2022-03-06 14:38:26 +01:00
<main class="layout-maxed composants" id="app">
2022-03-01 16:09:46 +01:00
<h1>Les composants</h1>
<ul>
<li><a href="#titres">Les titres</a></li>
2022-03-06 14:38:26 +01:00
<li><a href="#couleurs">Les couleurs</a></li>
2022-03-01 16:09:46 +01:00
<li><a href="#grilles">Les grilles</a></li>
<li><a href="#boutons">Les boutons</a></li>
<li><a href="#formulaires">Les formulaires</a></li>
<li><a href="#modales">Les modales</a></li>
<li><a href="#boites">Les boites</a></li>
<li><a href="#flash">Les messages flash</a></li>
<li><a href="#notifications">Les notifications</a></li>
<li><a href="#icones">Les icônes</a></li>
<li><a href="#listes">Les listes</a></li>
<li><a href="#paginations">Les paginations</a></li>
<li><a href="#barres-de-navigation">Les barres de navigation</a></li>
</ul>
<h2 id="titres">Les titres</h2>
<h1>Titre de niveau 1</h1>
<h2>Titre de niveau 2</h2>
<h3>Titre de niveau 3</h3>
<h4>Titre de niveau 4</h4>
<h5>Titre de niveau 5</h5>
<h6>Titre de niveau 6</h6>
2022-03-06 14:38:26 +01:00
<h2 id="couleurs">Les couleurs</h2>
<h3>Polar Night</h3>
<div class="grid grid-cols-5 gap-5">
<div class="couleur">
<div style="background-color: var(--nord0);"> </div>
nord0
</div>
<div class="couleur">
<div style="background-color: var(--nord1);"> </div>
nord1
</div>
<div class="couleur">
<div style="background-color: var(--nord2);"> </div>
nord2
</div>
<div class="couleur">
<div style="background-color: var(--nord3);"> </div>
nord3
</div>
</div>
<h3>Snow Storm</h3>
<div class="grid grid-cols-5 gap-5">
<div class="couleur">
<div style="background-color: var(--nord4);"> </div>
nord4
</div>
<div class="couleur">
<div style="background-color: var(--nord5);"> </div>
nord5
</div>
<div class="couleur">
<div style="background-color: var(--nord6);"> </div>
nord6
</div>
</div>
<h3>Frost</h3>
<div class="grid grid-cols-5 gap-5">
<div class="couleur">
<div style="background-color: var(--nord7);"> </div>
nord7
</div>
<div class="couleur">
<div style="background-color: var(--nord8);"> </div>
nord8
</div>
<div class="couleur">
<div style="background-color: var(--nord9);"> </div>
nord9
</div>
<div class="couleur">
<div style="background-color: var(--nord10);"> </div>
nord10
</div>
</div>
<h3>Aurora</h3>
<div class="grid grid-cols-5 gap-5">
<div class="couleur">
<div style="background-color: var(--nord11);"> </div>
nord11
</div>
<div class="couleur">
<div style="background-color: var(--nord12);"> </div>
nord12
</div>
<div class="couleur">
<div style="background-color: var(--nord13);"> </div>
nord13
</div>
<div class="couleur">
<div style="background-color: var(--nord14);"> </div>
nord14
</div>
<div class="couleur">
<div style="background-color: var(--nord15);"> </div>
nord15
</div>
</div>
<p>
Vous pourrez trouver plus d'informations sur le <a href="https://www.nordtheme.com/" target="_blank" rel="noopener noreferrer">site offciel</a> du projet nord.
</p>
2022-03-01 16:09:46 +01:00
<h2 id="grilles">Les grilles</h2>
<p>
Se référer à la documentation de <a href="https://www.knacss.com/doc.html#grid" target="_blank" rel="noopener noreferrer">Knacss</a>.
</p>
2022-03-07 16:58:02 +01:00
2022-03-01 16:09:46 +01:00
<h2 id="boutons">Les boutons</h2>
<div type="button" class="button">.button</div>
<div type="button" class="button is-link">.button.is-link</div>
<div type="button" class="button is-primary">.button.is-primary</div>
<div type="button" class="button is-success">.button.is-success</div>
<div type="button" class="button is-danger">.button.is-danger</div>
<div type="button" class="button is-warning">.button.is-warning</div>
<h2 id="formulaires">Les formulaires</h2>
<div class="field">
2022-03-14 16:27:50 +01:00
<label for="demo-email">Adresse e-mail</label>
<input type="email" name="email" id="demo-email" placeholder="ex : damien@darkou.fr">
2022-03-01 16:09:46 +01:00
</div>
<pre>
<div class="field">
2022-03-14 16:27:50 +01:00
<label for="demo-email">Adresse e-mail</label>
<input type="email" name="email" id="demo-email" placeholder="ex : damien@darkou.fr">
2022-03-01 16:09:46 +01:00
</div>
</pre>
<div class="field">
<label for="message">Message*</label>
<textarea name="message" id="message" rows="6" required ></textarea>
</div>
<pre>
<div class="field">
<label for="message">Message*</label>
<textarea name="message" id="message" rows="6" required ></textarea>
</div>
</pre>
<div class="field">
<label for="sortOrder">Trier par</label>
<select id="sortOrder" v-model="sortOrder" @change="changeSort">
<option value="artists_sort-asc">Artiste (A-Z)</option>
<option value="artists_sort-desc">Artiste (Z-A)</option>
<option value="year-asc">Année (A-Z)</option>
<option value="year-desc">Année (Z-A)</option>
<option value="country-asc">Pays (A-Z)</option>
<option value="country-desc">Pays (Z-A)</option>
<option value="formats.name-asc">Format (A-Z)</option>
<option value="formats.name-desc">Format (Z-A)</option>
</select>
</div>
<pre>
<div class="field">
<label for="sortOrder">Trier par</label>
<select id="sortOrder">
<option value="artists_sort-asc">Artiste (A-Z)</option>
<option value="artists_sort-desc">Artiste (Z-A)</option>
<option value="year-asc">Année (A-Z)</option>
<option value="year-desc">Année (Z-A)</option>
<option value="country-asc">Pays (A-Z)</option>
<option value="country-desc">Pays (Z-A)</option>
<option value="formats.name-asc">Format (A-Z)</option>
<option value="formats.name-desc">Format (Z-A)</option>
</select>
</div>
</pre>
2022-03-14 16:27:50 +01:00
<form>
<fieldset>
<div class="field inline">
2022-03-01 16:09:46 +01:00
<label for="choix1">choix 1</label>
2022-03-07 16:58:02 +01:00
<input type="radio" id="choix1" name="choix" value="choix1" checked>
2022-03-14 16:27:50 +01:00
</div>
<div class="field inline">
2022-03-01 16:09:46 +01:00
<label for="choix2">choix 2</label>
<input type="radio" id="choix2" name="choix" value="choix2">
</div>
2022-03-14 16:27:50 +01:00
</fieldset>
</form>
2022-03-01 16:09:46 +01:00
<pre>
2022-03-14 16:27:50 +01:00
<div class="field inline">
2022-03-01 16:09:46 +01:00
<label for="choix1">choix 1</label>
2022-03-07 16:58:02 +01:00
<input type="radio" id="choix1" name="choix" value="choix1" checked>
2022-03-14 16:27:50 +01:00
</div>
<div class="field inline">
2022-03-01 16:09:46 +01:00
<label for="choix2">choix 2</label>
<input type="radio" id="choix2" name="choix" value="choix2">
</div>
</pre>
<div class="field">
<label for="checkbox1">choix 1</label>
2022-03-07 16:58:02 +01:00
<input type="checkbox" id="checkbox1" name="checkbox" value="checkbox1" checked>
2022-03-01 16:09:46 +01:00
<label for="checkbox2">choix 2</label>
<input type="checkbox" id="checkbox2" name="checkbox" value="checkbox2">
</div>
<pre>
<div class="field">
<label for="checkbox1">choix 1</label>
2022-03-07 16:58:02 +01:00
<input type="checkbox" id="checkbox1" name="checkbox" value="checkbox1" checked>
2022-03-01 16:09:46 +01:00
<label for="checkbox2">choix 2</label>
<input type="checkbox" id="checkbox2" name="checkbox" value="checkbox2">
</div>
</pre>
<h2 id="modales">Les modales</h2>
<button type="button" class="button is-primary" @click="toggleModal">Ouvrir la modale</button>
<pre>
<div class="modal" :class="{'is-visible': showModal}">
<div class="modal-background"></div>
<div class="modal-card">
<header>Titre</header>
<section>
Ceci est une modale
</section>
<footer>
<button class="button is-primary" @click="toggleModal">Ok</button>
<button class="button" @click="toggleModal">Annuler</button>
</footer>
</div>
</div>
</pre>
<div class="modal" :class="{'is-visible': showModal}">
<div class="modal-background"></div>
<div class="modal-card">
<header>Titre</header>
<section>
Ceci est une modale
</section>
<footer>
<button class="button is-primary" @click="toggleModal">Ok</button>
<button class="button" @click="toggleModal">Annuler</button>
</footer>
</div>
</div>
<h2 id="boites">Les boites</h2>
<div class="box">
<form method="POST">
<h1>
Connexion
</h1>
<div class="field">
<label for="email">Adresse e-mail</label>
<input type="email" name="email" id="email" placeholder="ex : damien@darkou.fr">
</div>
<div class="field">
<label for="password">Mot de passe</label>
<input type="password" name="password" id="password" placeholder="********">
</div>
2022-03-07 16:58:02 +01:00
2022-03-01 16:09:46 +01:00
<div class="text-right mt-10">
<p>Pas encore inscrit ? <a href="/inscription">Inscrivez-vous</a></p>
</div>
2022-03-07 16:58:02 +01:00
2022-03-01 16:09:46 +01:00
<button type="submit" class="button is-primary">Connexion</button>
</form>
</div>
<pre>
<div class="box">
Contenu
</div>
</pre>
<h2 id="flash">Les messages flash</h2>
<div class="flash">
<div class="header">
Erreur
</div>
<div class="body">
Ceci est une erreur
</div>
</div>
2022-04-10 15:21:15 +02:00
<div class="flash info">
<div class="header">
Information
</div>
<div class="body">
Ceci est une information
</div>
</div>
<div class="flash success">
<div class="header">
Succès
</div>
<div class="body">
Ceci est un succès
</div>
</div>
2022-03-01 16:09:46 +01:00
<pre>
<div class="flash">
<div class="header">
Erreur
</div>
<div class="body">
Ceci est une erreur
</div>
</div>
</pre>
<h2 id="notifications">Les notifications</h2>
2022-03-07 17:00:48 +01:00
<h3>Erreur</h3>
2022-03-01 16:09:46 +01:00
<button type="button" 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>
<pre>
2022-03-07 16:58:02 +01:00
<button
2022-03-01 16:09:46 +01:00
type="button"
2022-03-07 16:58:02 +01:00
class="button is-primary"
2022-03-01 16:09:46 +01:00
onclick="showToastr('Ceci est une notification');"
>
Afficher une notification
</button>
2022-03-07 17:00:48 +01:00
<div id="toastr">
<button class="delete" onclick="hideToastr()" aria-label="Masquer la notification"></button>
<span></span>
</div>
</pre>
<h3>Succès</h3>
<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>
</div>
<pre>
<button
type="button"
class="button is-primary"
onclick="showToastr('Ceci est une notification', true);"
>
Afficher une notification
</button>
2022-03-01 16:09:46 +01:00
<div id="toastr">
<button class="delete" onclick="hideToastr()" aria-label="Masquer la notification"></button>
<span></span>
</div>
</pre>
<h2 id="icones">Les icônes</h2>
<i class="icon-plus">.icon-plus</i>
<i class="icon-user">.icon-user</i>
<i class="icon-search">.icon-search</i>
<i class="icon-mail">.icon-mail</i>
<i class="icon-link">.icon-link</i>
<i class="icon-link-ext">.icon-link-ext</i>
<i class="icon-heart">.icon-heart</i>
<i class="icon-eye">.icon-eye</i>
2022-03-06 14:38:26 +01:00
<i class="icon-left-open">.icon-left-open</i>
<i class="icon-right-open">.icon-right-open</i>
<i class="icon-export">.icon-export</i>
2022-08-30 15:17:14 +02:00
<i class="icon-refresh">.icon-refresh</i>
2022-03-06 14:38:26 +01:00
<i class="icon-share">.icon-share</i>
2022-03-01 16:09:46 +01:00
<i class="icon-spin">.icon-spin</i>
<i class="icon-sun">.icon-sun</i>
<i class="icon-moon">.icon-moon</i>
<i class="icon-trash">.icon-trash</i>
<i class="icon-blind">.icon-blind</i>
<h2 id="listes">Les listes</h2>
2022-03-07 16:58:02 +01:00
<h3>Liste normale</h3>
2022-03-01 16:09:46 +01:00
<div class="grid grid-cols-1 md:grid-cols-2 list">
<div class="item" v-for="item in items">
<span class="title">
{{ item.title }}
</span>
<div class="grid grid-cols-2 md:grid-cols-4">
<div>
<img :src="item.thumb" :alt="item.title" />
</div>
<div class="md:col-span-3">
{{ item.lorem }}
</div>
</div>
</div>
</div>
<pre>
<div class="grid grid-cols-1 md:grid-cols-2 list">
<div class="item">
Contenu
</div>
</div>
</pre>
2022-03-07 16:58:02 +01:00
<h3>Liste avec effet au hover</h3>
<div class="grid grid-cols-1 md:grid-cols-2 list hover">
<div class="item" v-for="item in items">
<span class="title">
{{ item.title }}
</span>
<div class="grid grid-cols-2 md:grid-cols-4">
<div>
<img :src="item.thumb" :alt="item.title" />
</div>
<div class="md:col-span-3">
{{ item.lorem }}
</div>
</div>
</div>
</div>
<pre>
<div class="grid grid-cols-1 md:grid-cols-2 list hover">
<div class="item">
Contenu
</div>
</div>
</pre>
2022-03-01 16:09:46 +01:00
<h2 id="paginations">Les paginations</h2>
<nav class="pagination" role="navigation" aria-label="Pagination">
<ul class="pagination-list">
<template v-for="p in Array.from({length: totalPages}, (v, i) => (i+1))">
<template v-if="p < 2 || p > (totalPages - 1) || (page - 1) <= p && page + 1 >= p">
<li>
<a class="pagination-link" :class="{'is-current': p === page}" @click="goTo(p)" aria-label="Aller à la page {{p}}">{{ p }}</a>
</li>
</template>
<template v-if="(page - 3 === p && page - 2 > 1) || (page + 2 === p && page + 2 < totalPages - 1)">
<li>
<a class="pagination-link is-disabled">…</a>
</li>
</template>
</template>
</ul>
</nav>
<pre>
<nav class="pagination" role="navigation" aria-label="Pagination">
<ul class="pagination-list">
<li><a class="pagination-link is-current" aria-label="Aller à la page 1">1</a></li>
<li><a class="pagination-link" aria-label="Aller à la page 2">2</a></li>
<li><a class="pagination-link is-disabled">…</a></li>
<li><a class="pagination-link" aria-label="Aller à la page 11">11</a></li>
</ul>
</nav>
</pre>
<h2 id="barres-de-navigation">Les barres de navigation</h2>
<pre>
<nav class="navbar" aria-label="Navigation principale">
<div class="navbar-brand">
<a class="navbar-item" href="/">
2022-03-02 16:50:25 +01:00
<img src="/img/logo.png" alt="Logo MusicTopus">
<span>MusicTopus</span>
2022-03-01 16:09:46 +01:00
</a>
<a role="button" class="navbar-burger" aria-label="Afficher le menu" aria-expanded="false" data-target="navbar">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div id="navbar" class="navbar-menu">
<div class="navbar-start">
<div class="navbar-item">
<div class="buttons">
<a class="button is-primary" href="/ajouter-un-album">
<i class="icon-plus"></i>
<span>
Ajouter un album
</span>
</a>
</div>
</div>
</div>
<div class="navbar-end">
<a class="navbar-item" href="/nous-contacter">
Nous contacter
</a>
<div class="navbar-item has-dropdown">
<a class="navbar-link">
<i class="icon-user"></i>
<span>
<%= user.username %>
</span>
</a>
<div class="navbar-dropdown">
<a class="navbar-item" href="/ma-collection">
Ma collection
</a>
</div>
</div>
<div class="navbar-item apparence">
<div class="theme-switch-wrapper">
<label class="theme-switch" for="checkbox" aria-label="Passer du thème clair au thème sombre et inversement">
<input type="checkbox" id="checkbox" />
<div class="slider round"></div>
</label>
</div>
</div>
<div class="navbar-item">
<div class="buttons">
<button type="button" class="button is-primary" id="switchAriaTheme" aria-label="Renforcer la visibilité de ce site" title="Renforcer la visibilité de ce site">
<i class="icon-eye"></i>
</button>
<a class="button is-danger" href="/se-deconnecter">
Déconnexion
</a>
</div>
</div>
</div>
</div>
</nav>
</pre>
</main>
<script>
Vue.createApp({
data() {
return {
showModal: false,
totalPages: 16,
page: 1,
items: [
{
'title': 'Titre 1',
'thumb': 'https://via.placeholder.com/150',
'lorem': 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed interdum mollis justo, id sodales ipsum tincidunt quis. Pellentesque volutpat enim vitae metus mollis, et volutpat nisi egestas. Maecenas vel volutpat felis, sit amet finibus risus. Vestibulum bibendum tempus luctus. Ut rutrum iaculis porta. Donec ultricies orci non tortor posuere faucibus. Cras posuere a augue quis faucibus. Integer consequat libero egestas tempus luctus. Praesent ac arcu eget neque interdum volutpat quis sed augue. Etiam egestas purus ac accumsan consectetur. Etiam vel nibh aliquet, hendrerit leo sed, molestie dui. Nulla eget mauris nec odio facilisis condimentum varius suscipit arcu. Sed vitae felis porta, ornare enim non, egestas velit. Nam tempor ipsum dapibus neque vulputate, at sagittis est commodo. Cras eu rhoncus arcu. ',
},
{
'title': 'Titre 2',
'thumb': 'https://via.placeholder.com/150',
'lorem': 'Quisque ipsum nunc, placerat non euismod at, varius quis urna. Vivamus augue augue, vulputate vel nunc eu, interdum eleifend eros. Nam finibus mattis commodo. Donec sem leo, feugiat sed venenatis et, ultricies sit amet tortor. Fusce feugiat nibh id ex suscipit, a auctor orci iaculis. Donec vulputate quis dolor in posuere. Nullam non luctus dolor. Morbi congue massa metus, vel scelerisque quam aliquam placerat. Aenean pharetra, neque sed sollicitudin finibus, massa quam tristique lacus, vitae egestas tellus mauris sed enim. ',
},
{
'title': 'Titre 3',
'thumb': 'https://via.placeholder.com/150',
'lorem': 'Nulla facilisi. Curabitur at leo nunc. Cras volutpat congue condimentum. Donec euismod rhoncus nisl non bibendum. Nullam nec lorem eget mi facilisis tincidunt id non sapien. Maecenas in sem sed risus hendrerit dapibus. Nulla eget ex laoreet, sollicitudin neque et, luctus ligula. Curabitur viverra a justo ut bibendum. Aenean lacinia dolor quis quam pellentesque tempus. Praesent a volutpat est. Proin dignissim, dui luctus dapibus commodo, nunc arcu tincidunt est, quis molestie erat elit bibendum nisi. Vestibulum hendrerit lacinia tortor a varius. Proin nec sem ligula. Aenean eleifend odio a mi laoreet, sed hendrerit massa efficitur. ',
},
{
'title': 'Titre 4',
'thumb': 'https://via.placeholder.com/150',
'lorem': 'Integer sed eleifend arcu. Morbi eget ipsum ut leo pellentesque commodo eget a ipsum. Nam vel enim sed neque bibendum ultricies nec non odio. Vivamus a fermentum ligula. Mauris in gravida tellus, eu pretium turpis. Mauris et mi tincidunt, molestie velit sit amet, euismod nunc. Fusce malesuada mi ante, vel accumsan lacus consequat non. Maecenas leo tellus, tincidunt nec hendrerit eget, convallis vel ex. Donec eleifend nisi erat, a aliquet ex vulputate congue. Sed efficitur eu ligula ac aliquam. Nullam sit amet blandit nisl. ',
},
{
'title': 'Titre 5',
'thumb': 'https://via.placeholder.com/150',
'lorem': 'Nulla facilisi. Aliquam et suscipit est, in faucibus felis. Nunc at risus rutrum, fermentum sem facilisis, porttitor diam. Mauris vitae neque enim. Sed in lobortis augue, eget hendrerit nunc. Donec in arcu vitae eros lobortis eleifend. Proin non vulputate sem, a pharetra felis. In tortor purus, blandit nec enim a, mattis pulvinar magna. Praesent vel felis vel sapien interdum suscipit ut a justo. Quisque non felis ac velit maximus tincidunt ac at nibh. ',
},
]
}
},
methods: {
toggleModal() {
this.showModal = !this.showModal;
},
goTo(page) {
this.page = page;
},
}
}).mount('#app')
</script>