Browse Source

rename app to application, add post permalinks

master
The Dod 1 year ago
parent
commit
c973481931
2 changed files with 3 additions and 3 deletions
  1. 2
    2
      mymastotag.py
  2. 1
    1
      templates/index.html

+ 2
- 2
mymastotag.py View File

@@ -3,9 +3,9 @@ import feedparser
3 3
 from flask import Flask, render_template
4 4
 from bs4 import BeautifulSoup
5 5
 
6
-app = Flask(__name__)
6
+application = Flask(__name__)
7 7
 
8
-@app.route('/<string:lang>/<string:instance>/<string:user>/<string:tag>')
8
+@application.route('/<string:lang>/<string:instance>/<string:user>/<string:tag>')
9 9
 def my_masto_tag(lang, instance, user, tag):
10 10
     lang = lang.lower()
11 11
     is_rtl = lang in ['he', 'ar']  # TODO: A less lame to determine rtl

+ 1
- 1
templates/index.html View File

@@ -14,7 +14,7 @@
14 14
           <div class="col-12 col-sm-6 col-md-4 col-lg-3 g-1">
15 15
             <div class="card">
16 16
               <div class="card-body">
17
-                <div class="float-end ms-1"><span class="badge bg-warning">{{ entry.date }}</span></div>
17
+                <div class="float-end ms-1"><span class="badge bg-info"><a target="_blank" class="link-light text-decoration-underline" href="{{entry.link}}">{{ entry.date }}</a></span></div>
18 18
                 {{ entry.description|safe }}
19 19
               </div>
20 20
               {% if entry.images %}

Loading…
Cancel
Save