From b2fe90ba88540c3430287a35cd5c9d99f90cc764 Mon Sep 17 00:00:00 2001 From: Giorgio Productions Date: Sat, 11 Sep 2021 01:17:13 +0200 Subject: [PATCH] Add the option to open footer links in a new tab (#136) --- config/footer.json | 6 ++++-- lib/philomena_web/templates/layout/_footer.html.slime | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/config/footer.json b/config/footer.json index e164b7c2..d875df97 100644 --- a/config/footer.json +++ b/config/footer.json @@ -41,7 +41,8 @@ { "title": "Changelog", "url": "https://github.com/derpibooru/philomena/commits/master", - "bold": true + "bold": true, + "target": "_blank" }, { "title": "FAQs", @@ -90,7 +91,8 @@ }, { "title": "Twitter", - "url": "https://twitter.com/Derpibooru" + "url": "https://twitter.com/Derpibooru", + "target": "_blank" } ] } diff --git a/lib/philomena_web/templates/layout/_footer.html.slime b/lib/philomena_web/templates/layout/_footer.html.slime index 4b3f0587..72fb1d54 100644 --- a/lib/philomena_web/templates/layout/_footer.html.slime +++ b/lib/philomena_web/templates/layout/_footer.html.slime @@ -5,13 +5,13 @@ footer#footer = for column <- footer_data["cols"] do .footercol h5 = column - + = for row <- footer_data[column] do = if row["bold"] do strong - a href=row["url"] = row["title"] + a href=row["url"] target=row["target"]||"_self" = row["title"] - else - a href=row["url"] = row["title"] + a href=row["url"] target=row["target"]||"_self" = row["title"] br #serving_info