Commit 824f4f4f authored by Floréal Toumikian's avatar Floréal Toumikian

Enhanced: Global website design

parent bb0be32f
Pipeline #26427 failed with stages
in 2 minutes and 50 seconds
image: ruby:2.3
image: ruby:2.4.2
before_script:
- gem install nanoc -v 4.1.1
- gem install coderay -v 1.1.0
- gem install kramdown -v 1.9.0
- gem install builder -v 3.2.2
- gem install nokogiri -v 1.6.7.1
- gem install w3c_validators -v 1.2
- gem install i18n -v 0.7.0
- gem install nanoc -v 4.8.10
- gem install coderay -v 1.1.2
- gem install kramdown -v 1.15.0
- gem install builder -v 3.2.3
- gem install nokogiri -v 1.8.1
- gem install w3c_validators -v 1.3.3
- gem install i18n -v 0.9.0
- gem install rubocop -v 0.51.0
stages:
- build
- checks
build_site:
script:
- echo http://comments.example.com > isso.url
- nanoc
- nanoc check internal_links external_links mixed_content
stage: build
content-check:
script:
- nanoc check internal_links external_links mixed_content
stage: checks
static-analysis:
script:
- rubocop lib
stage: checks
/*!
* Start Bootstrap - Blog Post HTML Template (http://startbootstrap.com)
* Code licensed under the Apache License v2.0.
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
*/
body {
padding-top: 70px; /* Required padding for .navbar-fixed-top. Remove if using .navbar-static-top. Change if height of navigation changes. */
html {
font-family: GillSans, Calibri, Trebuchet, sans-serif;
}
footer {
margin: 50px 0;
a {
color: #689f38;
}
.footnotes {
margin-top: 3em;
border-style: solid;
border-color: rgb(204, 204, 204);
border-width: 1px;
border-radius: 4px;
padding-right: 1em;
blockquote {
border-color: #33691e;
}
.footnotes:before {
content: "Notes de bas de page";
padding-left: 1em;
font-style: italic;
font-weight: bolder;
color: rgb(152, 152, 152);
footer {
padding-bottom: 1rem;
}
dt {
margin-top: 1em;
body {
display: flex;
min-height: 100vh;
flex-direction: column;
}
dd {
margin-left: 1em;
main {
flex: 1 0 auto;
}
img {
max-width: 100%;
height: auto;
.content > ul > li {
list-style-type: initial;
list-style-position: inside;
}
......@@ -2,7 +2,7 @@
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: url(/fonts/material-icons.wff2) format('truetype');
src: url(/fonts/material-icons.woff2) format('woff2');
}
.material-icons {
......
---
title: Tags
---
<%= all_tag_links %>
<ul>
<% for tag_link in (all_tag_links ' ', class: 'chip') %>
<li><%= tag_link %></li>
<% end %>
</ul>
......@@ -4,53 +4,27 @@
<%= render '/partials/head.html' %>
<body>
<%= render '/partials/nav.html' %>
<!-- Page Content -->
<div class="container">
<div class="row">
<!-- Blog Entries Column -->
<div class="col-md-8">
<div class="flow-text">
<%= yield %>
</div>
<hr>
<h2>Derniers billets</h2>
<% for post in sorted_articles[0..3] do %>
<h3><%= link_to(post[:title], post) %></h3>
<p class="lead">
par <%= authors(post) %>
</p>
<p><span class="glyphicon glyphicon-time"></span> Publié le <%= localize_date attribute_to_time(post[:created_at]) %></p>
<p><span class="glyphicon glyphicon-tag"></span>Tags: <%= tag_links_for(post) %></p>
<div class="section">
<h3><%= post[:title] %></h3>
<%= render '/partials/article-meta.html', article: post %>
<p><%= excerptize(strip_html(post.compiled_content(snapshot: :pre)), length: 140) %></p>
<a class="btn btn-primary" href="<%= post.path %>">Lire l'article <span class="glyphicon glyphicon-chevron-right"></span></a>
<hr>
<% end %>
</div>
<!-- Blog Sidebar Widgets Column -->
<div class="col-md-4">
<%= render '/partials/sidebar.html' %>
<a class="waves-effect waves-light btn light-green darken-4" href="<%= post.path %>"><i class="small material-icons right">chevron_right</i>Lire l'article</a>
</div>
<% end %>
</div>
<!-- /.row -->
<hr>
<%= render '/partials/footer.html' %>
</div>
<!-- /.container -->
<%= render '/partials/scripts.html' %>
</body>
......
<div class="valign-wrapper">
<i class="small material-icons">person</i>
<% for author in authors(article) %><div class="chip left"><img src="/images/person/<%= author %>.jpg" alt="avatar (<%= author %>)" /> <%= author %></div><% end %>
</div>
<div class="valign-wrapper"><i class="small material-icons">access_time</i> <%= localize_date attribute_to_time(article[:created_at]) %></div>
<div class="valign-wrapper"><i class="small material-icons">label</i> <%= tag_links_for(article, ' ', class: "chip") %></div>
<!-- Footer -->
<footer>
<div class="row">
<div class="col-lg-12">
<footer class="page-footer light-green darken-4">
<div class="container center-align">
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/">
<img alt="Licence Creative Commons" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" />
</a>
Cette œuvre est mise à disposition selon les termes de la <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Licence Creative Commons Attribution 4.0 International</a>.
</div>
</div>
<!-- /.row -->
</footer>
......@@ -3,7 +3,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="<%= authors(item) %>">
<meta name="author" content="<%= authors(item).join(', ') %>">
<link rel="author" href="/humans.txt" />
<link href="/atom.xml" type="application/atom+xml" rel="alternate" title="Flux ATOM de Nimukaito" />
<link rel="icon"
......@@ -13,11 +13,12 @@
<title>Nimukaito <%= "- #{@item[:title]}" if @item[:title] %></title>
<!-- Bootstrap Core CSS -->
<link href="/css/materialize.min.css" rel="stylesheet">
<link href="/css/coderay.css" rel="stylesheet">
<link href="/css/materialize.min.css" rel="stylesheet" />
<link href="/css/coderay.css" rel="stylesheet" />
<link href="/css/material-icons.css" rel="stylesheet" />
<!-- Custom CSS -->
<!-- link href="/css/blog.css" rel="stylesheet"-->
<link href="/css/blog.css" rel="stylesheet" />
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
......
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<nav class="z-depth-3 light-green darken-4">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<%= link_to('Nimukaito', '/', class: "navbar-brand") %>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li>
<%= link_to('Tags', '/tags') %>
</li>
<li>
<%= link_to('À propos', '/about') %>
</li>
<li>
<%= link_to('Me contacter', 'mailto:floreal+blog@nimukaito.net') %>
</li>
<div class="nav-wrapper">
<%= link_to('Nimukaito', '/', class: "brand-logo") %>
<ul id="nav-mobile" class="right hide-on-med-and-down">
<li><%= link_to('Tags', '/tags') %></li>
<li><%= link_to('À propos', '/about') %></li>
<li><%= link_to('Me contacter', 'mailto:floreal+blog@nimukaito.net') %></li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
......@@ -7,52 +7,18 @@
<%= render '/partials/nav.html' %>
<!-- Page Content -->
<div class="container">
<div class="row">
<!-- Blog Post Content Column -->
<div class="col-lg-8">
<!-- Blog Post -->
<div class="container content">
<!-- Title -->
<h1><%= @item[:title] %></h1>
<!-- Author -->
<p class="lead">
par <%= authors(@item) %>
</p>
<hr>
<!-- Date/Time -->
<p><span class="glyphicon glyphicon-time"></span> Publié le <%= localize_date attribute_to_time(@item[:created_at]) %></p>
<p><span class="glyphicon glyphicon-tag"></span> Tags: <%= tag_links_for(@item) %></p>
<hr>
<!-- Post Content -->
<%= render '/partials/article-meta.html', article: @item %>
<%= yield %>
<hr>
<%= comments_section %>
</div>
<!-- Blog Sidebar Widgets Column -->
<div class="col-md-4">
<%= render '/partials/sidebar.html' %>
</div>
</div>
<!-- /.row -->
<hr>
<%= render '/partials/footer.html' %>
</div>
<!-- /.container -->
<%= render '/partials/footer.html' %>
<%= render '/partials/scripts.html' %>
<%= comments_script %>
</body>
......
......@@ -7,38 +7,17 @@
<%= render '/partials/nav.html' %>
<!-- Page Content -->
<div class="container">
<div class="row">
<div class="col-lg-8">
<div class="container content">
<!-- Title -->
<h1><%= @item[:title] %></h1>
<hr>
<!-- Content -->
<%= yield %>
<hr>
</div>
<!-- Blog Sidebar Widgets Column -->
<div class="col-md-4">
<%= render '/partials/sidebar.html' %>
</div>
</div>
<!-- /.row -->
<hr>
<%= render '/partials/footer.html' %>
</div>
<!-- /.container -->
<%= render '/partials/footer.html' %>
<%= render '/partials/scripts.html' %>
</body>
......
def authors item
authors = item[:author_name]
return authors unless authors.respond_to? :join
authors.join(', ')
[ authors ].flatten
end
......@@ -3,7 +3,7 @@ require 'i18n'
module Localization
def localize_date date
setup_locales unless locales_loaded?
I18n.l date, format: :short
I18n.l date, format: :long
end
def locales_loaded?
......
require 'erb'
# Provides feature related to page tagging
#
module TagPages
include ERB::Util
# finds out every item containing tags
# @return Array an array of Nanoc::Item
def tagged_items
......@@ -26,8 +30,8 @@ module TagPages
# finds all tags for every pages and create a link for each
#
# @return String
def all_tag_links attributes = {}
all_tags.map { |tag| tag_link tag, attributes }.join(', ')
def all_tag_links separator = ' ', attributes = {}
all_tags.map { |tag| tag_link tag, attributes }
end
# finds out what should tag pages base path should be
......@@ -55,8 +59,8 @@ module TagPages
# to the tag pages
#
# @return String
def tag_links_for item, links_attributes = {}
item[:tags].map { |tag| tag_link tag, links_attributes }.join(', ') unless item[:tags].nil?
def tag_links_for item, separator = ' ', links_attributes = {}
item[:tags].map { |tag| tag_link tag, links_attributes }.join(separator) unless item[:tags].nil?
end
# Creates one Nanoc::Item for each tag
......
......@@ -202,6 +202,6 @@ fr:
am: am
formats:
default: "%d %B %Y %Hh %Mmin %Ss"
long: "%A %d %B %Y %Hh%M"
long: "%A %d %B %Y à %Hh%M"
short: "%d %b %Hh%M"
pm: pm
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment