From 774533cb71086f5ae91cf9d813e99842c28db885 Mon Sep 17 00:00:00 2001 From: dbroqua Date: Wed, 2 Mar 2022 14:17:10 +0100 Subject: [PATCH 001/125] !22 --- public/500.html | 53 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 public/500.html diff --git a/public/500.html b/public/500.html new file mode 100644 index 0000000..0b4b0d4 --- /dev/null +++ b/public/500.html @@ -0,0 +1,53 @@ + + + + + + + Site en maintenance + + + + + + + + + + + + + + + +
+
+

Site inaccessible

+ +

+ Pas de panique on revient très vite ! +

+
+ + + + -- 2.39.5 From 7f526eefeedaec5d5e65bb4961e7201ebd515373 Mon Sep 17 00:00:00 2001 From: Damien Broqua Date: Wed, 2 Mar 2022 14:18:11 +0100 Subject: [PATCH 002/125] !22 (#23) Co-authored-by: dbroqua Reviewed-on: https://git.darkou.fr/dbroqua/MusicTopus/pulls/23 Co-authored-by: Damien Broqua Co-committed-by: Damien Broqua --- public/500.html | 53 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 public/500.html diff --git a/public/500.html b/public/500.html new file mode 100644 index 0000000..0b4b0d4 --- /dev/null +++ b/public/500.html @@ -0,0 +1,53 @@ + + + + + + + Site en maintenance + + + + + + + + + + + + + + + +
+
+

Site inaccessible

+ +

+ Pas de panique on revient très vite ! +

+
+ + + + -- 2.39.5 From cf63d8b6d8627b10dc700e4864dab3aa4701a0be Mon Sep 17 00:00:00 2001 From: Damien Broqua Date: Wed, 2 Mar 2022 16:50:25 +0100 Subject: [PATCH 003/125] issue !21 (#24) Co-authored-by: dbroqua Reviewed-on: https://git.darkou.fr/dbroqua/MusicTopus/pulls/24 Co-authored-by: Damien Broqua Co-committed-by: Damien Broqua --- README.md | 59 ++-- docker-compose.yml.dev | 18 +- docker-compose.yml.prod | 18 +- package.json | 4 +- public/500.html | 8 +- public/MusicTopus.svg | 428 ++++++++++++++++++++++++++++++ public/android-chrome-192x192.png | Bin 9339 -> 23699 bytes public/android-chrome-512x512.png | Bin 26046 -> 82654 bytes public/apple-touch-icon.png | Bin 8679 -> 14503 bytes public/browserconfig.xml | 2 +- public/favicon-16x16.png | Bin 900 -> 1154 bytes public/favicon-32x32.png | Bin 1501 -> 2232 bytes public/favicon.ico | Bin 15086 -> 15086 bytes public/img/logo-large.png | Bin 0 -> 12141 bytes public/img/logo.png | Bin 1432 -> 5026 bytes public/mstile-144x144.png | Bin 6852 -> 14072 bytes public/mstile-150x150.png | Bin 6688 -> 3593 bytes public/mstile-310x310.png | Bin 14625 -> 33623 bytes public/mstile-70x70.png | Bin 4793 -> 5651 bytes public/safari-pinned-tab.svg | 152 +++++++++-- public/site.webmanifest | 4 +- sass/home.scss | 14 + sass/navbar.scss | 2 +- src/bin/www.js | 2 +- src/config/index.js | 3 +- views/index.ejs | 10 +- views/pages/composants.ejs | 4 +- views/pages/home.ejs | 63 +++-- 28 files changed, 687 insertions(+), 104 deletions(-) create mode 100644 public/MusicTopus.svg create mode 100644 public/img/logo-large.png diff --git a/README.md b/README.md index ace3c9d..c787da0 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -# My Music Library +# MusicTopus -My Music Library est une application Web (que vous pouvez auto-héberger) et un site Web (sur lequel vous pouvez créer un compte) permettant de gérer votre liste des CDs et Vinyles et de l'utiliser facilement n'importe où. +MusicTopus est une application Web (que vous pouvez auto-héberger) et un site Web (sur lequel vous pouvez créer un compte) permettant de gérer votre liste des CDs et Vinyles et de l'utiliser facilement n'importe où. -Le code source est publié sous licence libre [GNU GPL-3.0-or-later](LICENSE) et est disponible sur [git.darkou.fr](https://git.darkou.fr/dbroqua/MyMusicLibrary). +Le code source est publié sous licence libre [GNU GPL-3.0-or-later](LICENSE) et est disponible sur [git.darkou.fr](https://git.darkou.fr/dbroqua/MusicTopus). ## Utilisation -Vous pouvez librement utiliser le service en vous inscrivant sur [https://mml.darkou.fr](https://mml.darkou.fr). +Vous pouvez librement utiliser le service en vous inscrivant sur [https://www.musictopus.fr/](https://www.musictopus.fr/). Une fois inscrit vous pourrez saisir vos CDs et Vinyles sur votre espace personnel le tout gratuitement, sans tracker et sans utilisation de vos données personnelles ! @@ -29,7 +29,7 @@ En mode standalone il vous faudra : Quelque que soit la méthode, la première étape est de cloner le projet : ```bash -git clone https://git.darkou.fr/dbroqua/MyMusicLibrary.git +git clone https://git.darkou.fr/dbroqua/MusicTopus.git ``` ### Installation @@ -39,7 +39,7 @@ git clone https://git.darkou.fr/dbroqua/MyMusicLibrary.git Une fois le projet cloné rendez-vous dans son dossier, ```bash -cd ./MyMusicLibrary +cd ./MusicTopus ``` puis créez le fichier `.env` qui contiendra les variables d'environnement nécessaire au bon fonctionnement du projet ([voir à la fin pour la liste des variables](#env-file)). @@ -92,7 +92,7 @@ Le site est accessible sur [http://localhost:3001](http://localhost:3001). ### Aller plus loin -My Music Library est maintenant accessible en http sur un port custom (3001 par défaut) de votre serveur. +MusicTopus est maintenant accessible en http sur un port custom (3001 par défaut) de votre serveur. Nous allons voir comment rendre accessible en https avec un certificat [Let's Encrypt](https://letsencrypt.org/fr/). Pour le reverse proxy nous utiliserons [NGINX](https://nginx.org/). @@ -101,26 +101,26 @@ Pour la suite je pars du principe que vous êtes un minimum familier avec Nginx #### Obtenir le certificat ```bash -certbot certonly --nginx -d mml.darkou.fr +certbot --nginx --agree-tos --redirect --hsts --staple-ocsp --email votre@email.tld -d musictopus.fr ``` #### Créer le vhost -Pour ma part j'aime bien créer un fichier dans `/etc/nginx/sites-available` qui comporte le nom du site, ici par exemple `mml.darkou.fr`. +Pour ma part j'aime bien créer un fichier dans `/etc/nginx/sites-available` qui comporte le nom du site, ici par exemple `musictopus.fr`. En voici son contenu : ``` -upstream mml-env { +upstream musictopus-proxy { server 0.0.0.0:3001; } server { listen 80; listen [::]:80; - server_name mml.darkou.fr; + server_name musictopus.fr; - if ($host = mml.darkou.fr) { + if ($host = musictopus.fr) { return 301 https://$host$request_uri; } root /dev/null; @@ -132,11 +132,11 @@ server { server { listen 443 ssl http2; - server_name mml.darkou.fr; - root /dev/null; + server_name musictopus.fr; + root /srv/MusicTopus/public; - access_log /var/log/nginx/mml.darkou.fr-access.log; - error_log /var/log/nginx/mml.darkou.fr-error.log; + access_log /var/log/nginx/musictopus.fr-access.log; + error_log /var/log/nginx/musictopus.fr-error.log; add_header X-Content-Type-Options nosniff; add_header X-XSS-Protection "1; mode=block"; @@ -144,6 +144,10 @@ server { client_max_body_size 1m; location / { + try_files $uri @proxy; + } + + location @proxy { proxy_read_timeout 300; proxy_connect_timeout 300; proxy_redirect off; @@ -155,13 +159,24 @@ server { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Frame-Options SAMEORIGIN; - proxy_pass http://mml-env; + proxy_pass http://musictopus-proxy; + + tcp_nodelay on; } - include conf/ssl.conf; + error_page 500 501 502 503 504 /500.html; - ssl_certificate /etc/letsencrypt/live/mml.darkou.fr/fullchain.pem; # managed by Certbot - ssl_certificate_key /etc/letsencrypt/live/mml.darkou.fr/privkey.pem; # managed by Certbot + ssl_certificate /etc/letsencrypt/live/musictopus.fr/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/musictopus.fr/privkey.pem; + + add_header Strict-Transport-Security "max-age=31536000" always; + + include /etc/letsencrypt/options-ssl-nginx.conf; + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; + + ssl_trusted_certificate /etc/letsencrypt/live/musictopus.fr/chain.pem; + ssl_stapling on; + ssl_stapling_verify on; } ``` @@ -174,7 +189,7 @@ Voici la liste des variables configurables : ``` NODE_ENV # Environnement dans lequel exécuter le projet (development ou production) PORT # Port sur lequel éxécuter le serveur (par défaut 3001) -MONGODB_URI # Url du serveur mongo (par défaut mongodb://mymusiclibrary-db/mymusiclibrary) +MONGODB_URI # Url du serveur mongo (par défaut mongodb://musictopus-db/musictopus) SECRET # Hash utilisé pour pour sauvegardé les dessions (par défaut waemaeMe5ahc6ce1chaeKohKa6Io8Eik) DISCOGS_TOKEN # Token Discogs (vous devez créer un compte sur discogs afin d'en obtenir un gratuitement) FORMSPREE_ID # Id du formulaire formspree pour la page "nous-contacter" @@ -183,4 +198,4 @@ FORMSPREE_ID # Id du formulaire formspree pour la page "nous-contacter" ## Contributeurs - Damien Broqua (développeur principal du projet) -- Brunus (fournisseur d'idées :wink: ) \ No newline at end of file +- Brunus (Logo et fournisseur d'idées :wink: ) \ No newline at end of file diff --git a/docker-compose.yml.dev b/docker-compose.yml.dev index c58795e..b14864f 100644 --- a/docker-compose.yml.dev +++ b/docker-compose.yml.dev @@ -1,8 +1,8 @@ version: "2.4" services: - mymusiclibrary-www: - container_name: mymusiclibrary-www + musictopus-www: + container_name: musictopus-www image: "node:16" restart: always user: "node" @@ -17,7 +17,7 @@ services: ports: - 3001:3001 depends_on: - - mymusiclibrary-db + - musictopus-db environment: NODE_ENV: ${NODE_ENV} PORT: ${PORT} @@ -26,18 +26,18 @@ services: DISCOGS_TOKEN: ${DISCOGS_TOKEN} FORMSPREE_ID: ${FORMSPREE_ID} networks: - - mymusiclibrary - mymusiclibrary-db: - container_name: mymusiclibrary-db - image: mongo:latest + - musictopus + musictopus-db: + container_name: musictopus-db + image: mongo:4.4 restart: always ports: - 27617:27017 networks: - - mymusiclibrary + - musictopus volumes: - ./dump:/dump networks: - mymusiclibrary: + musictopus: driver: bridge diff --git a/docker-compose.yml.prod b/docker-compose.yml.prod index f5041f7..d314748 100644 --- a/docker-compose.yml.prod +++ b/docker-compose.yml.prod @@ -1,8 +1,8 @@ version: "2.4" services: - mymusiclibrary-www: - container_name: mymusiclibrary-www + musictopus-www: + container_name: musictopus-www image: "node:16" restart: always user: "node" @@ -17,7 +17,7 @@ services: ports: - 3001:3001 depends_on: - - mymusiclibrary-db + - musictopus-db environment: NODE_ENV: ${NODE_ENV} PORT: ${PORT} @@ -26,18 +26,18 @@ services: DISCOGS_TOKEN: ${DISCOGS_TOKEN} FORMSPREE_ID: ${FORMSPREE_ID} networks: - - mymusiclibrary - mymusiclibrary-db: - container_name: mymusiclibrary-db - image: mongo:latest + - musictopus + musictopus-db: + container_name: musictopus-db + image: mongo:4.4 restart: always ports: - 27617:27017 networks: - - mymusiclibrary + - musictopus volumes: - ./dump:/dump networks: - mymusiclibrary: + musictopus: driver: bridge diff --git a/package.json b/package.json index 7c38831..77f10de 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "mymusiclibrary", + "name": "musictopus", "version": "1.0.0", "description": "Simple application to manage your CD/Vinyl collection", "scripts": { @@ -18,7 +18,7 @@ }, "repository": { "type": "git", - "url": "git@git.darkou.fr:dbroqua/MyMusicLibrary.git" + "url": "git@git.darkou.fr:dbroqua/MusicTopus.git" }, "author": { "name": "Damien Broqua", diff --git a/public/500.html b/public/500.html index 0b4b0d4..072dfd0 100644 --- a/public/500.html +++ b/public/500.html @@ -11,7 +11,7 @@ - + @@ -21,8 +21,8 @@ - - diff --git a/views/pages/composants.ejs b/views/pages/composants.ejs index 7c17b38..dc4f8f2 100644 --- a/views/pages/composants.ejs +++ b/views/pages/composants.ejs @@ -1,8 +1,9 @@ -
+

Les composants

  • Les titres
  • +
  • Les couleurs
  • Les grilles
  • Les boutons
  • Les formulaires
  • @@ -24,6 +25,87 @@
    Titre de niveau 5
    Titre de niveau 6
    +

    Les couleurs

    +

    Polar Night

    +
    +
    +
     
    + nord0 +
    +
    +
     
    + nord1 +
    +
    +
     
    + nord2 +
    +
    +
     
    + nord3 +
    +
    +

    Snow Storm

    +
    +
    +
     
    + nord4 +
    +
    +
     
    + nord5 +
    +
    +
     
    + nord6 +
    +
    +

    Frost

    +
    +
    +
     
    + nord7 +
    +
    +
     
    + nord8 +
    +
    +
     
    + nord9 +
    +
    +
     
    + nord10 +
    +
    +

    Aurora

    +
    +
    +
     
    + nord11 +
    +
    +
     
    + nord12 +
    +
    +
     
    + nord13 +
    +
    +
     
    + nord14 +
    +
    +
     
    + nord15 +
    +
    +

    + Vous pourrez trouver plus d'informations sur le site offciel du projet nord. +

    +

    Les grilles

    Se référer à la documentation de Knacss. @@ -225,13 +307,15 @@ .icon-link-ext .icon-heart .icon-eye + .icon-left-open + .icon-right-open + .icon-export + .icon-share .icon-spin .icon-sun .icon-moon .icon-trash .icon-blind - .icon-left-open - .icon-right-open

    Les listes

    diff --git a/views/pages/mon-compte/ma-collection/exporter.ejs b/views/pages/mon-compte/ma-collection/exporter.ejs index dc1de77..13e3f98 100644 --- a/views/pages/mon-compte/ma-collection/exporter.ejs +++ b/views/pages/mon-compte/ma-collection/exporter.ejs @@ -1,4 +1,4 @@ -
    +

    Exporter ma collection

    Les formats CSV et Excel sont facilement lisiblent par un humain. Dans ces 2 formats vous trouverez seulement les informations principales de vos albums, à savoir : @@ -38,7 +38,7 @@

    - + + + + + + +
+ + -- 2.39.5 From 73716335e25d97c87be747a9ba54f5d85f994633 Mon Sep 17 00:00:00 2001 From: dbroqua Date: Sun, 6 Mar 2022 14:39:08 +0100 Subject: [PATCH 010/125] Suppression des anciens logos --- public/img/logo.svg | 1 - public/mstile-310x150.png | Bin 7242 -> 0 bytes 2 files changed, 1 deletion(-) delete mode 100644 public/img/logo.svg delete mode 100644 public/mstile-310x150.png diff --git a/public/img/logo.svg b/public/img/logo.svg deleted file mode 100644 index 7ceed9f..0000000 --- a/public/img/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/mstile-310x150.png b/public/mstile-310x150.png deleted file mode 100644 index ed34b0c499418d137767f8a34d7a9aeba9893d3c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7242 zcmdT}S6Gu-xBkEp1`yDpiZlgAiZp?sk)k3cR7HyP-n$S=sE#5kO@e@gs`M6gLg-CF zq<0c}C?X|5Xdw{V`S|b7#koI!agcyNlpwK?f~EJpe%b4FFNE0DuZ^MXdk;Tm}Hv zYyklJ5dgS+GwYuyfnU(s>u5d#&d%StO-0Gz4t)SjPo4fZ?PbP0B0;a5nAOsrynFEe6RQ?Bx3=&Z?jJ8Tq(Z%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22`xkUm@6$1wF-RpqRnQ`#b=cYEiZIER;niSS>C`-8ap z?pK7`ex|v0a9+dxWI6U&cNksktEFh8pbmS>fEN1ksu){O+UBZqp6Ph`bIqN&N3JKw z_}IHutQ$zx&Sf&s>xN=8qM{y^kF4w9JYa&M*LbN!-B^`IE1XikPxHu-tC2saG(J=Vrvq#u0uDtM$BKd|4%Tuea=MOZs&Us8(eqOp7q)mAx#r||`aY($ zXltMDkI#muP;(}Bv4{-~{I@#sRLDjvCH;~E*qA+tUI{x$1nq%FrZ6@rrAfBEJ! zJ}W29^cPe*>bE*Ls{5_-Y-|2i@ldSB-^3MssfRnc%f&-Ja@8f<=14?L_CXt1qZ&Ug zi>mOJlDy!^O{n9b`DS&Y@59%Q&}ob1|!q|Sw-CD;2oa_j;ED%I@7d`B z;$z(CU!$!}DR!h-Z%kViB8P8plocC!=~a}LdL*oV0=28~8p^O6J-7d7(kZ{#3V{L_ zaUo^ntVtJ9UPj2T9fEkxFy<8Me^%?)R#V@c2$*w$v)~TB8k{0xXgJmhUKICQo*agS z!%Hjfe!1fXb`*khJ_}b_C$Fz2Vk3?^qlGlHtz(A(R~bewfIj?-t68LnP}()O(iB8} zzfg(xFmG4$V`LJwMuJL7tf-p;P<-dpbzSfP_n~3gi1f1Z^+zz5s)eN>v%JH1D16yp zv_AS>eO}kDNz%Ap29@4aSZ-s*c#X!9&EzJ#6H-6qwL$znX(ilZ^9xJ@Ul3fD6Z!7$ z=&IC^H3q>99EdR{v-55 H+kgHC6DwZ$ -- 2.39.5 From 4886e9cc487ae911cd2334a7791f5480fa026c95 Mon Sep 17 00:00:00 2001 From: Damien Broqua Date: Sun, 6 Mar 2022 15:00:24 +0100 Subject: [PATCH 011/125] #30 - Avoir des statistiques avec Matomo (#33) Co-authored-by: dbroqua Reviewed-on: https://git.darkou.fr/dbroqua/MusicTopus/pulls/33 --- README.md | 3 ++- docker-compose.yml.dev | 1 + docker-compose.yml.prod | 1 + src/config/index.js | 1 + views/index.ejs | 18 ++++++++++++++++++ 5 files changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fdc754d..929ccbf 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Le code source est publié sous licence libre [GNU GPL-3.0-or-later](LICENSE) et Vous pouvez librement utiliser le service en vous inscrivant sur [https://www.musictopus.fr/](https://www.musictopus.fr/). -Une fois inscrit vous pourrez saisir vos CDs et Vinyles sur votre espace personnel le tout gratuitement, sans tracker et sans utilisation de vos données personnelles ! +Une fois inscrit vous pourrez saisir vos CDs et Vinyles sur votre espace personnel le tout gratuitement, sans tracker (en dehors de statistiques web via [Matomo](https://fr.matomo.org/)) et sans utilisation de vos données personnelles ! ## Auto hébergement @@ -195,6 +195,7 @@ MONGODB_URI # Url du serveur mongo (par défaut mongodb://musictopus-db/musictop SECRET # Hash utilisé pour pour sauvegardé les dessions (par défaut waemaeMe5ahc6ce1chaeKohKa6Io8Eik) DISCOGS_TOKEN # Token Discogs (vous devez créer un compte sur discogs afin d'en obtenir un gratuitement) FORMSPREE_ID # Id du formulaire formspree pour la page "nous-contacter" +MATOMO_URL # Url vers l'instance matomo (exemple: https://analytics.darkou.fr/) ``` ## Contributeurs diff --git a/docker-compose.yml.dev b/docker-compose.yml.dev index b14864f..9ae57ee 100644 --- a/docker-compose.yml.dev +++ b/docker-compose.yml.dev @@ -25,6 +25,7 @@ services: SECRET: ${SECRET} DISCOGS_TOKEN: ${DISCOGS_TOKEN} FORMSPREE_ID: ${FORMSPREE_ID} + MATOMO_URL: ${MATOMO_URL} networks: - musictopus musictopus-db: diff --git a/docker-compose.yml.prod b/docker-compose.yml.prod index d314748..ba4b3ef 100644 --- a/docker-compose.yml.prod +++ b/docker-compose.yml.prod @@ -25,6 +25,7 @@ services: SECRET: ${SECRET} DISCOGS_TOKEN: ${DISCOGS_TOKEN} FORMSPREE_ID: ${FORMSPREE_ID} + MATOMO_URL: ${MATOMO_URL} networks: - musictopus musictopus-db: diff --git a/src/config/index.js b/src/config/index.js index 43158f5..7c01f09 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -5,4 +5,5 @@ module.exports = { secret: process.env.SECRET || "waemaeMe5ahc6ce1chaeKohKa6Io8Eik", discogsToken: process.env.DISCOGS_TOKEN, formspreeId: process.env.FORMSPREE_ID, + matomoUrl: process.env.MATOMO_URL || "", }; diff --git a/views/index.ejs b/views/index.ejs index ddf0b8c..c45c557 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -19,6 +19,24 @@ + + <% if ( config.matomoUrl ) { %> + + + + <% } %>
\ No newline at end of file diff --git a/views/index.ejs b/views/index.ejs index ddf0b8c..a2a98b5 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -4,7 +4,7 @@ - <% if (page.title) { %><%= page.title %> <% } else { %> DarKou - MusicTopus <% } %> + <%= config.siteName %> :: <%= page.title %> @@ -19,6 +19,24 @@ + + <% if ( config.matomoUrl ) { %> + + + + <% } %> - - diff --git a/views/pages/composants.ejs b/views/pages/composants.ejs index 7c17b38..79b8ee6 100644 --- a/views/pages/composants.ejs +++ b/views/pages/composants.ejs @@ -1,8 +1,9 @@ -
+

Les composants

  • Les titres
  • +
  • Les couleurs
  • Les grilles
  • Les boutons
  • Les formulaires
  • @@ -24,11 +25,92 @@
    Titre de niveau 5
    Titre de niveau 6
    +

    Les couleurs

    +

    Polar Night

    +
    +
    +
     
    + nord0 +
    +
    +
     
    + nord1 +
    +
    +
     
    + nord2 +
    +
    +
     
    + nord3 +
    +
    +

    Snow Storm

    +
    +
    +
     
    + nord4 +
    +
    +
     
    + nord5 +
    +
    +
     
    + nord6 +
    +
    +

    Frost

    +
    +
    +
     
    + nord7 +
    +
    +
     
    + nord8 +
    +
    +
     
    + nord9 +
    +
    +
     
    + nord10 +
    +
    +

    Aurora

    +
    +
    +
     
    + nord11 +
    +
    +
     
    + nord12 +
    +
    +
     
    + nord13 +
    +
    +
     
    + nord14 +
    +
    +
     
    + nord15 +
    +
    +

    + Vous pourrez trouver plus d'informations sur le site offciel du projet nord. +

    +

    Les grilles

    Se référer à la documentation de Knacss.

    - +

    Les boutons

    .button
    @@ -39,13 +121,13 @@

    Les formulaires

    - - + +
     <div class="field">
    -    <label for="email">Adresse e-mail</label>
    -    <input type="email" name="email" id="email" placeholder="ex : damien@darkou.fr">
    +    <label for="demo-email">Adresse e-mail</label>
    +    <input type="email" name="email" id="demo-email" placeholder="ex : damien@darkou.fr">
     </div>
         
    @@ -86,30 +168,38 @@ </select> </div> -
    +
    +
    +
    - + +
    +
    +
    +
    -<div class="field">
    +<div class="field inline">
         <label for="choix1">choix 1</label>
    -    <input type="radio" id="choix1" name="choix" value="choix1" checked> 
    +    <input type="radio" id="choix1" name="choix" value="choix1" checked>
    +</div>
    +<div class="field inline">
         <label for="choix2">choix 2</label>
         <input type="radio" id="choix2" name="choix" value="choix2">
     </div>
         
    - +
     <div class="field">
         <label for="checkbox1">choix 1</label>
    -    <input type="checkbox" id="checkbox1" name="checkbox" value="checkbox1" checked> 
    +    <input type="checkbox" id="checkbox1" name="checkbox" value="checkbox1" checked>
         <label for="checkbox2">choix 2</label>
         <input type="checkbox" id="checkbox2" name="checkbox" value="checkbox2">
     </div>
    @@ -161,11 +251,11 @@
                     
                     
                 
    - +

    Pas encore inscrit ? Inscrivez-vous

    - +
    @@ -196,20 +286,41 @@

    Les notifications

    +

    Erreur

    -<button 
    +<button
         type="button"
    -    class="button is-primary" 
    +    class="button is-primary"
         onclick="showToastr('Ceci est une notification');"
     >
         Afficher une notification
     </button>
     
    +<div id="toastr">
    +    <button class="delete" onclick="hideToastr()" aria-label="Masquer la notification"></button>
    +    <span></span>
    +</div>
    +    
    +

    Succès

    + +
    + + +
    +
    +<button
    +    type="button"
    +    class="button is-primary"
    +    onclick="showToastr('Ceci est une notification', true);"
    +>
    +    Afficher une notification
    +</button>
    +
     <div id="toastr">
         <button class="delete" onclick="hideToastr()" aria-label="Masquer la notification"></button>
         <span></span>
    @@ -225,15 +336,18 @@
         .icon-link-ext
         .icon-heart
         .icon-eye
    +    .icon-left-open
    +    .icon-right-open
    +    .icon-export
    +    .icon-share
         .icon-spin
         .icon-sun
         .icon-moon
         .icon-trash
         .icon-blind
    -    .icon-left-open
    -    .icon-right-open
     
         

    Les listes

    +

    Liste normale

    @@ -256,6 +370,29 @@ </div> </div>
    +

    Liste avec effet au hover

    +
    +
    + + {{ item.title }} + +
    +
    + +
    +
    + {{ item.lorem }} +
    +
    +
    +
    +
    +<div class="grid grid-cols-1 md:grid-cols-2 list hover">
    +    <div class="item">
    +        Contenu
    +    </div>
    +</div>
    +    

    Les paginations