diff --git a/_data/navigation.yaml b/_data/navigation.yaml index 0a3990cd3b7d58487ffadc38e8c4a5b16cbe546a..023ba46f45c4ba2eacc0c370297560a161a981fb 100644 --- a/_data/navigation.yaml +++ b/_data/navigation.yaml @@ -1,15 +1,103 @@ - key : browse + title : browse__title url : /packages/ -- key : forum - url : https://forum.f-droid.org - external : true + locations : {"hero", + "dropMenu", # drop-down menu AND footer + "internal"} + +- key : about + url : /about/ + locations : {"hero", + "dropMenu", + "internal"} + +- key : installation + title : installation__title + url : /docs/Security_Model/#initial-installs + locations : {"dropMenu"} + +- key : faq + url : /docs/ + locations : {"hero", + "dropMenu", + "internal"} + - key : documentation url : /docs/ + locations : {"community"} # first of the 'Community' links + - key : news + title : news__title url : /news/ + locations : {"hero", + "dropMenu", + "internal"} + +- key : forum + url : https://forum.f-droid.org + external : true + locations : {"hero", + "internal", + "community"} + +# drop-down menu and footer 'secondary links' +- key : security + title : security__title + url : /docs/Security_Model/ + locations : {"drop2"} + +- key : privacy + title : privacy__title + url : /2019/05/05/trust-privacy-and-free-software.html + locations : {"drop2"} + +- key : contacts + title : contacts__title + url : /about/#contact + locations : {"drop2"} + +# the remaining 'Community' links +- key : repo + title : repo__title + url : https://gitlab.com/fdroid/fdroidclient + external : true + locations : {"community"} + - key : issues + title : issues__title url : /issues/ + locations : {"community"} + +- key : become_a_mirror + url : /docs/Running_a_Mirror/ + locations : {"community"} + - key : contribute url : /contribute/ -- key : about - url : /about/ + locations : {"internal", + "community"} + +- key : social__fediverse__alt + title : social__fediverse__title + url : https://mastodon.technology/@fdroidorg + class : fediverse + external : true + locations : {"social"} + +- key : social__twitter__alt + title : social__twitter__title + url : https://twitter.com/fdroidorg + class : twitter + external : true + locations : {"social"} + +- key : social__rss__alt + title : social__rss__title + url : https://f-droid.org/en/feed.xml + class : rss + external : true + locations : {"social"} + +# Search +- key : search_site + url : https://search.f-droid.org/ diff --git a/_data/strings.json b/_data/strings.json index 01bec46af9787f7bab354740c92bbbc79e38450c..f885edeb5d3a381f00d83bbe6039b5d00d405000 100644 --- a/_data/strings.json +++ b/_data/strings.json @@ -20,12 +20,36 @@ }, "navigation": { "about": "About", + "become_a_mirror": "Become a Mirror", "browse": "Browse", + "browse__title": "App list from A to Z", + "celebrating_10yrs_service": "Celebrating 10 years of service since 2010", + "community": "Community", + "contacts": "Contacts", + "contacts__title": "Contributors and Consultants", "contribute": "Contribute", "documentation": "Docs", + "documentation__alt": "Documentation", + "faq": "FAQs", "forum": "Forum", - "issues": "Issues", - "news": "News" + "installation": "Installation", + "installation__title": "Secure download and install", + "issues": "Report issues", + "issues__title": "See and report issues", + "news": "News", + "news__title": "Posts by F-Droid Contributors", + "privacy": "Privacy", + "privacy__title": "Trust, Privacy, and Free Software", + "repo": "Gitlab", + "repo__title": "F-Droid source-code", + "security": "Security", + "security__title": "The Security Model", + "social__fediverse__alt": "Mastodon icon", + "social__fediverse__title": "Toot us on the Fediverse", + "social__rss__alt": "RSS icon", + "social__rss__title": "RSS feed", + "social__twitter__alt": "Twitter icon", + "social__twitter__title": "On Twitter" }, "package": { "anti_features": "Anti-Features", diff --git a/_includes/header.html b/_includes/header.html index 23f5e0d28f7b493f8f70d48817b25cb3e345b4c7..9aa8436123ee4fbc48020ab79483bc71220a10e4 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -3,18 +3,40 @@ {{ site.header-title }} +
+ {% include language-selector.html checkbox_menu_id="header-lang" hideOnPhone=true %} - - +
+ {% assign menu_id = "header-ellipsis" %} + + +
+ + +
+ +
+
+ diff --git a/_includes/language-selector.html b/_includes/language-selector.html new file mode 100644 index 0000000000000000000000000000000000000000..617eb241cf17f28fac37393a5ff7637f8d3b292f --- /dev/null +++ b/_includes/language-selector.html @@ -0,0 +1,25 @@ +{% comment %} + The language chooser is now a checkbox/radio button hack that opens a dropdown list of the languages + that can be scrolled through on small screens which link to the same page but in the different language. +{% endcomment %} + +{% assign strings = site.data.strings.sidebars.lang %} + +
+ + +
+ + +
+
+
+ {% for lang in site.languages %} + + {{ site.data.languagenames[lang] }} + + {% endfor %} +
+
+
diff --git a/_includes/nav-generator.html b/_includes/nav-generator.html new file mode 100644 index 0000000000000000000000000000000000000000..580c0d239e119bd1c54830cf264e2f6b7a70db7c --- /dev/null +++ b/_includes/nav-generator.html @@ -0,0 +1,12 @@ +{% for nav-item in site.data.navigation %} + {% if nav-item.key and nav-item.locations contains include.nav_location %} + {% assign text = site.data.strings.navigation[nav-item.key] %} + {% assign title = site.data.strings.navigation[nav-item.title] %} + {% if nav-item.external %} + {{ text }} + {% else %} + {{ text }} + {% endif %} + {% endif %} +{% endfor %} + diff --git a/_includes/sidebar-lang.html b/_includes/sidebar-lang.html deleted file mode 100644 index c8c20d29e4ee262b26f2d6c0fd4500c043d9cb76..0000000000000000000000000000000000000000 --- a/_includes/sidebar-lang.html +++ /dev/null @@ -1,26 +0,0 @@ -{% comment %} - The language chooser is a drop down list which displays the relevant flag to the left. - If JavaScript is enabled, then it will automatically redirect to the relevant translation when changed. - If the user has JavaScript disabled, then it will show a submit button, and the .htaccess file will rewrite - the incoming "?lang=..." query parameter to the correct translated path. -{% endcomment %} - -{% assign strings = site.data.strings.sidebars.lang %} - -
- - - - - - - -
diff --git a/_includes/sidebar-search.html b/_includes/sidebar-search.html index cea8b6d5d07bdb223aa0535b0590fcac1b7128f1..4d4c7a4934f2f608640d5f9b957760974a1f5188 100644 --- a/_includes/sidebar-search.html +++ b/_includes/sidebar-search.html @@ -1,7 +1,20 @@ + +{% comment %} + See 'post.html' for reasoning on the below annoying loop +{% endcomment %} + +{% assign searchUrl = 0 %} +{% for navItem in site.data.navigation %} + {% if navItem.key == 'search_site' %} + {% assign searchUrl = navItem.url %} + {% break %} + {% endif %} +{% endfor %} +

{{ site.data.strings.sidebars.search.heading }}

-
+
diff --git a/_includes/underlined-search.html b/_includes/underlined-search.html new file mode 100644 index 0000000000000000000000000000000000000000..da68cebf7da12566ec8709d1875b0b0360907d7b --- /dev/null +++ b/_includes/underlined-search.html @@ -0,0 +1,20 @@ + +{% comment %} + See 'post.html' for reasoning on the below annoying loop +{% endcomment %} + +{% assign searchUrl = 0 %} +{% for navItem in site.data.navigation %} + {% if navItem.key == 'search_site' %} + {% assign searchUrl = navItem.url %} + {% break %} + {% endif %} +{% endfor %} + + +
+ + + +
+
diff --git a/_layouts/default-package-sidebar.html b/_layouts/default-package-sidebar.html index 7b818d0c8fecae36c0d3348735e40f4e5921e73f..14c0f80a2abdc4203ce6e52b43d2916d5cf8812a 100644 --- a/_layouts/default-package-sidebar.html +++ b/_layouts/default-package-sidebar.html @@ -21,7 +21,9 @@