Browse Source

Reprise du modele evenement : on conserve le microformat vevent, mais on ajoute les microdata de http://schema.org/Event (merci bennyb) et les balises HTML5

Reprise des pages agenda et jour, on ajoute les classes bootstrap qui vont bien pour que l'agenda tombe bien sans aucun habillage particulier

+ reprise de la css pour l'affichage de l'agenda
svn/attic/branches/v3/110596
cedric@yterium.com 9 years ago
parent
commit
f8eece716b
11 changed files with 85 additions and 73 deletions
  1. +1
    -0
      .gitattributes
  2. +29
    -15
      css/spip.agenda.css
  3. +1
    -13
      modeles/evenement_vevent.html
  4. +1
    -1
      paquet.xml
  5. +1
    -3
      squelettes/content/article-evenement.html
  6. +11
    -10
      squelettes/content/jour.html
  7. +1
    -3
      squelettes/contenu/page-agenda.html
  8. +1
    -3
      squelettes/contenu/page-jour.html
  9. +1
    -1
      squelettes/inclure/agenda-evenements-meme-article.html
  10. +18
    -24
      squelettes/inclure/agenda-liste.html
  11. +20
    -0
      squelettes/inclure/resume/evenement.html

+ 1
- 0
.gitattributes View File

@ -114,5 +114,6 @@ squelettes/extra1/rubrique-agenda.html -text
squelettes/ical-agenda.html -text
squelettes/inclure/agenda-evenements-meme-article.html -text
squelettes/inclure/agenda-liste.html -text
squelettes/inclure/resume/evenement.html -text
squelettes/navigation/page-agenda.html -text
squelettes/style_public_plugin_agenda.html -text

+ 29
- 15
css/spip.agenda.css View File

