restored dashboard from usable

This commit is contained in:
Bachir Soussi Chiadmi
2018-10-25 16:18:42 +02:00
commit abc70f9e12
454 changed files with 46195 additions and 0 deletions
@@ -0,0 +1,66 @@
{% set theme_config = attribute(config.themes, config.system.pages.theme) %}
<!DOCTYPE html>
<html lang="{{ grav.language.getActive ?: theme_config.default_lang }}">
<head>
{% block head %}
<meta charset="utf-8" />
<title>{% if header.title %}{{ header.title|e('html') }} | {% endif %}{{ site.title|e('html') }}</title>
{% include 'partials/metadata.html.twig' %}
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="icon" type="image/png" href="{{ url('theme://images/favicon.png', true) }}" />
<link rel="canonical" href="{{ page.url(true, true) }}" />
{% block stylesheets %}
{# {% do assets.addCss('theme://css/normalize.css') %} #}
{% do assets.addCss('theme://fonts/ubuntu/ubuntu.css') %}
{% do assets.addCss('theme://css/dashboard.css') %}
{% endblock %}
{{ assets.css() }}
{% endblock head%}
</head>
<body class="{{ page.header.body_classes }}">
<div id="container" class="_container">
{% block header %}
<header id="header" class="_row">
<div id="logo">
<h3><a href="{{base_url}}">{{ config.site.title }}</a></h3>
</div>
<div id="navbar">
{% block header_extra %}{% endblock %}
{% block header_navigation %}
{# {% include 'partials/navigation.html.twig' %} #}
<a href="https://esadhar.net/gogs/libre-creation_libre-design/usable">Git Sources</a>
{% endblock %}
</div>
</header>
{% endblock %}
{% block body %}
<div id="content" class="row">
{% block content %}{% endblock %}
</div>
{% endblock %}
{% block footer %}
<footer id="footer" class="row">
<a href="http://www.esadhar.fr">esadhar.fr</a>
</footer>
{% endblock %}
{% block bottom %}
{% endblock %}
</div>
{% block javascripts %}
{% do assets.addJs('jquery',101) %}
{% do assets.addJs('theme://js/dist/masonry.pkgd.min.js',100) %}
{% do assets.addJs('theme://js/dist/dashboard.min.js',100) %}
{% endblock %}
{{ assets.js() }}
</body>
</html>
@@ -0,0 +1,78 @@
<div class="list-item">
{% set header_image = page.header.header_image|defined(true) %}
{% set header_image_width = page.header.header_image_width|defined(900) %}
{% set header_image_height = page.header.header_image_height|defined(300) %}
{% set header_image_file = page.header.header_image_file %}
<div class="list-blog-header">
<span class="list-blog-date">
<span>{{ page.date|date("d") }}</span>
<em>{{ page.date|date("M") }}</em>
</span>
{% if page.header.link %}
<h4>
{% if page.header.continue_link is not sameas(false) %}
<a href="{{ page.url }}"><i class="fa fa-angle-double-right"></i></a>
{% endif %}
<a href="{{ page.header.link }}">{{ page.title }}</a>
</h4>
{% else %}
<h4><a href="{{ page.url }}">{{ page.title }}</a></h4>
{% endif %}
{% if page.taxonomy.tag %}
<span class="tags">
{% for tag in page.taxonomy.tag %}
<a href="{{ blog.url|rtrim('/') }}/tag{{ config.system.param_sep }}{{ tag }}">{{ tag }}</a>
{% endfor %}
</span>
{% endif %}
{% if header_image %}
{% if header_image_file %}
{% set header_image_media = page.media.images[header_image_file] %}
{% else %}
{% set header_image_media = page.media.images|first %}
{% endif %}
{{ header_image_media.cropZoom(header_image_width, header_image_height).html }}
{% endif %}
</div>
<div class="list-blog-padding">
{% if page.header.continue_link is sameas(false) %}
{{ page.content }}
{% if not truncate %}
{% set show_prev_next = true %}
{% endif %}
{% elseif truncate and page.summary != page.content %}
{{ page.summary }}
<p><a href="{{ page.url }}">Continue Reading...</a></p>
{% elseif truncate %}
{% if page.summary != page.content %}
{{ page.content|truncate(550) }}
{% else %}
{{ page.content }}
{% endif %}
<p><a href="{{ page.url }}">Continue Reading...</a></p>
{% else %}
{{ page.content }}
{% set show_prev_next = true %}
{% endif %}
{% if show_prev_next %}
<p class="prev-next">
{% if not page.isFirst %}
<a class="button" href="{{ page.nextSibling.url }}"><i class="fa fa-chevron-left"></i> Next Post</a>
{% endif %}
{% if not page.isLast %}
<a class="button" href="{{ page.prevSibling.url }}">Previous Post <i class="fa fa-chevron-right"></i></a>
{% endif %}
</p>
{% endif %}
</div>
</div>
@@ -0,0 +1,18 @@
{% set taxlist = taxonomylist.get() %}
{% for tax,tags in taxlist %}
<ul>
<h2>{{tax}}</h2>
{% for tag,value in tags %}
{% set active = uri.param(tax) == tag ? 'active' : '' %}
<li class="{{active}}">
<a
class="{{active}}"
href="{{ base_url }}/{{ tax }}{{ config.system.param_sep }}{{ tag|e('url') }}">
<span>{{ tag }}</sapn>
</a>
</li>
{% endfor %}
</ul>
{% endfor %}
@@ -0,0 +1,3 @@
{% for meta in page.metadata %}
<meta {% if meta.name %}name="{{ meta.name }}" {% endif %}{% if meta.http_equiv %}http-equiv="{{ meta.http_equiv }}" {% endif %}{% if meta.charset %}charset="{{ meta.charset }}" {% endif %}{% if meta.property %}property="{{ meta.property }}" {% endif %}{% if meta.content %}content="{{ meta.content }}" {% endif %}/>
{% endfor %}
@@ -0,0 +1,44 @@
{% macro loop(page) %}
{% for p in page.children.visible %}
{% set current_page = (p.active or p.activeChild) ? 'active' : '' %}
<li class="{{ current_page }}">
<a href="{{ p.url }}">
{% if p.header.icon %}<i class="fa fa-{{ p.header.icon }}"></i>{% endif %}
{{ p.menu }}
</a>
{% if p.children.visible.count > 0 %}
<ul>
{{ _self.loop(p) }}
</ul>
{% endif %}
</li>
{% endfor %}
{% endmacro %}
<ul class="navigation">
{% if theme_config.dropdown.enabled %}
{{ _self.loop(pages) }}
{% else %}
{% for page in pages.children.visible %}
{% set current_page = (page.active or page.activeChild) ? 'active' : '' %}
<li class="{{ current_page }}">
<a href="{{ page.url }}">
{% if page.header.icon %}<i class="fa fa-{{ page.header.icon }}"></i>{% endif %}
{{ page.menu }}
</a>
</li>
{% endfor %}
{% endif %}
{% for mitem in site.menu %}
<li>
<a href="{{ mitem.url }}">
{% if mitem.icon %}<i class="fa fa-{{ mitem.icon }}"></i>{% endif %}
{{ mitem.text }}
</a>
</li>
{% endfor %}
{% if config.plugins.login.enabled and grav.user.username %}
<li><i class="fa fa-lock"></i> {% include 'partials/login-status.html.twig' %}</li>
{% endif %}
</ul>
@@ -0,0 +1,42 @@
{% set feed_url = blog.url == '/' or blog.url == base_url_relative ? (base_url_relative~'/'~blog.slug) : blog.url %}
{% set new_base_url = blog.url == '/' ? '' : blog.url %}
{% if config.plugins.simplesearch.enabled %}
<div class="sidebar-content">
<h4>SimpleSearch</h4>
{% include 'partials/simplesearch_searchbox.html.twig' %}
</div>
{% endif %}
{% if config.plugins.relatedpages.enabled and related_pages|length > 0 %}
<h4>Related Posts</h4>
{% include 'partials/relatedpages.html.twig' %}
{% endif %}
{% if config.plugins.random.enabled %}
<div class="sidebar-content">
<h4>Random Article</h4>
<a class="button" href="{{ base_url }}/random"><i class="fa fa-retweet"></i> I'm Feeling Lucky!</a>
</div>
{% endif %}
<div class="sidebar-content">
<h4>Some Text Widget</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna.</p>
</div>
{% if config.plugins.taxonomylist.enabled %}
<div class="sidebar-content">
<h4>Popular Tags</h4>
{% include 'partials/taxonomylist.html.twig' with {'base_url':new_base_url, 'taxonomy':'tag'} %}
</div>
{% endif %}
{% if config.plugins.archives.enabled %}
<div class="sidebar-content">
<h4>Archives</h4>
{% include 'partials/archives.html.twig' with {'base_url':new_base_url} %}
</div>
{% endif %}
{% if config.plugins.feed.enabled %}
<div class="sidebar-content syndicate">
<h4>Syndicate</h4>
<a class="button" href="{{ feed_url }}.atom"><i class="fa fa-rss-square"></i> Atom 1.0</a>
<a class="button" href="{{ feed_url }}.rss"><i class="fa fa-rss-square"></i> RSS</a>
</div>
{% endif %}