side bar, breadcrumbs, navigation

This commit is contained in:
antil0pa 2019-07-01 13:59:46 +02:00
parent b2d152e9fe
commit 5a437bcadc
11 changed files with 228 additions and 190 deletions

View File

@ -11,7 +11,7 @@ page-toc:
active: true
---
## The User Interface (UI)
# The User Interface (UI)
<br>
@ -59,7 +59,7 @@ The levels you can choose are:
!! ![](en/note.png)
!! **NOTE!** **You should pay extra attention when filling up this information *(which is optional)* and decide how much information about yourself you want to share and reveal to others.**
!! **NOTE!** You should pay extra attention when filling up this information *(which is optional)* and decide how much information about yourself you want to share and reveal to others.
## Other information and settings
Below the profile picture you can see:
@ -119,7 +119,7 @@ You can add as many devices as you like. It is recommended to give each device a
Here you can decide whether or not an administrator will be able to recover your files in case you loose your password. This option is disabled by default as it enables admins of Disroot to decrypt and view your files.
!! ![](en/note.png)
!! **NOTE!** **Enabling this option after your password was lost will not recover your files!** You need to make this decision beforehand. **We strongly encourage you to never loose your password in the first place and keep it stored safe.**<br>This is the best way to keep your files and your account safe. We really don't want to have access to it.
!! **NOTE!** Enabling this option after your password was lost will not recover your files! <br>You must make this decision beforehand. We strongly encourage you keep your password stored in a safe place.<br>This is the best way to keep your files and your account safe. We really don't want to have access to it.
![](en/basic_encryption.png)

View File

@ -36,10 +36,16 @@ body {
margin: 0 auto;
}
.narrow{
max-width: 60%;
margin: 0 auto
.narrow {
max-width: 70%;
margin: 0 auto;
}
.centered {
float: none;
margin: 0 auto;
}
/* fixed width for IE8 */
.ie .row { width: 1000px ; }

View File

@ -4,32 +4,18 @@
@media (max-width: 1200px) and (min-width:901px) {
.hive {
width: 90%;
}
#hexGrid{
-o-transform: scale(1.26,1.26);
-ms-transform: scale(1.26,1.26);
-sand-transform: rotate(1.26,1.26);
-webkit-transform: scale(1.26,1.26);
transform: scale(0.8,0.8);
padding-bottom: 5.5%;
font-size: 13px;
}
/* .hex:nth-child(3){ /* 3nd hexagon */
/* top: 130px;
left: 110px;
}*/
/* .hex:nth-child(6){ /* 6th hexagon */
/* top: -115px;
left: 330px;
}*/
}
@media (max-width: 1040px) {
body {
font-size: 85%;
}
/* sidebar */
#sidebar {
display: none;
}
}
@media only screen and (max-width: 767px) {
@ -37,7 +23,7 @@
.narrow{
max-width: 100%;
margin: 0 auto
}
}
/* mobile navigation
------------------------------------*/
@ -118,43 +104,15 @@
clear: both;
}
/* sidebar */
#sidebar {
display: none;
}
}
@media (max-width: 900px) and (min-width:601px) {
#hexGrid{
padding-bottom: 7.4%;
font-size: 14px;
}
.hex:nth-child(3){
top: 130px;
left:0px;
}
.hex:nth-child(6){
top: -115px;
left: 330px;
}
}
@media (max-width: 600px) {
#hexGrid{
padding-bottom: 11.2%;
font-size: 12px;
}
.hex {
width: 50%;
}
.hex:nth-child(3n+3){
margin-left:25%;
}
}
@media (max-width: 400px) {
#hexGrid {
font-size: 8px;
}
}

View File

