feat/css-cleanup #2

Merged
millironx merged 41 commits from feat/css-cleanup into master 2024-12-02 02:51:14 +00:00
3 changed files with 130 additions and 127 deletions
Showing only changes of commit 7657de8277 - Show all commits

View file

@ -26,15 +26,6 @@
--font-family-slab-serif: Rockwell, "Rockwell Nova", "Roboto Slab", --font-family-slab-serif: Rockwell, "Rockwell Nova", "Roboto Slab",
"DejaVu Serif", "Sitka Small", serif; "DejaVu Serif", "Sitka Small", serif;
--font-family-system-ui: system-ui, sans-serif; --font-family-system-ui: system-ui, sans-serif;
/*
Breakpoint
*/
@property --responsive-breakpoint {
syntax: "<length>";
inherits: false;
initial-value: 768px;
}
} }
/* /*
@ -45,3 +36,61 @@ html {
background-color: light-dark(var(--brown-swiss-gray), var(--eclipse-gray)); background-color: light-dark(var(--brown-swiss-gray), var(--eclipse-gray));
font-family: var(--font-family-slab-serif); font-family: var(--font-family-slab-serif);
} }
header {
display: flex;
justify-content: space-evenly;
align-items: center;
}
nav {
display: flex;
flex-direction: row;
overflow: scroll;
padding-bottom: 1rem;
position: sticky;
top: 0;
}
/*
Container-type helper classes
*/
.row {
display: flex;
flex-direction: column;
width: 100%;
}
/*
Desktop screen size adjustments
*/
@media (min-width: 768px) {
/*
Default element styles
*/
nav {
flex-direction: column;
padding-right: 1rem;
padding-bottom: 0;
/*
Workaround for Chrome always showing scrollbar even when scrolling not needed
*/
-ms-overflow-style: none;
scrollbar-width: none;
}
/*
Continued Chrome workaround
*/
nav::-webkit-scrollbar {
display: none;
}
/*
Container-type helper classes
*/
.row {
flex-direction: row;
}
} /* end @media */

View file

