Browse Source

Initial blog support.

pull/6/head
Coma Grayce 2 weeks ago
parent
commit
b1c3e43750
Signed by: Coma Grayce <commagray@sunbutt.faith> GPG Key ID: ADC223901D3524FE

+ 82
- 78
assets/main.scss View File

@@ -1,79 +1,83 @@
1
-@import "variables";
2
-@import "fonts";
3
-
4
-html {
5
-	font-size: 100%;
6
-}
7
-
8
-body {
9
-	display: grid;
10
-	// FIXME: this is some sort of magic, isn't it?
11
-	grid-template-columns: 
12
-		[viewport-start] minmax(1em, 1fr)
13
-		[container-start] minmax(0, 30em) [container-end]
14
-		minmax(1em, 1fr) [viewport-end];
15
-	font-size: $site-font;
16
-	font-family: $site-sans, sans-serif;
17
-	line-height: $site-linegap;
18
-	color: $color-text;
19
-	
20
-	a, a:visited {
21
-		text-decoration: underline;
22
-		color: $color-text;
23
-	}
24
-}
25
-
26
-#header {
27
-	grid-column: container;
28
-	font-size: $site-header;
29
-
30
-	a, a:visited {
31
-		text-decoration: none;
32
-	}
33
-}
34
-
35
-nav {
36
-	grid-column: container;
37
-	font-size: $site-nav;
38
-
39
-	ul {
40
-		list-style-type: none;
41
-		margin: 0;
42
-		padding: 0;
43
-	
44
-		li {
45
-			display: inline;
46
-		}
47
-	}
48
-
49
-}
50
-
51
-#content {
52
-	grid-column: container;
53
-
54
-	a, a:visited {
55
-		color: $color-link;
56
-	}
57
-	
58
-	img {
59
-		margin: auto;
60
-		display: block;
61
-		max-width: 100%;
62
-	}
63
-
64
-	ul, li {
65
-		// FIXME: dirty fix for word wrapping.
66
-		word-break: break-all;
67
-	}
68
-
69
-	pre, code {
70
-		background-color: #eee;
71
-		font-family: $site-mono, monospace;
72
-		overflow-y: auto;
73
-	}
74
-}
75
-
76
-footer {
77
-	grid-column: container;
78
-	font-size: $site-footer;
1
+@import "variables";
2
+@import "fonts";
3
+
4
+html {
5
+	font-size: 100%;
6
+}
7
+
8
+body {
9
+	display: grid;
10
+	// FIXME: this is some sort of magic, isn't it?
11
+	grid-template-columns: 
12
+		[viewport-start] minmax(1em, 1fr)
13
+		[container-start] minmax(0, 30em) [container-end]
14
+		minmax(1em, 1fr) [viewport-end];
15
+	font-size: $site-font;
16
+	font-family: $site-sans, sans-serif;
17
+	line-height: $site-linegap;
18
+	color: $color-text;
19
+	
20
+	a, a:visited {
21
+		text-decoration: underline;
22
+		color: $color-text;
23
+	}
24
+}
25
+
26
+#header {
27
+	grid-column: container;
28
+	font-size: $site-header;
29
+
30
+	a, a:visited {
31
+		text-decoration: none;
32
+	}
33
+}
34
+
35
+nav {
36
+	grid-column: container;
37
+	font-size: $site-nav;
38
+
39
+	ul {
40
+		list-style-type: none;
41
+		margin: 0;
42
+		padding: 0;
43
+	
44
+		li {
45
+			display: inline;
46
+		}
47
+	}
48
+
49
+}
50
+
51
+#title {
52
+	font-size: $site-nav;
53
+}
54
+
55
+#content {
56
+	grid-column: container;
57
+
58
+	a, a:visited {
59
+		color: $color-link;
60
+	}
61
+	
62
+	img {
63
+		margin: auto;
64
+		display: block;
65
+		max-width: 100%;
66
+	}
67
+
68
+	ul, li {
69
+		// FIXME: dirty fix for word wrapping.
70
+		word-break: break-all;
71
+	}
72
+
73
+	pre, code {
74
+		background-color: #eee;
75
+		font-family: $site-mono, monospace;
76
+		overflow-y: auto;
77
+	}
78
+}
79
+
80
+footer {
81
+	grid-column: container;
82
+	font-size: $site-footer;
79 83
 }

+ 4
- 4
layouts/404.html View File

@@ -1,6 +1,6 @@
1 1
 {{ define "main"}}
2
-<article>
3
-	<p><h1>Nothing found! 404.</h1></p>
4
-	<p><a href="https://derpibooru.org/2001956"><img src="/images/echo.webp" alt="A mango lover."></a></p>
5
-</article>
2
+	<article>
3
+		<p><h1>Nothing found! 404.</h1></p>
4
+		<p><a href="https://derpibooru.org/2001956"><img src="/images/echo.webp" alt="A mango lover."></a></p>
5
+	</article>
6 6
 {{ end }}

+ 7
- 3
layouts/_default/list.html View File

@@ -1,5 +1,9 @@
1 1
 {{ define "main" }}
2
-{{ if .Content }}
3
-	{{ partial "single" . }}
4
-{{ end }}
2
+	<ul>
3
+		{{ range .Paginator.Pages }}
4
+			<li>
5
+				<a href="{{ .RelPermalink }}">{{- .Title | markdownify }}</a>
6
+			</li>
7
+		{{ end }}
8
+	</ul>
5 9
 {{ end }}

+ 4
- 3
layouts/_default/single.html View File

@@ -1,5 +1,6 @@
1 1
 {{ define "main" }}
2
-
3
-{{ partial "single" . }}
4
-
2
+	<article>
3
+		{{ partial "title.html" . }}
4
+		{{ .Content }}
5
+	</article>
5 6
 {{ end }}

+ 3
- 0
layouts/home/single.html View File

@@ -0,0 +1,3 @@
1
+{{ define "main" }}
2
+	{{ partial "single.html" . }}
3
+{{ end }}

+ 1
- 3
layouts/index.html View File

@@ -1,5 +1,3 @@
1 1
 {{ define "main" }}
2
-<article>
3
-	{{ .Content }}
4
-</article>
2
+	{{ partial "single.html" . }}
5 3
 {{ end }}

+ 5
- 0
layouts/page/list.html View File

@@ -0,0 +1,5 @@
1
+{{ define "main" }}
2
+	{{ if .Content }}
3
+		{{ partial "single" . }}
4
+	{{ end }}
5
+{{ end }}

+ 3
- 0
layouts/page/single.html View File

@@ -0,0 +1,3 @@
1
+{{ define "main" }}
2
+	{{ partial "single" . }}
3
+{{ end }}

+ 5
- 2
layouts/partials/footer.html View File

@@ -1,3 +1,6 @@
1
-{{ block "footer" . }}
2
-<footer>Powered by Hugo {{ .Hugo.Version }} and <a href="https://moonbutt.science/ie/barebones">barebones theme</a>. <br> <i>{{- .Site.Copyright -}}</i></footer>
1
+{{ block "footer" . }}
2
+	<footer>
3
+		Powered by Hugo {{ .Hugo.Version }} and <a href="https://moonbutt.science/ie/barebones">barebones theme</a>. <br>
4
+		<i>{{- .Site.Copyright -}}</i>
5
+	</footer>
3 6
 {{ end }}

+ 3
- 0
layouts/partials/title.html View File

@@ -0,0 +1,3 @@
1
+<div id="title">
2
+	<p><b>«{{ .Title }}»</b> was published {{ .Date.Format "January 2, 2006" }}</p>
3
+</div>

Loading…
Cancel
Save