Add isHomepage function, update Explore link to include icon, update styles
This commit is contained in:
parent
503467fbde
commit
a311a628d5
7 changed files with 44 additions and 24 deletions
|
@ -22,6 +22,6 @@
|
|||
"webpack": "^5.99.5",
|
||||
"webpack-cli": "^6.0.1"
|
||||
},
|
||||
"version": "1.0.0",
|
||||
"version": "1.1.0",
|
||||
"license": "GPL-3.0-or-later"
|
||||
}
|
||||
|
|
4
src/js/Functions/isHomepage.ts
Normal file
4
src/js/Functions/isHomepage.ts
Normal file
|
@ -0,0 +1,4 @@
|
|||
export default function isHomepage(): Boolean
|
||||
{
|
||||
return window.location.pathname === '/';
|
||||
}
|
|
@ -1 +1,7 @@
|
|||
console.log('Welcome to Loom Forge!');
|
||||
import isHomepage from './Functions/isHomepage';
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
if (isHomepage()) {
|
||||
// Open for changes
|
||||
}
|
||||
});
|
|
@ -1,4 +1,4 @@
|
|||
$spacingLevels: 8;
|
||||
$spacingLevels: 12;
|
||||
$fontSizeIncrement: 0.125rem;
|
||||
$fontSizeBase: 1rem;
|
||||
$fontLevels: 20;
|
|
@ -1,27 +1,27 @@
|
|||
@mixin marginClasses($i, $calc) {
|
||||
&-m {
|
||||
&-#{$i} {
|
||||
margin: $calc;
|
||||
margin: $calc !important;
|
||||
}
|
||||
&x-#{$i} {
|
||||
margin-left: $calc;
|
||||
margin-right: $calc;
|
||||
margin-left: $calc !important;
|
||||
margin-right: $calc !important;
|
||||
}
|
||||
&y-#{$i} {
|
||||
margin-top: $calc;
|
||||
margin-bottom: $calc;
|
||||
margin-top: $calc !important;
|
||||
margin-bottom: $calc !important;
|
||||
}
|
||||
&t-#{$i} {
|
||||
margin-top: $calc;
|
||||
margin-top: $calc !important;
|
||||
}
|
||||
&b-#{$i} {
|
||||
margin-bottom: $calc;
|
||||
margin-bottom: $calc !important;
|
||||
}
|
||||
&l-#{$i} {
|
||||
margin-left: $calc;
|
||||
margin-left: $calc !important;
|
||||
}
|
||||
&r-#{$i} {
|
||||
margin-right: $calc;
|
||||
margin-right: $calc !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -29,27 +29,27 @@
|
|||
@mixin paddingClasses($i, $calc) {
|
||||
&-p {
|
||||
&-#{$i} {
|
||||
padding: $calc;
|
||||
padding: $calc !important;
|
||||
}
|
||||
&x-#{$i} {
|
||||
padding-left: $calc;
|
||||
padding-right: $calc;
|
||||
padding-left: $calc !important;
|
||||
padding-right: $calc !important;
|
||||
}
|
||||
&y-#{$i} {
|
||||
padding-top: $calc;
|
||||
padding-bottom: $calc;
|
||||
padding-top: $calc !important;
|
||||
padding-bottom: $calc !important;
|
||||
}
|
||||
&t-#{$i} {
|
||||
padding-top: $calc;
|
||||
padding-top: $calc !important;
|
||||
}
|
||||
&b-#{$i} {
|
||||
padding-bottom: $calc;
|
||||
padding-bottom: $calc !important;
|
||||
}
|
||||
&l-#{$i} {
|
||||
padding-left: $calc;
|
||||
padding-left: $calc !important;
|
||||
}
|
||||
&r-#{$i} {
|
||||
padding-right: $calc;
|
||||
padding-right: $calc !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,9 +52,15 @@
|
|||
{{ctx.Locale.Tr "explore"}}
|
||||
</a>
|
||||
{{else if .IsLandingPageOrganizations}}
|
||||
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{ctx.Locale.Tr "explore"}}</a>
|
||||
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/organizations">
|
||||
<i class="fa-solid fa-binoculars" style="color: #777dff; margin-right: .5rem"></i>
|
||||
{{ctx.Locale.Tr "explore"}}
|
||||
</a>
|
||||
{{else}}
|
||||
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{ctx.Locale.Tr "explore"}}</a>
|
||||
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">
|
||||
<i class="fa-solid fa-binoculars" style="color: #777dff; margin-right: .5rem"></i>
|
||||
{{ctx.Locale.Tr "explore"}}
|
||||
</a>
|
||||
{{end}}
|
||||
|
||||
{{template "custom/extra_links" .}}
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
{{template "base/head" .}}
|
||||
<div role="main" aria-label="Welcome" class="page-content home">
|
||||
<div class="center">
|
||||
<div class="center loom-mt-10">
|
||||
<div>
|
||||
<h1 class="tw-font-bold loom-text-size-16l">
|
||||
Loom Forge
|
||||
</h1>
|
||||
<p class="loom-my-3 loom-px-4" style="max-width: 600px; margin: 0 auto;">
|
||||
Home to all the open-source software and packages maintained by <a href="/Danny">@Danny</a> and released under the
|
||||
<a href="/LoomLabs">@LoomLabs</a> handle.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue