Browse Source

More things

master
Cassidy 2 weeks ago
parent
commit
f9c494f1f7
Signed by: deing <admin@15318.de> GPG Key ID: DA34C790D267C164
4 changed files with 71 additions and 63 deletions
  1. 2
    2
      build.sh
  2. BIN
      src/res/wafel.png
  3. 64
    57
      src/sass/main.sass
  4. 5
    4
      src/template.html

+ 2
- 2
build.sh View File

@@ -9,10 +9,10 @@ sassc src/sass/main.sass public/res/main.css
9 9
 #move resources
10 10
 cp src/res/* public/res
11 11
 #run all md files through pandoc
12
-FILES=$(find src/md -type f)
12
+FILES=$(find -L src/md -type f)
13 13
 for FILE in $FILES
14 14
 do
15 15
   pandoc --template=src/template.html --variable path=$(echo $FILE | sed -r "s/src\/md\/(.+)\.md/\1/") $FILE -o public/$(echo $FILE | sed -r "s/src\/md\/(.+)\.md/\1/")/index.html
16 16
 done
17
-sed "s/https:\/\/dingenskirchen.systems\/index/https:\/\/dingenskirchen.systems\//" public/index/index.html > public/index.html
17
+sed -e "s/https:\/\/dingenskirchen.systems\/index/https:\/\/dingenskirchen.systems\//" -e "s/↑ <a href=\"\/\">Main Page<\/a>//" public/index/index.html > public/index.html
18 18
 rm public/index/ -rf

BIN
src/res/wafel.png View File


+ 64
- 57
src/sass/main.sass View File

@@ -1,79 +1,86 @@
1 1
 *
2
-  font-size: 21px
3
-  line-height: 1.5
4
-  font-family: "Charter"
5
-  color: #333
2
+	font-size: 21px
3
+	line-height: 1.5
4
+	font-family: "Charter"
5
+	color: #333
6 6
 
7 7
 body
8
-  background: linear-gradient(0deg, #21b1ff, #ffd800, #ff218c)
9
-  margin: 0
10
-  padding: 0
11
-  main
12
-    margin: 0 0 0 .75rem
13
-    padding: 1rem
14
-    min-height: 100vh
15
-    box-sizing: border-box
16
-    background: #f0f0f0
17
-    article
18
-      max-width: 75ch
19
-      word-wrap: break-word
20
-      h1
21
-        margin-top: 0
22
-      p, h1, h2, ul, ol, figure
23
-        margin: .5rem 0
24
-      a
25
-        color: #005050
26
-        text-decoration: underline
8
+	background: linear-gradient(0deg, #21b1ff, #ffd800, #ff218c)
9
+	margin: 0
10
+	padding: 0
11
+	main
12
+		margin: 0 0 0 .75rem
13
+		padding: 1rem
14
+		min-height: 100vh
15
+		box-sizing: border-box
16
+		background: #f0f0f0
17
+		article
18
+			max-width: 75ch
19
+			word-wrap: break-word
20
+			h1
21
+				margin-top: 0
22
+			p, h1, h2, ul, ol, figure
23
+				margin: .5rem 0
24
+			a
25
+				color: #005050
26
+				text-decoration: underline
27
+			ul
28
+				list-style: '~ '
27 29
 
28 30
 h1, h2
29
-  font: italic 1rem "IBM Plex Mono"
31
+	font: italic 1rem "IBM Plex Mono"
30 32
 
31 33
 h1
32
-  font-size: 1.2rem
34
+	font-size: 1.2rem
33 35
 
34 36
 h2
35
-  border-bottom: 4px solid #16161d
36
-  display: inline-block
37
+	border-bottom: 4px solid #16161d
38
+	display: inline-block
39
+	&#subtitle
40
+		font-weight: inherit
41
+		font-style: italic
42
+		font-family: "Charter"
43
+		border-bottom: none
37 44
 
38 45
 footer p
39
-  font: .5rem "IBM Plex Mono"
46
+	font: .5rem "IBM Plex Mono"
40 47
 
41 48
 @media screen and (max-width: 100ch)
42
-  *
43
-    font-size: 16px
44
-  body
45
-    background: linear-gradient(90deg, #21b1ff, #ffd800, #ff218c)
46
-    main
47
-      margin: .75rem 0 0 0
48
-    
49
+	*
50
+		font-size: 16px
51
+	body
52
+		background: linear-gradient(90deg, #21b1ff, #ffd800, #ff218c)
53
+		main
54
+			margin: .75rem 0 0 0
55
+		
49 56
 @media print
50
-  main
51
-    margin: 0
52
-  footer
53
-    display: none
57
+	main
58
+		margin: 0
59
+	footer
60
+		display: none
54 61
 
55 62
 @media screen and (prefers-color-scheme: dark)
56
-  *
57
-    color: #f0f0f0
58
-  body main
59
-    background-color: #16161d
60
-    article a
61
-      color: #0aa
63
+	*
64
+		color: #f0f0f0
65
+	body main
66
+		background-color: #16161d
67
+		article a
68
+			color: #0aa
62 69
 
63 70
 
64 71
 @font-face
65
-  src: url("IBMPlexMono-Regular-Latin1.woff2")
66
-  font-family: "IBM Plex Mono"
67
-  font-weight: normal
72
+	src: url("IBMPlexMono-Regular-Latin1.woff2")
73
+	font-family: "IBM Plex Mono"
74
+	font-weight: normal
68 75
 @font-face
69
-  src: url("IBMPlexMono-Italic-Latin1.woff2")
70
-  font-family: "IBM Plex Mono"
71
-  font-style: italic
76
+	src: url("IBMPlexMono-Italic-Latin1.woff2")
77
+	font-family: "IBM Plex Mono"
78
+	font-style: italic
72 79
 @font-face
73
-  src: url("Charter-Regular.otf")
74
-  font-family: "Charter"
75
-  font-weight: normal
80
+	src: url("Charter-Regular.otf")
81
+	font-family: "Charter"
82
+	font-weight: normal
76 83
 @font-face
77
-  src: url("Charter-Italic.otf")
78
-  font-family: "Charter"
79
-  font-style: italic
84
+	src: url("Charter-Italic.otf")
85
+	font-family: "Charter"
86
+	font-style: italic

+ 5
- 4
src/template.html View File

@@ -6,18 +6,19 @@
6 6
 	<title>$title$</title>
7 7
 	<meta name="viewport" content="width=device-width, initial-scale=1.0">
8 8
 	<meta property="og:title" content="$title$">
9
-  <meta property="og:image" content="https://dingenskirchen.systems/res/wafel.png">
10
-  <meta property="og:url" content="https://dingenskirchen.systems/$path$">
11
-  <meta property="og:type" content="website">
12
-  <meta property="og:description" content="Dingenskirchen Systems is one of the leading forces in technological procrastination.">
9
+	<meta property="og:url" content="https://dingenskirchen.systems/$path$">
10
+	<meta property="og:type" content="website">
11
+	<meta property="og:description" content="$if(subtitle)$$subtitle$$else$Dingenskirchen Systems is one of the leading forces in technological procrastination.$endif$">
13 12
 </head>
14 13
 <body>
15 14
 	<main>
16 15
 		<article>
17 16
 			<h1>$title$</h1>
17
+			$if(subtitle)$<h2 id="subtitle">$subtitle$</h2>$endif$
18 18
 			$body$
19 19
 		</article>
20 20
 		<footer>
21
+			$if(return_link)$← <a href="$return_link$">Return</a> | $endif$ ↑ <a href="/">Main Page</a>
21 22
 			<p>This page is best viewed using curl(1) on a screen resolution of 80×24 characters or better.</p>
22 23
 		</footer>
23 24
 	</main>

Loading…
Cancel
Save