Browse Source

escape quotes

bake 4 months ago
parent
commit
077c1156dc
4 changed files with 70 additions and 228 deletions
  1. 0
    172
      assets/css/main.css
  2. 2
    2
      pages/index.html
  3. 59
    47
      template/main.html
  4. 9
    7
      template/navigation.html

+ 0
- 172
assets/css/main.css View File

@@ -1,172 +0,0 @@
1
-* {
2
-  margin: 0;
3
-  padding: 0;
4
-}
5
-a {
6
-  border-bottom: 1px solid transparent;
7
-  color: #0070e8;
8
-  text-decoration: none;
9
-}
10
-a:hover {
11
-  border-color: #0070e8;
12
-  color: inherit;
13
-}
14
-::selection {
15
-  background: #0070e8;
16
-  color: #fff;
17
-}
18
-figure {
19
-  padding: 0 10px;
20
-  width: 200px;
21
-}
22
-figure[align=left] {
23
-  float: left;
24
-}
25
-figure[align=right] {
26
-  float: right;
27
-}
28
-figure img {
29
-  max-width: 100%;
30
-}
31
-figure figcaption {
32
-  padding: 5px;
33
-}
34
-abbr {
35
-  border-bottom: 1px dotted #2c3e50;
36
-}
37
-html,
38
-body {
39
-  min-height: 100%;
40
-}
41
-body {
42
-  color: #2c3e50;
43
-  font-family: Source Sans Pro, Helvetica Neue, Arial, sans-serif;
44
-}
45
-@media (min-width: 400px) {
46
-  body > aside,
47
-  body > section {
48
-    height: 100%;
49
-  }
50
-}
51
-@media (min-width: 400px) {
52
-  body {
53
-    display: flex;
54
-  }
55
-}
56
-body > aside > header,
57
-body > section > header {
58
-  padding: 10px;
59
-}
60
-body > aside {
61
-  background: #f2f2f2;
62
-  border: 1px solid rgba(0,0,0,0.15);
63
-  border-left: none;
64
-  border-top: none;
65
-  flex-shrink: 0;
66
-  text-align: right;
67
-}
68
-@media (max-width: 399px) {
69
-  body > aside {
70
-    border-right: none;
71
-  }
72
-}
73
-@media (min-width: 400px) {
74
-  body > aside {
75
-    border-bottom: none;
76
-    width: 150px;
77
-  }
78
-  body > aside header > h1 > span {
79
-    display: none;
80
-  }
81
-}
82
-body > section {
83
-  flex-grow: 1;
84
-  max-width: 850px;
85
-}
86
-@media (mzax-width: 1001px) {
87
-  body > section {
88
-    width: auto;
89
-  }
90
-}
91
-@media (max-width: 399px) {
92
-  body > section header:first-of-type > h1 {
93
-    display: none;
94
-  }
95
-}
96
-body > section header > h1::after {
97
-  background: url("../img/beat.png") no-repeat center center;
98
-  content: '';
99
-  display: inline-block;
100
-  height: 16px;
101
-  width: 32px;
102
-}
103
-body > section > article {
104
-  padding: 10px;
105
-}
106
-body > section > article h2 {
107
-  color: #829ebb;
108
-  font-size: 1.2rem;
109
-  font-weight: lighter;
110
-}
111
-body > section > article > * {
112
-  margin-bottom: 10px;
113
-}
114
-nav li {
115
-  margin: 0;
116
-}
117
-@media (max-width: 399px) {
118
-  nav li {
119
-    display: inline-block;
120
-  }
121
-  nav li.divider {
122
-    display: block;
123
-    padding: 10px;
124
-  }
125
-}
126
-@media (min-width: 400px) {
127
-  nav li {
128
-    margin: 10px 0;
129
-  }
130
-}
131
-nav li.divider {
132
-  color: rgba(0,0,0,0.25);
133
-  font-size: 0.85rem;
134
-  font-weight: bold;
135
-  margin: 0;
136
-  padding: 0 10px;
137
-  text-transform: uppercase;
138
-}
139
-nav li a {
140
-  border: 3px solid transparent;
141
-  border-left: none;
142
-  border-top: none;
143
-  color: inherit;
144
-  display: block;
145
-  padding: 10px;
146
-}
147
-nav li a.new:before {
148
-  color: #0070e8;
149
-  content: '●';
150
-  padding-right: 5px;
151
-}
152
-@media (max-width: 399px) {
153
-  nav li a {
154
-    border-right: none;
155
-    margin-bottom: -2px;
156
-  }
157
-}
158
-@media (min-width: 400px) {
159
-  nav li a {
160
-    border-bottom: none;
161
-    margin-right: -2px;
162
-  }
163
-}
164
-nav li a:hover,
165
-nav li a.active {
166
-  border-color: #0070e8;
167
-}
168
-nav li a:hover span,
169
-nav li a.active span {
170
-  border-bottom: 2px solid transparent;
171
-}
172
-

+ 2
- 2
pages/index.html View File

@@ -5,11 +5,11 @@ title: Ein Hackerspace für blaue, Eisteemate trinkende Frotteehasen
5 5
 
6 6
 <hr>
7 7
 
