Move navigation to an include

This commit is contained in:
Vincevrp 2019-01-18 17:17:56 +01:00 committed by Vince
parent 3e03c6f79c
commit 68bca5a02c
2 changed files with 173 additions and 179 deletions

95
_includes/nav.html Normal file
View File

@ -0,0 +1,95 @@
<nav id="navbar" class="navbar fixed-top navbar-expand-lg navbar-dark bg-dark">
<div class="container">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
{% assign prefix = "" %}
{% if page.active_page %}
{% assign prefix = "index.html" %}
{% endif %}
<li class="nav-item">
<a class="nav-link" href="{{prefix}}#top"><i class="fas fa-home"></i> <span class="sr-only">Home</span></a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="providerDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Provider
</a>
<div class="dropdown-menu" aria-labelledby="providerDropdown">
<a class="dropdown-item" href="{{prefix}}#ukusa"><i class="fab fa-creative-commons-nc"></i> Avoid all US and UK based services</a>
<a class="dropdown-item" href="{{prefix}}#vpn"><i class="far fa-eye-slash"></i> Virtual Private Network (VPN)</a>
<a class="dropdown-item" href="{{prefix}}#email"><i class="fas fa-mail-bulk"></i> Privacy Email</a>
<a class="dropdown-item" href="{{prefix}}#wc"><i class="fa fa-exclamation-circle"></i> Warrant Canaries</a>
<a class="dropdown-item" href="{{prefix}}#cloud"><i class="fas fa-cloud"></i> Encrypted Cloud Storage Services</a>
<a class="dropdown-item" href="{{prefix}}#social"><i class="fas fa-expand-arrows-alt"></i> Decentralized Social Networks</a>
<a class="dropdown-item" href="{{prefix}}#dns"><i class="fa fa-tasks"></i> Domain Name System (DNS)</a>
<a class="dropdown-item" href="{{prefix}}#search"><i class="fab fa-searchengin"></i> Privacy Respecting Search Engines</a>
<a class="dropdown-item" href="{{prefix}}#host"><i class="fas fa-database"></i> Secure Hosting Providers</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="browserDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Browser
</a>
<div class="dropdown-menu" aria-labelledby="browserDropdown">
<a class="dropdown-item" href="{{prefix}}#browser"><i class="fas fa-check"></i> Recommendation</a>
<a class="dropdown-item" href="{{prefix}}#fingerprint"><i class="fas fa-fingerprint"></i> Fingerprint</a>
<a class="dropdown-item" href="{{prefix}}#webrtc"><i class="far fa-eye"></i> WebRTC IP Leak</a>
<a class="dropdown-item" href="{{prefix}}#addons"><i class="far fa-list-alt"></i> Firefox Privacy Add-ons</a>
<a class="dropdown-item" href="{{prefix}}#about_config"><i class="fas fa-wrench"></i> Privacy Related Tweaks</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="softwareDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Software
</a>
<div class="dropdown-menu" aria-labelledby="softwareDropdown">
<a class="dropdown-item" href="{{prefix}}#clients"><i class="fas fa-envelope"></i> Email Clients</a>
<a class="dropdown-item" href="{{prefix}}#messaging"><i class="fas fa-random"></i> Email Alternatives</a>
<a class="dropdown-item" href="{{prefix}}#im"><i class="fab fa-telegram-plane"></i> Instant Messenger</a>
<a class="dropdown-item" href="{{prefix}}#voip"><i class="fas fa-phone"></i> Video & Voice Messenger</a>
<a class="dropdown-item" href="{{prefix}}#filesharing"><i class="fas fa-file-export"></i> File Sharing</a>
<a class="dropdown-item" href="{{prefix}}#mycloud"><i class="fas fa-hdd"></i> Self-Hosted Cloud Server</a>
<a class="dropdown-item" href="{{prefix}}#sync"><i class="fas fa-copy"></i> Secure File Sync</a>
<a class="dropdown-item" href="{{prefix}}#pw"><i class="fas fa-user-lock"></i> Password Manager</a>
<a class="dropdown-item" href="{{prefix}}#calendar_contacts"><i class="far fa-calendar-alt"></i> Calendar and Contacts Sync</a>
<a class="dropdown-item" href="{{prefix}}#encrypt"><i class="fas fa-lock"></i> File Encryption</a>
<a class="dropdown-item" href="{{prefix}}#darknets"><i class="fas fa-user-secret"></i> Self-contained Networks</a>
<a class="dropdown-item" href="{{prefix}}#notebook"><i class="far fa-sticky-note"></i> Digital Notebook</a>
<a class="dropdown-item" href="{{prefix}}#paste"><i class="fas fa-paste"></i> Paste Services</a>
<a class="dropdown-item" href="{{prefix}}#productivity"><i class="fas fa-briefcase"></i> Productivity Tools</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="osDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
OS
</a>
<div class="dropdown-menu" aria-labelledby="osDropdown">
<a class="dropdown-item" href="{{prefix}}#os"><i class="fas fa-th-large"></i> PC OS</a>
<a class="dropdown-item" href="{{prefix}}#live_os"><i class="fas fa-compact-disc"></i> Live CD OS</a>
<a class="dropdown-item" href="{{prefix}}#mobile_os"><i class="fas fa-mobile-alt"></i> Mobile OS</a>
<a class="dropdown-item" href="{{prefix}}#aaddons"><i class="fas fa-th"></i> Android Privacy Add-ons</a>
<a class="dropdown-item" href="{{prefix}}#firmware"><i class="fas fa-signal"></i> Router Firmware</a>
<a class="dropdown-item" href="{{prefix}}#win10"><i class="far fa-thumbs-down"></i> Don't use Windows 10</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="#participate">Participate</a>
</li>
</ul>
<ul class="navbar-nav">
{% if page.active_page == "donate" %}
<li class="nav-item active">
<a class="nav-link" href="#">Donate <i class="fas fa-heart text-danger"></i></a>
</li>
{% else %}
<li class="nav-item">
<a class="nav-link" href="donate.html">Donate <i class="fas fa-heart text-danger"></i></a>
</li>
{% endif %}
</ul>
</div>
</div>
</nav>

