Skip to content

Commit dd2fc28

Browse files
Unify frontend CSS, move datenschutz to templates and add markdown editor and preview
- Unify style.css and styles.css into single file - Convert impressum and datenschutz to templates - Add Discord markdown editor with preview - Redesign case page - Add navigation for quicker going around
1 parent c677caa commit dd2fc28

15 files changed

Lines changed: 1172 additions & 679 deletions

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ README.md
1212
.gitignore
1313
debug.sh
1414
public/impressum.html
15+
public/datenschutz.html

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ composer.lock
2525
info.php
2626
*.env
2727
!example.*.env
28+
public/impressum.html
29+
public/datenschutz.html

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ RUN apt-get update && \
1010
libjpeg62-turbo-dev \
1111
libpng-dev \
1212
unzip \
13-
git
13+
git \
14+
gettext-base
1415

1516
# Install PHP extensions
1617
RUN /usr/local/bin/docker-php-ext-install mysqli pdo pdo_mysql

debug.Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ RUN apt-get update && \
1010
libjpeg62-turbo-dev \
1111
libpng-dev \
1212
unzip \
13-
git
13+
git \
14+
gettext-base
1415

1516
# Install PHP extensions
1617
RUN /usr/local/bin/docker-php-ext-install mysqli pdo pdo_mysql

docker/start-apache

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
#!/usr/bin/env bash
22

3-
# Generate impressum from template if it doesn't exist
3+
# Generate impressum and datenschutz from templates if they don't exist
44
if [ ! -f /var/www/public/impressum.html ]; then
55
echo "Generating /var/www/public/impressum.html from template..."
6-
cp /var/www/docker/templates/impressum.html.template /var/www/public/impressum.html
7-
sed -i "s/IMPRESSUM_NAME/${IMPRESSUM_NAME:-}/g" /var/www/public/impressum.html
8-
sed -i "s/IMPRESSUM_STREET/${IMPRESSUM_STREET:-}/g" /var/www/public/impressum.html
9-
sed -i "s/IMPRESSUM_CITY/${IMPRESSUM_CITY:-}/g" /var/www/public/impressum.html
10-
sed -i "s/IMPRESSUM_EMAIL/${IMPRESSUM_EMAIL:-}/g" /var/www/public/impressum.html
6+
envsubst '${IMPRESSUM_NAME} ${IMPRESSUM_STREET} ${IMPRESSUM_CITY} ${IMPRESSUM_EMAIL}' \
7+
< /var/www/docker/templates/impressum.html.template \
8+
> /var/www/public/impressum.html
9+
fi
10+
11+
if [ ! -f /var/www/public/datenschutz.html ]; then
12+
echo "Generating /var/www/public/datenschutz.html from template..."
13+
envsubst '${IMPRESSUM_NAME} ${IMPRESSUM_STREET} ${IMPRESSUM_CITY}' \
14+
< /var/www/docker/templates/datenschutz.html.template \
15+
> /var/www/public/datenschutz.html
1116
fi
1217

1318
sed -i "s/Listen 80/Listen ${PORT:-80}/g" /etc/apache2/ports.conf

public/datenschutz.html renamed to docker/templates/datenschutz.html.template

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
<html>
44
<head>
5-
<title>Impressum - DevCord</title>
5+
<meta charset="UTF-8" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Datenschutzerkl&auml;rung - DevCord</title>
68
<link rel="shortcut icon" type="image/x-icon" href="assets/img/favicon.png" />
7-
<link rel="stylesheet" href="assets/css/style.css" />
9+
<link rel="stylesheet" href="assets/css/styles.css" />
810
</head>
911

1012
<body>
@@ -74,10 +76,16 @@ <h3>Datenschutz</h3>
7476
<h3>Hinweis zur verantwortlichen Stelle</h3>
7577
<p>Die verantwortliche Stelle f&uuml;r die Datenverarbeitung auf dieser Website ist:</p>
7678
<p>
77-
Max Schlosser<br />
78-
Gro&szlig;br&ouml;sern 4<br />
79-
02627 Radibor<br />
79+
${IMPRESSUM_NAME}<br />
80+
${IMPRESSUM_STREET}<br />
81+
${IMPRESSUM_CITY}<br />
8082
</p>
8183
</div>
84+
<footer class="site-footer">
85+
<div class="footer-nav">
86+
<a href="/">&larr; Zur&uuml;ck zum Devmarkt</a>
87+
</div>
88+
<a href="impressum.html">Impressum</a> &middot; <a href="datenschutz.html">Datenschutz</a>
89+
</footer>
8290
</body>
8391
</html>

docker/templates/impressum.html.template

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
<html>
44
<head>
5+
<meta charset="UTF-8" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
57
<title>Impressum - DevCord</title>
68
<link rel="shortcut icon" type="image/x-icon" href="assets/img/favicon.png" />
7-
<link rel="stylesheet" href="assets/css/style.css" />
9+
<link rel="stylesheet" href="assets/css/styles.css" />
810
</head>
911

1012
<body>
@@ -13,9 +15,9 @@
1315

1416
<h2>Angaben gem&auml;&szlig; &sect; 5 TMG</h2>
1517
<p>
16-
IMPRESSUM_NAME<br />
17-
IMPRESSUM_STREET<br />
18-
IMPRESSUM_CITY
18+
${IMPRESSUM_NAME}<br />
19+
${IMPRESSUM_STREET}<br />
20+
${IMPRESSUM_CITY}
1921
</p>
2022

2123
<p>
@@ -24,7 +26,7 @@
2426
</p>
2527

2628
<h2>Kontakt</h2>
27-
<p>E-Mail: IMPRESSUM_EMAIL</p>
29+
<p>E-Mail: ${IMPRESSUM_EMAIL}</p>
2830

2931
<p>
3032
Wir sind nicht bereit oder verpflichtet, an Streitbeilegungsverfahren vor einer
@@ -81,5 +83,11 @@
8183
>
8284
</p>
8385
</div>
86+
<footer class="site-footer">
87+
<div class="footer-nav">
88+
<a href="/">&larr; Zur&uuml;ck zum Devmarkt</a>
89+
</div>
90+
<a href="impressum.html">Impressum</a> &middot; <a href="datenschutz.html">Datenschutz</a>
91+
</footer>
8492
</body>
8593
</html>

0 commit comments

Comments
 (0)