Added a FAQ
authorDavid Kerkeslager <kerkeslager@gmail.com>
Fri, 3 Sep 2021 16:28:23 +0000 (12:28 -0400)
committerDavid Kerkeslager <kerkeslager@gmail.com>
Fri, 3 Sep 2021 16:28:23 +0000 (12:28 -0400)
src/bigly/static/bigly/styles.css
src/bigly/templates/bigly/_base.html
src/bigly/templates/bigly/faq.html [new file with mode: 0644]
src/bigly/templates/bigly/index.html
src/bigly/urls.py
src/bigly/views.py

index 3a373d9..856316b 100644 (file)
@@ -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;
+}
index 13ccecd..63216e0 100644 (file)
     <footer>
       <section>&copy; {% now "Y" %} David Kerkeslager</section>
       <section>All code for this site is released under the AGPL version 3.</section>
+      <section>
+        <a href='https://github.com/kerkeslager/bigly'>Code</a>
+        |
+        <a href='{% url "faq" %}'>FAQ</a>
+      </section>
     </footer>
   </body>
 </html>
diff --git a/src/bigly/templates/bigly/faq.html b/src/bigly/templates/bigly/faq.html
new file mode 100644 (file)
index 0000000..bee6b9d
--- /dev/null
@@ -0,0 +1,25 @@
+{% extends 'bigly/_base.html' %}
+
+{% block body %}
+<h1>FAQ</h1>
+
+<section class='faq'>
+<p class='faq-question'>What is this?</p>
+<p>
+  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.
+</p>
+
+<p class='faq-question'>Why?</p>
+<p>
+  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.
+</p>
+<p>
+  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.
+</p>
+</section>
+{% endblock %}
index 960aaed..b810b6e 100644 (file)
@@ -2,8 +2,8 @@
 {% load static %}
 
 {% block body %}
-<h1>bigly</h1>
-<h2>make links big again</h2>
+<h1 class='index'>bigly</h1>
+<h2 class='index'>make links big again</h2>
 
 <form action='{% url "embiggen" %}' method='get'>
   <input type='url' name='link' autofocus></input>
index ae0210d..f6bb4b4 100644 (file)
@@ -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'),
 )
index 4a3317c..c74bc28 100644 (file)
@@ -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)