Skip to content

Commit

Permalink
Some style changes and fixes (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
UltimatChamp authored May 17, 2024
1 parent ea73744 commit e37612f
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 18 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
public/
.hugo_build.lock
hugo.exe
.idea
*.sublime-project
*.sublime-workspace
.vscode/*
11 changes: 7 additions & 4 deletions assets/js/neoforge.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,21 @@ async function loadLatestVersions(minecraftVersions) {
let dropDown_VAL;
let badges_beta;
let badges_new;
let badges_legacy;
if (mcVersion.startsWith("1.20.1")) {
gav = LEGACY_GAV;
fn = "forge";
mcvers = "1.20.1";
badges_new = "";
badges_legacy = `<font class="badges badges_legacy">LEGACY</font>`;
badges_beta = "";
dropDown_VAL = "";
} else {
gav = FORGE_GAV;
fn = "neoforge";
badges_beta = "";
badges_new = `<font class="badges_new">NEW</font>`;
badges_new = `<font class="badges badges_new">NEW</font>`;
badges_legacy = "";
dropDown_VAL = ` open="open"`;
}

Expand Down Expand Up @@ -54,7 +57,7 @@ async function loadLatestVersions(minecraftVersions) {
mcvers = "1." + Array.from(version)[0] + Array.from(version)[1] + Array.from(version)[2] + Array.from(version)[3];
}
if (version.includes("beta")) {
badges_beta = `<font class="badges_beta">BETA</font>`;
badges_beta = `<font class="badges badges_beta">BETA</font>`;
}

const vs = `#filelist${mcVersion}`.split('.').join("");
Expand All @@ -63,10 +66,10 @@ async function loadLatestVersions(minecraftVersions) {

document.querySelector(vs).innerHTML = `
<details${dropDown_VAL}>
<summary class="fileinfo__header">${badges_beta} ${badges_new} NeoForge ${version} for Minecraft ${mcvers}</summary>
<summary class="fileinfo__header">${badges_beta} ${badges_new} ${badges_legacy} NeoForge <code>${version}</code> for Minecraft ${mcvers}</summary>
<div class="fileinfo__body">
<a href="${installerUrl}"><span class="fileinfo__icon"><i class="bi-file-earmark-zip-fill" style="font-size: 2rem;"></i></span>
<span class="fileinfo__content"><span>Latest <em>NeoForge</em> Installer</span><span>${fn}-${version}-installer.jar</span></span></a>
<span class="fileinfo__content"><span>Latest <em>NeoForge</em> Installer</span><span class="installer-version">${fn}-${version}-installer.jar</span></span></a>
<a href="${changelogUrl}"><span class="fileinfo__icon"><i class="bi-file-earmark-text-fill" style="font-size: 2rem;"></i></span>
<span class="fileinfo__content"><span>Latest Changelog</span><span>${version}</span></span></a>
</div>
Expand Down
2 changes: 2 additions & 0 deletions hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ theme = ["hugo-notice", "mainroad"]
[[Params.widgets.social.custom]]
title = "Team member application form"
url = "https://links.neoforged.net/apply"
icon = "svg/team.svg"

[[Params.widgets.social.custom]]
title = "Discord ban appeal form"
url = "https://links.neoforged.net/appeal"
icon = "svg/email.svg"
2 changes: 1 addition & 1 deletion layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</div>
{{- end }}
<div class="news">
<h1 class="newsbanner">Latest News from The NeoForged Project</h1>
<h1 class="newsbanner">News from The NeoForged Project</h1>
{{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
{{- range $paginator.Pages }}
{{- .Render "summary" }}
Expand Down
31 changes: 20 additions & 11 deletions themes/mainroad/assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@
*::before,
*::after {
box-sizing: border-box;
}

html, body, .container--outer {
height: 100%;
transition: all 0.5s;
}

article,
Expand Down Expand Up @@ -1073,7 +1070,11 @@ details[open] summary {
cursor: grab;
}

summary:hover {
summary code:hover {
filter: brightness(.85);
}

.badges:hover {
filter: brightness(.85);
}

Expand Down Expand Up @@ -1134,12 +1135,12 @@ summary:hover {
visibility: hidden;
}

/* Installer Badges */
.badges_beta {
padding: 0 5px;
.installer-version {
font-family: monospace;
}

.badges_new {
/* Installer Badges */
.badges_beta, .badges_new, .badges_legacy {
padding: 0 5px;
}

Expand Down Expand Up @@ -1192,10 +1193,10 @@ summary:hover {
align-items: center;
text-align: center;
justify-content: center;
border-radius: 25%;
}

.footer_modetoggle-button {
border-radius: 50%;
border-collapse: separate;
height: 28px;
width: 28px;
Expand Down Expand Up @@ -1350,6 +1351,10 @@ summary:hover {
--color-background: #d5e0df;
--color-badges-beta: #d7742f;
--color-badges-new: #e57;
--color-badges-legacy: #13cace;
--color-border-badges-beta: #dd9460;
--color-border-badges-new: #e2899c;
--color-border-badges-legacy: #53d8da;
--color-download: #e68c37;
--color-download-highlight: #e5b04c;
--color-box: #bdc7c7;
Expand All @@ -1360,7 +1365,7 @@ summary:hover {
--color-code: #b12a48;
--color-code-background: #bdc7c7;
--color-code-notice: #e57;
--color-code-notice-background: #bdc7c7;
--color-code-notice-background: #ffffff85;
--color-code-block-background: #2e3135;
--color-footer-text: #aab0b3;
--color-footer-link-text: #bdc7c7;
Expand All @@ -1375,6 +1380,10 @@ summary:hover {
--color-highlight: #d7742f;
--color-badges-beta: #d7742f;
--color-badges-new: #e57;
--color-badges-legacy: #079b9e;
--color-border-badges-beta: #875938;
--color-border-badges-new: #8b5460;
--color-border-badges-legacy: #227778;
--color-background: #222427;
--color-download: #d7742f;
--color-download-highlight: #e68c37;
Expand Down
1 change: 0 additions & 1 deletion themes/mainroad/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
{{- if hasPrefix .Site.GoogleAnalytics "G-" }}
{{ template "_internal/google_analytics.html" . }}
{{- else }}
{{ template "_internal/google_analytics_async.html" . }}
{{- end }}
{{- end }}
<script src="{{ "js/modetoggle.js" | relURL }}"></script>
Expand Down
7 changes: 7 additions & 0 deletions themes/mainroad/layouts/partials/colors.css
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,17 @@ details:hover {
/* Installer Badges */
.badges_beta {
background-color: var(--color-badges-beta);
border: 2px solid var(--color-border-badges-beta);
}

.badges_new {
background-color: var(--color-badges-new);
border: 2px solid var(--color-border-badges-new);
}

.badges_legacy {
background-color: var(--color-badges-legacy);
border: 2px solid var(--color-border-badges-legacy);
}

/* News Section */
Expand Down
1 change: 1 addition & 0 deletions themes/mainroad/layouts/partials/svg/team.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion themes/mainroad/theme.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Mainroad is a responsive, clean and content-focused Hugo theme."
homepage = "https://github.com/vimux/mainroad/"
demosite = "https://mainroad-demo.netlify.app/"
tags = ["blog", "responsive", "light", "multilingual", "customizable", "widgets", "wordpress"]
features = ["blog", "responsive", "multilingual", "widgets", "rss", "disqus", "google analytics", "wordpress"]
features = ["blog", "responsive", "multilingual", "widgets", "rss", "disqus", "wordpress"]
min_version = "0.48"

[author]
Expand Down

0 comments on commit e37612f

Please sign in to comment.