From ad9b9c0f7bd4d95ddc54462970d33d92bab9392c Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Fri, 22 Oct 2021 17:59:44 +0200 Subject: Added a functionning url shortening service --- src/templates/error.html | 7 +++++++ src/templates/index.html | 25 +++++++++++++++++++++++++ src/templates/noshort.html | 10 ++++++++++ src/templates/partials/footer.html | 5 +++++ src/templates/partials/master.html | 17 +++++++++++++++++ src/templates/short.html | 9 +++++++++ 6 files changed, 73 insertions(+) create mode 100644 src/templates/error.html create mode 100644 src/templates/index.html create mode 100644 src/templates/noshort.html create mode 100644 src/templates/partials/footer.html create mode 100644 src/templates/partials/master.html create mode 100644 src/templates/short.html (limited to 'src/templates') diff --git a/src/templates/error.html b/src/templates/error.html new file mode 100644 index 0000000..5de1923 --- /dev/null +++ b/src/templates/error.html @@ -0,0 +1,7 @@ +{% extends "templates/partials/master.html" %} +{% block content %} +

{{ $code }} - {{ $msg }}

+

+ Go back +

+{% endblock %} diff --git a/src/templates/index.html b/src/templates/index.html new file mode 100644 index 0000000..b89e381 --- /dev/null +++ b/src/templates/index.html @@ -0,0 +1,25 @@ +{% extends "templates/partials/master.html" %} +{% block content %} +

URL shortener

+

+The simple, open source and privacy friendly URL shortener : anonymous usage, no tracking.
+This is a personal sharing service: Data may be deleted anytime. Don't share illegal, unethical or morally reprehensible content. +

+
+
+
+ + + +
+ +{% endblock %} diff --git a/src/templates/noshort.html b/src/templates/noshort.html new file mode 100644 index 0000000..e0be436 --- /dev/null +++ b/src/templates/noshort.html @@ -0,0 +1,10 @@ +{% extends "templates/partials/master.html" %} +{% block content %} +

URL not found!

+

+ This url does not exist or has expired, sorry! +

+

+ Go back +

+{% endblock %} diff --git a/src/templates/partials/footer.html b/src/templates/partials/footer.html new file mode 100644 index 0000000..6ae4459 --- /dev/null +++ b/src/templates/partials/footer.html @@ -0,0 +1,5 @@ + diff --git a/src/templates/partials/master.html b/src/templates/partials/master.html new file mode 100644 index 0000000..82cedac --- /dev/null +++ b/src/templates/partials/master.html @@ -0,0 +1,17 @@ + + + + + + + + + short.adyxax.org + + +
+ {% block content %}{% endblock %} +
+ {% importnwt "templates/partials/footer.html" %} + + diff --git a/src/templates/short.html b/src/templates/short.html new file mode 100644 index 0000000..1f36fdf --- /dev/null +++ b/src/templates/short.html @@ -0,0 +1,9 @@ +{% extends "templates/partials/master.html" %} +{% block content %} +

{{ $req.Title }}

+

{{ $req.Url }}

+

+Created on : {{ $req.Created }}
+Expires on : {{ $req.Expires }} +

+{% endblock %} -- cgit v1.2.3