import from la bonne adresse and first refactoring for ouidade.com
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
{% extends 'partials/base.html.twig' %}
|
||||
|
||||
{% set bodyclass = "categories" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<nav class="categories">
|
||||
{% include 'partials/tagslist.html.twig' with {'base_url':"/categories/", 'taxonomy':'tag', 'display':'inline'} %}
|
||||
</nav>
|
||||
|
||||
{% set contents = page.collection %}
|
||||
{% set taxlist = taxonomylist.get() %}
|
||||
|
||||
<div id="categories-content" class="grid">
|
||||
{% for tax,value in taxlist['client'] %}
|
||||
{% set posts = taxonomy.findTaxonomy({'client':tax}) %}
|
||||
|
||||
{% set disposts = {} %}
|
||||
{% set i = 0 %}
|
||||
{% for p,v in posts %}
|
||||
{% if v in contents %}
|
||||
{% set disposts = disposts|merge({('_'~(v.date|date("Y"))~'_'~i):v}) %}
|
||||
{% endif %}
|
||||
{% set i = i+1 %}
|
||||
{% endfor %}
|
||||
|
||||
{{ dump(disposts) }}
|
||||
|
||||
{% if disposts|length %}
|
||||
<section class="client-block client-block-text grid-block columns large-3 medium-6 small-12">
|
||||
<h3>{{ tax }}</h3>
|
||||
<ul>
|
||||
{% for key,post in disposts|ksort|reverse %}
|
||||
<li class="project">
|
||||
{% include 'partials/projet-block.html.twig' with {'page':post,'display':'text',"key":key} %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% extends 'partials/base.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<section class="default">
|
||||
{{ page.content }}
|
||||
</section>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,15 @@
|
||||
{% extends 'partials/base.html.twig' %}
|
||||
|
||||
{% set bodyclass = "home" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="grid">
|
||||
{% for child in page.collection %}
|
||||
{% if child.header.home == true %}
|
||||
<section class="projet-block projet-block-img grid-block columns xlarge-3 large-4 medium-6 small-12">
|
||||
{% include 'partials/projet-block.html.twig' with {'page':child,'display':'img'} %}
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,68 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
||||
{% block head %}
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
{% if header.description %}
|
||||
<meta name="description" content="{{ header.description }}">
|
||||
{% else %}
|
||||
<meta name="description" content="{{ site.description }}">
|
||||
{% endif %}
|
||||
{% if header.robots %}
|
||||
<meta name="robots" content="{{ header.robots }}">
|
||||
{% endif %}
|
||||
<link rel="icon" type="image/png" href="{{ theme_url }}/images/favicon.png">
|
||||
|
||||
<title>{% if header.title %}{{ header.title|e('html') }} | {% endif %}{{ site.title|e('html') }}</title>
|
||||
|
||||
{% block stylesheets %}
|
||||
{# Bootstrap core CSS #}
|
||||
{# % do assets.add('theme://app/bower_components/foundation/css/foundation.min.css',101) % #}
|
||||
|
||||
{# Custom font for this theme #}
|
||||
{% do assets.add('theme://font/fontwebkit.css',100) %}
|
||||
|
||||
{# Custom styles for this theme #}
|
||||
{% do assets.add('theme://css/styles.css',100) %}
|
||||
|
||||
{{ assets.css() }}
|
||||
{% endblock %}
|
||||
|
||||
{% endblock head %}
|
||||
</head>
|
||||
|
||||
<body class="{{bodyclass}}">
|
||||
<div id="container">
|
||||
|
||||
{# include the header + navigation #}
|
||||
{% include 'partials/header.html.twig' %}
|
||||
|
||||
<div id="center" class="row fullwidth">
|
||||
<div class="large-12 columns">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% block bottom %}{% endblock %}
|
||||
|
||||
|
||||
{# include the footer#}
|
||||
{% include 'partials/footer.html.twig' %}
|
||||
|
||||
</div>
|
||||
|
||||
{% block javascripts %}
|
||||
{% do assets.add('theme://bower_components/jquery/dist/jquery.min.js', 101) %}
|
||||
{% do assets.add('theme://bower_components/foundation/js/foundation.min.js') %}
|
||||
{% do assets.add('theme://bower_components/imagesloaded/imagesloaded.pkgd.min.js') %}
|
||||
{% do assets.add('theme://bower_components/masonry/dist/masonry.pkgd.min.js') %}
|
||||
{% do assets.add('theme://js/dist/script.min.js') %}
|
||||
{{ assets.js() }}
|
||||
{% endblock %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,11 @@
|
||||
<footer id="bottom-bar">
|
||||
<div class="row fullwidth">
|
||||
<section class="large-12 columns">
|
||||
<h1><a class="logo" href="/">- {{ site.title|e('html') }} -</a></h1>
|
||||
<address>
|
||||
{{ site.adresse|e('html') }}<br />
|
||||
<a class="mailto" href="mailto:{{site.email}}">{{ site.email|e('html') }}</a>
|
||||
</address>
|
||||
</section>
|
||||
</div>
|
||||
</header>
|
||||
@@ -0,0 +1,32 @@
|
||||
<header id="top-bar">
|
||||
<div class="bg">
|
||||
<div class="row fullwidth">
|
||||
|
||||
<section id="title-area" class="medium-8 medium-push-2 columns">
|
||||
<h1><a href="/"><span>{{ site.title|e('html') }}</span></a></h1>
|
||||
<h2>{{ site.subtitle|e('html') }}</h2>
|
||||
</section>
|
||||
|
||||
<nav id="left-nav" class="nav small-6 medium-2 medium-pull-8 columns">
|
||||
<div class="wrapper">
|
||||
<ul class="left">
|
||||
{% for page in pages.children %}
|
||||
{% if page.menu != "home" and page.menu != "Catégories" %}
|
||||
<li><a href="{{ page.url }}">{{ page.menu }}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<nav id="right-nav" class="nav small-6 medium-2 columns">
|
||||
{% if config.plugins.taxonomylist.enabled %}
|
||||
<div class="wrapper">
|
||||
<h4><a href="/categories">Catégories</a></h4>
|
||||
{% include 'partials/tagslist.html.twig' with {'base_url':"/categories/", 'taxonomy':'tag'} %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
@@ -0,0 +1,22 @@
|
||||
{% if display == 'img' %}
|
||||
|
||||
{% set image = page.media['00-home.jpg'] %}
|
||||
{% if image == null %}
|
||||
{% set image = page.media.images|first %}
|
||||
{% endif %}
|
||||
|
||||
<a href="{{ page.url }}">{{ image.resize(500).html }}</a>
|
||||
<header>
|
||||
<h1><a href="{{ page.url }}">{{page.title}}</a></h1>
|
||||
<h2><a href="{{ page.url }}">{{page.header.subtitle}}</a></h2>
|
||||
</header>
|
||||
{% endif %}
|
||||
|
||||
{% if display == 'text' %}
|
||||
<h4><a href="{{ page.url }}">{{page.title}} - {{page.date|date("Y")}}</a></h4>
|
||||
{% set image = page.media['00-cat.jpg'] %}
|
||||
{% if image == null %}
|
||||
{% set image = page.media.images|first %}
|
||||
{% endif %}
|
||||
<a class="projet-img" href="{{ page.url }}">{{ image.resize(500).html }}</a>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,19 @@
|
||||
{% set taxlist = taxonomylist.get() %}
|
||||
|
||||
{% if taxlist %}
|
||||
<ul class="tags">
|
||||
{% for tax,value in taxlist[taxonomy] %}
|
||||
{% set active = uri.param(taxonomy) == tax ? 'active' : '' %}
|
||||
{% if not loop.first and display == "inline" %}
|
||||
<span>-</span>
|
||||
{% endif %}
|
||||
<li class="{{ active }}">
|
||||
<a
|
||||
class="{{ active }}"
|
||||
href="{{ base_url }}{{ taxonomy }}{{ config.system.param_sep }}{{ tax|e('url') }}">
|
||||
<span>{{ tax }}</sapn>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,69 @@
|
||||
{% extends 'partials/base.html.twig' %}
|
||||
|
||||
{% set bodyclass = "projet" %}
|
||||
|
||||
{% set images = page.media.images[2:] %}
|
||||
{% set images = images|merge(page.media.files) %}
|
||||
|
||||
{% block content %}
|
||||
<section class="projet">
|
||||
<h1>{{page.title}}</h1>
|
||||
<h2>{{ page.header.subtitle}}</h2>
|
||||
|
||||
{{ page.content }}
|
||||
|
||||
<div id="images" class="">
|
||||
{{ dump(images) }}
|
||||
|
||||
{# set temporary array to be able to look trough images with index #}
|
||||
{% set numberedKeys = {} %}
|
||||
{% for key,value in images %}
|
||||
{% set numberedKeys = numberedKeys|merge({(loop.index):(key)}) %}
|
||||
{% endfor %}
|
||||
{{dump(numberedKeys)}}
|
||||
|
||||
{# display images #}
|
||||
{% set continue = false %}
|
||||
|
||||
{% for image in images %}
|
||||
{% if not continue %}
|
||||
<div class="row">
|
||||
|
||||
{% if image.meta.size == 1 %}
|
||||
<div class="block block-{{loop.index}} column large-12">
|
||||
{{ image.html }}
|
||||
</div>
|
||||
{% else %}
|
||||
{% set nextimage = images[numberedKeys[loop.index]] %}
|
||||
{{ dump(nextimage) }}
|
||||
{% if nextimage.meta.size != 1 %}
|
||||
{% set continue = true %}
|
||||
<div class="block block-{{loop.index}} column large-6">
|
||||
{{ image.resize(1000).html }}
|
||||
</div>
|
||||
<div class="block block-{{loop.index+1}} column large-6">
|
||||
{{ nextimage.resize(1000).html }}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="block block-{{loop.index}} column large-6">
|
||||
{{ image.resize(1000).html }}
|
||||
</div>
|
||||
<div class="block empty column large-6"></div>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
{% else %}
|
||||
{% set continue = false %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<nav class="categories">
|
||||
{% include 'partials/tagslist.html.twig' with {'base_url':"/categories/", 'taxonomy':'tag', 'display':'inline'} %}
|
||||
</nav>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user