Skip to content

Commit 3076caf

Browse files
committed
Experiment with tag and term and taxanomy not impplemented yet
1 parent 026a8d4 commit 3076caf

File tree

6 files changed

+153
-7
lines changed

6 files changed

+153
-7
lines changed

assets/css/home.css

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
body {
2+
background-color: #e5e9f4;
3+
padding: 2rem;
4+
overflow-x: hidden;
5+
font-family: Inter, system-ui, -apple-system, sans-serif
6+
}
7+
8+
.page-header {
9+
text-align: center;
10+
margin-bottom: 3rem
11+
}
12+
13+
.page-header img {
14+
margin-bottom: .75rem
15+
}
16+
17+
.page-header h3,
18+
.page-header h4 {
19+
margin: 0;
20+
font-family: Inter, sans-serif
21+
}
22+
23+
.page-header h3 {
24+
font-size: 2rem;
25+
font-weight: 500;
26+
color: #363a49
27+
}
28+
29+
.page-header h4 {
30+
font-size: 1rem;
31+
font-weight: 400;
32+
color: #808697;
33+
margin-top: .25rem
34+
}
35+
36+
.category-section {
37+
width: min(75rem, 100%);
38+
margin-inline: auto;
39+
margin-bottom: 3rem
40+
}
41+
42+
.category-title {
43+
font-family: Inter, sans-serif;
44+
font-size: 1.1rem;
45+
font-weight: 600;
46+
color: #8e93a3;
47+
text-align: left;
48+
margin-bottom: 2rem;
49+
text-transform: uppercase;
50+
letter-spacing: 3px
51+
}
52+
53+
.button-grid {
54+
display: grid;
55+
grid-template-columns: repeat(auto-fit, minmax(7rem, 9rem));
56+
gap: 1.25rem
57+
}
58+
59+
a.neumorphic-button {
60+
display: flex;
61+
flex-direction: column;
62+
place-content: center;
63+
align-items: center;
64+
text-decoration: none;
65+
container-type: inline-size;
66+
aspect-ratio: 1/1;
67+
border: none;
68+
border-radius: .8rem;
69+
color: #616a83;
70+
background: #e5e9f4;
71+
--shadow-light: hsl(0 0% 100% / .6);
72+
--shadow-dark: hsl(225 15% 70% / .9);
73+
box-shadow: -.3rem -.3rem .6rem var(--shadow-light), .3rem .3rem .6rem var(--shadow-dark);
74+
transition: transform .2s, box-shadow .2s;
75+
outline: 0
76+
}
77+
78+
a.neumorphic-button:focus-visible,
79+
a.neumorphic-button:hover {
80+
color: #427cef;
81+
transform: translateY(-4px);
82+
box-shadow: -.4rem -.4rem .8rem var(--shadow-light), .4rem .4rem .8rem var(--shadow-dark), inset 0 0 0 transparent, inset 0 0 0 transparent
83+
}
84+
85+
a.neumorphic-button.active,
86+
a.neumorphic-button:active {
87+
color: #427cef;
88+
transform: translateY(0);
89+
box-shadow: inset .2rem .2rem .4rem var(--shadow-dark), inset -.2rem -.2rem .4rem var(--shadow-light)
90+
}
91+
92+
.button-icon {
93+
height: 30cqi;
94+
transition: height .2s
95+
}
96+
97+
a.neumorphic-button>span {
98+
font-family: 'JetBrains Mono', monospace;
99+
font-size: 15cqi;
100+
font-weight: 500;
101+
margin-top: .5rem;
102+
text-align: center;
103+
line-height: 1.2;
104+
transition: font-size .2s
105+
}
106+
107+
a.neumorphic-button.active>.button-icon,
108+
a.neumorphic-button:active>.button-icon {
109+
height: 27cqi
110+
}
111+
112+
a.neumorphic-button.active>span,
113+
a.neumorphic-button:active>span {
114+
font-size: 14cqi
115+
}
116+
117+
@media (max-width:650px) {
118+
.category-title {
119+
text-align: center
120+
}
121+
122+
.button-grid {
123+
justify-content: center
124+
}
125+
}

data/home.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
categories:
2-
# Category for all interactive games and fun projects
3-
4-
# Category for practical tools and utilities
5-
6-
# Category for art, design, and creative assets
72
- name: "Creative & Assets"
83
items:
94
- name: "Art"

layouts/_default/taxonomy.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{{ define "main" }}
2+
<main class="main-content">
3+
<header class="page-header">
4+
{{/* This shows the title, like "All Tags" */}}
5+
<h1>{{ .Title }}</h1>
6+
</header>
7+
8+
{{/* This creates a simple list */}}
9+
<ul>
10+
{{/* This loops through all the available tags or categories */}}
11+
{{ range .Data.Terms.ByCount }}
12+
<li>
13+
<a href="{{ .Page.Permalink }}">
14+
{{ .Page.Title }}
15+
{{/* This shows how many posts have that tag */}}
16+
<span>({{ .Count }})</span>
17+
</a>
18+
</li>
19+
{{ end }}
20+
</ul>
21+
</main>
22+
{{ end }}

layouts/_default/term.html

Whitespace-only changes.

layouts/index.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
<html lang="en">
33
<head>
44
{{ partial "header.html" . }}
5-
<link rel="stylesheet" href="css/home.css">
5+
{{ with resources.Get "css/home.css" }}
6+
{{ $minifiedCSS := . | resources.Minify }}
7+
<link rel="stylesheet" href="{{ $minifiedCSS.RelPermalink }}">
8+
{{ else }}
9+
{{ warnf "The CSS file 'css/home.css' was not found." }}
10+
{{ end }}
611
</head>
712
<body style="background-color: #e5e9f4;">
813

static/css/home.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)