From 944d18dd5411b43d712a2056a63fbc7abc1cdbd6 Mon Sep 17 00:00:00 2001 From: chankalan Date: Mon, 21 Jun 2021 10:00:24 +0200 Subject: [PATCH] =?UTF-8?q?=C3=A9mission/chapitre?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base/libreavous.php | 9 +- formulaires/editer_chapitre.html | 4 + lang/chapitre_fr.php | 2 + lang/libreavous_fr.php | 16 ++ libreavous_administrations.php | 3 +- libreavous_fonctions.php | 20 ++- paquet.xml | 4 +- prive/objets/contenu/chapitre.html | 5 + squelettes/content/article-emission.html | 26 +-- squelettes/scss/base/_typo.scss | 5 +- squelettes/scss/styles/_perso.scss | 167 ++++++++++++++++++++ squelettes/scss/utils/_variables-perso.scss | 1 + 12 files changed, 240 insertions(+), 22 deletions(-) create mode 100644 lang/libreavous_fr.php diff --git a/base/libreavous.php b/base/libreavous.php index b4fe176..4a24ad1 100644 --- a/base/libreavous.php +++ b/base/libreavous.php @@ -194,9 +194,9 @@ function libreavous_declarer_tables_objets_sql($tables) { 'chronique' => 'varchar(255) NOT NULL DEFAULT ""', 'mp3' => 'varchar(255) NOT NULL DEFAULT ""', 'ogg' => 'varchar(255) NOT NULL DEFAULT ""', + 'references_sujet' => 'text NOT NULL DEFAULT ""', 'drupal_guid' => 'varchar(255) NOT NULL DEFAULT ""', 'drupal_pubdate' => 'varchar(255) NOT NULL DEFAULT ""', - 'references_sujet' => 'text NOT NULL DEFAULT ""', 'maj' => 'timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP' ), 'key' => array( @@ -205,13 +205,14 @@ function libreavous_declarer_tables_objets_sql($tables) { ), 'titre' => 'titre AS titre, "" AS lang', #'date' => '', - 'champs_editables' => array('titre', 'code', 'code_fichier', 'code_podcast', 'debut', 'fin', 'type_sujet', 'chronique', 'mp3', 'ogg', 'drupal_guid', 'drupal_pubdate', 'id_article'), - 'champs_versionnes' => array('titre', 'code', 'code_fichier', 'code_podcast', 'debut', 'fin', 'type_sujet', 'chronique', 'mp3', 'ogg', 'drupal_guid', 'drupal_pubdate', 'id_article'), + 'champs_editables' => array('titre', 'code', 'code_fichier', 'code_podcast', 'debut', 'fin', 'type_sujet', 'chronique', 'mp3', 'ogg', 'references_sujet', 'drupal_guid', 'drupal_pubdate', 'id_article'), + 'champs_versionnes' => array('titre', 'code', 'code_fichier', 'code_podcast', 'debut', 'fin', 'type_sujet', 'chronique', 'mp3', 'ogg', 'references_sujet', 'drupal_guid', 'drupal_pubdate', 'id_article'), 'rechercher_champs' => array("titre" => 5), 'tables_jointures' => array(), - ); return $tables; } + + diff --git a/formulaires/editer_chapitre.html b/formulaires/editer_chapitre.html index 72c1379..b3600ec 100644 --- a/formulaires/editer_chapitre.html +++ b/formulaires/editer_chapitre.html @@ -48,6 +48,10 @@ label=<:chapitre:champ_ogg_label:/>, explication=<:chapitre:champ_ogg_explication:/> })] + [(#SAISIE{textarea, references_sujet, + label=<:chapitre:champ_references_sujet_label:/>, + explication=<:chapitre:champ_references_sujet_explication:/> })] + [(#SAISIE{input, drupal_guid, label=<:chapitre:champ_drupal_guid_label:/>, explication=<:chapitre:champ_drupal_guid_explication:/> })] diff --git a/lang/chapitre_fr.php b/lang/chapitre_fr.php index c1b50f3..5d2b76f 100644 --- a/lang/chapitre_fr.php +++ b/lang/chapitre_fr.php @@ -30,6 +30,8 @@ $GLOBALS[$GLOBALS['idx_lang']] = array( 'champ_mp3_label' => 'MP3', 'champ_ogg_explication' => 'Taille du fichier ogg', 'champ_ogg_label' => 'OGG', + 'champ_references_sujet_explication' => 'Références ...', + 'champ_references_sujet_label' => 'Références sujet', 'champ_titre_explication' => 'dans le json = chapter_title', 'champ_titre_label' => 'titre', 'champ_type_sujet_explication' => 'Nomenclature de deux lettres : SL, SC, CH, AN', diff --git a/lang/libreavous_fr.php b/lang/libreavous_fr.php new file mode 100644 index 0000000..e0ac1de --- /dev/null +++ b/lang/libreavous_fr.php @@ -0,0 +1,16 @@ + 'Podcast', + 'ogg' => 'OGG', + 'mp3' => 'MP3', + 'emission_integrale' => 'Émission intégrale', + +); diff --git a/libreavous_administrations.php b/libreavous_administrations.php index 188f8e5..13c9078 100644 --- a/libreavous_administrations.php +++ b/libreavous_administrations.php @@ -57,8 +57,7 @@ function libreavous_upgrade($nom_meta_base_version, $version_cible) { cextras_api_upgrade(libreavous_declarer_champs_extras(), $maj['0.0.1']); - $maj['0.1.0'] = array(array('maj_tables', array('spip_chapitres'))); - $maj['0.1.1'] = array(array('maj_tables', array('spip_chapitres'))); + $maj['0.1.3'] = array(array('maj_tables', array('spip_chapitres'))); include_spip('base/upgrade'); maj_plugin($nom_meta_base_version, $version_cible, $maj); diff --git a/libreavous_fonctions.php b/libreavous_fonctions.php index 8c34372..22bd461 100644 --- a/libreavous_fonctions.php +++ b/libreavous_fonctions.php @@ -131,7 +131,7 @@ function libreavous_toDateIso($code) { return $texte; } -function filtre_libreavous_conversionDrupal($shortdate) { +function libreavous_conversionDrupal($shortdate) { $annee = substr($shortdate, 0, 4); $mois = substr($shortdate, 4, 2); $jour = substr($shortdate, 6, 2); @@ -185,3 +185,21 @@ function libreavous_nomtypesujet($abbr) { } } +// plutot utiliser la fonction spip taille_en_octets +function libreavous_mio($number) { + $mio = round($number / (1024 * 1024), 1); + if ($mio < 10) { + $mio = round($mio, 2); + return number_format($mio, 2, ',', ' '); + } else if ($mio < 100) { + $mio = round($mio, 1); + return number_format($mio, 1, ',', ' '); + } else { + $mio = round($mio, 0); + return number_format($mio, 0, ',', ' '); + } + return $mio; +} + + + diff --git a/paquet.xml b/paquet.xml index 363d6d4..3ab4595 100644 --- a/paquet.xml +++ b/paquet.xml @@ -1,8 +1,8 @@ diff --git a/prive/objets/contenu/chapitre.html b/prive/objets/contenu/chapitre.html index 204e83d..8a2dcc0 100644 --- a/prive/objets/contenu/chapitre.html +++ b/prive/objets/contenu/chapitre.html @@ -49,6 +49,11 @@ (#OGG) ] +[
+
<:chapitre:champ_references_sujet_label:/> :
+ (#REFERENCES_SUJET) +
] + [
<:chapitre:champ_drupal_guid_label:/> :
(#DRUPAL_GUID) diff --git a/squelettes/content/article-emission.html b/squelettes/content/article-emission.html index da60543..e39fdfd 100644 --- a/squelettes/content/article-emission.html +++ b/squelettes/content/article-emission.html @@ -35,19 +35,23 @@
+
- - [
+
+ + [
+
+ + ] +
+ +
- - ] - - [
(#CHAPO)
] diff --git a/squelettes/scss/base/_typo.scss b/squelettes/scss/base/_typo.scss index 6bd08f7..9fb86f8 100644 --- a/squelettes/scss/base/_typo.scss +++ b/squelettes/scss/base/_typo.scss @@ -43,11 +43,12 @@ html.rtl * { } a { - border-bottom:1px solid $couleurSecondaire; + border-bottom:1px solid $couleurSecondaireClaire; text-decoration:none; &.spip_out { color: $couleurTertiaire; - border-bottom-color:$couleurTertiaire; + border:0; + font-weight:700; } &:hover, &:focus { text-decoration: none; diff --git a/squelettes/scss/styles/_perso.scss b/squelettes/scss/styles/_perso.scss index 10b3075..eb9ad7b 100644 --- a/squelettes/scss/styles/_perso.scss +++ b/squelettes/scss/styles/_perso.scss @@ -212,6 +212,60 @@ h2 { font-family:$typo-titre; } } +.lecteur { + @include flex; + align-items:center; + margin-bottom:2em; + > .podlove_wrapper { +/* flex-grow:2; */ + width:76%; + } + .telecharger { + list-style:none; + width:24%; + padding:0 0 0 2em; + margin:0; + li { + margin-bottom:1em; + &:last-child { + margin:0; + } + } + .btn { + width:100%; + padding:0 0.5em 0.3em 40px; + position:relative; + text-align:left; + border-width:0.25em; + border-color:$couleurSecondaire; + color:$couleurSecondaire !important; + font-weight:900; + font-size:1.15rem; + &:before { + @include triangle(right, $couleurSecondaire, 0.5em); + position: absolute; + left: 15px; + top: 50%; + margin-top:-0.5em; + } + small { + font-size:0.7em; + font-weight:400; + } + &.mp3 { + border-color:$couleurPrincipale; + color:$couleurPrincipale !important; + &:before { + @include triangle(right, $couleurPrincipale, 0.5em); + } + } + &:hover, &:active { + background:none !important; + border-color:$couleurPrincipaleOn !important; + } + } + } +} div.star-rating, div.star-rating a { background-image:url('img/star.png'); @@ -244,3 +298,116 @@ div.rating-cancel a { /* max-width:100%; */ } } + + + + + + + + /*! Plusieurs typographies sont finalement trop grosses, j'ai réduit. */ +h1, .h1 { + font-size: 2.6em; +} +h2 { + font-weight: 700; +} +.article-resume__titre a { + color: #2E5281; + border-bottom: inherit; +} + + + /*! certaines graisses sont trop forte en 700.*/ + +.page_header > .page_container .nav a { + font-weight: 500; +} + + + /*! Sur le menu j'ai augmenté la hauteur du bouton RSS et le champ recherche. Pour le menu avec le hover je propose de modifier le design, car le bouton bleu cyan au rollover est trop prégnant. Je convertis en filets simlple 2pt. Par contre j'ai basculé le padding sur le "li" sinon le filet sous le "a" débordait de chaque côté (voir copie-écran de la retouche css de la bannière) +Sur le menu, je vais voir s'il est possible de faire des filets de rollover composés de tirets et de points avec les fonctions css border-image. Ce qui ferrait un rappel du design.*/ + + /*! cyan ausurvol*/ +.page_header .nav a:hover, .page_header .nav a.on, .page_header .nav a.active { + color: white !important; + background-color: transparent !important; + border-bottom:3px solid #00c4f5; +} + + /*! bleu charte ensuite */ +.page_header .nav a.on, .page_header .nav a.active { + border-bottom:3px solid #2E5281; +} + +.btn { + padding: 0.5em 1em; + font-weight: 500; +} + +/*! Boutons trop hauts*/ + + +.liens .btn{ + padding: 0.7em 1em; + } +.btn.blanc { + border-radius: 0.7em; +} + + +.emission-Programme ul::before { + content: "Sujet Principal :"; + font-size: 1.3em; + font-weight: 700; + font-family: 'Montserrat'; + line-height: 2em; + margin-left: -1em; +} +p a.spip_out, li a.spip_out { + color: #2E5281; + border-bottom: 2px solid #FDC; +} +.formulaire_spip input[type="text"]{ + min-height: 2.5em; + line-height: 1.875em; + border-radius: 3px; +} + + /*! trop gros, j'ai réduis. */ + +.num_emission { + font-size: 2.3rem; +} +.nav li { + margin: 0 0.7em; +} +.page_header .nav a { + padding: 0.3em 0em 0.2em; + color: white !important; + background-color: inherit; + border-radius:0; + border-bottom:3px solid transparent; +} + + /*! couleurs des liens sortants selon la maquette */ + + +.formulaire_spip .abonnement button::after { + bottom: 0.8rem; +} + +/*! fond du cartouche galerie selon la maquette avec ombrages*/ + +.fl { + background: #EEF1F5; + box-shadow: inset 0px 1px 20px rgba(0, 0, 0, 0.5); +} + + +/*! Polices du pied de page plus maigre */ + +.page_footer p { + font-size: 0.8rem; + font-weight: 200; +} diff --git a/squelettes/scss/utils/_variables-perso.scss b/squelettes/scss/utils/_variables-perso.scss index c47cc17..e8473c4 100644 --- a/squelettes/scss/utils/_variables-perso.scss +++ b/squelettes/scss/utils/_variables-perso.scss @@ -4,6 +4,7 @@ $couleurPrincipale: #005184; $couleurPrincipaleOn: #00c4f5; $couleurSecondaire: #f7651a; +$couleurSecondaireClaire: #F9E8DF; /* $couleurPrincipaleDowner: lighten($couleurPrincipale, 60%); */ /* $blancTransparent: rgba(white,0.7); */