From a7b6a292aa7c8a2affab0b2d401447560d16ef61 Mon Sep 17 00:00:00 2001 From: chankalan Date: Wed, 7 Oct 2020 19:01:29 +0200 Subject: [PATCH] on avance... --- lang/spip_fr.php | 13 + librealire_autorisations.php | 2 +- paquet.xml | 3 +- squelettes/body.html | 2 +- .../content/article-transcriptions.html | 72 ++--- squelettes/content/article.html | 58 ++++ squelettes/content/sommaire.html | 7 +- squelettes/inclure/resume/article.html | 16 +- squelettes/javascript/perso.js | 11 + squelettes/modeles/citation.html | 4 + squelettes/modeles/sommaire.html | 12 + squelettes/scss/styles/_perso.scss | 251 +++++++++++++++++- squelettes/scss/utils/_variables-perso.scss | 3 + 13 files changed, 395 insertions(+), 59 deletions(-) create mode 100644 lang/spip_fr.php create mode 100644 squelettes/content/article.html create mode 100644 squelettes/javascript/perso.js create mode 100644 squelettes/modeles/citation.html create mode 100644 squelettes/modeles/sommaire.html diff --git a/lang/spip_fr.php b/lang/spip_fr.php new file mode 100644 index 0000000..23f5112 --- /dev/null +++ b/lang/spip_fr.php @@ -0,0 +1,13 @@ + 'Rechercher dans les transcriptions', + +); diff --git a/librealire_autorisations.php b/librealire_autorisations.php index 4a9f17c..06e6b20 100644 --- a/librealire_autorisations.php +++ b/librealire_autorisations.php @@ -13,7 +13,7 @@ function librealire_autoriser() { include_spip('inc/cextras_autoriser'); -// restreindre le champ 'loisirs' sur les articles qui portent la composition 'cv' +// restreindre le champ fieldset 'transcriptions' sur les articles qui portent la composition 'transcriptions' restreindre_extras('article', array('transcriptions'), 'transcriptions', 'composition'); diff --git a/paquet.xml b/paquet.xml index cbfc25e..d7b55fd 100755 --- a/paquet.xml +++ b/paquet.xml @@ -1,7 +1,7 @@ + diff --git a/squelettes/body.html b/squelettes/body.html index f484bb8..67f4af1 100644 --- a/squelettes/body.html +++ b/squelettes/body.html @@ -17,7 +17,7 @@
- [(#COMPOSITION|=={transcriptions}|non) + [(#COMPOSITION|=={transcriptions}|ou{#ENV{type-page}|=={mot}}|non) ] diff --git a/squelettes/content/article-transcriptions.html b/squelettes/content/article-transcriptions.html index 24412c8..2344dad 100644 --- a/squelettes/content/article-transcriptions.html +++ b/squelettes/content/article-transcriptions.html @@ -1,14 +1,14 @@ -
+
- + [(#ID_ARTICLE|<{758}|oui) [(#LOGO_ARTICLE|image_reduire{200,200})] - + ] [

(#SURTITRE)

]

#TITRE[ - (#SOUSTITRE) + (#SOUSTITRE) ]

- [
(#CHAPO)
] + [
(#CHAPO|image_reduire{#CONST{_CONTENT_WIDTH},0})
] [
(#TEXTE|image_reduire{#CONST{_CONTENT_WIDTH},0})
]
- []
- - [

<:voir_en_ligne:/> : [(#NOM_SITE|sinon{[(#URL_SITE|couper{80})]})]

] - + [
(#PS|image_reduire{#CONST{_CONTENT_WIDTH},0})
] + + [(#INCLURE{fond=inclure/documents,id_article})] + + [

<:voir_en_ligne:/> : [(#NOM_SITE|sinon{[(#URL_SITE|couper{80})]})]

] [
(#NOTES)
] [(#TITRE_T|ou{#SOURCE}|ou{#LIEU}|ou{#DATE_T}|ou{#DUREE}|ou{#LIENS}|ou{#EVENEMENT}|ou{#LICENCE}|ou{#CREDITSVISUELS}|oui)
-

<:librealire:media_d_origine:>

-
- [
Titre :
-
(#TITRE_T|propre)
] - [
Source :
-
(#SOURCE|propre)
] - [
Lieu :
-
(#LIEU|propre)
] - [
Date :
- ] - [
Durée :
-
(#DUREE|propre)
] - [
Autres liens :
-
(#LIENS|propre)
] - [
Évènement :
-
(#EVENEMENT|propre)
] - [
License :
-
(#LICENCE|=={verbatim}|oui)Verbatim
] - [
License :
-
(#LICENCE|=={autrelicence}|oui)Autre licence
] - [
Crédits des visuels :
-
(#CREDITSVISUELS|propre)
] -
] +

<:librealire:media_d_origine:>

+
+ [
Titre :
+
(#TITRE_T|propre)
] + [
Source :
+
(#SOURCE|propre)
] + [
Lieu :
+
(#LIEU|propre)
] + [
Date :
+ ] + [
Durée :
+
(#DUREE|propre)
] + [
Autres liens :
+
(#LIENS|propre)
] + [
Évènement :
+
(#EVENEMENT|propre)
] + [
License :
+
(#LICENCE|=={verbatim}|oui)Verbatim
] + [
License :
+
(#LICENCE|=={autrelicence}|oui)Autre licence
] + [
Crédits des visuels :
+
(#CREDITSVISUELS|propre)
] +
+
] + + [
<:librealire:avertissement:> : (#CONFIG{librealire/avertissement})
]
diff --git a/squelettes/content/article.html b/squelettes/content/article.html new file mode 100644 index 0000000..42090e6 --- /dev/null +++ b/squelettes/content/article.html @@ -0,0 +1,58 @@ + + +
+ +
+ + [

(#SURTITRE)

] +

#TITRE[ + (#SOUSTITRE) + ]

+ + + + + +
+ +
+ + [
(#CHAPO)
] + + [
(#TEXTE|image_reduire{#CONST{_CONTENT_WIDTH},0})
] + +
+ + [] + + + +
+ + diff --git a/squelettes/content/sommaire.html b/squelettes/content/sommaire.html index aad0090..f9dba1d 100644 --- a/squelettes/content/sommaire.html +++ b/squelettes/content/sommaire.html @@ -5,8 +5,10 @@ [
(#CHAPO|image_reduire{700,*})
] [
(#TEXTE|image_reduire{700,*})
] +
- [

<:info_ps:>

(#PS|image_reduire{700,*})
] [

<:info_notes:>

(#NOTES)
]
@@ -15,4 +17,5 @@ [
(#DESCRIPTIF_SITE_SPIP)
] - + + diff --git a/squelettes/inclure/resume/article.html b/squelettes/inclure/resume/article.html index a6419b1..2eaea7b 100644 --- a/squelettes/inclure/resume/article.html +++ b/squelettes/inclure/resume/article.html @@ -1,16 +1,18 @@
- + []
-

#TITRE

+

#TITRE

+

#SOUSTITRE

[(#ENV{hero}|=={oui}|oui)[(#ENV{compteur}|=={1}|oui) + <:librealire:lire:>]]
[(#DATE|nom_jour|ucfirst) [(#DATE|affdate)]] [(#TITRE)] -
-
-
+
[(#ENV{hero}|=={oui}|oui)[(#ENV{compteur}|=={1}|non) + <:librealire:lire:>]][(#ENV{hero}|=={oui}|non) + <:librealire:lire:>]
diff --git a/squelettes/javascript/perso.js b/squelettes/javascript/perso.js new file mode 100644 index 0000000..68b1894 --- /dev/null +++ b/squelettes/javascript/perso.js @@ -0,0 +1,11 @@ +$(function() { + + // un sommaire masque + $('.sommaire_titre').siblings('ul').toggle(); + $('.sommaire_titre').on('click', function(){ + $(this).siblings('ul').toggle().toggleClass('ouvert'); + }); + $('.sommaire-back').on('click', function(){ + $('.sommaire_titre').siblings('ul:not(.ouvert)').toggle(); + }); +}); diff --git a/squelettes/modeles/citation.html b/squelettes/modeles/citation.html new file mode 100644 index 0000000..78a1aca --- /dev/null +++ b/squelettes/modeles/citation.html @@ -0,0 +1,4 @@ +
+ [
(#ENV{texte}|propre)
] +
[(#FICHIER|image_reduire{150,150})]
+
diff --git a/squelettes/modeles/sommaire.html b/squelettes/modeles/sommaire.html new file mode 100644 index 0000000..c9149fb --- /dev/null +++ b/squelettes/modeles/sommaire.html @@ -0,0 +1,12 @@ +#SET{liste, '*'} +[(#CONFIG{sommaire_automatique_numerote}|=={on}|oui) + #SET{liste, '#'} +] + + + +#FILTRE{propre} diff --git a/squelettes/scss/styles/_perso.scss b/squelettes/scss/styles/_perso.scss index 124e54d..3bd825b 100644 --- a/squelettes/scss/styles/_perso.scss +++ b/squelettes/scss/styles/_perso.scss @@ -9,6 +9,98 @@ } +@mixin bouton($clair:#fff, $sombre:$couleurPrincipale) { + +$couleurSaturate : saturate($clair, 45%); +$couleurSaturateLight : lighten($couleurSaturate, 10%); + + display: inline-block; + line-height: 1.2; + background-color: $clair; + border: none; + border-radius: 0; + box-shadow: none; + text-align: center; + color: $sombre; + transition: background 0.3s; + cursor: pointer; + font-family:$typo-Merriweather; + padding:0; + &.plein { + border-radius:($spacer/4); + background:$sombre; + color:$clair; + font-weight:700; + padding: ($spacer/2) $spacer; + .fas { + &:before { + color:$clair; + } + } + } + &:before { + content:'...'; + display:inline-block; + margin: 0 -1em 0 0; + font-size: 1.2rem; + float: left; + line-height: 1.6; + color: red; + } + &.plein:before { + display:none; + } + &:hover { + background-color: darken($clair,15%); + text-decoration: none; + color: $sombre; + } + &:focus { + background-color: $couleurSaturateLight !important; + text-decoration: none; + color: $sombre; + } + &[disabled=disabled] { + background: desaturate($clair, 45%); + color: darken($sombre, 10%) !important; + } + .fas { + padding-left:em(12px); + float:right; + &:before { + font-size:em(22px); + line-height:1; + font-weight:700; + color: $sombre; + } + } + &:hover .fas:before { + color: $sombre; + } + &:focus .fas:before { + color: $sombre; + } +} + + +// +// modele bouton +// +.btn { + @include bouton(transparent,$couleurPrincipale); + &.plein { + @include bouton(#fff,$couleurPrincipale); + } + &.right { + float:right; + margin-left:$spacer; + } + &.left { + float:left; + margin-right:$spacer; + } +} + /* blocs */ .page_connex { @@ -48,29 +140,48 @@ padding-top:0; .formulaire_spip.formulaire_recherche { - display:none; + display:none;// pour ne pas surcharger tout le footer } } + +// layout +.page_content { + margin-bottom:$spacer*2; +} + + + // page sommaire .texte_accueil { - max-width: 70%; - font-size: 1.6rem; - line-height: 1.5; + line-height: 1.6; margin-bottom:$spacer; margin-left:$spacer; font-family:$typo-Merriweather; font-weight:200; color:$couleurPrincipale; + @include clearfix(); + .main { + max-width: 65%; + font-size: 1.6rem; + float:left; + padding:$spacer $spacer*1.5; + } + aside { + width:35%; + float:right; + } +} +.formulaire_spip.formulaire_recherche { + font-size:1rem; } - // resume .article-resume { display:block; border-left:solid $couleurConnexplus ($spacer/3); background-color:$couleurBkgT; - padding:($spacer*3) $spacer $spacer ($spacer*1.5); + padding:($spacer*2.5) $spacer $spacer ($spacer*3.2); &, a { color:#0a4756; } @@ -79,10 +190,17 @@ display:block; clear:both; } - + .article-resume__titre { + font-size: 2rem; + line-height: 1.6; + } + .article-resume__soustitre { + font-weight:700; + margin:0; + } .article-resume__logo { float:right; - margin:-($spacer*2) 0 0 ($spacer * 1.5); + margin:-($spacer*1.5) 0 0 ($spacer * 1.5); max-width:30%; width:auto; } @@ -90,6 +208,9 @@ position:absolute; top:$spacer; left:($spacer*2); + @include media($bp-medium-up) { + left:($spacer*4); + } &:before { display:none; } @@ -105,22 +226,55 @@ .page_content { margin-right:0; article { - padding:($spacer*2); + padding:($spacer*2.5) ($spacer*2) $spacer; background-color:$couleurBkgT; + border-radius:0 0 6px 6px; @include media($bp-medium-up) { - padding:$spacer ($spacer*4); + padding:($spacer*2.5) ($spacer*4) $spacer; + } + .avertissement { + background:$couleurBkgAvertissement; + margin-bottom:-$spacer; + margin-top:0; + border-radius:0 0 6px 6px; + } + &.import { + .main { + .strong_to_dl { + @include clearfix; + &:first-of-type:before { + content:'Média d’origine'; + display:block; + @extend .h2; + } + dt { + clear:both; + float:left; + margin-right:$spacer/2; + } + dd { + margin:0; + } + } + } + } + } + .liste_articles article { + padding:($spacer*2.5) $spacer $spacer ($spacer*2); + @include media($bp-medium-up) { + padding:($spacer*2.5) $spacer $spacer ($spacer*4); } } } } -.article__transcription_origine { +.article__transcription_origine, .avertissement, .strong_to_dl { /* width:100%; */ - margin:$spacer -($spacer*2); + margin:($spacer*2) -($spacer*2) 0; padding:$spacer ($spacer*2); background:$couleurBkgTOrigine; color:$couleurTDetails; @include media($bp-medium-up) { - margin:$spacer -($spacer*4); + margin:($spacer*2) -($spacer*4) 0; padding:$spacer ($spacer*4); } dt { @@ -143,4 +297,75 @@ } } +// article +.article__soustitre { + display:block; + font-size:1rem; +} +.nav-sommaire { + border:0; + margin:($spacer*2) 0; + .sommaire_titre { + font-size:0.8rem; + @include bouton(#9dccd1,$couleurPrincipale); + &.plein { + border-radius:0; + } + &:hover, &:hover .fas { + color:darken($couleurPrincipale,10%); + } + } + > ul { + + } +} + + + + + +// page_mot +.page_mot { + .page_content { + margin-right:0; + } +} + + + + +/* modeles */ +/* citation */ +.modele_citation { + @include clearfix(); + .citation_texte { + background:$couleurBkgCitation; + border-radius:$spacer/2; + padding:$spacer; + font-size:1.4rem; + color:$couleurPrincipale; + } + .citation_image { + float:right; + position:relative; + margin-top:10px; + padding-left:46px; + &:after { + display:block; content:''; width:0; height:0; + position:absolute; left:0; top:-32px; + border-top: 60px solid $couleurBkgCitation; + border-left: 20px solid transparent; + border-right: 10px solid transparent; + border-bottom: 0; + @include rotate(-50deg); + z-index:0; + } + } +} + + + + + + diff --git a/squelettes/scss/utils/_variables-perso.scss b/squelettes/scss/utils/_variables-perso.scss index b69cdb4..a7a0558 100644 --- a/squelettes/scss/utils/_variables-perso.scss +++ b/squelettes/scss/utils/_variables-perso.scss @@ -12,3 +12,6 @@ $couleurConnexplus: #62c0c9; $couleurBkgT: #fdf7f2; $couleurBkgTOrigine: #b8d9dd; $couleurTDetails: #1f6b7c; + +$couleurBkgCitation: #e1f7f9; +$couleurBkgAvertissement: #ebf6f7;