Skip to content

Commit

Permalink
Fix other buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
pufmat authored and modmuss50 committed Oct 2, 2023
1 parent 2e12229 commit 83b2c62
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 28 deletions.
9 changes: 7 additions & 2 deletions _sass/fabric.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
button, .button {
&.primary {
background-color: $button-color;
border-radius: 5px;
border: none;

&:hover, &:focus {
background-color: darken($button-color, 10%);
Expand All @@ -73,7 +73,6 @@ button, .button {
&.secondary {
background-color: transparent;
border: 2px solid $button-color;
border-radius: 7px;

&:hover, &:focus {
background-color: darken($button-color, 10%);
Expand All @@ -85,6 +84,7 @@ button, .button {
}
}

border-radius: 5px;
color: $text-color !important;
text-decoration: none !important;
padding: 5px 8px;
Expand All @@ -93,6 +93,11 @@ button, .button {
box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;
}

button {
font-size: inherit;
line-height: inherit;
}

.download {
text-align: center;
}
Expand Down
22 changes: 14 additions & 8 deletions scripts/src/lib/Installer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,26 @@
</p>

{#if win32}
<a class="button" href={selectedVersion.replace('.jar', '.exe')}>
<DownloadIcon/> Download for Windows
</a>
<p>
<a href={selectedVersion}>
<a class="button primary" href={selectedVersion.replace('.jar', '.exe')}>
<DownloadIcon/> Download for Windows
</a>
<br>
or
<br>
<a class="button secondary" href={selectedVersion}>
Download universal jar
</a>
</p>
{:else}
<a class="button" href={selectedVersion}>
<DownloadIcon/> Download installer (Universal/.JAR)
</a>
<p>
<a href={selectedVersion.replace('.jar', '.exe')}>
<a class="button primary" href={selectedVersion}>
<DownloadIcon/> Download installer (Universal/.JAR)
</a>
<br>
or
<br>
<a class="button secondary" href={selectedVersion.replace('.jar', '.exe')}>
Download for Windows
</a>
</p>
Expand Down
2 changes: 1 addition & 1 deletion scripts/src/lib/MCUpdater.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
<main>
<LegacyVersion bind:this={legacyVersion} />
<br />
<button on:click={copyImportEntry}>Copy MCUpdater Import entry</button>
<button class="primary" on:click={copyImportEntry}>Copy MCUpdater Import entry</button>
</main>
2 changes: 1 addition & 1 deletion scripts/src/lib/Server.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
</div>

<div class="download">
<a class="button" href={serverJarUrl}><DownloadIcon /> Executable Server (.jar)</a>
<a class="button primary" href={serverJarUrl}><DownloadIcon />Executable Server (.jar)</a>
</div>
<p>
<a href={installerJarUrl}>
Expand Down
2 changes: 1 addition & 1 deletion scripts/src/lib/Technic.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ import { getLauncherProfile } from "./Api";
<main>
<LegacyVersion bind:this={legacyVersion} />
<br />
<button on:click={downloadJson}>Download bin/version.json file</button>
<button class="primary" on:click={downloadJson}>Download bin/version.json file</button>
</main>
30 changes: 15 additions & 15 deletions scripts/src/lib/Template.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@
{:else}
<p>Choose a name for your new mod. The mod ID will be <code>{modid}</code>. <a href={""} on:click|preventDefault={useCustomModId}>Use custom id</a></p>
{/if}

<input id="project-name" bind:value={projectName} on:keyup={doFormatProjectName} />
{#if modIdErrors != undefined}

{#if modIdErrors != undefined}
{#each modIdErrors as error}
<li style="color: red">{error}</li>
{/each}
Expand All @@ -124,7 +124,7 @@
<h3>Mod ID:</h3>
<hr />
<p>Enter the modid you wish to use for your mod. <a href={""} on:click|preventDefault={useDefaultModId}>Use default</a></p>
{#if customIdErrors != undefined}
{#if customIdErrors != undefined}
{#each customIdErrors as error}
<li style="color: red">{error}</li>
{/each}
Expand Down Expand Up @@ -208,12 +208,12 @@
<br>

{#if loading}
<a class="button download-button" href={""}>
<a class="button primary download-button" href={""}>
<DownloadIcon /> Generating...
</a>
{:else}
<a
class="button download-button"
class="button primary download-button"
href={""}
on:click|preventDefault={generate}
>
Expand Down Expand Up @@ -246,24 +246,24 @@
.option {
&-container {
display: flex;
align-items: center;
display: flex;
align-items: center;
}
&-input {
width: 1rem;
height: 1rem;
width: 1rem;
height: 1rem;
}
&-label {
margin-left: 0.5rem;
margin-left: 0.5rem;
}
&-body {
display: block;
padding-left: 1rem;
margin-top: 0.25rem;
margin-left: 1rem;
display: block;
padding-left: 1rem;
margin-top: 0.25rem;
margin-left: 1rem;
}
}
</style>

0 comments on commit 83b2c62

Please sign in to comment.