diff options
| author | polo <ordipolo@gmx.fr> | 2022-03-02 01:10:29 +0100 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2022-03-02 01:10:29 +0100 |
| commit | 2afdde9749eeface10ceca832eb7f8ff8d32de3c (patch) | |
| tree | c0e14c238fa8c60897919afabe6f6ef7ba69a2d1 | |
| parent | 2ac4254829fb27d878044978e4e89f15eeeddd23 (diff) | |
| download | melaine-2afdde9749eeface10ceca832eb7f8ff8d32de3c.tar.gz melaine-2afdde9749eeface10ceca832eb7f8ff8d32de3c.tar.bz2 melaine-2afdde9749eeface10ceca832eb7f8ff8d32de3c.zip | |
Affichage et page archives
| -rw-r--r-- | .htaccess | 2 | ||||
| -rw-r--r-- | config.php | 4 | ||||
| -rw-r--r-- | controller/admin.php | 44 | ||||
| -rw-r--r-- | controller/visitor.php | 33 | ||||
| -rw-r--r-- | lisez-moi.txt | 30 | ||||
| -rw-r--r-- | public/css/accueil.css | 34 | ||||
| -rw-r--r-- | public/css/discographie.css | 22 | ||||
| -rw-r--r-- | public/css/donnees_hors_editeur.css | 9 | ||||
| -rw-r--r-- | public/css/pages_articles_simples.css | 27 | ||||
| -rw-r--r-- | public/header_images/logo_real.png | bin | 0 -> 12772 bytes | |||
| -rw-r--r-- | public/header_images/logo_vlc.png | bin | 0 -> 12002 bytes | |||
| -rw-r--r-- | view/album.php | 2 | ||||
| -rw-r--r-- | view/courriel.php | 1 | ||||
| -rw-r--r-- | view/discographie.php | 2 | ||||
| -rw-r--r-- | view/pageArticlesSimples.php | 23 | ||||
| -rw-r--r-- | view/template-formulaires.php | 8 | ||||
| -rw-r--r-- | à faire après livraison.txt | 11 |
17 files changed, 140 insertions, 112 deletions
| @@ -8,4 +8,4 @@ ErrorDocument 404 http://melaine.localhost/erreur404.php | |||
| 8 | #ErrorDocument 404 "<a href='http://melaine.localhost/erreur404.php' >retour au site</a>" | 8 | #ErrorDocument 404 "<a href='http://melaine.localhost/erreur404.php' >retour au site</a>" |
| 9 | 9 | ||
| 10 | # Interdire exploration du répertoire | 10 | # Interdire exploration du répertoire |
| 11 | #Options All -Indexes | 11 | Options All -Indexes |
| @@ -1,4 +1,8 @@ | |||
| 1 | <?php | 1 | <?php |
| 2 | // à adapter au serveur apache pour attraper les erreurs 404 | ||
| 3 | // permet d'adapter le contenu du .htaccess | ||
| 4 | $racineDuSite = '/var/www/melaine'; | ||
| 5 | |||
| 2 | // bibliothèque utilisée pour créer les miniatures | 6 | // bibliothèque utilisée pour créer les miniatures |
| 3 | // écrire 'gd' ou 'imagick' | 7 | // écrire 'gd' ou 'imagick' |
| 4 | $imageLibrary = 'imagick'; | 8 | $imageLibrary = 'imagick'; |
diff --git a/controller/admin.php b/controller/admin.php index ee5c217..5e3cde7 100644 --- a/controller/admin.php +++ b/controller/admin.php | |||
| @@ -6,7 +6,17 @@ | |||
| 6 | 6 | ||
| 7 | function pageArticlesSimplesAdmin(string $page, string $title, string $headerPaintedTitle, $fileCode, int $suppression) | 7 | function pageArticlesSimplesAdmin(string $page, string $title, string $headerPaintedTitle, $fileCode, int $suppression) |
| 8 | { | 8 | { |
| 9 | $headerImage = '<div class="photo" id="photo_' . $page . '" ></div>'; | 9 | if($page == 'archives') |
| 10 | { | ||
| 11 | $headerImage = '<div style="display: flex;" > | ||
| 12 | <div>hello</div> | ||
| 13 | <div class="photo" id="photo_' . $page . '" ></div> | ||
| 14 | </div>'; | ||
| 15 | } | ||
| 16 | else | ||
| 17 | { | ||
| 18 | $headerImage = '<div class="photo" id="photo_' . $page . '" ></div>'; | ||
| 19 | } | ||
| 10 | 20 | ||
| 11 | // infos sur les fichiers | 21 | // infos sur les fichiers |
| 12 | $Articles = new Article($page); | 22 | $Articles = new Article($page); |
| @@ -210,40 +220,10 @@ function discoEdit($fileCode, $suppression) | |||
| 210 | $fileCodeArgument = ''; | 220 | $fileCodeArgument = ''; |
| 211 | } | 221 | } |
| 212 | 222 | ||
| 213 | // préremplir le champ <input type="file" > | ||
| 214 | // c'est normallement impossible | ||
| 215 | |||
| 216 | |||
| 217 | // tri des albums avec l'année dans le .json | ||
| 218 | |||
| 219 | // noms des fichiers JSON | ||
| 220 | //$albumNamesJSON = $Albums->fileList; | ||
| 221 | //$annees = []; | ||
| 222 | //for($i = 0; $i < $Albums->fileListCount; $i++) | ||
| 223 | //{ | ||
| 224 | // une case supplémentaire contient le "fileCode" | ||
| 225 | //$albumsJSON[$i][3] = pathinfo($albumNamesJSON[$i])['filename']; | ||
| 226 | //$albumsJSON[$i][3] = pathinfo($Albums->fileList[$i]['fileCode'])['filename']; | ||
| 227 | |||
| 228 | //$annees[$i] = $albumsJSON[$i][1]; | ||
| 229 | //} | ||
| 230 | //var_dump($annee); die(); | ||
| 231 | |||
| 232 | // tri d'un tableau multidimensionnel | ||
| 233 | //array_multisort($annees, $albumsJSON); | ||
| 234 | |||
| 235 | |||
| 236 | |||
| 237 | // liens dans la page et le menu chronologie | ||
| 238 | // ce dernier comporte une ancre lorsque le html n'existe pas | ||
| 239 | /*$lienAlbum = []; | ||
| 240 | $avecLien = []; | ||
| 241 | $linkDiscoChrono = [];*/ | ||
| 242 | for($i = 0; $i < $Albums->fileListCount; $i++) | 223 | for($i = 0; $i < $Albums->fileListCount; $i++) |
| 243 | { | 224 | { |
| 244 | if(file_exists('data/discographie/html/' . $Albums->fileList[$i]['fileCode'] . '.html')) | 225 | if(file_exists('data/discographie/html/' . $Albums->fileList[$i]['fileCode'] . '.html')) |
| 245 | { | 226 | { |
| 246 | /*$lienAlbum[$i] = 'page=album&album_name=' . $Albums->fileList[$i]['titre'] . '&file_code=' . $Albums->fileList[$i]['fileCode'];*/ | ||
| 247 | $lienAlbum[$i] = 'page=album&file_code=' . $Albums->fileList[$i]['fileCode']; | 227 | $lienAlbum[$i] = 'page=album&file_code=' . $Albums->fileList[$i]['fileCode']; |
| 248 | $avecLien[$i] = true; | 228 | $avecLien[$i] = true; |
| 249 | $linkDiscoChrono[$i] = 'linkChrono'; // css | 229 | $linkDiscoChrono[$i] = 'linkChrono'; // css |
| @@ -254,7 +234,7 @@ function discoEdit($fileCode, $suppression) | |||
| 254 | $avecLien[$i] = false; | 234 | $avecLien[$i] = false; |
| 255 | $linkDiscoChrono[$i] = 'noLinkChrono'; // css | 235 | $linkDiscoChrono[$i] = 'noLinkChrono'; // css |
| 256 | } | 236 | } |
| 257 | $lienBoutonModif[$i] = 'page=discographie&action=edition&file_code=' . $Albums->fileList[$i]['fileCode']; | 237 | $lienBoutonModif[$i] = 'page=discographie&action=edition&file_code=' . $Albums->fileList[$i]['fileCode'] . '#' . $Albums->fileList[$i]['fileCode']; |
| 258 | } | 238 | } |
| 259 | 239 | ||
| 260 | // morceaux en HTML à assembler | 240 | // morceaux en HTML à assembler |
diff --git a/controller/visitor.php b/controller/visitor.php index aae15a7..ac19441 100644 --- a/controller/visitor.php +++ b/controller/visitor.php | |||
| @@ -30,8 +30,6 @@ function menu() | |||
| 30 | // toutes celles du menu sauf: menu et discographie | 30 | // toutes celles du menu sauf: menu et discographie |
| 31 | function pageArticlesSimplesVisitor(string $page, string $title, string $headerPaintedTitle) | 31 | function pageArticlesSimplesVisitor(string $page, string $title, string $headerPaintedTitle) |
| 32 | { | 32 | { |
| 33 | $headerImage = '<div class="photo" id="photo_' . $page . '" ></div>'; | ||
| 34 | |||
| 35 | // infos sur les fichiers $Articles->fileList | 33 | // infos sur les fichiers $Articles->fileList |
| 36 | $Articles = new Article($page); | 34 | $Articles = new Article($page); |
| 37 | 35 | ||
| @@ -47,7 +45,7 @@ function pageArticlesSimplesVisitor(string $page, string $title, string $headerP | |||
| 47 | $Articles->fileList = array_reverse($Articles->fileList); | 45 | $Articles->fileList = array_reverse($Articles->fileList); |
| 48 | } | 46 | } |
| 49 | 47 | ||
| 50 | // variables $css, $js, $header et $content | 48 | // variables $css, $js, $header, $content et $headerImage |
| 51 | require('view/pageArticlesSimples.php'); | 49 | require('view/pageArticlesSimples.php'); |
| 52 | // HTML | 50 | // HTML |
| 53 | require('view/template.php'); | 51 | require('view/template.php'); |
| @@ -122,43 +120,22 @@ function discoVisitor() | |||
| 122 | } | 120 | } |
| 123 | //var_dump($Albums->fileList); die(); | 121 | //var_dump($Albums->fileList); die(); |
| 124 | 122 | ||
| 125 | |||
| 126 | // tri des albums avec l'année dans le .json | ||
| 127 | |||
| 128 | // noms des fichiers JSON | ||
| 129 | //$albumNamesJSON = $Albums->fileList; | ||
| 130 | |||
| 131 | //$annees = []; | ||
| 132 | for($i = 0; $i < $Albums->fileListCount; $i++) | ||
| 133 | {} | ||
| 134 | //var_dump($annee); die(); | ||
| 135 | |||
| 136 | // tri d'un tableau multidimensionnel | ||
| 137 | //array_multisort($annees, $albumsJSON); | ||
| 138 | |||
| 139 | |||
| 140 | // lien vers le HTML ou ancre? | ||
| 141 | /*$lienAlbum = []; | ||
| 142 | $avecLien = []; | ||
| 143 | $linkDiscoChrono = [];*/ | ||
| 144 | |||
| 145 | // liens vers les albums | 123 | // liens vers les albums |
| 146 | for($i = 0; $i < $Albums->fileListCount; $i++) | 124 | for($i = 0; $i < $Albums->fileListCount; $i++) |
| 147 | { | 125 | { |
| 148 | if(file_exists('data/discographie/html/' . $Albums->fileList[$i]['fileCode'] . '.html')) | 126 | if(file_exists('data/discographie/html/' . $Albums->fileList[$i]['fileCode'] . '.html')) |
| 149 | { | 127 | { |
| 150 | /*$lienAlbum[$i] = 'page=album&album_name=' . $Albums->fileList[$i]['titre'] . '&file_code=' . $Albums->fileList[$i]['fileCode'];*/ | ||
| 151 | $lienAlbum[$i] = 'page=album&file_code=' . $Albums->fileList[$i]['fileCode']; | 128 | $lienAlbum[$i] = 'page=album&file_code=' . $Albums->fileList[$i]['fileCode']; |
| 152 | $avecLien[$i] = true; | 129 | $avecLien[$i] = true; |
| 153 | $linkDiscoChrono[$i] = 'linkChrono'; // pour le css | 130 | $linkDiscoChrono[$i] = 'linkChrono'; // pour le css |
| 154 | } | 131 | } |
| 155 | else | 132 | else |
| 156 | { | 133 | { |
| 157 | $lienAlbum[$i] = 'page=discographie#' . $Albums->fileList[$i]['titre']; | 134 | $lienAlbum[$i] = 'page=discographie#' . $Albums->fileList[$i]['fileCode']; |
| 158 | $avecLien[$i] = false; | 135 | $avecLien[$i] = false; |
| 159 | $linkDiscoChrono[$i] = 'noLinkChrono'; // pour le css | 136 | $linkDiscoChrono[$i] = 'noLinkChrono'; // pour le css |
| 160 | } | 137 | } |
| 161 | $lienBoutonModif[$i] = 'page=discographie&action=edition&file_code=' . $Albums->fileList[$i]['fileCode']; | 138 | $lienBoutonModif[$i] = 'page=discographie&action=edition&file_code=' . $Albums->fileList[$i]['fileCode'] . '#' . $Albums->fileList[$i]['fileCode']; |
| 162 | } | 139 | } |
| 163 | 140 | ||
| 164 | // variables $css, $js et $content | 141 | // variables $css, $js et $content |
| @@ -174,6 +151,10 @@ function album($fileCode) | |||
| 174 | 151 | ||
| 175 | $Albums = new Album($page); | 152 | $Albums = new Album($page); |
| 176 | $Albums->getAllJSON(); | 153 | $Albums->getAllJSON(); |
| 154 | if(!empty($Albums->fileList)) | ||
| 155 | { | ||
| 156 | $Albums->fileList = array_reverse($Albums->fileList); | ||
| 157 | } | ||
| 177 | $Albums->fileCode = $fileCode; | 158 | $Albums->fileCode = $fileCode; |
| 178 | $Albums->readOne(); | 159 | $Albums->readOne(); |
| 179 | 160 | ||
diff --git a/lisez-moi.txt b/lisez-moi.txt index 9f2b5be..4df9e5c 100644 --- a/lisez-moi.txt +++ b/lisez-moi.txt | |||
| @@ -2,35 +2,39 @@ Pré-requis: | |||
| 2 | 2 | ||
| 3 | - Un serveur apache exécutant PHP. | 3 | - Un serveur apache exécutant PHP. |
| 4 | - Le n'utilise pas de base de données mais un ensemble de fichiers HTML. | 4 | - Le n'utilise pas de base de données mais un ensemble de fichiers HTML. |
| 5 | - Le module GD de PHP pour créer des miniatures des photos (bande passante). | 5 | - Le module imagemagick ou GD de PHP pour créer des miniatures des photos (bande passante). |
| 6 | - La possibilité d'utiliser un fichier .htaccess pour la sécurité (du mot de passe admin en particulier). | 6 | - La possibilité d'utiliser un fichier .htaccess pour la sécurité (du mot de passe admin en particulier). |
| 7 | - Le responsable du site (Melaine) ne doit pas utiliser un navigateur trop vieux (ckeditor). | 7 | - Le responsable du site (Melaine) ne doit pas utiliser un navigateur trop vieux (ckeditor). |
| 8 | 8 | ||
| 9 | 9 | ||
| 10 | Informations: | 10 | Informations: |
| 11 | 11 | ||
| 12 | Le site n'utilise pas de base de données mais à la place un ensemble de fichiers. Le dossier data contient des dossiers "html" et "images", ainsi qu'un dossier 'json'. | 12 | Le site n'utilise pas de base de données mais un ensemble de fichiers dans le dossier "data". |
| 13 | - Les premiers contiennent le texte sous forme de fichiers HTML. | 13 | Les données sont dans les formats HTML et JSON, il y aussi des images et des miniatures |
| 14 | - Les seconds les images ainsi qu'un dossier "thumbnails" (chargement rapide des pages). | 14 | Le code suit une architecture modèle-vue-contrôleur, il n'utilise pas de framework mais quelques bibliothèques. |
| 15 | Le code suit une architecture modèle-vue-contrôleur, il n'utilise pas de framework. | 15 | l'upload de son et vidéo ou l'embarquement (suovre le lien sans quitter le site) ne sont pas gérés pour l'instant. |
| 16 | - Il n'est pas possible pour l'instant d'uploader du multimedia (son et video). Peut-être plus tard. | ||
| 17 | - Il n'est pas possible non plus d'embarquer du multimedia (son et vidéo hébergé ailleurs). Peut-être plus tard. | ||
| 18 | 16 | ||
| 19 | 17 | ||
| 20 | Installation: | 18 | Installation: |
| 21 | 19 | ||
| 22 | - Copier tous les fichiers sur le serveur. | 20 | Extraire le fichier melainePHP.zip sur le serveur |
| 23 | - Autoriser en écriture le dossier "data" et tout son contenu, ça se fait depuis la racine du site avec la commande: | 21 | OU |
| 24 | chmod -R 777 data | 22 | Se placer dans /var/www et faire un "git clone" |
| 25 | Le php se chargera des ajustements (supprimer l'autorisation des fichiers en exécution, permettre à l'utilisateur de manipuler les nouveaux fichiers sans accès root, créer un backup des données). | 23 | |
| 26 | - Autoriser le .htaccess (normalement par une manipulation dans le fichier /etc/php/php.ini du serveur) | 24 | Créer à la racine du site un dossier data si il n'existe pas et lui donner les droits 777 |
| 27 | - Augmenter la taille maximale des fichiers (par défaut de 2Mo) pouvant être téléchargés dans le php.ini, ainsi que dans le fichier model/Image.php. Une taille max de 5Mo est très raisonnable. | 25 | |
| 26 | Autoriser le .htaccess (normalement par une manipulation dans le fichier /etc/php/php.ini du serveur) | ||
| 27 | |||
| 28 | Augmenter la taille maximale des fichiers pouvant être réléchargé (par défaut de 2Mo) dans le php.ini | ||
| 29 | |||
| 30 | En fonction de la configuration et de ce qu'il a été possible de réaliser, éditer le fichier config.php | ||
| 28 | 31 | ||
| 29 | 32 | ||
| 30 | Redirections: | 33 | Redirections: |
| 31 | 34 | ||
| 32 | Si les redirections en cas d'erreur 404 ne fonctionnent pas c'est sans doute que le .htaccess ne pointe pas vers le fichier erreur404.php. | 35 | Si les redirections en cas d'erreur 404 ne fonctionnent pas c'est sans doute que le .htaccess ne pointe pas vers le fichier erreur404.php. |
| 33 | En effet, la racine du serveur pourrait bien, du point de vue d'apache, être le dossier parent à celui du site. | 36 | En effet, la racine du serveur pourrait bien, du point de vue d'apache, être le dossier parent à celui du site. |
| 37 | Vérifier le fichier config.php | ||
| 34 | 38 | ||
| 35 | 39 | ||
| 36 | architecture Modèle-Vue-Contrôleur (MVC): | 40 | architecture Modèle-Vue-Contrôleur (MVC): |
diff --git a/public/css/accueil.css b/public/css/accueil.css index 8c8ff35..b95e818 100644 --- a/public/css/accueil.css +++ b/public/css/accueil.css | |||
| @@ -95,6 +95,11 @@ h3 | |||
| 95 | margin: 3px; | 95 | margin: 3px; |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | article | ||
| 99 | { | ||
| 100 | font-size: 90%; | ||
| 101 | margin: 5px 0; | ||
| 102 | } | ||
| 98 | .articleAvecEditeur | 103 | .articleAvecEditeur |
| 99 | { | 104 | { |
| 100 | background-color: #a8b3d9; | 105 | background-color: #a8b3d9; |
| @@ -123,8 +128,11 @@ form | |||
| 123 | 128 | ||
| 124 | #courriel a:hover | 129 | #courriel a:hover |
| 125 | { | 130 | { |
| 126 | /*border: 1px blue solid;*/ | 131 | /*padding: 5px;*/ |
| 127 | padding: 5px; | 132 | } |
| 133 | #courriel>button /* bouton pour remonter */ | ||
| 134 | { | ||
| 135 | float: right; | ||
| 128 | } | 136 | } |
| 129 | 137 | ||
| 130 | #courrielJS | 138 | #courrielJS |
| @@ -249,16 +257,16 @@ form | |||
| 249 | { | 257 | { |
| 250 | .police_titre | 258 | .police_titre |
| 251 | { | 259 | { |
| 252 | 260 | max-width: 550px; | |
| 253 | font-family: you_are_loved, Arial, sans; | 261 | font-family: you_are_loved, Arial, sans; |
| 254 | font-size: 250%; | 262 | font-size: 250%; |
| 255 | color: #ddc97a; | 263 | color: #ddc97a; |
| 256 | position: relative; | 264 | margin-left: 30px; |
| 257 | top: 30px; | 265 | padding-top: 20px; |
| 258 | left: 40px; | ||
| 259 | } | 266 | } |
| 260 | 267 | ||
| 261 | /* compensation des cibles de liens # superposées au "nav" hors flux */ | 268 | /* compensation des cibles de liens # |
| 269 | superposées au "nav" hors flux */ | ||
| 262 | :target | 270 | :target |
| 263 | { | 271 | { |
| 264 | padding-top: 70px; | 272 | padding-top: 70px; |
| @@ -328,10 +336,8 @@ form | |||
| 328 | font-family: you_are_loved, Arial, sans; | 336 | font-family: you_are_loved, Arial, sans; |
| 329 | font-size: 200%; | 337 | font-size: 200%; |
| 330 | color: #ddc97a; | 338 | color: #ddc97a; |
| 331 | 339 | margin-left: 25px; | |
| 332 | position: relative; | 340 | padding-top: 20px; |
| 333 | top: 20px; | ||
| 334 | left: 30px; | ||
| 335 | } | 341 | } |
| 336 | 342 | ||
| 337 | #bienvenue .police_titre | 343 | #bienvenue .police_titre |
| @@ -427,10 +433,8 @@ form | |||
| 427 | font-family: you_are_loved, Arial, sans; | 433 | font-family: you_are_loved, Arial, sans; |
| 428 | font-size: 150%; | 434 | font-size: 150%; |
| 429 | color: #ddc97a; | 435 | color: #ddc97a; |
| 430 | 436 | margin-left: 15px; | |
| 431 | position: relative; | 437 | padding-top: 10px; |
| 432 | top: 13px; | ||
| 433 | left: 18px; | ||
| 434 | } | 438 | } |
| 435 | 439 | ||
| 436 | #bienvenue .police_titre | 440 | #bienvenue .police_titre |
diff --git a/public/css/discographie.css b/public/css/discographie.css index 8ed3700..0362bb4 100644 --- a/public/css/discographie.css +++ b/public/css/discographie.css | |||
| @@ -25,7 +25,7 @@ aside div | |||
| 25 | 25 | ||
| 26 | #bouton_chronologie | 26 | #bouton_chronologie |
| 27 | { | 27 | { |
| 28 | width: 200px; | 28 | width: 250px; |
| 29 | text-align: center; | 29 | text-align: center; |
| 30 | font-size: large; | 30 | font-size: large; |
| 31 | font-weight: bold; | 31 | font-weight: bold; |
| @@ -38,7 +38,7 @@ aside div | |||
| 38 | 38 | ||
| 39 | #chronologie | 39 | #chronologie |
| 40 | { | 40 | { |
| 41 | width: 200px; | 41 | width: 250px; |
| 42 | font-weight: bold; | 42 | font-weight: bold; |
| 43 | /*padding: 5px;*/ | 43 | /*padding: 5px;*/ |
| 44 | display: none; | 44 | display: none; |
| @@ -55,7 +55,7 @@ aside div | |||
| 55 | 55 | ||
| 56 | #chronologie p a:visited | 56 | #chronologie p a:visited |
| 57 | { | 57 | { |
| 58 | color: blue; | 58 | /*color: blue;*/ |
| 59 | } | 59 | } |
| 60 | #chronologie p a:hover | 60 | #chronologie p a:hover |
| 61 | { | 61 | { |
| @@ -65,6 +65,7 @@ aside div | |||
| 65 | .linkChrono | 65 | .linkChrono |
| 66 | { | 66 | { |
| 67 | text-decoration: none; | 67 | text-decoration: none; |
| 68 | color: blue; | ||
| 68 | } | 69 | } |
| 69 | .linkChrono:hover | 70 | .linkChrono:hover |
| 70 | { | 71 | { |
| @@ -131,7 +132,7 @@ input | |||
| 131 | article | 132 | article |
| 132 | { | 133 | { |
| 133 | margin: 5px 0px; | 134 | margin: 5px 0px; |
| 134 | width: 32%; | 135 | width: 22%; |
| 135 | /*min-width: 300px;*/ | 136 | /*min-width: 300px;*/ |
| 136 | } | 137 | } |
| 137 | .articleAvecEditeur | 138 | .articleAvecEditeur |
| @@ -139,15 +140,15 @@ article | |||
| 139 | width: 100%; | 140 | width: 100%; |
| 140 | } | 141 | } |
| 141 | 142 | ||
| 142 | .vignette | 143 | figure |
| 143 | { | 144 | { |
| 144 | width: 100%; | 145 | margin: 0px; |
| 146 | /*display: inline-block;*/ | ||
| 145 | } | 147 | } |
| 146 | 148 | ||
| 147 | figure | 149 | .vignette |
| 148 | { | 150 | { |
| 149 | margin: 0px; | 151 | width: 100%; |
| 150 | /*display: inline-block;*/ | ||
| 151 | } | 152 | } |
| 152 | 153 | ||
| 153 | figcaption | 154 | figcaption |
| @@ -280,13 +281,14 @@ a:hover figure figcaption | |||
| 280 | 281 | ||
| 281 | #bouton_chronologie | 282 | #bouton_chronologie |
| 282 | { | 283 | { |
| 283 | width: 130px; | 284 | width: 180px; |
| 284 | font-size: initial; /* 150% est plus petit que "normal" */ | 285 | font-size: initial; /* 150% est plus petit que "normal" */ |
| 285 | padding-top: 5px; | 286 | padding-top: 5px; |
| 286 | } | 287 | } |
| 287 | 288 | ||
| 288 | #chronologie | 289 | #chronologie |
| 289 | { | 290 | { |
| 291 | width: 180px; | ||
| 290 | /*display: flex;*/ | 292 | /*display: flex;*/ |
| 291 | } | 293 | } |
| 292 | 294 | ||
diff --git a/public/css/donnees_hors_editeur.css b/public/css/donnees_hors_editeur.css index 25436a4..d54d7ff 100644 --- a/public/css/donnees_hors_editeur.css +++ b/public/css/donnees_hors_editeur.css | |||
| @@ -1,5 +1,3 @@ | |||
| 1 | /*img{vertical-align: bottom;}*/ | ||
| 2 | |||
| 3 | .text-tiny{font-size: x-small;} | 1 | .text-tiny{font-size: x-small;} |
| 4 | .text-small{font-size: small;} | 2 | .text-small{font-size: small;} |
| 5 | .text-big{font-size: large;} | 3 | .text-big{font-size: large;} |
| @@ -20,13 +18,12 @@ input[type=checkbox]{-webkit-appearance: none;-moz-appearance: none;-ms-appearan | |||
| 20 | height: 16px; width: 16px; border: 1px solid black; border-radius: 2px; position: relative; top: 5px; margin-right: 10px;} | 18 | height: 16px; width: 16px; border: 1px solid black; border-radius: 2px; position: relative; top: 5px; margin-right: 10px;} |
| 21 | input[type="checkbox"]:checked{border: none; background: #26ab33;} | 19 | input[type="checkbox"]:checked{border: none; background: #26ab33;} |
| 22 | 20 | ||
| 23 | .table>table{border-collapse: collapse;} | 21 | .table>table{border-collapse: collapse; border-width: 2px;} |
| 24 | .table td{border: 1px grey solid; padding: 7px; min-width: 30px;} | 22 | .table td{padding: 7px; min-width: 30px; border-width: 2px;} |
| 25 | td p{margin: 0px;} | 23 | td p{margin: 0px;} |
| 26 | 24 | ||
| 27 | .image{width: fit-content;margin: 0px;text-align: center;margin: auto;/*height: 100%;*/} | 25 | .image{width: fit-content;margin: 0px;text-align: center;margin: auto;/*height: 100%;*/} |
| 28 | .image img{width: 100%;} | 26 | .image img{width: 100%;} |
| 29 | /*.image:not(.image_resized) img{width: auto;}*/ | ||
| 30 | .image-style-side{float: right;} | 27 | .image-style-side{float: right;} |
| 31 | .image-style-side:not(.image_resized){max-width: 50%;} | 28 | .image-style-side:not(.image_resized){max-width: 50%;} |
| 32 | .image>figcaption{padding: 7px; text-align: center; font-size: small; background-color: #f0f0f0;} | 29 | .image>figcaption{padding: 7px; text-align: center; font-size: small; background-color: #f0f0f0;} |
| @@ -38,8 +35,6 @@ iframe{min-width: 400px; min-height: 300px; max-width: 1200px; max-height: 900px | |||
| 38 | 35 | ||
| 39 | 36 | ||
| 40 | 37 | ||
| 41 | |||
| 42 | |||
| 43 | @media screen and (max-width: 1000px) | 38 | @media screen and (max-width: 1000px) |
| 44 | { | 39 | { |
| 45 | /*img{max-width: 900px;}*/ | 40 | /*img{max-width: 900px;}*/ |
diff --git a/public/css/pages_articles_simples.css b/public/css/pages_articles_simples.css index 03e4317..5f20753 100644 --- a/public/css/pages_articles_simples.css +++ b/public/css/pages_articles_simples.css | |||
| @@ -91,6 +91,11 @@ figure | |||
| 91 | } | 91 | } |
| 92 | } | 92 | } |
| 93 | 93 | ||
| 94 | .explications | ||
| 95 | { | ||
| 96 | font-size: 90%; | ||
| 97 | } | ||
| 98 | |||
| 94 | 99 | ||
| 95 | /* CSS spécifique à chaque page */ | 100 | /* CSS spécifique à chaque page */ |
| 96 | @media screen and (min-width: 700px) | 101 | @media screen and (min-width: 700px) |
| @@ -134,6 +139,7 @@ figure | |||
| 134 | height: 171px; | 139 | height: 171px; |
| 135 | margin-left: auto; | 140 | margin-left: auto; |
| 136 | } | 141 | } |
| 142 | |||
| 137 | #photo_archives | 143 | #photo_archives |
| 138 | { | 144 | { |
| 139 | background-image: url('../header_images/blonde.jpg'); | 145 | background-image: url('../header_images/blonde.jpg'); |
| @@ -141,6 +147,14 @@ figure | |||
| 141 | height: 233px; | 147 | height: 233px; |
| 142 | margin-left: auto; | 148 | margin-left: auto; |
| 143 | } | 149 | } |
| 150 | .explications | ||
| 151 | { | ||
| 152 | width: 373px; | ||
| 153 | } | ||
| 154 | .explications p | ||
| 155 | { | ||
| 156 | margin: 10px; | ||
| 157 | } | ||
| 144 | } | 158 | } |
| 145 | 159 | ||
| 146 | @media screen and (max-width: 699px) | 160 | @media screen and (max-width: 699px) |
| @@ -191,6 +205,14 @@ figure | |||
| 191 | height: 177px; | 205 | height: 177px; |
| 192 | margin: 0 0 0 auto; | 206 | margin: 0 0 0 auto; |
| 193 | } | 207 | } |
| 208 | .explications | ||
| 209 | { | ||
| 210 | width: 285px; | ||
| 211 | } | ||
| 212 | .explications p | ||
| 213 | { | ||
| 214 | margin: 5px; | ||
| 215 | } | ||
| 194 | } | 216 | } |
| 195 | 217 | ||
| 196 | @media screen and (max-width: 479px) | 218 | @media screen and (max-width: 479px) |
| @@ -241,4 +263,9 @@ figure | |||
| 241 | height: 118px; | 263 | height: 118px; |
| 242 | margin: 0 0 0 auto; | 264 | margin: 0 0 0 auto; |
| 243 | } | 265 | } |
| 266 | .explications | ||
| 267 | { | ||
| 268 | width: 190px; | ||
| 269 | |||
| 270 | } | ||
| 244 | } | 271 | } |
diff --git a/public/header_images/logo_real.png b/public/header_images/logo_real.png new file mode 100644 index 0000000..2a7cae1 --- /dev/null +++ b/public/header_images/logo_real.png | |||
| Binary files differ | |||
diff --git a/public/header_images/logo_vlc.png b/public/header_images/logo_vlc.png new file mode 100644 index 0000000..df17359 --- /dev/null +++ b/public/header_images/logo_vlc.png | |||
| Binary files differ | |||
diff --git a/view/album.php b/view/album.php index 86f1e58..a9afbd9 100644 --- a/view/album.php +++ b/view/album.php | |||
| @@ -23,7 +23,7 @@ echo "\n"; | |||
| 23 | ?> | 23 | ?> |
| 24 | <header> | 24 | <header> |
| 25 | <div id="titre" > | 25 | <div id="titre" > |
| 26 | <span class="police_titre" ><?= $Albums->oneAlbum['titre'] ?> - <?= $Albums->oneAlbum['annee'] ?></span> | 26 | <div class="police_titre" ><?= $Albums->oneAlbum['titre'] ?> - <?= $Albums->oneAlbum['annee'] ?></div> |
| 27 | </div> | 27 | </div> |
| 28 | <div id="photo" ></div> | 28 | <div id="photo" ></div> |
| 29 | </header> | 29 | </header> |
diff --git a/view/courriel.php b/view/courriel.php index be3b1d7..77a4eb0 100644 --- a/view/courriel.php +++ b/view/courriel.php | |||
| @@ -1,4 +1,5 @@ | |||
| 1 | <div id="courriel" > | 1 | <div id="courriel" > |
| 2 | <button ><a href="index.php?page=<?= $page ?>" >Remonter en haut de la page</a></button> | ||
| 2 | <div> | 3 | <div> |
| 3 | <img src="public/timbre.png" alt="" ><br />Envoyez-moi un courriel à: <img src="public/courriel.png" > | 4 | <img src="public/timbre.png" alt="" ><br />Envoyez-moi un courriel à: <img src="public/courriel.png" > |
| 4 | </div> | 5 | </div> |
diff --git a/view/discographie.php b/view/discographie.php index e8e5770..552eeab 100644 --- a/view/discographie.php +++ b/view/discographie.php | |||
| @@ -32,7 +32,7 @@ echo "\n"; | |||
| 32 | ?> | 32 | ?> |
| 33 | <header> | 33 | <header> |
| 34 | <div id="titre" > | 34 | <div id="titre" > |
| 35 | <span class="police_titre" >Discographie</span> | 35 | <div class="police_titre" >Discographie</div> |
| 36 | </div> | 36 | </div> |
| 37 | <div id="photo" ></div> | 37 | <div id="photo" ></div> |
| 38 | </header> | 38 | </header> |
diff --git a/view/pageArticlesSimples.php b/view/pageArticlesSimples.php index aa755d8..a8c94d2 100644 --- a/view/pageArticlesSimples.php +++ b/view/pageArticlesSimples.php | |||
| @@ -26,13 +26,33 @@ if(isset($_GET['action']) && $_GET['action'] == 'editor') | |||
| 26 | $js = ob_get_clean(); | 26 | $js = ob_get_clean(); |
| 27 | 27 | ||
| 28 | 28 | ||
| 29 | // message lecteur multimedia | ||
| 30 | if($page == 'archives') | ||
| 31 | { | ||
| 32 | $explications = '<p > | ||
| 33 | <img style="float: right;" src="public/header_images/logo_real.png" /> | ||
| 34 | Certains liens vidéos nécessitent le lecteur <a href="https://www.real.com" target="_blank" >Real Media</a> (windows, android et iOS) pour être lus.</p> | ||
| 35 | <p> | ||
| 36 | <img style="float: left;" src="public/header_images/logo_vlc.png" /> | ||
| 37 | Vous pouvez aussi utiliser le<br/><a href="https://www.videolan.org/vlc/" target="_blank" >lecteur VLC.</a></p>'; | ||
| 38 | $headerImage = '<div class="photo" style="display: flex; height: fit-content;" > | ||
| 39 | <div class="explications" >' . $explications . '</div> | ||
| 40 | <div id="photo_' . $page . '" ></div> | ||
| 41 | </div>'; | ||
| 42 | } | ||
| 43 | else | ||
| 44 | { | ||
| 45 | $headerImage = '<div class="photo" id="photo_' . $page . '" ></div>'; | ||
| 46 | } | ||
| 47 | |||
| 48 | |||
| 29 | // variable $header | 49 | // variable $header |
| 30 | ob_start(); | 50 | ob_start(); |
| 31 | echo "\n"; | 51 | echo "\n"; |
| 32 | ?> | 52 | ?> |
| 33 | <header> | 53 | <header> |
| 34 | <div id="titre" > | 54 | <div id="titre" > |
| 35 | <span class="police_titre" ><?= $headerPaintedTitle ?></span> | 55 | <div class="police_titre" ><?= $headerPaintedTitle ?></div> |
| 36 | </div> | 56 | </div> |
| 37 | <?= $headerImage ?> | 57 | <?= $headerImage ?> |
| 38 | </header> | 58 | </header> |
| @@ -40,6 +60,7 @@ echo "\n"; | |||
| 40 | $header = ob_get_clean(); | 60 | $header = ob_get_clean(); |
| 41 | 61 | ||
| 42 | 62 | ||
| 63 | |||
| 43 | // variable $content | 64 | // variable $content |
| 44 | ob_start(); | 65 | ob_start(); |
| 45 | if($_SESSION['admin'] == 1) | 66 | if($_SESSION['admin'] == 1) |
diff --git a/view/template-formulaires.php b/view/template-formulaires.php index ede8f27..01f86c2 100644 --- a/view/template-formulaires.php +++ b/view/template-formulaires.php | |||
| @@ -31,7 +31,7 @@ ob_start(); | |||
| 31 | <label for="titre" >Titre</label> | 31 | <label for="titre" >Titre</label> |
| 32 | <input type="text" name="titre" value="<?= $vignette[0] ?>" required ><br /> | 32 | <input type="text" name="titre" value="<?= $vignette[0] ?>" required ><br /> |
| 33 | <label for="annee" >Année</label> | 33 | <label for="annee" >Année</label> |
| 34 | <input type="text" name="annee" value="<?= $vignette[1] ?>" required ><br /> | 34 | <input type="text" name="annee" value="<?= $vignette[1] ?>" ><br /> |
| 35 | <label for="pochette" >Pochette du disque (jpg ou png) : <?= $vignette[2] ?></label><br/> | 35 | <label for="pochette" >Pochette du disque (jpg ou png) : <?= $vignette[2] ?></label><br/> |
| 36 | <input type="file" name="upload" ><br /><br /><br /> | 36 | <input type="file" name="upload" ><br /><br /><br /> |
| 37 | <?php | 37 | <?php |
| @@ -93,7 +93,7 @@ if($page == 'discographie') | |||
| 93 | toolbar: [ | 93 | toolbar: [ |
| 94 | //'imageStyle:full', //inutile? | 94 | //'imageStyle:full', //inutile? |
| 95 | 'imageStyle:block', | 95 | 'imageStyle:block', |
| 96 | //'imageStyle:inline', // complexe, on peut aussi placer l'image à la souris | 96 | 'imageStyle:inline', // complexe, on peut aussi placer l'image à la souris |
| 97 | 'imageStyle:side', | 97 | 'imageStyle:side', |
| 98 | /*'imageStyle:align-left', | 98 | /*'imageStyle:align-left', |
| 99 | 'imageStyle:align-right',*/ | 99 | 'imageStyle:align-right',*/ |
| @@ -110,8 +110,8 @@ if($page == 'discographie') | |||
| 110 | 'tableColumn', | 110 | 'tableColumn', |
| 111 | 'tableRow', | 111 | 'tableRow', |
| 112 | 'mergeTableCells', | 112 | 'mergeTableCells', |
| 113 | //'tableCellProperties', | 113 | 'tableProperties', |
| 114 | 'tableProperties' | 114 | 'tableCellProperties' |
| 115 | ] | 115 | ] |
| 116 | }, | 116 | }, |
| 117 | 117 | ||
diff --git a/à faire après livraison.txt b/à faire après livraison.txt index 19b8b01..f42f6f1 100644 --- a/à faire après livraison.txt +++ b/à faire après livraison.txt | |||
| @@ -1,8 +1,17 @@ | |||
| 1 | liens sans http dans l'éditeur | 1 | liens sans http dans l'éditeur |
| 2 | 2 | ||
| 3 | dans installation.php, utiliser la racine dans config.php pour adapter le .htaccess | ||
| 4 | |||
| 5 | réduire les droits des dossiers | ||
| 6 | |||
| 7 | bouton pour remonter: remplacer le lien par du JS pour ne pas recharger la page | ||
| 8 | |||
| 3 | captcha dans password.php | 9 | captcha dans password.php |
| 4 | 10 | ||
| 5 | gestion des liens "real media" = un lien pour télécharger VLC | 11 | Zoom sur images (articles) |
| 12 | |||
| 13 | galerie en css (ou/et en javascript) pour les peintures de bateau | ||
| 14 | https://www.guyom-design.com/blog/astuces/css/tuto_diapo_css/ | ||
| 6 | 15 | ||
| 7 | remplacer le survol par un clic sur les smartphones | 16 | remplacer le survol par un clic sur les smartphones |
| 8 | 17 | ||
