add article + a venir

This commit is contained in:
2019-12-20 11:30:26 +01:00
parent 0fd036ea7b
commit 6ac0eb5b76
152 changed files with 3756 additions and 200 deletions

View File

@@ -0,0 +1,92 @@
extends@: default
child_type: item
rules:
slug:
pattern: "[a-z][a-z0-9_\-]+"
min: 2
max: 80
form:
fields:
tabs:
type: tabs
active: 1
fields:
advanced:
fields:
overrides:
fields:
header.child_type:
default: item
blog:
type: tab
title: Blog Config
fields:
content_title:
type: spacer
title: Content Definition
header.content.items:
type: textarea
yaml: true
label: Items
default: '@self.children'
validate:
type: yaml
header.content.limit:
type: text
label: Max Item Count
default: 5
validate:
required: true
type: int
min: 1
header.content.order.by:
type: select
label: Order By
default: date
options:
folder: Folder
title: Title
date: Date
default: Default
header.content.order.dir:
type: select
label: Order
default: desc
options:
asc: Ascending
desc: Descending
header.content.pagination:
type: toggle
label: Pagination
highlight: 1
default: 1
options:
1: PLUGIN_ADMIN.ENABLED
0: PLUGIN_ADMIN.DISABLED
validate:
type: bool
header.content.url_taxonomy_filters:
type: toggle
label: URL Taxonomy Filters
highlight: 1
default: 1
options:
1: PLUGIN_ADMIN.ENABLED
0: PLUGIN_ADMIN.DISABLED
validate:
type: bool
import@:
type: partials/blog-bits
context: blueprints://pages

View File

@@ -0,0 +1,112 @@
extends@: default
form:
fields:
tabs:
fields:
blog:
type: tab
title: Blog Item
fields:
header_options:
type: section
title: Header Options
underline: true
header.continue_link:
type: toggle
toggleable: true
label: DF Style Link
help: Daring Fireball style title link
highlight: 1
options:
1: PLUGIN_ADMIN.ENABLED
0: PLUGIN_ADMIN.DISABLED
validate:
type: bool
header.header_image:
type: toggle
toggleable: true
label: Display Header Image
help: Enabled displaying of a header image
highlight: 1
options:
1: PLUGIN_ADMIN.ENABLED
0: PLUGIN_ADMIN.DISABLED
header.header_image_file:
type: text
toggleable: true
label: Image File
help: image filename that exists in the page folder. If not provided, will use the first image found.
placeholder: For example: myimage.jpg
header.header_image_width:
type: text
toggleable: true
label: Image Width
size: small
help: Header width in px
placeholder: Default is 900
validate:
type: int
min: 0
max: 5000
header.header_image_height:
type: text
toggleable: true
label: Image Height
size: small
help: Header height in px
placeholder: Default is 300
validate:
type: int
min: 0
max: 5000
summary:
type: section
title: Summary
underline: true
header.summary.enabled:
type: toggle
toggleable: true
label: Summary
highlight: 1
options:
1: PLUGIN_ADMIN.ENABLED
0: PLUGIN_ADMIN.DISABLED
header.summary.format:
type: select
toggleable: true
label: Format
classes: fancy
options:
'short': 'Use the first occurence of delimter or size'
'long': 'Summary delimiter will be ignored'
header.summary.size:
type: text
toggleable: true
label: Size
classes: large
placeholder: 300
validate:
type: int
min: 1
header.summary.delimiter:
type: text
toggleable: true
label: Summary delimiter
classes: large
placeholder: ===
import@:
type: partials/blog-bits

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -15,25 +15,29 @@ var paths = {
source: src_dir
};
gulp.task('watch', function() {
gulp.watch(watch_dir, ['build']);
});
function watch() {
return gulp.watch(watch_dir, build);
}
gulp.task('build', function() {
gulp.src(paths.source)
.pipe(sourcemaps.init())
.pipe(sass({outputStyle: 'compact', precision: 10})
.on('error', sass.logError)
)
.pipe(sourcemaps.write())
.pipe(autoprefixer())
.pipe(gulp.dest(dest_dir))
.pipe(csscomb())
.pipe(cleancss())
.pipe(rename({
suffix: '.min'
}))
.pipe(gulp.dest(dest_dir));
});
function build() {
return gulp.src(paths.source)
.pipe(sourcemaps.init())
.pipe(sass({
outputStyle: 'compact',
precision: 10
}).on('error', sass.logError)
)
.pipe(sourcemaps.write())
.pipe(autoprefixer())
.pipe(gulp.dest(dest_dir))
.pipe(csscomb())
.pipe(cleancss())
.pipe(rename({
suffix: '.min'
}))
.pipe(gulp.dest(dest_dir));
}
gulp.task('default', ['build']);
exports.watch = watch;
exports.build = build;
exports.default = build;

