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,38 @@
{% embed 'partials/base.html.twig' %}
{% set collection = page.collection() %}
{% block content %}
{% set blog_image = page.media.images|first.grayscale().contrast(20).brightness(-100).colorize(-35,81,122) %}
{% if blog_image %}
<div class="flush-top blog-header blog-header-image" style="background-image: url({{ blog_image.url }});">
{% else %}
<div class="blog-header">
{% endif %}
{{ page.content }}
</div>
{% if config.plugins.breadcrumbs.enabled %}
{% include 'partials/breadcrumbs.html.twig' %}
{% endif %}
<div class="content-wrapper blog-content-list grid pure-g">
<div id="listing" class="block pure-u-2-3">
{% for child in collection %}
{% include 'partials/blog_item.html.twig' with {'blog':page, 'page':child, 'truncate':true} %}
{% endfor %}
{% if config.plugins.pagination.enabled and collection.params.pagination %}
{% include 'partials/pagination.html.twig' with {'base_url':page.url, 'pagination':collection.params.pagination} %}
{% endif %}
</div>
<div id="sidebar" class="block size-1-3 pure-u-1-3">
{% include 'partials/sidebar.html.twig' with {'blog':page} %}
</div>
</div>
{% endblock %}
{% endembed %}
@@ -0,0 +1,5 @@
{% extends 'partials/base.html.twig' %}
{% block content %}
{{ page.content }}
{% endblock %}
@@ -0,0 +1,12 @@
{% extends 'partials/base.html.twig' %}
{% block content %}
<div id="error">
<div>
<h1>Error {{ page.header.http_response_code }}</h1>
<p>
{{ page.content }}
</p>
</div>
</div>
{% endblock %}
@@ -0,0 +1,8 @@
{% extends 'partials/base.html.twig' %}
{% block content %}
{{ content }}
{% include "forms/form.html.twig" %}
{% endblock %}
@@ -0,0 +1,12 @@
{% extends 'partials/base.html.twig' %}
{% block content %}
{{ content }}
<div class="alert">{{ form.message }}</div>
<p>Here is the summary of what you wrote to us:</p>
{% include "forms/data.html.twig" %}
{% endblock %}
@@ -0,0 +1 @@
{% extends "forms/default/data.html.twig" %}
@@ -0,0 +1 @@
{% extends "forms/default/data.txt.twig" %}
@@ -0,0 +1 @@
{% extends "forms/default/form.html.twig" %}
@@ -0,0 +1,30 @@
{% extends 'partials/base.html.twig' %}
{% block content %}
<div id="dashboard-filters">
{% include 'partials/dashboard-filters.html.twig' %}
</div>
<div id="dashboard-projects">
{% for child in page.collection %}
{% if child.header.visible == true %}
{% set image = child.media.images|first %}
{% if image == null %}
{% set image = child.media.files|first %}
{% endif %}
<section class="project">
<div class="mask">
<a href="{{child.url}}"></a>
<header>
<h1>{{child.title}}</h1>
<p>{{child.header.shortdescription}}</p>
</header>
</div>
<figure>
{{ image.resize(500).html }}
</figure>
</section>
{% endif %}
{% endfor %}
</div>
{% endblock %}
@@ -0,0 +1,18 @@
{% embed 'partials/base.html.twig' %}
{% block content %}
{% if config.plugins.breadcrumbs.enabled %}
{% include 'partials/breadcrumbs.html.twig' %}
{% endif %}
<div class="blog-content-item grid pure-g-r">
<div id="item" class="block pure-u-2-3">
{% include 'partials/blog_item.html.twig' with {'blog':page.parent, 'truncate':false} %}
</div>
<div id="sidebar" class="block size-1-3 pure-u-1-3">
{% include 'partials/sidebar.html.twig' with {'blog':page.parent}%}
</div>
</div>
{% endblock %}
{% endembed %}
@@ -0,0 +1,3 @@
{% macro input(name, value, type, size) %}
<input type="{{ type|default('text') }}" name="{{ name }}" value="{{ value|e }}" size="{{ size|default(20) }}" />
{% endmacro %}
@@ -0,0 +1,56 @@
{% extends 'partials/base.html.twig' %}
{% set show_onpage_menu = header.onpage_menu == true or header.onpage_menu is null %}
{% macro pageLinkName(text) %}{{ text|lower|replace({' ':'_'}) }}{% endmacro %}
{% block javascripts %}
{% if show_onpage_menu %}
{% do assets.add('theme://js/singlePageNav.min.js') %}
{% endif %}
{{ parent() }}
{% endblock %}
{% block bottom %}
{{ parent() }}
{% if show_onpage_menu %}
<script>
// singlePageNav initialization & configuration
$('#navbar').singlePageNav({
offset: $('#header').outerHeight(),
filter: ':not(.external)',
updateHash: true,
currentClass: 'active'
});
</script>
{% endif %}
{% endblock %}
{% block header_navigation %}
{% if show_onpage_menu %}
<ul class="navigation">
{% for module in page.collection() %}
{% set current_module = (module.active or module.activeChild) ? 'active' : '' %}
<li class="{{ current_module }}"><a href="#{{ _self.pageLinkName(module.menu) }}">{{ module.menu }}</a></li>
{% endfor %}
{% 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 %}
</ul>
{% else %}
{{ parent() }}
{% endif %}
{% endblock %}
{% block content %}
{{ page.content }}
{% for module in page.collection() %}
<div id="{{ _self.pageLinkName(module.menu) }}"></div>
{{ module.content }}
{% endfor %}
{% endblock %}
@@ -0,0 +1,22 @@
<div class="modular-row features {{ page.header.class}}">
{{ content }}
<div class="feature-items">
{% for feature in page.header.features %}
<div class="feature">
{% if feature.icon %}
<i class="fa fa-fw fa-{{ feature.icon }}"></i>
<div class="feature-content icon-offset">
{% else %}
<div class="feature-content">
{% endif %}
{% if feature.header %}
<h4>{{ feature.header }}</h4>
{% endif %}
{% if feature.text %}
<p>{{ feature.text }}</p>
{% endif %}
</div>
</div>
{% endfor %}
</div>
</div>
@@ -0,0 +1,13 @@
{% set showcase_image = page.media.images|first.grayscale().contrast(20).brightness(-125).colorize(-35,81,122) %}
{% if showcase_image %}
<div class="modular-row showcase flush-top" style="background-image: url({{ showcase_image.url }});">
{% else %}
<div class="modular-row showcase">
{% endif %}
{{ content }}
{% for button in page.header.buttons %}
<a class="button{% if button.primary %} primary{% endif %}" href="{{ button.url }}">{{ button.text }}</a>
{% endfor %}
</div>
@@ -0,0 +1,7 @@
<div class="modular-row callout">
{% set image = page.media.images|first %}
{% if image %}
{{ image.cropResize(400,400).html('','','align-'~page.header.image_align) }}
{% endif %}
{{ content }}
</div>
@@ -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 %}
@@ -0,0 +1,74 @@
{% extends 'partials/base.html.twig' %}
{% block content %}
<section class="page-projet">
<h2 id="page-title">{{page.header.title}}</h2>
<p>{{page.header.shortdescription}}</p>
<nav>
<div class="taxonomy">
{% for tax,tags in page.taxonomy %}
<ul>
<h2>{{tax}}</h2>
{% for tag,value in tags %}
<li>
<span>{{ value }}</sapn>
</li>
{% endfor %}
</ul>
{% endfor %}
</div>
<div class="siblings">
{{page.prevSibling()}}
{{page.nextSibling()}}
</div>
</nav>
<section class="audios">
{% for audio in page.media.audios %}
<div class="">
{{ audio.html }}
<a href="{{audio.url()}}">audio file</a>
</div>
{% endfor %}
</section>
<section class="videos">
{% for video in page.media.videos %}
<div class="">
{{ video.html }}
<a href="{{video.url()}}">video file</a>
</div>
{% endfor %}
</section>
<section class="images" data-featherlight-gallery data-featherlight-filter="a">
{% for image in page.media.files %}
<a href="{{image.url()}}">{{ image.resize(500).html }}</a>
{% endfor %}
{% for image in page.media.images %}
<a href="{{image.url()}}">{{ image.resize(500).html }}</a>
{% endfor %}
</section>
<section class="content">
{{ page.content }}
</section>
<footer>
<div class="link">
<a href="{{page.header.project_url}}" target="_blank">{{page.header.project_url}}</a>
</div>
{% for key,value in page.header.extra_links %}
<ul>
<li><label>{{key}}:</label> <a href="{{ value }}">{{ value }}</a></li>
</ul>
{% endfor %}
</footer>
</section>
{% endblock %}
@@ -0,0 +1,20 @@
{% extends 'partials/snipcart_base.html.twig' %}
{% block content %}
{% include 'modular/lightslider.html.twig' with {'page': page.find('/slider', true)} %}
{{ parent() }}
<div class="content-wrapper">
{{ page.content }}
<div class="snipcart-categories">
{% for child in page.collection() %}
{% if (child.header.unpublished is not defined or (child.header.unpublished == false)) %}
{% include 'partials/snipcart_category_item.html.twig' with {'page': child, 'parent': page} %}
{% endif %}
{% endfor %}
</div>
</div>
{% endblock %}