@ -17,85 +17,72 @@
<body> <body>
<div class="container-fluid"> <header>
<div class="row wrapper min-vh-100 flex-column flex-sm-row"> <object data="{{ $millironx.RelPermalink }}">
{{ partial "sidebar" . }} <img src="{{ $millironx.RelPermalink }}" alt="Milliron X" />
<main class="col bg-faded py-3 gx-0"> </object>
<div class="container"> <h1 class="font-small-caps">Milliron X</h1>
<header class="d-none d-sm-none d-md-block text-center"> </header>
<h1 class="font-serif font-small-caps"> <div class="row">
<object data="{{ $millironx.RelPermalink }}"> {{ partial "sidebar" . }}
<img src="{{ $millironx.RelPermalink }}" alt="Milliron X" /> <main>
</object> {{ block "main" . }}
&emsp; Milliron X {{ .Content }}
</h1> {{ end }}
</header> </main>
</div>
{{ block "main" . }}
<section class="container-fluid list-main">
<div class="container px-5">
{{ .Content }}
</div>
</section>
{{ end }}
<footer class="fixed-bottom">
<div class="container-fluid footer-contents">
<div class="row justify-content-between">
<div class="col-3 align-self-center">
{{ $brandedbull := resources.Get "graphics/brandedbull.svg" }}
{{ $brandedbullsmall := $brandedbull | resources.Minify }}
<img
src="{{ $brandedbullsmall.RelPermalink }}"
height="95rem"
/>
</div>
<div class="col-3 align-self-center">
<div
class="btn-group float-end"
role="group"
aria-label="Other Milliron X sites"
>
<a
class="btn btn-outline-primary btn-sm"
href="https://video.millironx.com/"
data-bs-toggle="tooltip"
title="Video (Peertube)"
>
<i class="fax fa-peertube fa-fw"></i>
</a>
<a
class="btn btn-outline-primary btn-sm"
href="https://code.millironx.com/"
data-bs-toggle="tooltip"
title="Code (Gitea)"
>
<i class="fax fa-gitea fa-fw"></i>
</a>
<a
class="btn btn-outline-primary btn-sm"
href="https://nextcloud.millironx.com/"
data-bs-toggle="tooltip"
title="Files (Nextcloud)"
>
<i class="fax fa-nextcloud fa-fw"></i>
</a>
<button
type="button"
class="btn btn-outline-primary btn-sm"
data-bs-toggle="modal"
data-bs-target="#extras-modal"
title="Extras"
>
<i class="fad fa-cowbell fa-fw"></i>
</button>
</div>
</div>
</div>
</div>
</footer>
</main>
</div>
</div> </div>
<footer class="fixed-bottom">
<div class="container-fluid footer-contents">
<div class="row justify-content-between">
<div class="col-3 align-self-center">
{{ $brandedbull := resources.Get "graphics/brandedbull.svg" }}
{{ $brandedbullsmall := $brandedbull | resources.Minify }}
<img src="{{ $brandedbullsmall.RelPermalink }}" height="95rem" />
</div>
<div class="col-3 align-self-center">
<div
class="btn-group float-end"
role="group"
aria-label="Other Milliron X sites"
>
<a
class="btn btn-outline-primary btn-sm"
href="https://video.millironx.com/"
data-bs-toggle="tooltip"
title="Video (Peertube)"
>
<i class="fax fa-peertube fa-fw"></i>
</a>
<a
class="btn btn-outline-primary btn-sm"
href="https://code.millironx.com/"
data-bs-toggle="tooltip"
title="Code (Gitea)"
>
<i class="fax fa-gitea fa-fw"></i>
</a>
<a
class="btn btn-outline-primary btn-sm"
href="https://nextcloud.millironx.com/"
data-bs-toggle="tooltip"
title="Files (Nextcloud)"
>
<i class="fax fa-nextcloud fa-fw"></i>
</a>
<button
type="button"
class="btn btn-outline-primary btn-sm"
data-bs-toggle="modal"
data-bs-target="#extras-modal"
title="Extras"
>
<i class="fad fa-cowbell fa-fw"></i>
</button>
</div>
</div>
</div>
</div>
</footer>
<!-- Font Awesome --> <!-- Font Awesome -->
{{ $fontawesome := resources.Get "scripts/fa-icons.js" | js.Build "js/fontawesome.js" | minify }} {{ $fontawesome := resources.Get "scripts/fa-icons.js" | js.Build "js/fontawesome.js" | minify }}

View file

@ -1,48 +1,15 @@
{{ $millironx := resources.Get "graphics/millironx.svg" }} {{ $millironx := resources.Get "graphics/millironx.svg" }}
{{ $currentPage := . }} {{ $currentPage := . }}
<aside class="col-12 col-md-3 p-0 bg-dark flex-shrink-1"> <aside class="col-12 col-md-3 p-0 bg-dark flex-shrink-1">
<nav <nav>
class="navbar navbar-expand-md navbar-dark bg-dark align-items-start flex-md-column flex-row" {{ range .Site.Menus.main }}
>
<div class="container-fluid">
<a class="navbar-brand d-block d-md-none" href="#">
<object
class="d-inline-block align-text-top"
width="80"
height="24"
style="filter: invert(100%)"
data="{{ $millironx.RelPermalink }}"
>
<img src="{{ $millironx.RelPermalink }}" alt="Milliron X" />
</object>
&ensp;
<span class="font-small-caps font-serif">Milliron X</span>
</a>
<a <a
href class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}"
class="navbar-toggler" href="{{ .URL }}"
data-bs-toggle="collapse"
data-bs-target=".sidebar"
> >
<span class="navbar-toggler-icon"></span> <i class="{{ .Params.prefix }} {{ .Params.icon }} fa-fw"></i>
{{ .Name }}
</a> </a>
<div class="collapse navbar-collapse sidebar"> {{ end }}
<ul class="flex-column navbar-nav w-100 justify-content-between">
{{ range .Site.Menus.main }}
<li class="nav-item">
<a
class="nav-link pl-0 {{ if $currentPage.IsMenuCurrent "main" . }}
active
{{ end }}"
href="{{ .URL }}"
>
<i class="{{ .Params.prefix }} {{ .Params.icon }} fa-fw"></i>
{{ .Name }}
</a>
</li>
{{ end }}
</ul>
</div>
</div>
</nav> </nav>
</aside> </aside>