@ -1,22 +1,36 @@
.evenement.one {padding: 0.75em;padding-left: 7.5em;background: #eee;margin-bottom: 1.5em;}
.evenement.one {padding: 0.75em;background: #eee;margin-bottom: 1.5em;}
.evenement.one .lire-la-suite {display: none;}
.page_agenda .liste-items .evenement, .rubrique_agenda .liste-items .evenement, .page_evenement .liste-items .evenement {padding-left: 7.5em;background-image: url(img/agenda-filet.png);background-repeat: repeat-y;background-position: 6.5em top;}
.evenement .dateban {float: left;margin-left: -7.5em;width: 6.5em;}
.evenement .dateban .day {display: block;text-align: center;font-size: 2em;}
.evenement .dateban .month {display: block;text-align: center;text-transform: uppercase;font-size: 0.71em;}
.evenement .dateban .year {display: block;text-align: center;font-size: 0.71em;}
.page_agenda .item.month, .rubrique_agenda .item.month {padding: 0.75em;background: #e4e4e4; text-transform: uppercase;}
.item.evenement.fini {opacity: 0.7;}
.item.month.fini {opacity: 0.7;}
.long .liste-items .evenement {padding-left: 7.5em;}
.long .liste-items .evenement .banner {display:block;float: left;margin-left: -7.5em;width: 5.5em;text-align: center;overflow: hidden;opacity: 0.7;}
.long .liste-items .evenement .banner .label {display: block;padding:0.75em 0;}
.long .liste-items .evenement .banner .day {display: block;text-align: center;font-size: 2em;line-height: 1;}
.long .liste-items .evenement .banner .month {display: block;text-align: center;text-transform: uppercase;font-size: 0.85em;}
.long .liste-items .evenement .banner .year {display: block;text-align: center;font-size: 0.85em;}
.page_jour .liste-items.evenements .item .dateban {display: none;}
/*.long .liste-items.evenements .item.month, .long .liste-items.evenements .item.month {padding: 0.75em;background: #e4e4e4; text-transform: uppercase;}*/
.liste-items.evenements .item.fini .entry-title {font-size: inherit;line-height: inherit;}
.liste-items.evenements .item.fini .entry-content {margin-bottom: 0;max-height: 4.5em;overflow: hidden;}
.liste-items.evenements .item.fini .meta-publi {display: none;}
.liste-items.evenements .item.fini .lire-la-suite {display: none;}
.liste-items.evenements .item.fini .evenement .banner {opacity: 0.5;}
.liste-items.evenements.short .info-publi, .short .liste-items.evenements .info-publi {display:block;margin: 0;}
.liste-items.evenements .meta-publi {left:7.5em;}
.liste-items.evenements .lire-la-suite {left:7.5em;}
.liste-items.evenements .entry-title {margin-top: 0;}
.page_jour .liste-items.evenements .evenement .banner {display: none;}
.page_jour .long .liste-items .evenement{padding-left: 0;}
.page_jour .liste-items.evenements .meta-publi {left:0;}
.page_jour .liste-items.evenements .lire-la-suite {left:0;}
/*
.liste-items.evenements.short .evenement {padding-left: 0;background-image: none;}
.liste-items.evenements.short .summary {margin: 0;font-size: 1em;}
.liste-items.evenements.short .date {margin: 0;}
.liste-items.evenements.short .dateban {display: none;}
.liste-items.evenements.short .description {display: none;}
.liste-items.evenements.short .entry-title {margin: 0;font-size: inherit;}
.liste-items.evenements.short .banner {display: none;}
.liste-items.evenements.short .entry-content {display: none;}
.liste-items.evenements.short .lire-la-suite {display: none;}
.liste-items.evenements.short .category {display: none;}
.liste-items.evenements.short .meta-publi {display: none;}
*/

+ 1
- 13
modeles/evenement_vevent.html View File

@ -1,13 +1 @@
<BOUCLE_vevent(EVENEMENTS){id_evenement=#ENV{id,#ENV{id_evenement}}}{tout}>
<div class="dateban"><b class="day">[(#DATE_DEBUT|jour)]</b> <b class="month">[(#DATE_DEBUT|nom_mois)]</b> <b class="year">[(#DATE_DEBUT|annee)]</b></div>
<div class="vevent id_#ID_EVENEMENT">
<h3 class="summary #EDIT{titre}"><a href="[(#URL_EVENEMENT)]">#TITRE</a></h3>
[(#INSCRIPTION|?{' ',''})<p class="inscrits">#NB_INSCRITS[/(#PLACES) ]<:agenda:inscrits:></p>]
[<p class="date">(#DATE_DEBUT|agenda_affdate_debut_fin{#DATE_FIN,#HORAIRE,'hcal'})</p>]
#SET{intro,''}<BOUCLE_art(ARTICLES){id_article}>#SET{intro,#INTRODUCTION}</BOUCLE_art>
[<div class="description #EDIT{descriptif}">(#DESCRIPTIF|sinon{#GET{intro}})</div>]
[<p class="lieu"><span class="location #EDIT{lieu}">(#LIEU)</span>[<br /><span class="adresse #EDIT{adresse}">(#ADRESSE|PtoBR)</span>]</p>]
<B_mots><p class='category'><BOUCLE_mots(MOTS){id_evenement}{par num titre,titre}{', '}>#TITRE</BOUCLE_mots></p></B_mots>
<p class="lire-la-suite"><a href="#URL_EVENEMENT">Lire le détail de &laquo; #TITRE &raquo;</a></p>
</div>
</BOUCLE_vevent>
#INCLURE{fond=inclure/resume/evenement,id_evenement=#ENV{id,#ENV{id_evenement}}}

+ 1
- 1
paquet.xml View File

@ -1,7 +1,7 @@
<paquet
prefix="agenda"
categorie="date"
version="3.9.3"
version="3.10.0"
etat="stable"
compatibilite="[3.0.0;3.0.*]"
logo="prive/themes/spip/images/evenement-32.png"


+ 1
- 3
squelettes/content/article-evenement.html View File

@ -8,8 +8,6 @@
*/
]
<BOUCLE_ev(EVENEMENTS){id_evenement}>
<div class="evenement one">
#MODELE{evenement_vevent}
</div>
<div class="evenement one well">#INCLURE{fond=inclure/resume/evenement,id_evenement}</div>
<INCLURE{fond=content/article,id_article,id_evenement,env} />
</BOUCLE_ev>

+ 11
- 10
squelettes/content/jour.html View File

@ -13,21 +13,22 @@
<div class="content-principal">
<div class="cartouche">
<h1 class="h1"><:agenda:titre_sur_l_agenda:></h1>
<h1 class="h1"><:agenda:titre_sur_l_agenda:>
<small>[(#GET{date_debut}|affdate)]</small>
</h1>
</div>
</div>
<B_ev>
[<h2>[(#GET{date_debut}|affdate)]&nbsp;: (#TOTAL_BOUCLE|singulier_ou_pluriel{agenda:info_un_evenement,agenda:info_nombre_evenements})</h2>]
<ul class="liste-items evenements">
<BOUCLE_ev(EVENEMENTS){!evenement_passe #GET{date_debut}}{!evenement_a_venir #GET{date_fin}}{par date_debut}{id_article?}{id_rubrique?}{id_mot?}{id_evenement_source?}>
[(#TOTAL_BOUCLE|>{0}|sinon_interdire_acces{#URL_EVENEMENT})]
<li class="item">
#MODELE{evenement_vevent}
</li>
</BOUCLE_ev>
</ul>
<div class="liste long evenements">
<ul class="liste-items evenements">
<BOUCLE_ev(EVENEMENTS){!evenement_passe #GET{date_debut}}{!evenement_a_venir #GET{date_fin}}{par date_debut}{id_article?}{id_rubrique?}{id_mot?}{id_evenement_source?}>
[(#TOTAL_BOUCLE|>{1}|sinon_interdire_acces{#URL_EVENEMENT})]
<li class="item">#INCLURE{fond=inclure/resume/evenement,id_evenement}</li>
</BOUCLE_ev>
</ul>
</div>
</B_ev>
<p><:agenda:info_aucun_evenement:></p>
<//B_ev>

+ 1
- 3
squelettes/contenu/page-agenda.html View File

@ -10,9 +10,7 @@
[<h1>(#TOTAL_BOUCLE|singulier_ou_pluriel{agenda:info_un_evenement,agenda:info_nombre_evenements})</h1>]
<ul class="liste-items evenements">
<BOUCLE_ev(EVENEMENTS){!evenement_passe #ENV{date_debut,#ENV{date}}}{!evenement_a_venir #ENV{date_debut,#ENV{date}}|agenda_moisdecal{1,'Y-m-d H:i:00'}}{par date_debut}{id_article?}{id_rubrique?}{id_mot?}{id_evenement_source?}>
<li class="item">
#MODELE{evenement_vevent}
</li>
<li class="item">#INCLURE{fond=inclure/resume/evenement,id_evenement}</li>
</BOUCLE_ev>
</ul>
</B_ev>


+ 1
- 3
squelettes/contenu/page-jour.html View File

@ -10,9 +10,7 @@
[<h1>[(#GET{date_debut}|affdate): ](#TOTAL_BOUCLE|singulier_ou_pluriel{agenda:info_un_evenement,agenda:info_nombre_evenements})</h1>]
<ul class="liste-items evenements">
<BOUCLE_ev(EVENEMENTS){!evenement_passe #GET{date_debut}}{!evenement_a_venir #GET{date_fin}}{par date_debut}{id_article?}{id_rubrique?}{id_mot?}{id_evenement_source?}>
<li class="item">
#MODELE{evenement_vevent}
</li>
<li class="item">#INCLURE{fond=inclure/resume/evenement,id_evenement}</li>
</BOUCLE_ev>
</ul>
</B_ev>


+ 1
- 1
squelettes/inclure/agenda-evenements-meme-article.html View File

@ -4,7 +4,7 @@
#ANCRE_PAGINATION
<ul class="liste-items evenements short">
<BOUCLE_et_aussi(EVENEMENTS){par date_debut}{!evenement_passe #ENV{date_debut,#ENV{date}}}{id_article=#ENV{id_article}}{id_evenement!=#ENV{id_evenement,0}}{pagination 10}>
<li class="item evenement">#MODELE{evenement_vevent}</li>
<li class="item evenement">#INCLURE{fond=inclure/resume/evenement,id_evenement}</li>
</BOUCLE_et_aussi>
</ul>
[<p class="pagination">(#PAGINATION)</p>]


+ 18
- 24
squelettes/inclure/agenda-liste.html View File

@ -10,19 +10,19 @@
#SET{affichage_duree,#ENV{affichage_duree,#CONFIG{agenda/affichage_duree,12}}}
#SET{affichage_debut,#CONFIG{agenda/affichage_debut,#ENV{affichage_debut,date_jour}}}
#SET{date_debut,#ENV{date_debut,#ENV{date}}|agenda_date_debut_liste{#GET{affichage_debut}}}
#SET{date_prev,#ENV{date_debut,#ENV{date}}|agenda_moisdecal{#GET{affichage_duree}|mult{-1},'Y-m-d H:i:00'}}
#SET{date_fin,#ENV{date_debut,#ENV{date}}|agenda_moisdecal{#GET{affichage_duree},'Y-m-d H:i:00'}}
#SET{date_prev,#GET{date_debut}|agenda_moisdecal{#GET{affichage_duree}|mult{-1},'Y-m-d H:i:00'}}
#SET{date_fin,#GET{date_debut}|agenda_moisdecal{#GET{affichage_duree},'Y-m-d H:i:00'}}
[(#REM) Ne pas afficher l'annee de depart, elle est dans le h2)]
[(#GET{date_debut}|annee|unique{annee}|non)]
<div id="agenda-liste">
<div id="agenda-liste" class="liste long evenements">
<h2>[(#GET{date_debut}|affdate_periode{#GET{affichage_duree},#GET{affichage_debut}})]</h2>
<B_ev>
<ul class="liste-items evenements">
<BOUCLE_ev(EVENEMENTS){!evenement_passe #GET{date_debut}}{!evenement_a_venir #GET{date_fin}}{par date_debut}{id_article?}{id_rubrique?}{id_mot?}{id_evenement_source?}>
[<li class="item month[(#DATE_DEBUT|agenda_date_passee)fini]">(#GET{affichage_duree}|>{1}?{[(#DATE_DEBUT|nom_mois|unique{mois})[ (#DATE_DEBUT|annee|unique{annee})]]})</li>]
<li class="item evenement[(#DATE_FIN|agenda_date_passee)fini]">
#MODELE{evenement_vevent}
[<li class="item item-header month[(#DATE_DEBUT|agenda_date_passee)fini]">(#GET{affichage_duree}|>{1}?{[(#DATE_DEBUT|nom_mois|unique{mois})[ (#DATE_DEBUT|annee|unique{annee})]]})</li>]
<li class="item[(#DATE_FIN|agenda_date_passee)fini]">
#INCLURE{fond=inclure/resume/evenement,id_evenement}
</li>
</BOUCLE_ev>
</ul>
@ -30,26 +30,20 @@
<p><:agenda:info_aucun_evenement:></p>
<//B_ev>
<p class="pagination">
#SET{sep,' | '}
<div class="pagination">
#SET{hasprev,''}
<BOUCLE_prev(EVENEMENTS){!evenement_a_venir #GET{date_debut}}{0,1}{id_article?}{id_rubrique?}{id_mot?}{id_evenement_source?}>#SET{hasprev,1}</BOUCLE_prev>
[<span
class="prev[(#GET{hasprev}|non)disabled]">(#SELF
|parametre_url{date_debut,#GET{date_prev}|affdate{Y-m-d}}
|ancre_url{agenda-liste}
|lien_ou_expose{[&larr; (#ENV{label_precedent,#GET{date_prev}|affdate_periode{#GET{affichage_duree}}})],[(#GET{hasprev}|non)],'lien_pagination','',nofollow}
|inserer_attribut{rel,prev}
)[<span
class='sep'>(#GET*{sep})</span>]</span>]
#SET{hasnext,''}
<BOUCLE_next(EVENEMENTS){!evenement_passe #GET{date_fin}}{0,1}{id_article?}{id_rubrique?}{id_mot?}{id_evenement_source?}>#SET{hasnext,1}</BOUCLE_next>
[<span
class="next[(#GET{hasnext}|non)disabled]">(#SELF
|parametre_url{date_debut,#GET{date_fin}|affdate{Y-m-d}}
|ancre_url{agenda-liste}
|lien_ou_expose{[(#ENV{label_suivant,#GET{date_fin}|affdate_periode{#GET{affichage_duree}}}) &rarr;],[(#GET{hasnext}|non)],'lien_pagination','',nofollow}
|inserer_attribut{rel,next}
)</span>]
</p>
[(#INCLURE{fond=modeles/pagination_precedent_suivant,
label_precedent=#GET{date_prev}|affdate_periode{#GET{affichage_duree}},
label_suivant=#GET{date_fin}|affdate_periode{#GET{affichage_duree}},
nombre_pages=#VAL{1}|plus{#GET{hasprev}|?{1,0}}|plus{#GET{hasnext}|?{1,0}},
page_courante=#GET{hasprev}|?{2,1},
url_precedent=#SELF|parametre_url{date_debut,#GET{date_prev}|affdate{Y-m-d}},
url_suivant=#SELF|parametre_url{date_debut,#GET{date_fin}|affdate{Y-m-d}},
ancre=agenda-liste,
separateur=' | ',
})]
</div>
</div>

+ 20
- 0
squelettes/inclure/resume/evenement.html View File

@ -0,0 +1,20 @@
<BOUCLE_vevent(EVENEMENTS){id_evenement=#ENV{id,#ENV{id_evenement}}}{tout}>
<article class="entry evenement vevent id_#ID_EVENEMENT" itemscope itemtype="http://schema.org/Event">
<span class="banner"><span class="label label-inverse"><b class="day">[(#DATE_DEBUT|jour)]</b> <b class="month">[(#DATE_DEBUT|nom_mois)]</b> <b class="year">[(#DATE_DEBUT|annee)]</b></span></span>
<strong class="h3-like summary entry-title"><a itemprop="url" class="url" href="[(#URL_EVENEMENT)]">[(#LOGO_EVENEMENT|image_reduire{150,100}|inserer_attribut{itemprop,image})]<span itemprop="name">#TITRE</span><span
class="lire-la-suite hide"><i class="icon-chevron-right" title="<:zpip:lire_la_suite|attribut_html:><:zpip:lire_la_suite_de|attribut_html:>&laquo;[(#TITRE|attribut_html)]&raquo;"></i></span></a></strong>
<meta itemprop="startDate" content="[(#DATE_DEBUT|date_iso)]" />
<meta itemprop="endDate" content="[(#DATE_FIN|date_iso)]" />
<p class="info-publi">[<time><i class="icon-calendar"></i> (#DATE_DEBUT|agenda_affdate_debut_fin{#DATE_FIN,#HORAIRE,'hcal'})</time>]</p>
<div class="entry-content">
#SET{intro,''}<BOUCLE_art(ARTICLES){id_article}>#SET{intro,#INTRODUCTION{#ENV{coupe,300}}</BOUCLE_art>
[<div class="introduction #EDIT{descriptif}" itemprop="description">(#DESCRIPTIF|sinon{#GET{intro}})</div>]
[<p class="location" itemprop="location"><span class="lieu #EDIT{lieu}">(#LIEU)</span>[<br /><span class="adresse #EDIT{adresse}">(#ADRESSE|PtoBR)</span>]</p>]
</div>
<p class="meta-publi">
[(#INSCRIPTION|?{' ',''})<span class="inscrits"><span class="sep">|</span> <i class="icon-user" title="#NB_INSCRITS[/(#PLACES) ] <:agenda:inscrits|attribut_html:>"></i> #NB_INSCRITS[/(#PLACES) ]</span>]
<B_mots><span class='category'><span class="sep">|</span> <BOUCLE_mots(MOTS){id_evenement}{par num titre,titre}{', '}><span class="label"><i class="icon-tag"></i> #TITRE</span></BOUCLE_mots></span></B_mots>
</p>
</article>
</BOUCLE_vevent>

Loading…
Cancel
Save