View File

@ -3,7 +3,7 @@
<!-- set the default language as English --> <!-- set the default language as English -->
<html lang="en"> <html lang="en">
<head> <head>
<!-- tags for Search Engine Optimization --> <!-- tags for Search Engine Optimization -->
<meta charset="utf-8"> <meta charset="utf-8">
@ -46,11 +46,6 @@
<!-- CSS stylesheets --> <!-- CSS stylesheets -->
<link href="assets/css/style.css?v=5" rel="stylesheet"> <link href="assets/css/style.css?v=5" rel="stylesheet">
<!--[if lt IE 9]>
<script src="js/html5shiv.min.js"></script>
<script src="js/respond.min.js"></script>
<![endif]-->
<!-- Open Graph Protocol tags for SEO --> <!-- Open Graph Protocol tags for SEO -->
<meta property="og:title" content="Privacy Tools | Encryption against global mass surveillance" /> <meta property="og:title" content="Privacy Tools | Encryption against global mass surveillance" />
<meta property="og:type" content="website" /> <meta property="og:type" content="website" />
@ -60,150 +55,54 @@
/> />
<meta property="og:locale" content="en_US" /> <meta property="og:locale" content="en_US" />
<meta property="og:site_name" content="privacytools.io" /> <meta property="og:site_name" content="privacytools.io" />
</head> </head>
<body data-spy="scroll" data-target="#navbar"> <body data-spy="scroll" data-target="#navbar">
<!-- navigation starts -->
<nav id="navbar" class="navbar fixed-top navbar-expand-lg navbar-dark bg-dark"> {% include nav.html %}
<div class="container">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent"> <div id="top" class="py-4">
<ul class="navbar-nav mr-auto"> <div class="mb-5"></div>
{% assign prefix = "" %} {{ content }}
{% if page.active_page %}
{% assign prefix = "index.html" %}
{% endif %}
<li class="nav-item">
<a class="nav-link" href="{{prefix}}#top"><i class="fas fa-home"></i> <span class="sr-only">Home</span></a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="providerDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Provider
</a>
<div class="dropdown-menu" aria-labelledby="providerDropdown">
<a class="dropdown-item" href="{{prefix}}#ukusa"><i class="fab fa-creative-commons-nc"></i> Avoid all US and UK based services</a>
<a class="dropdown-item" href="{{prefix}}#vpn"><i class="far fa-eye-slash"></i> Virtual Private Network (VPN)</a>
<a class="dropdown-item" href="{{prefix}}#email"><i class="fas fa-mail-bulk"></i> Privacy Email</a>
<a class="dropdown-item" href="{{prefix}}#wc"><i class="fa fa-exclamation-circle"></i> Warrant Canaries</a>
<a class="dropdown-item" href="{{prefix}}#cloud"><i class="fas fa-cloud"></i> Encrypted Cloud Storage Services</a>
<a class="dropdown-item" href="{{prefix}}#social"><i class="fas fa-expand-arrows-alt"></i> Decentralized Social Networks</a>
<a class="dropdown-item" href="{{prefix}}#dns"><i class="fa fa-tasks"></i> Domain Name System (DNS)</a>
<a class="dropdown-item" href="{{prefix}}#search"><i class="fab fa-searchengin"></i> Privacy Respecting Search Engines</a>
<a class="dropdown-item" href="{{prefix}}#host"><i class="fas fa-database"></i> Secure Hosting Providers</a>
</div> </div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="browserDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Browser
</a>
<div class="dropdown-menu" aria-labelledby="browserDropdown">
<a class="dropdown-item" href="{{prefix}}#browser"><i class="fas fa-check"></i> Recommendation</a>
<a class="dropdown-item" href="{{prefix}}#fingerprint"><i class="fas fa-fingerprint"></i> Fingerprint</a>
<a class="dropdown-item" href="{{prefix}}#webrtc"><i class="far fa-eye"></i> WebRTC IP Leak</a>
<a class="dropdown-item" href="{{prefix}}#addons"><i class="far fa-list-alt"></i> Firefox Privacy Add-ons</a>
<a class="dropdown-item" href="{{prefix}}#about_config"><i class="fas fa-wrench"></i> Privacy Related Tweaks</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="softwareDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Software
</a>
<div class="dropdown-menu" aria-labelledby="softwareDropdown">
<a class="dropdown-item" href="{{prefix}}#clients"><i class="fas fa-envelope"></i> Email Clients</a>
<a class="dropdown-item" href="{{prefix}}#messaging"><i class="fas fa-random"></i> Email Alternatives</a>
<a class="dropdown-item" href="{{prefix}}#im"><i class="fab fa-telegram-plane"></i> Instant Messenger</a>
<a class="dropdown-item" href="{{prefix}}#voip"><i class="fas fa-phone"></i> Video & Voice Messenger</a>
<a class="dropdown-item" href="{{prefix}}#filesharing"><i class="fas fa-file-export"></i> File Sharing</a>
<a class="dropdown-item" href="{{prefix}}#mycloud"><i class="fas fa-hdd"></i> Self-Hosted Cloud Server</a>
<a class="dropdown-item" href="{{prefix}}#sync"><i class="fas fa-copy"></i> Secure File Sync</a>
<a class="dropdown-item" href="{{prefix}}#pw"><i class="fas fa-user-lock"></i> Password Manager</a>
<a class="dropdown-item" href="{{prefix}}#calendar_contacts"><i class="far fa-calendar-alt"></i> Calendar and Contacts Sync</a>
<a class="dropdown-item" href="{{prefix}}#encrypt"><i class="fas fa-lock"></i> File Encryption</a>
<a class="dropdown-item" href="{{prefix}}#darknets"><i class="fas fa-user-secret"></i> Self-contained Networks</a>
<a class="dropdown-item" href="{{prefix}}#notebook"><i class="far fa-sticky-note"></i> Digital Notebook</a>
<a class="dropdown-item" href="{{prefix}}#paste"><i class="fas fa-paste"></i> Paste Services</a>
<a class="dropdown-item" href="{{prefix}}#productivity"><i class="fas fa-briefcase"></i> Productivity Tools</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="osDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
OS
</a>
<div class="dropdown-menu" aria-labelledby="osDropdown">
<a class="dropdown-item" href="{{prefix}}#os"><i class="fas fa-th-large"></i> PC OS</a>
<a class="dropdown-item" href="{{prefix}}#live_os"><i class="fas fa-compact-disc"></i> Live CD OS</a>
<a class="dropdown-item" href="{{prefix}}#mobile_os"><i class="fas fa-mobile-alt"></i> Mobile OS</a>
<a class="dropdown-item" href="{{prefix}}#aaddons"><i class="fas fa-th"></i> Android Privacy Add-ons</a>
<a class="dropdown-item" href="{{prefix}}#firmware"><i class="fas fa-signal"></i> Router Firmware</a>
<a class="dropdown-item" href="{{prefix}}#win10"><i class="far fa-thumbs-down"></i> Don't use Windows 10</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="#participate">Participate</a>
</li>
</ul>
<ul class="navbar-nav">
{% if page.active_page == "donate" %}
<li class="nav-item active">
<a class="nav-link" href="#">Donate <i class="fas fa-heart text-danger"></i></a>
</li>
{% else %}
<li class="nav-item">
<a class="nav-link" href="donate.html">Donate <i class="fas fa-heart text-danger"></i></a>
</li>
{% endif %}
</ul>
</div>
</div>
</nav>
<!-- navigation ends here -->
<div id="top" class="py-4"> <!-- add jQuery, Popper, Bootstrap, Sortable, and tooltip libraries -->
<div class="mb-5"></div> <script src="assets/js/jquery-3.3.1.min.js?v=4"></script>
{{ content }} <script src="assets/js/popper.min.js?v=4"></script>
</div> <script src="assets/js/bootstrap.min.js?v=4"></script>
<script src="assets/js/sortable.min.js?v=4"></script>
<!-- add jQuery, Popper, Bootstrap, Sortable, and tooltip libraries --> <script>
<script src="assets/js/jquery-3.3.1.min.js?v=4"></script>
<script src="assets/js/popper.min.js?v=4"></script>
<script src="assets/js/bootstrap.min.js?v=4"></script>
<script src="assets/js/sortable.min.js?v=4"></script>
<script>
$(function () { $(function () {
$("[data-toggle='tooltip']").tooltip(); $("[data-toggle='tooltip']").tooltip();
}); });
$('.navbar a').not(".dropdown-toggle").click(function (e) { $('.navbar a').not(".dropdown-toggle").click(function (e) {
if ($(".navbar-toggler").is(":visible")) { if ($(".navbar-toggler").is(":visible")) {
$('.navbar-collapse').collapse('toggle'); $('.navbar-collapse').collapse('toggle');
} }
}); });
</script> </script>
<!-- <!--
Piwik is the leading open-source analytics platform: Piwik is the leading open-source analytics platform:
- Free open-source software - Free open-source software
- 100% data ownership - 100% data ownership
- User privacy protection - User privacy protection
--> -->
<script> <script>
var _paq = _paq || []; var _paq = _paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */ /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']); _paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']); _paq.push(['enableLinkTracking']);
(function() { (function() {
var u="//piwik.privacytools.io/"; var u="//piwik.privacytools.io/";
_paq.push(['setTrackerUrl', u+'piwik.php']); _paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', '1']); _paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s); g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})(); })();
</script> </script>
<noscript><p><img src="//piwik.privacytools.io/piwik.php?idsite=1&rec=1" style="border:0;" alt="" /></p></noscript> <noscript><p><img src="//piwik.privacytools.io/piwik.php?idsite=1&rec=1" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code --> <!-- End Piwik Code -->
</body> </body>
</html> </html>