diff --git a/README.md b/README.md index f8e69af5..017b0ddc 100644 --- a/README.md +++ b/README.md @@ -216,7 +216,7 @@ complete .md file can look like this: title: Stuff author: alice date: 2015-03-27 - glyphicon: glyphicon-user + icon: bi-person ### Stuff #### Part 1 @@ -227,8 +227,8 @@ Another possibility is to include hyperlinks, which only have a metadata section: title: Awesome page - glyphicon: glyphicon-tower - link: http://http://www.awesome-page.com/ + icon: bi-emoji-smile + link: https://example.org/ rank: 1 Translations diff --git a/sipa/flatpages.py b/sipa/flatpages.py index 58725250..e289d71a 100644 --- a/sipa/flatpages.py +++ b/sipa/flatpages.py @@ -132,9 +132,7 @@ def hidden(self) -> bool: @property def icon(self) -> str: - return self.localized_page.meta.get("icon") or self.localized_page.meta.get( - "glyphicon" - ) + return self.localized_page.meta.get("icon") def __getattr__(self, attr: str) -> str: """Return the meta attribute of the localized page diff --git a/sipa/initialization.py b/sipa/initialization.py index 7167ec60..8d76de74 100644 --- a/sipa/initialization.py +++ b/sipa/initialization.py @@ -101,36 +101,6 @@ def init_app(app, **kwargs): ) app.add_template_filter(render_links) - def glyphicon_to_bi(glyphicon: str) -> str: - MAP = { - "glyphicon-briefcase": "bi-briefcase-fill", - "glyphicon-bullhorn": "bi-megaphone-fill", - "glyphicon-chevron-down": "bi-chevron-down", - "glyphicon-cloud": "bi-cloud-fill", - "glyphicon-comment": "bi-chat-left-fill", - "glyphicon-dashboard": "bi-speedometer", - "glyphicon-download-alt": "bi-download", - "glyphicon-envelope": "bi-envelope-fill", - "glyphicon-euro": "bi-currency-euro", - "glyphicon-file": "bi-file-earmark-fill", - "glyphicon-globe": "bi-globe-europe-africa", - "glyphicon-headphones": "bi-headphones", - "glyphicon-list-alt": "bi-card-list", - "glyphicon-lock": "bi-lock-fill", - "glyphicon-log-in": "bi-box-arrow-in-right", - "glyphicon-question-sign": "bi-question-circle-fill", - "glyphicon-retweet": "bi-arrow-repeat", - "glyphicon-signal": "bi-router-fill", # used for router page - "glyphicon-star": "bi-star-fill", - "glyphicon-tasks": "bi-box-arrow-up-right", - "glyphicon-tint": "bi-droplet-fill", - "glyphicon-transfer": "bi-arrow-left-right", - "glyphicon-user": "bi-person-fill", - "glyphicon-wrench": "bi-wrench-adjustable", - } - return MAP.get(glyphicon, glyphicon.replace("glyphicon-", "bi-")) - - app.add_template_filter(glyphicon_to_bi) logger.debug("Jinja globals have been set", extra={'data': {'jinja_globals': app.jinja_env.globals}}) diff --git a/sipa/templates/base.html b/sipa/templates/base.html index 49b0df8c..8358f303 100644 --- a/sipa/templates/base.html +++ b/sipa/templates/base.html @@ -140,7 +140,7 @@ {%- for article in c.articles -%} {%- if not article.id == 'index' and article.title and not article.hidden -%} - + {{ article.title }} {%- endif %} diff --git a/sipa/templates/news_edit.html b/sipa/templates/news_edit.html index 02049054..6f62d615 100644 --- a/sipa/templates/news_edit.html +++ b/sipa/templates/news_edit.html @@ -2,7 +2,7 @@ {% set known_meta_keys = [ "title", "author", "date", "outage", "information", "event", - "rank", "link", "hidden", "icon", "glyphicon", + "rank", "link", "hidden", "icon", ] %} {% block content %}