Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| web:css:frameworks:semantic [2023/04/16 17:01] – créée jcheron | web:css:frameworks:semantic [2023/04/18 02:46] (Version actuelle) – [Eléments HTML simples] jcheron | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| ====== Semantic-UI ====== | ====== Semantic-UI ====== | ||
| + | |||
| + | Comme son nom l' | ||
| + | |||
| + | Le projet initial **Semantic-ui** a été abandonné par son auteur, puis repris par une équipe motivée avec le Fork **Fomantic-UI** | ||
| + | |||
| + | **Semantic-UI** utilise **jQuery**. | ||
| + | |||
| + | ===== Documentation ===== | ||
| + | |||
| + | * https:// | ||
| + | |||
| + | ===== Intégration ===== | ||
| + | |||
| + | ==== Via CDN ==== | ||
| + | |||
| + | === CSS === | ||
| + | |||
| + | <sxh html; | ||
| + | < | ||
| + | <link rel=" | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | === Javascript === | ||
| + | Avant la fermeture du body : | ||
| + | <sxh html; | ||
| + | <!-- You MUST include jQuery 3+ before Fomantic --> | ||
| + | <script src=" | ||
| + | <script src=" | ||
| + | </ | ||
| + | </ | ||
| + | ==== Via npm ==== | ||
| + | <wrap info>Ne pas oublier également l' | ||
| + | <sxh bash; | ||
| + | npm install fomantic-ui | ||
| + | </ | ||
| + | |||
| + | === CSS === | ||
| + | Dans le head | ||
| + | <sxh html; | ||
| + | < | ||
| + | <link rel=" | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | === Javascript === | ||
| + | Avant la fermeture du body : | ||
| + | <sxh html; | ||
| + | <!-- You MUST include jQuery 3+ before Fomantic --> | ||
| + | <script src=" | ||
| + | <script src="/ | ||
| + | </ | ||
| + | |||
| + | ===== Bases ===== | ||
| + | ==== Eléments HTML simples ==== | ||
| + | La plupart des composants Semantic ne requiert que du HTML | ||
| + | |||
| + | **Segment :** | ||
| + | <sxh html; | ||
| + | <div class=' | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | **Bouton :** | ||
| + | <sxh html; | ||
| + | <a class=' | ||
| + | Ouvrir... | ||
| + | </a> | ||
| + | </ | ||
| + | |||
| + | ==== Eléments HTML/JS ==== | ||
| + | |||
| + | Certains composants nécessitent une création en HTML, et une initialisation en JS : | ||
| + | |||
| + | Exemple : Dropdown | ||
| + | |||
| + | <sxh html; | ||
| + | <div class=" | ||
| + | <input type=" | ||
| + | <i class=" | ||
| + | <div class=" | ||
| + | <div class=" | ||
| + | <div class=" | ||
| + | <div class=" | ||
| + | <div class=" | ||
| + | <div class=" | ||
| + | <div class=" | ||
| + | <div class=" | ||
| + | <div class=" | ||
| + | <div class=" | ||
| + | </ | ||
| + | </ | ||
| + | < | ||
| + | $(' | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ==== Eléments JS ==== | ||
| + | |||
| + | Certains composants (beaucoup plus rares) sont 100% JS, c'est le cas par exemple du **toast** : | ||
| + | |||
| + | <sxh javascript; | ||
| + | $.toast({ | ||
| + | title: ' | ||
| + | message: 'Hey look, I have a title !' | ||
| + | }); | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||