View File

@@ -35,7 +35,7 @@ function filteritem() {
var $img = $('.body-wrapper .img');
$(".filters .btn").click(function(e) {
e.preventDefault();
// e.preventDefault();
var filter = $(this).attr("data-filter");
var self = $('.body-wrapper');

View File

@@ -16,7 +16,7 @@
max-width: 50%;
background: $light-blue;
padding: 25px;
top: 20vw;
bottom: 20%;
color: $white;
opacity: 0;
}
@@ -128,7 +128,7 @@
}
.start:not(#form){
&#calendrier, &#archive{
&#calendrier, &#archive, &#articles{
width: 70%;
margin: 40px auto 40px auto;
.header-wrapper{
@@ -160,7 +160,6 @@
font-size: 1.2rem;
}
}
}
.body-wrapper{
@include inlineflex();
@@ -170,7 +169,8 @@
.card{
width: calc( (100% / 3) - 27px);
min-width: 200px;
margin: 0 0 40px 0 ;
margin: 0 0 40px 0;
max-width: 1200px;
.card-header{
position: relative;
width: 100%;
@@ -225,6 +225,135 @@
}
}
#articles{
.cat{
label{
&:not(.active){
border: none;
}
&.active, &:hover{
border-top: 1px solid #0093a3;
border-bottom: 2px solid #b5cb3a;
}
}
}
.articles-listing{
flex-direction: column;
.card{
width: 100%!important;
& > a{
display: grid;
grid-template-columns: minmax(300px, 25%) minmax(400px, calc(75% - 40px)) ;
grid-template-rows: 250px;
grid-column-gap: 40px;
position: relative;
.card-image{
grid-column-start: 1;
grid-row-start: 1;
object-fit: contain;
overflow: hidden;
display: inline-flex;
justify-content: center;
img{
display: inline-block;
height: 250px;
width: auto;
}
}
.wrapper-content{
grid-column-start: 2;
grid-row-start: 1;
background-image: url(/user/themes/lecampus/images/Trame-bleu2.svg);
background-repeat: repeat;
padding: 20px 20px;
width: 100%;
height: 100%;
.date{
float: left;
}
.cat{
margin-left: 3px;
}
.readmore{
float: right;
}
}
}
.card-content{
overflow: hidden;
height: 7.7rem;
h2{
font-size: 0.9rem;
}
}
&:last-child{
margin-bottom: 0;
}
}
}
}
.paginations{
max-width: 1200px;
& > ul{
& > li{
border: none;
& > span{
&.active{
&::after{
content: " ";
width: 100%;
height: 5px;
display: block;
background: #b5cb3a;
}
}
}
span, a{
padding: 4px 5px;
}
&:first-child{
float: left;
& > a, & > span{
&::before{
content: "<";
margin-right: 10px;
display: inline-block;
transform: translateX(0px);
transition: 0.3s transform ease;
}
}
& > a{
&:hover{
&::before{
transform: translateX(-3px);
transition: 0.3s transform ease;
}
}
}
}
&:last-child{
float: right;
& > a, & > span{
&::after{
content: ">";
margin-left: 10px;
display: inline-block;
transform: translateX(0px);
transition: 0.3s transform ease;
}
}
& > a:hover{
&::after{
transform: translateX(3px);
transition: 0.3s transform ease;
}
}
}
}
}
}
.start#form{
.entete{
border-top: 1px solid $light-blue
@@ -556,7 +685,7 @@
}
#mlb2-985974.ml-form-embedContainer .ml-form-embedWrapper.embedPopup,
#mlb2-985974.ml-form-embedContainer .ml-form-embedWrapper.embedDefault { width: 400px; }
#mlb2-985974.ml-form-embedContainer .ml-form-embedWrapper.embedForm { width: 40%; }
#mlb2-985974.ml-form-embedContainer .ml-form-embedWrapper.embedForm { width: 750px; }
#mlb2-985974.ml-form-embedContainer .ml-form-align-left { text-align: left; }
#mlb2-985974.ml-form-embedContainer .ml-form-align-center { text-align: center; }
#mlb2-985974.ml-form-embedContainer .ml-form-align-default { display: table-cell !important; vertical-align: middle !important; text-align: center !important; }
@@ -845,6 +974,7 @@
#home{
.content{
// min-width: 800px;
@include inlineflex();
& > p{
position: relative;
@@ -881,7 +1011,102 @@
}
}
#item{
#item, #item-article{
.item-wrapper{
width: 45%;
margin: auto;
.title-wrapper{
display: inline-flex;
align-items: baseline;
width: 100%;
margin: 40px 0;
.back{
margin-right: 10px;
margin-left: -80px;
&::before{
content: "<";
display: inline-block;
margin-right: 5px;
}
}
.title{
width: auto;
margin: 0;
h1{
width: auto;
padding: 10px 20px;
border-radius: 30px;
background: #9e0027;
}
}
}
.info-wrapper{
display: inline-flex;
width: 100%;
flex-direction: column;
align-items: flex-end;
.date{
width: 100%;
background-image: url('/user/themes/lecampus/images/Trame-bleu2.svg');
background-repeat: repeat;
padding: 5px 10px;
text-align: right;
margin-bottom: 20px;
}
.reso{
display: inline-flex;
margin-bottom: 20px;
a{
display: inline-flex;
margin: 0 0 0 10px;
align-items: center;
img{
margin-left: 5px;
width: 20px;
height: auto;
}
}
}
}
.body-wrapper{
.card-image{
width: 100%;
}
.card-content{
margin: 40px 0;
.txt{
p{
margin: 0 0 1.2rem 0;
line-height: 1.5rem;
}
h2{
font-size: 1.2rem;
font-family: $Bold;
font-weight: normal;
margin: 0;
}
ul{
margin-bottom: 1.2rem;
li{
&::before{
content: " ";
width: 5px;
height: 5px;
border-radius: 10px;
display: inline-block;
vertical-align: middle;
background: $red;
margin-right: 5px;
}
}
}
}
}
}
}
}
#item, #item-article{
.content{
@include inlineflex;
.images_s{
@@ -978,7 +1203,7 @@
}
#devis{
&.item, &.sublog{
&.item, &.sublog, &.item-article{
background: $red;
height: auto;
padding: 20px 0;
@@ -1098,7 +1323,7 @@
}
}
#event{
#event, #item, #item-article{
.title{
width: 45%;
margin: auto;

View File

@@ -1,5 +1,5 @@
#footer{
padding-bottom: 45px;
padding-bottom: 0;
width: 100%;
background: $light-grey;
.block{

View File

@@ -1,27 +1,65 @@
// header{
// z-index: 999;
// position: relative;
// @include inlineflex();
// justify-content: center;
// width: 100%;
// border-bottom: 1px solid $light-blue;
// height: 105px;
// nav{
// @include inlineflex();
// justify-content: space-around;
// height: 100px;
// width: 75%;
// flex-wrap: nowrap;
// .logo{
// display: flex;
// a{
// display: block;
// margin: auto;
// }
// }
// .reso{
// @include inlineflex;
// flex-wrap: nowrap;
// a{
// display: block;
// width: 35px;
// margin: auto 5px;
// }
// }
// }
// }
//
//
header{
z-index: 999;
position: relative;
@include inlineflex();
justify-content: center;
width: 100%;
border-bottom: 1px solid $light-blue;
display: flex;
height: 105px;
nav{
@include inlineflex();
justify-content: space-around;
height: 100px;
z-index: 999;
border-bottom: 1px solid $light-blue;
& > nav{
margin: auto;
min-width: 1100px;
width: 70%;
flex-wrap: nowrap;
display: inline-flex;
justify-content: space-between;
.navTrigger{
display: none;
}
.logo{
display: flex;
a{
display: block;
margin: auto;
width: 150px;
}
.dropmenu{
width: 70%;
& > ul{
height: 100%;
}
}
.reso{
@include inlineflex;
flex-wrap: nowrap;
display: inline-flex;
width: auto;
a{
display: block;
width: 35px;

View File

@@ -16,7 +16,7 @@ header{
& > li{
text-align: center;
position: relative;
margin: 0 20px;
margin: 0 10px;
&>a{
border-top: 1px solid $light-blue;
border-bottom: 3px solid $green;
@@ -28,6 +28,7 @@ header{
position: absolute;
margin-top: 12px;
z-index: 0;
z-index: 999;
li{
background-color: white;
a{

View File

@@ -4,12 +4,17 @@
width: 90%!important;
}
}
.start:not(#form)#archive, .start:not(#form)#articles, .start:not(#form)#calendrier{
width: 90%!important;
}
}
@media screen and (max-width: 1080px) {
@media screen and (max-width: 1150px) {
header{
&> nav{
min-width: auto!important;
width: 100%!important;
margin: auto 10px;
}
}
}
@@ -17,15 +22,16 @@
@media screen and (max-width: 1024px) {
header nav{
position: relative;
width: 90%!important;
width: 100%!important;
.dropmenu{
background: white;
display: none;
position: absolute;
left: -6%;
top: 100px;
left: -10px;
top: 70px;
width: auto!important;
height: auto;
z-index: 999;
&>ul{
-webkit-box-orient: vertical!important;
-webkit-box-direction: normal!important;
@@ -60,9 +66,15 @@
}
}
.logo{
position: absolute;
width: 150px;
margin: auto;
left: 50%;
transform: translate(-50%, -50%);
top: 50%;
}
.navTrigger {
display: block;
cursor: pointer;
width: 30px;
height: 25px;
@@ -249,12 +261,12 @@
}
.gal{
.title_gal{
top: 15vw!important;
// top: 15vw!important;
max-width: 60%!important;
}
}
#item{
#item, #item-article{
.content{
.icones{
@@ -265,6 +277,7 @@
}
#item .demander-votre-devis,
#item-article .demander-votre-devis,
#sublog .demander-votre-devis{
width: 300px!important;
height: 110px!important;
@@ -290,16 +303,16 @@
transform: translate(0%, -125%)!important;
}
}
#newsletter #mlb2-985974.ml-form-embedContainer .ml-form-embedWrapper.embedForm{
width: 50%!important;
}
// #newsletter #mlb2-985974.ml-form-embedContainer .ml-form-embedWrapper.embedForm{
// width: 50%!important;
// }
}
@media screen and (max-width: 960px) {
.gal{
.title_gal{
max-width: 80%!important;
top: 15vw!important;
// top: 15vw!important;
}
.content_gal{
width: 2%!important;
@@ -310,7 +323,7 @@
width: 100%!important;
}
.title_gal{
top:25vw!important;
// top:25vw!important;
right: 5%!important;
max-width: 70%!important;
}
@@ -361,7 +374,7 @@
}
}
#devis.item .title, #devis.sublog .title{
#devis.item .title, #devis.sublog .title, #devis.item-article .title{
border-radius: 30px!important;
}
#sublog{
@@ -416,7 +429,7 @@
margin-top: 0px!important;
}
}
#item .demander-votre-devis{
#item .demander-votre-devis, #item-article .demander-votre-devis{
width: 300px!important;
height: 110px!important;
a{
@@ -432,12 +445,31 @@
margin-top: 0px!important;
}
}
.start:not(#form)#archive, .start:not(#form)#calendrier{
width: 80%!important;
.start:not(#form)#archive, .start:not(#form)#calendrier, .start:not(#form)#articles{
width: 90%!important;
}
#articles{
.card{
width: 100%!important;
&> a{
grid-template-columns: minmax(300px,20%) minmax(400px,calc(80% - 40px))!important;
}
}
}
#item, #item-article{
.item-wrapper{
width: 90%!important;
.title-wrapper{
flex-direction: column!important;
.back{
margin: 20px 0!important;
}
}
}
}
.start:not(#form) .body-wrapper .card{
width: calc((100% / 2) - 20px)!important;
// width: calc((100% / 2) - 20px)!important;
}
.start#form .body-wrapper form{
width: 90%!important;
@@ -486,12 +518,59 @@
}
@media screen and (max-width: 750px) {
header{
& > nav{
.logo{
position: relative;
width: auto!important;
margin: auto!important;
left: 0!important;
transform: none!important;
top: 0!important;
}
}
}
.start{
.demander-votre-devis{
display: none;
}
}
#item{
#item ,#item-article{
.title-wrapper{
flex-direction: column;
.back{
margin: 0 0 20px 0!important;
}
}
width: 100%!important;
// padding: 0 40px!important;
}
#articles{
.articles-listing{
.card{
& > a{
grid-template-columns: 100%!important;
grid-column-gap: 0!important;
grid-template-rows: 100%!important;
.card-image{
img{
width: 100%!important;
height: auto!important;
}
}
.wrapper-content{
grid-column-start:1!important;
grid-row-start: 2!important;
.readmore{
float: right;
}
}
}
}
}
}
#item, #item-article{
.bandeau{
.img{
width: 100%;
@@ -522,7 +601,7 @@
}
.content{
margin: 2rem auto!important;
width: 90%!important;
width: 100%!important;
p{
padding: 40px 20px!important;
}
@@ -652,13 +731,16 @@
width: 100%!important;
}
} .start:not(#form)#archive, .start:not(#form)#calendrier{
} .start:not(#form)#archive, .start:not(#form)#calendrier, .start:not(#form)#articles{
width: 90%!important;
.cat {
height: auto!important;
.btn-group{
&:nth-child(1){
width: 75%;
width: 100%;
}
&:nth-child(2){
float: left;
}
label{
margin-bottom: 10px;

View File

@@ -111,7 +111,85 @@ p{
}
}
#item{
#articles{
.card{
line-height: 1.5rem;
.card-title{
font-family: $Bold;
font-weight: normal;
}
.wrapper-info{
margin: 5px 0;
font-size: 0.8rem;
font-family: $Bold;
color: $red;
.dt{
text-transform: lowercase;
}
}
.readmore{
font-family: $Bold;
font-size: 0.8rem;
}
}
}
.paginations{
font-family: $Bold;
font-size: 0.8rem;
}
#item, #item-article{
.title-wrapper{
.back{
font-family: $Bold;
}
.title{
h1{
color: white;
font-size: 1.2rem;
}
}
}
.info-wrapper{
.date{
font-family: $Bold;
color: $red;
font-size: 0.8rem;
.dt{
text-transform: lowercase;
}
}
.reso{
font-size: 0.8rem;
font-family: $Bold;
}
}
.body-wrapper{
.card-image{
}
.card-content{
.txt{
p{
line-height: 1.5rem;
}
h2{
font-size: 1.2rem;
font-family: $Bold;
font-weight: normal;
}
ul{
li{
font-size: 0.9rem;
line-height: 1.5rem;
}
}
}
}
}
}
#item, #item-article{
.content{
.content_s{
h2{
@@ -224,7 +302,7 @@ p{
}
}
&.item{
&.item, &.item-article{
.title{
font-family: $Bold;
}

View File

@@ -21,7 +21,7 @@
</div>
</section>
<section class="body-wrapper" class="section blog-listing">
<section class="body-wrapper">
{% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
{% include 'partials/breadcrumbs.html.twig' %}
{% endif %}

View File

@@ -0,0 +1,50 @@
{% extends 'partials/base.html.twig' %}
{% set blog_image = page.media.images[page.header.hero_image] ?: page.media.images|first %}
{% set collection = page.collection() %}
{% set blog = page.find(header_var('blog_url')|defined(theme_var('blog-page'))) %}
{% set show_breadcrumbs = header_var('show_breadcrumbs', [page, blog])|defined(true) %}
{% set show_sidebar = header_var('show_sidebar', [page, blog])|defined(true) %}
{% set show_pagination = header_var('show_pagination', [page, blog])|defined(true) %}
{% block hero %}
{% include 'partials/hero.html.twig' with {id: 'blog-hero', content: page.content, hero_image: blog_image} %}
{% endblock %}
{% block body %}
<section class="header-wrapper">
<div class="title">
<h1>{{page.title}}</h1>
</div>
<div class="cat">
{% include 'partials/taxonomylist.html.twig' with {base_url: my_url, taxonomy: 'category'} %}
</div>
</section>
<section class="body-wrapper articles-listing">
{% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
{% include 'partials/breadcrumbs.html.twig' %}
{% endif %}
{% embed 'partials/layout.html.twig' with {blog: page} %}
{% block item %}
{% for child in page.collection().order('publish_date','desc') %}
{% include 'partials/articles-list.html.twig' with {blog: page, page: child} %}
{% endfor %}
{% endblock %}
{% endembed %}
</section>
<div class="paginations">
{% 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>
{% endblock %}
{% block newsletter %}
{% include 'partials/newsletters.html.twig' %}
{% endblock %}

View File

@@ -0,0 +1,55 @@
{% extends 'partials/base.html.twig' %}
{% set blog = page.find(header_var('blog_url')|defined(theme_var('blog-page'))) %}
{% set show_breadcrumbs = header_var('show_breadcrumbs', [page, blog])|defined(true) %}
{% set show_sidebar = header_var('show_sidebar', [page, blog])|defined(true) %}
{% set show_pagination = header_var('show_pagination', [page, blog])|defined(true) %}
{% set hero_image_name = page.header.hero_image %}
{% block body %}
<script type="application/ld+json">
{
"@type": "Article",
"headline": "{{page.title}}",
"alternativeHeadline": "{{page.summary}}",
"image": "http://example.com/image.jpg",
"author": "",
"award": "{{page.title}}",
"editor": "Le Campus",
"genre": "{{page.title}}",
"keywords": " le_campus_valdedrome ",
"wordcount": "1120",
"publisher": {
"@type": "Organization",
"name": "Le Campus",
"logo": {
"@type": "ImageObject",
"url": "/user/themes/lecampus/images/logo_lecampus.svg"
}
},
"url": "{{uri.base}}",
"datePublished": "2015-09-20",
"dateCreated": "2015-09-20",
"dateModified": "2015-09-20",
"description": "We love to do stuff to help people and stuff",
"articleBody": "You can paste your entire post in here, and yes it can get really really long."
}
</script>
{% block item %}
{% if page.parent.template == "articles" %}
{% include 'partials/article-item.html.twig' %}
{% else %}
{% include 'partials/blog-item.html.twig' %}
{% endif %}
{% endblock %}
{% endblock %}
{% block newsletter %}
{% include 'partials/newsletters.html.twig' %}
{% endblock %}
{% block devis %}
{% include 'partials/devis.html.twig' %}
{% endblock %}

View File

@@ -37,8 +37,13 @@
</script>
{% block item %}
{% if page.parent.template == "articles" %}
{% include 'partials/article-item.html.twig' %}
{% else %}
{% include 'partials/blog-item.html.twig' %}
{% endif %}
{% endblock %}
{% endblock %}
{% block newsletter %}

View File

@@ -0,0 +1,78 @@
<script type='application/ld+json'>
{
"@type": "Articles",
"name": "article",
"url": "{{uri.base}}",
"description": "{{page.header.metadata.description}}",
"startDate": "{{page.header.date_begin}}",
"endDate": "{{page.header.date_end}}",
"location": {
"@type": "Place",
"name": "{{page.title}}",
"address": {
"@type": "PostalAddress",
"streetAddress": "Place Michel Paulus,Ecosite du Val de Drôme",
"addressLocality": "Eurre",
"addressRegion": "Val de Drôme",
"postalCode": "26400",
"addressCountry": "France"
}
}
}
</script>
{% set image = page.media.images|first %}
<section class="item-wrapper">
<section class="header-wrapper">
<div class="title-wrapper">
<div class="back">
<a href="{{page.parent.url}}">Retour</a>
</div>
<div class="title">
<h1>{{page.title}}</h1>
</div>
</div>
<div class="info-wrapper">
<div class="date">
Publié {% include 'partials/blog/date.html.twig' %} |
{% if page.taxonomy.category %}
{% for category in page.taxonomy.category %}
<span class="cat">
{{ category }}
</span>
{% endfor %}
{% endif %}
</div>
<div class="reso">
<!-- Your share button code -->
<div>
<a href="//www.facebook.com/sharer/sharer.php?u={{uri.route(true, true)}}" class="sharebox" target="_blank" rel =" noopener " onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=400,width=700');return false;">
Partager
<img src="/user/themes/lecampus/images/fb_black.svg" alt="facebook">
</a>
</div>
<a target="_blank" rel =" noopener " title="Twitter" href="https://twitter.com/share?url={{uri.route(true, true)}}" rel="nofollow" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=400,width=700');return false;">
Partager
<img src="/user/themes/lecampus/images/twitter.svg" alt="Twitter">
</a>
<a target="_blank" rel =" noopener " href=" http://www.linkedin.com/shareArticle?mini=true&url={{uri.route(true, true)}}" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=400,width=700');return false;">
Partager
<img src="/user/themes/lecampus/images/in_black.svg" alt="linkedin" />
</a>
</div>
</div>
</section>
<section class="body-wrapper">
<div class="card-image">
{% for images in page.media.images|slice(0, 1) %}
{{images.html('', page.title )}}
{% endfor %}
</div>
<div class="card-content">
<div class="txt">
{{ page.content|raw }}
</div>
</div>
</section>
</section>

View File

@@ -0,0 +1,41 @@
{% set image = page.media.images|first %}
<div class="card">
<a href="{{ page.url }}">
{% if image %}
<div class="card-image">
{{ image.derivatives(300,700,200).sizes('(max-width:26em) 100vw, 50vw').html('','articles') }}
</div>
{% endif %}
<div class="wrapper-content">
<div class="card-title">
{% include 'partials/blog/title.html.twig' with {title_level: 'h5'} %}
</div>
<div class="wrapper-info">
<div class="date">
Publié {% include 'partials/blog/date.html.twig' %} |
</div>
{% if page.taxonomy.category %}
{% for category in page.taxonomy.category %}
<span class="cat">
{{ category }}
</span>
{% endfor %}
{% endif %}
</div>
<div class="card-content">
{% if page.summary != page.content %}
{{ page.summary(500) }}
{% else %}
{{ page.content|raw }}
{% endif %}
</div>
<div class="readmore">
Lire l'article
</div>
</div>
</a>
</div>

View File

@@ -71,9 +71,10 @@
<header>
<nav>
<div class="navTrigger">
<i></i><i></i><i></i>
<i></i>
<i></i>
<i></i>
</div>
<div class="logo">
<a href="/"><img alt="le_campus_biovallee" src="/user/themes/lecampus/images/logo_lecampus.svg" alt="logo_lecampus"></a>
</div>

View File

@@ -13,7 +13,9 @@
{% include 'partials/blog/title.html.twig' with {title_level: 'h5'} %}
</div>
<div class="card-subtitle text-gray">
{% include 'partials/blog/date.html.twig' %}
<div class="date">
{% include 'partials/blog/date.html.twig' %}
</div>
</div>
</div>
<div class="card-body">

View File

@@ -1,31 +1,44 @@
<div class="date">
<span class="dt">
{% set mois_begin = 'MONTHS_OF_THE_YEAR'|ta(page.header.date|date('n') - 1) %}
{% set mois_end = 'MONTHS_OF_THE_YEAR'|ta(page.header.date_end|date('n') - 1) %}
{% set mois_begin = 'MONTHS_OF_THE_YEAR'|ta(page.header.publish_date|date('n') - 1) %}
{% set mois_end = 'MONTHS_OF_THE_YEAR'|ta(page.header.date_end|date('n') - 1) %}
{% if not page.header.date_end %}
Le
<time class="dt-begin" datetime="{{ page.header.date|date("c") }}">
{{ page.header.date|date('d') }}
{{mois_begin}}
{{ page.header.date|date('Y') }}
à
{{ page.header.date|date('G', "Europe/Paris") }}h{{ page.header.date|date('i', "Europe/Paris") }}
</time>
{% if page.parent.template == "articles" %}
Le
<time class="dt-begin" datetime="{{ page.header.date|date("c") }}">
{{ page.header.publish_date|date('d') }}
{{mois_begin}}
{{ page.header.publish_date|date('Y') }}
à
{{ page.header.publish_date|date('G', "Europe/Paris") }}h{{ page.header.publish_date|date('i', "Europe/Paris") }}
</time>
{% else %}
Le
<time class="dt-begin" datetime="{{ page.header.date|date("c") }}">
{{ page.header.date|date('d') }}
{{mois_begin}}
{{ page.header.date|date('Y') }}
à
{{ page.header.date|date('G', "Europe/Paris") }}h{{ page.header.date|date('i', "Europe/Paris") }}
</time>
{% endif %}
{% endif %}
{% if page.header.date_end %}
Du
<time class="dt-begin" datetime="{{ page.header.date|date("c") }}">
{{ page.header.date|date('d') }}
{{mois_begin}}
{{mois_begin}}
{{ page.header.date|date('Y') }}
</time>
au
<time class="dt-end" datetime="{{ page.header.date_end|date("c") }}">
{{ page.header.date_end|date('d') }}
{{mois_end}}
{{mois_end}}
{{ page.header.date_end|date('Y') }}
</time>
{% endif %}
</span>
</div>

View File

@@ -1,11 +1,11 @@
{% if page.taxonomy.tag %}
{% macro pageLinkName(text) %}{{ text|lower|replace({' ':'_'}) }}{% endmacro %}
{% macro pageLinkName(text) %}{{ text|lower|replace({' ':'_'}) }}{% endmacro %}
{% import _self as macro %}
{% import _self as macro %}
{% for tag in page.taxonomy.tag %}
<span class="tags {{ macro.pageLinkName(tag) }}">
<a class="label">{{ tag }}</a>
</span>
{% endfor %}
{% for tag in page.taxonomy.tag %}
<span class="tags {{ macro.pageLinkName(tag) }}">
<a class="label">{{ tag }}</a>
</span>
{% endfor %}
{% endif %}

View File

@@ -44,7 +44,9 @@
<div class="card-body">
<div class="card-title">
{% include 'partials/blog/date.html.twig' %}
<div class="date">
{% include 'partials/blog/date.html.twig' %}
</div>
{% include 'partials/blog/title.html.twig' with {title_level: 'h2'} %}
</div>
</div>

View File

@@ -15,7 +15,9 @@
{% endif %}
<div class="card-body">
<div class="card-title">
{% include 'partials/blog/date.html.twig' %}
<div class="date">
{% include 'partials/blog/date.html.twig' %}
</div>
{% include 'partials/blog/title.html.twig' with {title_level: 'h2'} %}
</div>
<div class="card-summary">

View File

@@ -0,0 +1,34 @@
{% set pagination = pagination|default(page.collection.params.pagination) %}
{% set base_url = base_url|default(page.url) %}
{% if pagination|length > 1 %}
<ul class="pagination">
{% if pagination.hasPrev %}
{% set url = (base_url ~ pagination.params ~ pagination.prevUrl)|replace({'//':'/'}) %}
<li><a rel="prev" href="{{ url }}">Page précédente</a></li>
{% else %}
<li><span>Page précédente</span></li>
{% endif %}
{% for paginate in pagination %}
{% if paginate.isCurrent %}
<li><span class="active">{{ paginate.number }}</span></li>
{% elseif paginate.isInDelta %}
{% set url = (base_url ~ pagination.params ~ paginate.url)|replace({'//':'/'}) %}
<li><a href="{{ url }}">{{ paginate.number }}</a></li>
{% elseif paginate.isDeltaBorder %}
<li class="gap"><span>&hellip;</span></li>
{% endif %}
{% endfor %}
{% if pagination.hasNext %}
{% set url = (base_url ~ pagination.params ~ pagination.nextUrl)|replace({'//':'/'}) %}
<li><a rel="next" href="{{ url }}">Page suivante</a></li>
{% else %}
<li><span>Page suivante</span></li>
{% endif %}
</ul>
{% endif %}

View File

@@ -1,4 +1,3 @@
{% set options = { items: {'@page.children': '/agenda'} } %}
{% set h2 = h2 ?: 'h2' %}
{% set h3 = h3 ?: 'h3' %}
@@ -10,10 +9,14 @@
{% set this_month = "now"|date('M') %}
{% set this_day = "now"|date('d') %}
{% for p in page.collection(options).dateRange( this_day ~ this_month ~ this_year, '12/31/' ~ this_year).slice(0, 3).order('date', 'asc') %}
{% set next_year = "+1 year"|date('Y')%}
{% for p in page.collection(options).dateRange( this_day ~ this_month ~ this_year, '12/31/' ~ next_year).slice(0, 3).order('date', 'asc') %}
<div class="side-agenda">
<a href="{{p.url}}">
{% include 'partials/blog/date.html.twig' with {page: p} %}
<div class="date">
{% include 'partials/blog/date.html.twig' with {page: p} %}
</div>
<{{h3}}>{{p.title}}</{{h3}}>
{{p.summary(70)}}
</a>
@@ -22,5 +25,4 @@
<div class="side-all-agenda">
<a href="/agenda">voir tout l'agenda</a>
</div>
</div>

View File

@@ -1,33 +1,48 @@
{% set taxlist = children_only is defined ? taxonomylist.getChildPagesTags() : taxonomylist.get() %}
{% macro pageLinkName(text) %}{{ text|lower|replace({' ':'_'}) }}{% endmacro %}
{% import _self as macro %}
{% import _self as macro %}
{% if taxlist %}
<div class="btn-toolbar filters">
<div data-toggle="buttons" class="btn-group">
<label class="btn btn-default tous" data-filter="">
<input type="radio" name="options">
Tous
{% set active = uri.param(taxonomy) == tax? 'active' : '' %}
<label class="{{active}} btn btn-default tous" data-filter="">
{% if page.template == "articles" %}
<a class="{{ active }}" href="{{ page.url }}">Tous</a>
{% else %}
<input type="radio" name="options">
Tous
{% endif %}
</label>
{% for tax,value in taxlist[taxonomy] %}
{% set active = uri.param(taxonomy) == tax? 'active' : '' %}
{% set label_class = uri.param(taxonomy) == tax ? 'label-primary' : 'label-secondary' %}
<label class="btn btn-default {{ macro.pageLinkName(tax) }}" data-filter="{{tax}}">
<input type="radio" name="options" >
{{tax}}
<label class="{{ active }} btn btn-default {{ macro.pageLinkName(tax) }}" data-filter="{{tax}}">
{% if page.template == "articles" %}
<a class="{{ active }}" href="{{ page.url }}/{{ taxonomy }}{{ config.system.param_sep }}{{ tax }}">{{ tax }}</a>
{% else %}
<input type="radio" name="options" >
{{tax}}
{% endif %}
</label>
{% endfor %}
</div>
<div class="btn-group ">
<label class="btn-default archive">
{% if page.title == 'Archive' %}
<a href="/{{page.parent.title|lower}}">{{page.parent.title}}</a>
{% else %}
{% if page.template == 'archive' %}
<div class="btn-group ">
<label class="btn-default archive">
<a href="/{{page.parent.title|lower}}">{{page.parent.title}}</a>
</label>
</div>
{% elseif page.template == 'calendrier' %}
<div class="btn-group ">
<label class="btn-default archive">
<a href="{{page.url}}/archive">Archive</a>
{% endif %}
</label>
</div>
</label>
</div>
{% endif %}
</div>
{% endif %}