From ee6a7067d4b06f20805f071272f2739c03da1683 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Sun, 11 Nov 2018 22:18:54 +0000 Subject: Preparing for the new contact form backend --- .hgignore | 2 + web/GNUmakefile | 4 +- web/templates/contact.html.j2.tmpl | 107 +++++++++++++++++++++++++++++++++++++ web/templates/include/automenu.inc | 69 ------------------------ 4 files changed, 111 insertions(+), 71 deletions(-) create mode 100644 web/templates/contact.html.j2.tmpl delete mode 100644 web/templates/include/automenu.inc diff --git a/.hgignore b/.hgignore index 188e003..37effa1 100644 --- a/.hgignore +++ b/.hgignore @@ -14,6 +14,8 @@ Backup * sandbox/luaconf/Debug/** sandbox/luaconf/Release/** web/*.html +web/*.html.j2 +web/templates/include/automenu.inc web/software/cushionstarlets.php src/* Visual Lint/* diff --git a/web/GNUmakefile b/web/GNUmakefile index 4b04127..5016a60 100644 --- a/web/GNUmakefile +++ b/web/GNUmakefile @@ -7,7 +7,7 @@ STYLESHEET:=templates/include/styles.css all: $(HTMLPAGES) -$(AUTOMENU): $(TEMPLATES) +$(AUTOMENU): $(filter-out %.j2.tmpl,$(TEMPLATES)) (echo "[%\npages = ["; for i in $^; do FNAME="$${i##*/}"; echo " {\n fname = '$${FNAME%.tmpl}'"; grep -E '^\s+(description|norder|uuid|title) = ' $$i; echo " }\n"; done; echo "\n]\n%]";) > $@ %: templates/%.tmpl $(AUTOMENU) $(TMPLINCLS) $(STYLESHEET) @@ -18,5 +18,5 @@ clean: rm -f $(HTMLPAGES) $(AUTOMENU) rebuild: clean all -.PHONY: all clean rebuild +.PHONY: all clean rebuild $(AUTOMENU) .NOTPARALLEL: clean rebuild diff --git a/web/templates/contact.html.j2.tmpl b/web/templates/contact.html.j2.tmpl new file mode 100644 index 0000000..d2f7bf9 --- /dev/null +++ b/web/templates/contact.html.j2.tmpl @@ -0,0 +1,107 @@ +[% WRAPPER 'html-body.tt' + title = 'Contact' + description = 'Contact the team or a team member' + uuid = '6dcfe529-89ef-44f1-903c-2614d8d56432' + norder = '-1' +%] +[%- PROCESS 'constants.tt' -%] +{%if form.get %} +

All the fields have to be filled in ...

+

NB: As a matter of courtesy you should consider adding your name (or even a pseudonym) in the message to us. You know our names as well. Besides, it makes it easier to address you in a response. Thanks.

+
+ ++ + + + + + + + + + + + + + + + + + + + + +
+ Who should receive the message?: + + +
+ Your email address (max. 100 chars): + + +
+ Subject (max. 100 chars): + + + +
+ Here goes your text:
+ +
+ +
+
+

Report an issue or defect ("bug")?

+

+Please use the issue tracker over on Bitbucket or for +security-related reports use a PGP-encrypted email. See below for public keys available. +

+

Email from your own client?

+

+If you prefer to send an email, i.e. not use this contact form, you can use the lowercase form of the team +member's first name and append the at sign and then windirstat.net to it to get the email address +of that team member (i.e. <name>@windirstat.net). +If you can't remember the names, use the dropdown box above to receive a clue ;) +

+

Using PGP to encrypt communication or to verify emails we send out

+

+You can use the following PGP +public keys to encrypt to. The keys will be available from commonly used key servers such as +pgp.mit.edu or subkeys.pgp.net. Please use the traditional ASCII armor in your first communication to +establish whether PGP/MIME can be used in future communication. +

+ +{% else %} +{% if post.success %} +

Success / Erfolg

+
+

Your email was sent successfully (delivery may still fail, though)

+
+
+

Ihre Email wurde erfolgreich verschickt (die Zustellung kann dennoch fehlschlagen)

+
+
\n{% post.message %}\n
+{% else %} +

Error / Fehler {% post.status %}

+
+

An error occurred when processing your request.

+

Status code {% post.status %}: {% post.status_description %}

+
+
+

Während der Verarbeitung Ihrer Anfrage kam es zu einem Fehler.

+

Statuscode {% post.status %}: {% post.status_description %} (Beschreibung auf Englisch)

+
+{% endif %} +{% endif %} +[% END %] diff --git a/web/templates/include/automenu.inc b/web/templates/include/automenu.inc deleted file mode 100644 index 4ac1526..0000000 --- a/web/templates/include/automenu.inc +++ /dev/null @@ -1,69 +0,0 @@ -[% -pages = [ - { - fname = 'background.html' - title = 'Background' - description = 'Background and history' - uuid = '07c225cb-e2db-49da-b1d5-c33588c8ffbb' - norder = '4000' - } - - { - fname = 'contact.html' - title = 'Contact' - description = 'Contact the team or a team member' - uuid = 'a57cd25d-42ee-4e3a-aa24-f42b9548dbdd' - norder = '9989' - } - - { - fname = 'download.html' - title = 'Downloads, permalinks' - description = 'Permalinks to downloads and other content' - uuid = '8dccb375-74a0-4fde-a733-0019572b0646' - norder = '1000' - } - - { - fname = 'index.html' - title = 'Home' - description = 'Windows Directory Statistics' - uuid = '92e5b3ac-10ac-418e-97f9-8156b67c1d57' - norder = '0000' - } - - { - fname = 'logo.html' - title = 'Logos' - description = 'Logos / icons' - uuid = '51f50289-c61f-4cf7-ac07-fd236f442f39' - norder = '9999' - } - - { - fname = 'permalink.html' - title = 'Permanent Links' - description = 'Permalinks to downloads and other content' - uuid = '24719a1c-e784-454d-9a05-4bbf82e53cb5' - norder = '3000' - } - - { - fname = 'translations.html' - title = 'Translation Project' - description = 'Translations of WinDirStat' - uuid = '5da70447-d5f0-4895-8377-88f4a1ac8b3e' - norder = '6000' - } - - { - fname = 'unicode.html' - title = 'Notes on Unicode' - description = 'Notes on Unicode - Why is Unicode relevant?' - uuid = '18f81132-3a23-474c-9b64-ff066752cc21' - norder = '7000' - } - - -] -%] -- cgit v1.2.3