added overrides to the theme
This commit is contained in:
585
assets/css/main.css
Normal file
585
assets/css/main.css
Normal file
@@ -0,0 +1,585 @@
|
||||
:root {
|
||||
/* Typography */
|
||||
--spacing-base: 1.5em;
|
||||
--font-family-mono: monospace;
|
||||
--font-size-base: 1.125em;
|
||||
--font-size-small: 1em;
|
||||
--font-size-code: 1.0625em;
|
||||
|
||||
/* Spacing */
|
||||
--spacing-xs: calc(var(--spacing-base) * 0.25);
|
||||
--spacing-sm: calc(var(--spacing-base) * 0.5);
|
||||
--spacing-md: var(--spacing-base);
|
||||
--spacing-lg: calc(var(--spacing-base) * 2);
|
||||
|
||||
/* Colors - Light Theme */
|
||||
--color-bg-primary: hsl(0, 0%, 99%);
|
||||
--color-bg-secondary: hsl(0, 0%, 97.3%);
|
||||
--color-border: hsl(0, 0%, 93%);
|
||||
--color-text-primary: hsl(0, 0%, 9%);
|
||||
--color-text-muted: hsl(0, 0%, 43.5%);
|
||||
--color-text-code: hsl(0, 0%, 20%);
|
||||
--color-selection-bg: hsl(0, 0%, 85.8%);
|
||||
|
||||
/* Layout */
|
||||
--container-width: 80ch;
|
||||
--pre-border-radius: 0.75rem;
|
||||
--inline-border-radius: 0.375rem;
|
||||
--gap-base: 1em;
|
||||
--gap-small: 0.5em;
|
||||
|
||||
/* Breakpoints */
|
||||
--breakpoint-mobile: 600px;
|
||||
}
|
||||
|
||||
/* Dark Theme */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
/* Colors - Dark Theme */
|
||||
--color-bg-primary: hsl(0, 0%, 8%);
|
||||
--color-bg-secondary: hsl(0, 0%, 12%);
|
||||
--color-border: hsl(0, 0%, 20%);
|
||||
--color-text-primary: hsl(0, 0%, 92%);
|
||||
--color-text-muted: hsl(0, 0%, 65%);
|
||||
--color-text-code: hsl(0, 0%, 85%);
|
||||
--color-selection-bg: hsl(0, 0%, 25%);
|
||||
}
|
||||
|
||||
/* Dark theme specific adjustments */
|
||||
pre {
|
||||
background: hsl(0, 0%, 15%);
|
||||
}
|
||||
|
||||
body {
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5 {
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.path-nav li.current a {
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.path-nav li {
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
.back-link:hover {
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
}
|
||||
|
||||
/* Common component styles */
|
||||
.no-scrollbar {
|
||||
scrollbar-width: none; /* Firefox */
|
||||
-ms-overflow-style: none; /* IE and Edge */
|
||||
}
|
||||
|
||||
.no-scrollbar::-webkit-scrollbar {
|
||||
display: none; /* Chrome, Safari, Opera */
|
||||
}
|
||||
|
||||
.list-unstyled {
|
||||
list-style: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.text-muted {
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
.no-underline {
|
||||
text-decoration: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
::selection {
|
||||
background: var(--color-selection-bg);
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font: inherit;
|
||||
color: inherit;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style-type: disc;
|
||||
margin-left: 1.5rem;
|
||||
}
|
||||
|
||||
ol {
|
||||
list-style-type: decimal;
|
||||
margin-left: 1.5rem;
|
||||
}
|
||||
|
||||
html {
|
||||
margin: 0 0 0 calc(100vw - 100%);
|
||||
-webkit-text-size-adjust: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
font: var(--font-size-base) / var(--spacing-base) var(--font-family-mono);
|
||||
background: var(--color-bg-primary);
|
||||
min-height: 100%;
|
||||
display: grid;
|
||||
grid-template-rows: auto 1fr auto;
|
||||
grid-template-columns: minmax(auto, var(--container-width));
|
||||
justify-content: center;
|
||||
padding: var(--spacing-lg);
|
||||
gap: var(--spacing-lg);
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
a {
|
||||
display: inline-block;
|
||||
margin-left: -0.16666em;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px dotted;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
border-bottom: 1px solid;
|
||||
}
|
||||
|
||||
p,
|
||||
pre {
|
||||
margin: var(--spacing-base) 0;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5 {
|
||||
margin: var(--spacing-base) 0;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h2 {
|
||||
counter-increment: h2;
|
||||
counter-reset: h3;
|
||||
}
|
||||
|
||||
h3 {
|
||||
counter-increment: h3;
|
||||
counter-reset: h4;
|
||||
}
|
||||
|
||||
h4 {
|
||||
counter-increment: h4;
|
||||
counter-reset: h5;
|
||||
}
|
||||
|
||||
h5 {
|
||||
counter-increment: h5;
|
||||
}
|
||||
|
||||
/* nested counters */
|
||||
h2::before {
|
||||
content: counter(h2) ". ";
|
||||
}
|
||||
|
||||
h3::before {
|
||||
content: counter(h2) "." counter(h3) ". ";
|
||||
}
|
||||
|
||||
h4::before {
|
||||
content: counter(h2) "." counter(h3) "." counter(h4) ". ";
|
||||
}
|
||||
|
||||
h5::before {
|
||||
content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) ". ";
|
||||
}
|
||||
|
||||
time {
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
footer {
|
||||
padding: calc(var(--spacing-base) * 2) 0;
|
||||
text-align: center;
|
||||
}
|
||||
footer p {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
pre {
|
||||
/* background: var(--color-bg-secondary); */
|
||||
border: 1px solid var(--color-border);
|
||||
padding: var(--spacing-sm) var(--spacing-md);
|
||||
border-radius: var(--pre-border-radius);
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
font-family: var(--font-family-mono);
|
||||
font-size: var(--font-size-code);
|
||||
line-height: 1.6;
|
||||
color: var(--color-text-code);
|
||||
overflow-x: auto;
|
||||
box-shadow: 0 1px 2px 0 var(--color-border);
|
||||
}
|
||||
|
||||
pre code {
|
||||
background: none;
|
||||
border: none;
|
||||
padding: 0;
|
||||
font-size: inherit;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
p > code,
|
||||
li > code,
|
||||
h1 > code,
|
||||
h2 > code,
|
||||
h3 > code,
|
||||
h4 > code,
|
||||
h5 > code {
|
||||
background: var(--color-bg-secondary);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--inline-border-radius);
|
||||
padding: 0.2em 0.4em;
|
||||
font-family: var(--font-family-mono);
|
||||
font-size: var(--font-size-code);
|
||||
color: var(--color-text-code);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.terms-list {
|
||||
padding-bottom: var(--spacing-base);
|
||||
}
|
||||
|
||||
.terms-list ul {
|
||||
list-style-type: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.terms-list ul li {
|
||||
display: inline-block;
|
||||
font-style: italic;
|
||||
font-size: var(--font-size-small);
|
||||
color: var(--color-text-muted);
|
||||
padding: 0 3px;
|
||||
}
|
||||
|
||||
/* Path navigation styles */
|
||||
.path-nav {
|
||||
font-family: var(--font-family-mono);
|
||||
padding: var(--spacing-base) 0;
|
||||
white-space: nowrap;
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
scrollbar-width: none; /* Firefox */
|
||||
-ms-overflow-style: none; /* IE and Edge */
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.path-nav::-webkit-scrollbar {
|
||||
display: none; /* Chrome, Safari, Opera */
|
||||
}
|
||||
|
||||
.path-nav ol {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.path-nav li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: var(--color-text-muted);
|
||||
flex-shrink: 0;
|
||||
max-width: 200px; /* Limit maximum width on small screens */
|
||||
}
|
||||
|
||||
.path-nav li.current {
|
||||
max-width: none; /* Allow full width for current page */
|
||||
}
|
||||
|
||||
.path-nav li a {
|
||||
text-decoration: none;
|
||||
border-bottom: none;
|
||||
padding: 0 0.25em;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.path-nav li.current a {
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.path-nav a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.back-nav {
|
||||
margin-bottom: var(--spacing-base);
|
||||
}
|
||||
|
||||
.back-link {
|
||||
color: var(--color-text-muted);
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.back-link:hover {
|
||||
color: var(--color-text-primary);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Time list */
|
||||
.time-list ul {
|
||||
list-style: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.time-list li {
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr;
|
||||
gap: var(--gap-base);
|
||||
align-items: start;
|
||||
padding: var(--spacing-sm) 0;
|
||||
}
|
||||
|
||||
@media (max-width: var(--breakpoint-mobile)) {
|
||||
.time-list li {
|
||||
grid-template-columns: 1fr;
|
||||
gap: var(--gap-small);
|
||||
}
|
||||
|
||||
.time-list time {
|
||||
font-size: var(--font-size-small);
|
||||
}
|
||||
}
|
||||
|
||||
/* Main menu navigation styles */
|
||||
.terminal-nav {
|
||||
font-family: var(--font-family-mono);
|
||||
border-top: 1px solid var(--color-border);
|
||||
padding-top: var(--spacing-base);
|
||||
}
|
||||
|
||||
.terminal-nav nav ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
display: flex;
|
||||
gap: 1em;
|
||||
}
|
||||
|
||||
.terminal-nav nav ul li {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.terminal-nav nav ul li a,
|
||||
.terminal-nav .back-link {
|
||||
color: var(--color-text-muted);
|
||||
border-bottom: none;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.terminal-nav nav ul li a:hover,
|
||||
.terminal-nav .back-link:hover {
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.terminal-nav nav ul li a.active {
|
||||
color: var(--color-text-primary);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.terminal-nav .back-nav {
|
||||
margin: calc(var(--spacing-base) * 0.5) 0;
|
||||
}
|
||||
|
||||
/* Image styles */
|
||||
img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
margin: var(--spacing-base) auto;
|
||||
border-radius: var(--pre-border-radius);
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: var(--spacing-base) 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
figure img {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
figcaption {
|
||||
color: var(--color-text-muted);
|
||||
font-size: var(--font-size-small);
|
||||
margin-top: calc(var(--spacing-base) / 2);
|
||||
}
|
||||
|
||||
/* Table styles */
|
||||
table {
|
||||
width: 100%;
|
||||
margin: var(--spacing-base) 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
thead th,
|
||||
th {
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
border-bottom: 2px solid var(--color-border);
|
||||
padding: var(--spacing-sm);
|
||||
}
|
||||
|
||||
td {
|
||||
padding: var(--spacing-sm);
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
/* Typography emphasis */
|
||||
strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
em {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* Blockquote styles */
|
||||
blockquote {
|
||||
margin: var(--spacing-base) 0;
|
||||
padding: var(--spacing-sm) var(--spacing-base);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--pre-border-radius);
|
||||
background: var(--color-bg-secondary);
|
||||
box-shadow: 0 1px 2px 0 var(--color-border);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
blockquote > :first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
blockquote > :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* Table of Contents */
|
||||
.toc {
|
||||
margin: var(--spacing-base) 0;
|
||||
padding: var(--spacing-sm);
|
||||
border: 1px solid var(--color-border);
|
||||
background: var(--color-bg-secondary);
|
||||
border-radius: var(--pre-border-radius);
|
||||
box-shadow: 0 1px 2px 0 var(--color-border);
|
||||
}
|
||||
|
||||
.toc .toc-content a {
|
||||
text-decoration: none;
|
||||
color: var(--color-text-primary);
|
||||
font-size: var(--font-size-small)
|
||||
}
|
||||
|
||||
.toc .toc-content ol li {
|
||||
list-style-type: disc !important;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.path-nav li {
|
||||
max-width: 100px; /* More aggressive truncation on mobile */
|
||||
}
|
||||
|
||||
.path-nav li:first-child {
|
||||
max-width: none; /* Don't truncate site title */
|
||||
}
|
||||
|
||||
.path-nav li.current {
|
||||
max-width: 150px; /* Allow slightly more width for current page on mobile */
|
||||
}
|
||||
}
|
||||
|
||||
/* Post list styles */
|
||||
.post-preview h3::before {
|
||||
content: none;
|
||||
}
|
||||
|
||||
/* Post meta styles */
|
||||
.post-meta {
|
||||
margin: calc(var(--spacing-base) * 0.5) 0 var(--spacing-base) 0;
|
||||
font-size: var(--font-size-small);
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
/* Post navigation styles */
|
||||
.post-nav {
|
||||
margin: calc(var(--spacing-base) * 2) 0;
|
||||
padding: var(--spacing-base) 0;
|
||||
border-top: 1px solid var(--color-border);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: var(--spacing-base);
|
||||
}
|
||||
|
||||
.post-nav-prev {
|
||||
flex: 1;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.post-nav-next {
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.post-nav a {
|
||||
color: var(--color-text-muted);
|
||||
font-size: var(--font-size-small);
|
||||
border-bottom: none;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.post-nav a:hover {
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
/* Banner styles */
|
||||
.banner {
|
||||
margin: 0 0 calc(var(--spacing-base) * 2) 0;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.banner-image {
|
||||
width: min(95ch, 100vw - 4em);
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
border-radius: var(--pre-border-radius);
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
@media (max-width: var(--breakpoint-mobile)) {
|
||||
.banner-image {
|
||||
width: min(75ch, 100vw - 2em);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-device-width: 600px) {
|
||||
body {
|
||||
padding-top: 2em;
|
||||
}
|
||||
|
||||
pre {
|
||||
max-width: calc(100vw - 4em);
|
||||
}
|
||||
}
|
||||
36
layouts/_default/single.html
Normal file
36
layouts/_default/single.html
Normal file
@@ -0,0 +1,36 @@
|
||||
{{ define "main" }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
|
||||
<div class="post-meta">
|
||||
{{ partial "date.html" .Date }} • {{ .WordCount }} words • {{ .ReadingTime }} min read
|
||||
</div>
|
||||
|
||||
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
|
||||
|
||||
{{/* Table of Contents */}}
|
||||
{{ $hasToC := .Params.toc | default true }}
|
||||
{{ $headers := findRE "<h[2-6]" .Content }}
|
||||
{{ if and $hasToC (ge (len $headers) 1) }}
|
||||
<nav class="toc">
|
||||
<strong>Table of contents</strong>
|
||||
<div class="toc-content">
|
||||
{{ .TableOfContents }}
|
||||
</div>
|
||||
</nav>
|
||||
{{ end }}
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
<div class="post-nav">
|
||||
{{ with .PrevInSection }}
|
||||
<div class="post-nav-prev">
|
||||
<a href="{{ .RelPermalink }}" rel="prev">← {{ .Title }}</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ with .NextInSection }}
|
||||
<div class="post-nav-next">
|
||||
<a href="{{ .RelPermalink }}" rel="next">{{ .Title }} →</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
16
layouts/_partials/head/js.html
Normal file
16
layouts/_partials/head/js.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{{- with resources.Get "js/main.js" }}
|
||||
{{- $opts := dict
|
||||
"minify" (not hugo.IsDevelopment)
|
||||
"sourceMap" (cond hugo.IsDevelopment "external" "")
|
||||
"targetPath" "js/main.js"
|
||||
}}
|
||||
{{- with . | js.Build $opts }}
|
||||
{{- if hugo.IsDevelopment }}
|
||||
<script src="{{ .RelPermalink }}"></script>
|
||||
{{- else }}
|
||||
{{- with . | fingerprint }}
|
||||
<script src="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
24
layouts/index.html
Normal file
24
layouts/index.html
Normal file
@@ -0,0 +1,24 @@
|
||||
{{ define "main" }}
|
||||
<div class="banner">
|
||||
<img src="/images/avatar.png" alt="Assilvestrar Banner" class="banner-image">
|
||||
</div>
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
<div class="post-list">
|
||||
{{ range (where .Site.RegularPages "Section" "posts") }}
|
||||
<article class="post-preview">
|
||||
<h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
|
||||
<div class="post-meta">
|
||||
<span>{{ partial "date" .Date }}</span>
|
||||
</div>
|
||||
<div class="post-summary">
|
||||
{{ .Summary | plainify }}
|
||||
</div>
|
||||
<div class="read-more">
|
||||
<a href="{{ .RelPermalink }}">Read more →</a>
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
24
layouts/partials/header.html
Normal file
24
layouts/partials/header.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<header>
|
||||
<nav class="path-nav">
|
||||
<ol>
|
||||
{{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<div class="terminal-nav">
|
||||
{{ partial "menu.html" (dict "menuID" "main" "page" .) }}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{ define "breadcrumbnav" }}
|
||||
{{ if .p1.Parent }}
|
||||
{{ template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2 ) }}
|
||||
{{ else if not .p1.IsHome }}
|
||||
{{ template "breadcrumbnav" (dict "p1" .p1.Site.Home "p2" .p2 ) }}
|
||||
{{ end }}
|
||||
<li{{ if eq .p1 .p2 }} class="current"{{ end }}>
|
||||
{{ if .p1.IsHome }}/{{ end }}
|
||||
<a href="{{ .p1.RelPermalink }}">{{ if .p1.IsHome }}{{ .p1.Site.Title }}{{ else }}{{ .p1.Title }}{{ end }}</a>
|
||||
{{ if ne .p1 .p2 }}/{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
BIN
static/favicon.ico
Normal file
BIN
static/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
Reference in New Issue
Block a user