From c9e1b1be5a243dac10e44221db1781f2c470dc1a Mon Sep 17 00:00:00 2001 From: David Kerkeslager Date: Fri, 3 Sep 2021 12:28:23 -0400 Subject: [PATCH] Added a FAQ --- src/bigly/static/bigly/styles.css | 20 ++++++++++++++++++-- src/bigly/templates/bigly/_base.html | 5 +++++ src/bigly/templates/bigly/faq.html | 25 +++++++++++++++++++++++++ src/bigly/templates/bigly/index.html | 4 ++-- src/bigly/urls.py | 1 + src/bigly/views.py | 5 +++++ 6 files changed, 56 insertions(+), 4 deletions(-) create mode 100644 src/bigly/templates/bigly/faq.html diff --git a/src/bigly/static/bigly/styles.css b/src/bigly/static/bigly/styles.css index 3a373d9..856316b 100644 --- a/src/bigly/static/bigly/styles.css +++ b/src/bigly/static/bigly/styles.css @@ -28,12 +28,12 @@ main { align-items: center; } -h1 { +h1.index { font-size: 12vw; text-align: center; } -h2 { +h2.index { font-size: 6vw; text-align: center; } @@ -74,3 +74,19 @@ footer { footer section:not(:first-child) { margin-top: 1em; } + +h1 { + font-size: 3em; +} + +section.faq { + max-width: 40em; +} + +p.faq-question { + font-weight: bold; +} + +p.faq-question:not(:first-child) { + margin-top: 1em; +} diff --git a/src/bigly/templates/bigly/_base.html b/src/bigly/templates/bigly/_base.html index 13ccecd..63216e0 100644 --- a/src/bigly/templates/bigly/_base.html +++ b/src/bigly/templates/bigly/_base.html @@ -21,6 +21,11 @@ diff --git a/src/bigly/templates/bigly/faq.html b/src/bigly/templates/bigly/faq.html new file mode 100644 index 0000000..bee6b9d --- /dev/null +++ b/src/bigly/templates/bigly/faq.html @@ -0,0 +1,25 @@ +{% extends 'bigly/_base.html' %} + +{% block body %} +

FAQ

+ +
+

What is this?

+

+ Bigly is the opposite of Bit.ly: it's a link unshortener. Put in a link that + has been shortened using Bit.ly, TinyURL, Short.io, or any similar site, and + get back the longer link that the shortened URL points to. +

+ +

Why?

+

+ URL shorteners often collect data about the people using their service, + violating your privacy. Bigly doesn't do that: the code is libre software, + so you can verify that yourself by looking at the code. +

+

+ Additionally, shortened URLs can be used to mask links to malicious or NSFW + websites. Bigly lets you see where the link is taking you before you go to it. +

+
+{% endblock %} diff --git a/src/bigly/templates/bigly/index.html b/src/bigly/templates/bigly/index.html index 960aaed..b810b6e 100644 --- a/src/bigly/templates/bigly/index.html +++ b/src/bigly/templates/bigly/index.html @@ -2,8 +2,8 @@ {% load static %} {% block body %} -

bigly

-

make links big again

+

bigly

+

make links big again

diff --git a/src/bigly/urls.py b/src/bigly/urls.py index ae0210d..f6bb4b4 100644 --- a/src/bigly/urls.py +++ b/src/bigly/urls.py @@ -22,5 +22,6 @@ urlpatterns = ( path('admin/', admin.site.urls), path('api/v1/follow-redirects', views.api_follow_redirects, name='api:follow-redirects'), path('', views.index), + path('faq', views.faq, name='faq'), path('embiggen', views.embiggen, name='embiggen'), ) diff --git a/src/bigly/views.py b/src/bigly/views.py index 4a3317c..c74bc28 100644 --- a/src/bigly/views.py +++ b/src/bigly/views.py @@ -60,6 +60,11 @@ class IndexView(TemplateView): index = IndexView.as_view() +class FAQView(TemplateView): + template_name = 'bigly/faq.html' + +faq = FAQView.as_view() + def embiggen(request): serializer = serializers.FollowRedirectsSerializer(data=request.GET) -- 2.20.1