8
-<div class="grid">
8
+<div class=\"grid\">
9 9
 	$(for page in mate/*.html; do echo "
10 10
 		<div class=\"col-one-fourth\">
11 11
 			<figure>
12
-				<img src=\"/assets/img/$(basename "${page}" ".html")_1.jpg\">
12
+				<img src=\"/assets/img/$(basename "${page}" ".html")_1.jpg\" alt=\"$(meta "${page}" "title")\">
13 13
 				<figcaption>
14 14
 					<a href=\"/mate/$(basename "${page}")\">
15 15
 						$(meta "${page}" "title")

+ 59
- 47
template/main.html View File

@@ -1,48 +1,60 @@
1 1
 <!doctype html>
2
-<meta charset=\"utf-8\">
3
-<meta name=\"viewport\" content=\"width=device-width\">
4
-
5
-<title>$(meta "$page" "title") - fussel.space</title>
6
-
7
-<link rel=\"stylesheet\" href=\"/assets/css/main.css\">
8
-<link rel=\"stylesheet\" href=\"//fonts.googleapis.com/css?family=Source+Sans+Pro:400,700,400italic,700italic\">
9
-
10
-<link rel=\"icon\" href=\"/assets/img/beat.png\">
11
-
12
-<aside>
13
-	<header>
14
-		<h1>fussel<span>.space</span></h1>
15
-	</header>
16
-
17
-	<nav>
18
-		$(eval "echo \"$(cat "../template/navigation.html")\"")
19
-	</nav>
20
-</aside>
21
-
22
-<section>
23
-	<header>
24
-		<h1>space</h1>
25
-	</header>
26
-
27
-	<article>
28
-		<h2>$(meta "$page" "title")</h2>
29
-
30
-		$(content "$page")
31
-
32
-		$(if [ `dirname "$page"` == "./mate" ]; then
33
-			caffeine=`meta "$page" "caffeine"`
34
-			if [ "$caffeine" != "" ]; then
35
-				echo "<p><strong>Koffein:</strong> ${caffeine}mg/100ml</p>"
36
-			fi
37
-
38
-			monkey=`meta "$page" "monkey"`
39
-			if [ "$monkey" != "" ]; then
40
-				echo "<p><a href=\"https://matemonkey.com/map/dealer/?products=${monkey}\">$(meta "${page}" "title") auf <strong>MateMonkey</strong></a></p>"
41
-			fi
42
-		fi)
43
-
44
-		<footer>
45
-			<p>$(git log -1 --format="Zuletzt bearbeitet am <a href="https://git.192k.pw/bake/fussel.space/commit/%H">%ad</a> von <a href="https://git.192k.pw/%an">%an</a>." --date=format:"%d.%m.%Y" $page)</p>
46
-		</footer>
47
-	</article>
48
-</section>
2
+<html lang=\"de\">
3
+	<head>
4
+		<meta charset=\"utf-8\">
5
+		<meta name=\"viewport\" content=\"width=device-width\">
6
+
7
+		<title>$(meta "$page" "title") - fussel.space</title>
8
+
9
+		<link rel=\"stylesheet\" href=\"/assets/css/main.css\">
10
+		<link rel=\"stylesheet\" href=\"//fonts.googleapis.com/css?family=Source+Sans+Pro:400,700,400italic,700italic\">
11
+
12
+		<link rel=\"icon\" href=\"/assets/img/beat.png\">
13
+	</head>
14
+
15
+	<body>
16
+		<aside>
17
+			<header>
18
+				<h1>fussel<span>.space</span></h1>
19
+			</header>
20
+
21
+			<nav>
22
+				$(eval "echo \"$(cat "../template/navigation.html")\"")
23
+			</nav>
24
+		</aside>
25
+
26
+		<section>
27
+			<header>
28
+				<h1>space</h1>
29
+			</header>
30
+
31
+			<article>
32
+				<h2>$(meta "$page" "title")</h2>
33
+
34
+				$(content "$page")
35
+
36
+				$(if [ `dirname "$page"` == "./mate" ]; then
37
+					caffeine=`meta "$page" "caffeine"`
38
+					if [ "$caffeine" != "" ]; then echo "
39
+						<p>
40
+							<strong>Koffein:</strong> ${caffeine}mg/100ml
41
+						</p>
42
+					"; fi
43
+
44
+					monkey=`meta "$page" "monkey"`
45
+					if [ "$monkey" != "" ]; then echo "
46
+						<p>
47
+							<a href=\"https://matemonkey.com/map/dealer/?products=${monkey}\">
48
+								$(meta "${page}" "title") auf <strong>MateMonkey</strong>
49
+							</a>
50
+						</p>
51
+					"; fi
52
+				fi)
53
+
54
+				<footer>
55
+					<p>$(git log -1 --format="Zuletzt bearbeitet am <a href=\"https://git.192k.pw/bake/fussel.space/commit/%H\">%ad</a> von <a href=\"https://git.192k.pw/%an\">%an</a>." --date=format:"%d.%m.%Y" $page)</p>
56
+				</footer>
57
+			</article>
58
+		</section>
59
+	</body>
60
+</html>

+ 9
- 7
template/navigation.html View File

@@ -3,13 +3,15 @@
3 3
 	<li><a href=\"https://git.192k.pw/bake/fussel.space\">Git</a></li>
4 4
 	<li class=\"divider\"><span>Mate</span></li>
5 5
 	$(for page in $pages; do
6
-		if [ `dirname "${page}"` != "./mate" ]; then
7
-			continue
8
-		fi
9 6
 		class=""
10
-		if [ `basename "${page}"` == "$file" ]; then
11
-			class=" class=\"active\""
12
-		fi
13
-		echo "<li><a href=\"/mate/$(basename "${page}")\"${class}><span>$(meta "${page}" "title")</span></a></li>";
7
+		if [ `dirname "${page}"` != "./mate" ]; then continue; fi
8
+		if [ `basename "${page}"` == "$file" ]; then class=" class=\"active\""; fi
9
+		echo "
10
+			<li>
11
+				<a href=\"/mate/$(basename "${page}")\"${class}>
12
+					<span>$(meta "${page}" "title")</span>
13
+				</a>
14
+			</li>
15
+		";
14 16
 	done)
15 17
 </ul>

Loading…
Cancel
Save