@ -98,6 +98,17 @@ a:hover {
.content img {
display: block;
margin: 2% auto;
max-width: 80%;
}
.notices.red {
background-color: #efeeee;
color: var(--primary-color);
border-color: var(--alternative-color);
}
.notices {
font-size: 90%;
}
/* Content Styling */
@ -232,8 +243,9 @@ a:hover {
transform: skew(0deg, 1deg) translateY(-10px);
}
.title h5 {
.topbar {
color: var(--alternative-color);
margin: 10px 0;
}
.search {
@ -283,24 +295,33 @@ a:hover {
filter: grayscale(30%);
}
/* topbar */
/* sidebar */
#sidebar {
max-width: 250px;
top: 150px;
padding-top: 10px;
margin-left: 20px;
margin-bottom: 10px;
}
.page-toc {
max-width: 250px;
padding: 4px;
padding: 10px;
margin-left: 0;
margin-right: 0;
margin-bottom: 1rem;
margin-top: 10px;
margin-top: 5rem;
font-size: 0.7rem;
overflow: hidden;
border: none;
border-radius: 10px;
border-radius: 0px;
background: #efeeee;
}
.page-toc:hover {
box-shadow: 10px 10px 38px 0px rgba(0, 0, 0, 0.25);
}
.toc-toggle {

View File

@ -7,18 +7,6 @@
{% set progress = page.collection({'items':{'@taxonomy':{'category': 'docs'}},'order': {'by': 'default', 'dir': 'asc'}}) %}
{% endif %}
{% block navigation %}
<div id="navigation">
{% if not progress.isFirst(page.path) %}
<a class="nav nav-prev" href="{{ progress.nextSibling(page.path).url }}"> <i class="fa fa-chevron-left"></i></a>
{% endif %}
{% if not progress.isLast(page.path) %}
<a class="nav nav-next" href="{{ progress.prevSibling(page.path).url }}"><i class="fa fa-chevron-right"></i></a>
{% endif %}
</div>
{% endblock %}
{% set showsidebar = false %}
{% if (grav.theme.config.params.sidebar.show.categories) or (grav.theme.config.params.sidebar.show.popular) or (grav.theme.config.params.sidebar.show.latest) %}
@ -26,12 +14,15 @@
{% endif %}
{% block content %}
<div class="wrapper">
{% block sidebar %}
<section id="sidebar" class="column pull-right">
<section id="sidebar" class="pull-right">
{% include 'partials/sidebar.html.twig' %}
</section>
{% endblock %}
{% include 'partials/page.html.twig' %}
</div>
{% endblock %}

View File

@ -57,11 +57,7 @@
{% endblock %}
{% block footer %}
<div class="footer text-center">
<div class="wrapper padding">
<p><a href="http://getgrav.org">Grav</a> was <i class="fa fa-code"></i> with <i class="fa fa-heart"></i> by <a href="http://www.rockettheme.com">RocketTheme</a>.</p>
</div>
</div>
{% include 'partials/footer.html.twig' %}
{% endblock %}
{% block bottom %}

View File

@ -0,0 +1,21 @@
<div class="footer text-center">
<div class="wrapper padding">
<div id="navigation">
{% if theme_var('github.link') %}
{% include 'partials/github-link.html.twig' %}
{% endif %}
{% if not progress.isFirst(page.path) %}
<a class="nav-prev tooltip tooltip-bottom left" data-tooltip="Previous Page [&larr;]" href="{{ progress.nextSibling(page.path).url }}">{{ progress.nextSibling(page.path).title }} <i class="fa fa-angle-left"></i></a>
{% else %}
<span class="disabled"><i class="fa fa-angle-left"></i></span>
{% endif %}
{% if not progress.isLast(page.path) %}
<a class="nav-next tooltip tooltip-bottom right" data-tooltip="Next Page [&rarr;]" href="{{ progress.prevSibling(page.path).url }}"><i class="fa fa-angle-right"></i> {{ progress.prevSibling(page.path).title }}</a>
{% else %}
<span class="disabled"><i class="fa fa-angle-right"></i></span>
{% endif %}
</div>
<div class="progress"></div>
<p><a href="http://getgrav.org">Grav</a> was <i class="fa fa-code"></i> with <i class="fa fa-heart"></i> by <a href="http://www.rockettheme.com">RocketTheme</a>.</p>
</div>
</div>

View File

@ -1,15 +1,15 @@
{% block body %}
<div id="body-inner">
<article>
<section class="title wrapper">
<h5>
{{ page.title|e }}
</h5>
<section class="topbar wrapper">
{% block topbar %}
{% include 'partials/topbar.html.twig' %}
{% endblock %}
</section>
{% include 'partials/docmeta.html.twig' %}
<section class="content narrow column centered">
<section class="content narrow centered">
{{ page.content|raw }}
<p></p>
</section>

View File

@ -1,3 +1,10 @@
{% if not progress.isLast(page.path) %}
<a class="nav-next tooltip tooltip-bottom push-right" data-tooltip="Next Page [&rarr;]" href="{{ progress.prevSibling(page.path).url }}"><i class="fa fa-angle-right"></i> {{ progress.prevSibling(page.path).title }}</a>
{% else %}
<span class="disabled"><i class="fa fa-angle-right"></i></span>
{% endif %}
{% if config.get('plugins.page-toc.active') or attribute(page.header, 'page-toc').active %}
<div class="page-toc">
{% set table_of_contents = toc(page.content) %}
@ -8,108 +15,3 @@
{% endif %}
</div>
{% endif %}
{% if config.plugins.relatedpages.enabled and related_pages|length > 0 %}
<h4>Related Posts</h4>
{% include 'partials/relatedpages.html.twig' %}
{% endif %}
{% set homeroute = '/home' %}
{% if grav.theme.config.params.articleroot is defined %}
{% set homeroute = grav.theme.config.params.articleroot %}
{% endif %}
{% if grav.theme.config.params.articles.root is defined %}
{% set homeroute = grav.theme.config.params.articles.root %}
{% endif %}
{% set options = { items: {'@page.descendants': homeroute}, 'order': {'by': 'date', 'dir': 'desc'}} %}
{% set my_collection = page.collection(options) %}
{% set catlist = taxonomy.taxonomy["category"]|keys %}
{% set blist = [] %}
{% if grav.theme.config.params.articles.blacklist is defined %}
{% set blist = grav.theme.config.params.articles.blacklist %}
{% set tmplst = [] %}
{% for cat in catlist %}
{% if cat not in blist %}
{% set tmplst = tmplst|merge([cat]) %}
{% endif %}
{% endfor %}
{% set catlist = tmplst %}
{% endif %}
{% if grav.theme.config.params.sidebar.show.categories %}
<div>
<h4><span>{{ 'CATEGORIES'|t }}</span></h4>
<ul style="padding-left: 1rem">
{% for cat in catlist|sort %}
{# Check to see if a dedicated category page exists #}
{% set slug = cat|hyphenize|url_encode %}
{% set p = page.find('/categories/'~slug) %}
{% if p == null %}
<li><a href="{{ base_url }}/taxonomy?name=category&amp;val={{ cat|url_encode }}">{{ cat }}</a></li>
{% else %}
<li><a href="{{ base_url }}/categories/{{slug}}">{{ cat }}</a></li>
{% endif %}
{% endfor %}
</ul>
</div>
{% endif %}
{% set maxcount = 5 %}
{% if grav.theme.config.params.sidebar.maxentries is defined %}
{% set maxcount = grav.theme.config.params.sidebar.maxentries %}
{% endif %}
{% if grav.theme.config.params.sidebar.show.popular %}
<div class="topiclist">
{% set counts = viewcounts|sort|reverse %}
{% set popular = [] %}
{% for route,views in counts %}
{% if route starts with homeroute %}
{% set thispage = page.find(route) %}
{% if thispage is not null %}
{% set popular = popular|merge([thispage]) %}
{% endif %}
{% endif %}
{% endfor %}
{% set tmplst = [] %}
{% for page in popular %}
{% set blisted = false %}
{% for bcat in blist %}
{% if bcat in page.taxonomy["category"] %}
{% set blisted = true %}
{% endif %}
{% endfor %}
{% if not blisted %}
{% set tmplst = tmplst|merge([page]) %}
{% endif %}
{% endfor %}
{% set popular = tmplst %}
<h4><span>{{ 'POPULAR_ARTICLES'|t }}</span></h4>
{% include 'partials/topiclist.html.twig' with {'articles': popular, 'maxcount': maxcount} %}
</div>
{% endif %}
{% if grav.theme.config.params.sidebar.show.latest %}
<div class="topiclist">
<h4><span>{{ 'LATEST_ARTICLES'|t }}</span></h4>
{% set tmplst = [] %}
{% for page in my_collection %}
{% set blisted = false %}
{% for bcat in blist %}
{% if bcat in page.taxonomy["category"] or (page.header.published is defined and not page.header.published) %}
{# Setting this to blacklisted when the category is in the blacklist OR if the page isn't yet published #}
{% set blisted = true %}
{% endif %}
{% endfor %}
{% if not blisted %}
{% set tmplst = tmplst|merge([page]) %}
{% endif %}
{% endfor %}
{% set articles = tmplst|slice(0,maxcount) %}
{% include 'partials/topiclist.html.twig' with {'articles': articles, 'maxcount': maxcount} %}
</div>
{% endif %}

View File

@ -0,0 +1,131 @@
<div id="navigation">
{% if theme_var('github.link') %}
{% include 'partials/github-link.html.twig' %}
{% endif %}
{% if not progress.isFirst(page.path) %}
<!--a class="nav-prev tooltip tooltip-bottom" data-tooltip="Previous Page [&larr;]" href="{{ progress.nextSibling(page.path).url }}">{{ progress.nextSibling(page.path).title }} <i class="fa fa-angle-left"></i></a-->
{% else %}
<!--span class="disabled"><i class="fa fa-angle-left"></i></span-->
{% endif %}
{% if not progress.isLast(page.path) %}
<a class="nav-next tooltip tooltip-bottom push-right" data-tooltip="Next Page [&rarr;]" href="{{ progress.prevSibling(page.path).url }}"><i class="fa fa-angle-right"></i> NEXT PAGE: {{ progress.prevSibling(page.path).title }}</a>
{% else %}
<span class="disabled"><i class="fa fa-angle-right"></i></span>
{% endif %}
</div>
<div class="progress"></div>
{% if config.get('plugins.page-toc.active') or attribute(page.header, 'page-toc').active %}
<div class="page-toc">
{% set table_of_contents = toc(page.content) %}
{% if table_of_contents is not empty %}
<span class="toc-toggle"><i class="fa fa-angle-up"></i></span>
<h5>Table of Content</h5>
{{ table_of_contents|raw }}
{% endif %}
</div>
{% endif %}
{% if config.plugins.relatedpages.enabled and related_pages|length > 0 %}
<h4>Related Posts</h4>
{% include 'partials/relatedpages.html.twig' %}
{% endif %}
{% set homeroute = '/home' %}
{% if grav.theme.config.params.articleroot is defined %}
{% set homeroute = grav.theme.config.params.articleroot %}
{% endif %}
{% if grav.theme.config.params.articles.root is defined %}
{% set homeroute = grav.theme.config.params.articles.root %}
{% endif %}
{% set options = { items: {'@page.descendants': homeroute}, 'order': {'by': 'date', 'dir': 'desc'}} %}
{% set my_collection = page.collection(options) %}
{% set catlist = taxonomy.taxonomy["category"]|keys %}
{% set blist = [] %}
{% if grav.theme.config.params.articles.blacklist is defined %}
{% set blist = grav.theme.config.params.articles.blacklist %}
{% set tmplst = [] %}
{% for cat in catlist %}
{% if cat not in blist %}
{% set tmplst = tmplst|merge([cat]) %}
{% endif %}
{% endfor %}
{% set catlist = tmplst %}
{% endif %}
{% if grav.theme.config.params.sidebar.show.categories %}
<div>
<h4><span>{{ 'CATEGORIES'|t }}</span></h4>
<ul style="padding-left: 1rem">
{% for cat in catlist|sort %}
{# Check to see if a dedicated category page exists #}
{% set slug = cat|hyphenize|url_encode %}
{% set p = page.find('/categories/'~slug) %}
{% if p == null %}
<li><a href="{{ base_url }}/taxonomy?name=category&amp;val={{ cat|url_encode }}">{{ cat }}</a></li>
{% else %}
<li><a href="{{ base_url }}/categories/{{slug}}">{{ cat }}</a></li>
{% endif %}
{% endfor %}
</ul>
</div>
{% endif %}
{% set maxcount = 5 %}
{% if grav.theme.config.params.sidebar.maxentries is defined %}
{% set maxcount = grav.theme.config.params.sidebar.maxentries %}
{% endif %}
{% if grav.theme.config.params.sidebar.show.popular %}
<div class="topiclist">
{% set counts = viewcounts|sort|reverse %}
{% set popular = [] %}
{% for route,views in counts %}
{% if route starts with homeroute %}
{% set thispage = page.find(route) %}
{% if thispage is not null %}
{% set popular = popular|merge([thispage]) %}
{% endif %}
{% endif %}
{% endfor %}
{% set tmplst = [] %}
{% for page in popular %}
{% set blisted = false %}
{% for bcat in blist %}
{% if bcat in page.taxonomy["category"] %}
{% set blisted = true %}
{% endif %}
{% endfor %}
{% if not blisted %}
{% set tmplst = tmplst|merge([page]) %}
{% endif %}
{% endfor %}
{% set popular = tmplst %}
<h4><span>{{ 'POPULAR_ARTICLES'|t }}</span></h4>
{% include 'partials/topiclist.html.twig' with {'articles': popular, 'maxcount': maxcount} %}
</div>
{% endif %}
{% if grav.theme.config.params.sidebar.show.latest %}
<div class="topiclist">
<h4><span>{{ 'LATEST_ARTICLES'|t }}</span></h4>
{% set tmplst = [] %}
{% for page in my_collection %}
{% set blisted = false %}
{% for bcat in blist %}
{% if bcat in page.taxonomy["category"] or (page.header.published is defined and not page.header.published) %}
{# Setting this to blacklisted when the category is in the blacklist OR if the page isn't yet published #}
{% set blisted = true %}
{% endif %}
{% endfor %}
{% if not blisted %}
{% set tmplst = tmplst|merge([page]) %}
{% endif %}
{% endfor %}
{% set articles = tmplst|slice(0,maxcount) %}
{% include 'partials/topiclist.html.twig' with {'articles': articles, 'maxcount': maxcount} %}
</div>
{% endif %}

View File

@ -0,0 +1,12 @@
<div id="top-bar">
{% if github_link_position == 'top' %}
<div id="top-github-link">
{% include 'partials/github_link.html.twig' %}
</div>
{% endif %}
{% if config.plugins.breadcrumbs.enabled %}
{% include 'partials/breadcrumbs.html.twig' %}
{% endif %}
</div>