diff options
| author | Mitsuo Tokumori <[email protected]> | 2023-10-29 06:11:16 -0500 |
|---|---|---|
| committer | Mitsuo Tokumori <[email protected]> | 2023-10-29 06:11:16 -0500 |
| commit | efee2a4a4a973c7d2d8b42525069df01b2797271 (patch) | |
| tree | dc865f808a991da0594f16bfbe2127331b050e9d /flaskr/templates/blog/index.html | |
| parent | cafc557c6820e1808b1e4cf71f58ff99b97ca545 (diff) | |
| download | ustayml-efee2a4a4a973c7d2d8b42525069df01b2797271.tar.gz ustayml-efee2a4a4a973c7d2d8b42525069df01b2797271.tar.bz2 ustayml-efee2a4a4a973c7d2d8b42525069df01b2797271.zip | |
Make truncate and add <abbr> to long titles
Diffstat (limited to 'flaskr/templates/blog/index.html')
| -rw-r--r-- | flaskr/templates/blog/index.html | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/flaskr/templates/blog/index.html b/flaskr/templates/blog/index.html index 0d3ed17..0fb2e80 100644 --- a/flaskr/templates/blog/index.html +++ b/flaskr/templates/blog/index.html @@ -13,7 +13,11 @@ <article class="post"> <header> <div> - <h1>{{ post['title'] }}</h1> + {% if post['title'].__len__() > 80 %} + <h1><abbr title="{{ post['title'] }}">{{ post['title'][:80] }}</abbr></h1> + {% else %} + <h1>{{ post['title'] }}</h1> + {% endif %} <div class="about">by {{ post['username'] }} on {{ post['created'].strftime('%Y-%m-%d') }}</div> </div> {% if g.user['id'] == post['author_id'] %} |
