issue91:command_conquer
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| issue91:command_conquer [2015/01/02 15:55] – créée andre_domenech | issue91:command_conquer [2015/02/25 14:07] (Version actuelle) – auntiee | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | Last month I mentioned the Zurb Foundation when discussing bower. For a long while it was my go-to grid system, regardless of my opinion towards using divs for rows and the strict formatting guidelines. Very recently, however, I have found a new framework which does not require those sorts of divs (or even pre-defined classes). It is called Jeet, and after using it on only one project, I don’t see myself using Foundation for the grid any more. | + | ====== 1 ====== |
| + | |||
| + | **Last month I mentioned the Zurb Foundation when discussing bower. For a long while it was my go-to grid system, regardless of my opinion towards using divs for rows and the strict formatting guidelines. Very recently, however, I have found a new framework which does not require those sorts of divs (or even pre-defined classes). It is called Jeet, and after using it on only one project, I don’t see myself using Foundation for the grid any more. | ||
| Example Files | Example Files | ||
| Ligne 7: | Ligne 9: | ||
| Jeet - What is it? | Jeet - What is it? | ||
| - | Jeet is a so-called “Ratio Grid”. It features functions in SASS or Stylus to generate the CSS required to create columns on any element. The website linked to in Further Reading (below) does an excellent job describing what exactly Jeet is. So instead, I will focus on an example of how it differs from Foundation. | + | Jeet is a so-called “Ratio Grid”. It features functions in SASS or Stylus to generate the CSS required to create columns on any element. The website linked to in Further Reading (below) does an excellent job describing what exactly Jeet is. So instead, I will focus on an example of how it differs from Foundation.** |
| - | Emmet? Who? | + | Le mois dernier, j'ai mentionné la Fondation Zurb en parlant de bower. Pendant longtemps il a été mon système de grille préféré, indépendamment de mon opinion sur l' |
| + | |||
| + | Fichiers d' | ||
| + | |||
| + | J'ai créé un dépôt github contenant tous mes fichiers d' | ||
| + | |||
| + | Jeet - C'est quoi ? | ||
| + | |||
| + | Jeet est ce qu'on appelle un « Ratio Grid ». Il propose des fonctions SASS ou Stylus pour générer le CSS nécessaire pour créer des colonnes sur n' | ||
| + | |||
| + | ====== 2 ====== | ||
| + | |||
| + | **Emmet? Who? | ||
| Emmet is essentially the spiritual successor to Zen Coding. It enables you to enter a series of selectors (based off the CSS selectors), which then auto-completes into HTML code when you hit tab. There are plugins available for the vast majority of text editors, so you should have no problem finding one. | Emmet is essentially the spiritual successor to Zen Coding. It enables you to enter a series of selectors (based off the CSS selectors), which then auto-completes into HTML code when you hit tab. There are plugins available for the vast majority of text editors, so you should have no problem finding one. | ||
| Ligne 25: | Ligne 39: | ||
| This creates a set of header tags, followed by (“+” adjacent sibling selector) a section element with two children (“> | This creates a set of header tags, followed by (“+” adjacent sibling selector) a section element with two children (“> | ||
| - | After running these commands, I will have a basic HTML5 page. To see what the end result was, look in the emmet.html file in the example code. | + | After running these commands, I will have a basic HTML5 page. To see what the end result was, look in the emmet.html file in the example code.** |
| - | The Example | + | Emmet ? Qui ? |
| + | |||
| + | Emmet est essentiellement le successeur spirituel de Zen Coding. Il vous permet de saisir une série de sélecteurs (basés sur les sélecteurs CSS), qu'il complète ensuite automatiquement en code HTML quand vous appuyez sur TAB. Il existe des greffons disponibles pour la grande majorité des éditeurs de texte et vous ne devriez avoir aucun problème pour en trouver un. | ||
| + | |||
| + | L' | ||
| + | |||
| + | Pour l' | ||
| + | |||
| + | html:5 | ||
| + | Cela génère la structure de base de la page HTML5 (doctype, balises HTML, en-tête et corps). | ||
| + | | ||
| + | Cela génère une ligne <link rel=”stylesheet” href=”css/ | ||
| + | |||
| + | header+section> | ||
| + | Cela crée un ensemble de balises d' | ||
| + | |||
| + | Après l' | ||
| + | |||
| + | ====== 3 ====== | ||
| + | |||
| + | **The Example | ||
| Assuming you wanted to create a two-column layout that spans the whole width of the webpage, you’d need to do the following for Foundation: | Assuming you wanted to create a two-column layout that spans the whole width of the webpage, you’d need to do the following for Foundation: | ||
| Ligne 38: | Ligne 72: | ||
| • Run the cf() function on header, footer and section (Not strictly necessary, but it definitely doesn’t hurt). | • Run the cf() function on header, footer and section (Not strictly necessary, but it definitely doesn’t hurt). | ||
| • Run the column function on article and aside (col(0.75) and col(0.25) respectively). | • Run the column function on article and aside (col(0.75) and col(0.25) respectively). | ||
| - | • Compile the scss or stylus file. | + | • Compile the scss or stylus file.** |
| - | In both cases, I’ve added a few extra styles to help illustrate the end layout, but as they aren’t necessary, I haven’t included them. | + | L' |
| + | |||
| + | En supposant que vous vouliez créer une mise en page sur deux colonnes qui s' | ||
| + | • Créer un div avec la classe « row » dans les balises du corps. | ||
| + | • Créer un style supplémentaire pour étendre la largeur de la ligne à 100 %. | ||
| + | • Ajouter vos classes de colonne à chaque élément. | ||
| + | • Ajouter un div avec la classe « row » autour de l' | ||
| + | |||
| + | Les mêmes étapes pour Jeet (en commençant après la création du fichier emmet) : | ||
| + | • Exécuter la fonction cf() sur l' | ||
| + | • Exécuter la fonction de colonne sur l' | ||
| + | • Compiler le fichier scss ou stylus. | ||
| + | |||
| + | ====== 4 ====== | ||
| + | |||
| + | **In both cases, I’ve added a few extra styles to help illustrate the end layout, but as they aren’t necessary, I haven’t included them. | ||
| Note: The functions for Jeet can be run in scss, but that requires the format @include col(0.75); The format I use above is for Stylus. | Note: The functions for Jeet can be run in scss, but that requires the format @include col(0.75); The format I use above is for Stylus. | ||
| - | Note #2: If you want to work on the stylus file, you’ll first need to install jeet (most easily done via npm). | + | Note #2: If you want to work on the stylus file, you’ll first need to install jeet (most easily done via npm).** |
| - | The conclusion | + | Dans les deux cas, j'ai ajouté quelques styles supplémentaires pour aider à illustrer la mise en page finale, mais comme ils ne sont pas nécessaires, |
| + | |||
| + | Remarque : les fonctions pour Jeet peuvent être exécutées en scss, mais cela exige le format @include col(0.75); Le format que j' | ||
| + | |||
| + | Remarque n° 2 : si vous voulez travailler sur le dossier stylus, vous devrez d' | ||
| + | |||
| + | ====== 5 ====== | ||
| + | |||
| + | **The conclusion | ||
| As you can see, the configuration of the columns occurs in a stylesheet, meaning you can focus on creating a basic html structure, and then only edit it as you add extra styles that you may need. You’re not forced to adjust the columns by editing the element tags, which is great when you’re working with a CMS and won’t necessarily be able to easily edit an HTML file to make your changes. Another benefit is that the compiled CSS file contains literally only the styles you use. While Foundation does let you pick and choose different modules to compile, there is very often a large amount of unnecessary code. | As you can see, the configuration of the columns occurs in a stylesheet, meaning you can focus on creating a basic html structure, and then only edit it as you add extra styles that you may need. You’re not forced to adjust the columns by editing the element tags, which is great when you’re working with a CMS and won’t necessarily be able to easily edit an HTML file to make your changes. Another benefit is that the compiled CSS file contains literally only the styles you use. While Foundation does let you pick and choose different modules to compile, there is very often a large amount of unnecessary code. | ||
| - | Hopefully this will help bring Jeet to the attention of those just starting out, so they can focus more on good formatting and being succinct rather than conforming to the Zurb Foundation format. That isn’t to say Foundation isn’t useful for certain aspects, as it offers more than just a grid (such as pre-defined styles for buttons or menus), and it can easily be mixed with the Jeet grid. | + | Hopefully this will help bring Jeet to the attention of those just starting out, so they can focus more on good formatting and being succinct rather than conforming to the Zurb Foundation format. That isn’t to say Foundation isn’t useful for certain aspects, as it offers more than just a grid (such as pre-defined styles for buttons or menus), and it can easily be mixed with the Jeet grid.** |
| + | |||
| + | Conclusion | ||
| + | |||
| + | Comme vous pouvez le voir, la configuration des colonnes se passe dans une feuille de style, ce qui signifie que vous pouvez vous concentrer sur la création d'une structure de base html, puis la modifier uniquement pour ajouter des styles supplémentaires au besoin. Vous n' | ||
| + | |||
| + | Espérons que cela va aider à porter Jeet à l' | ||
| + | |||
| + | ====== 6 ====== | ||
| - | Final note: If you want Jeet to work in older versions of Internet Explorer, you’ll need to use something like selectivzr, modernizr, or HTML5shiv, or a combination. | + | **Final note: If you want Jeet to work in older versions of Internet Explorer, you’ll need to use something like selectivzr, modernizr, or HTML5shiv, or a combination. |
| I hope this article has been helpful to anyone starting out with web programming. If you have any questions, or have used either Emmet or Jeet for an interesting project, feel free to email me at lswest34+fcm@gmail.com. Also, anyone who has a request for an article is also welcome to email me. | I hope this article has been helpful to anyone starting out with web programming. If you have any questions, or have used either Emmet or Jeet for an interesting project, feel free to email me at lswest34+fcm@gmail.com. Also, anyone who has a request for an article is also welcome to email me. | ||
| Ligne 61: | Ligne 126: | ||
| https:// | https:// | ||
| http:// | http:// | ||
| - | https:// | + | https:// |
| + | |||
| + | Note finale : si vous voulez que Jeet fonctionne avec les anciennes versions d' | ||
| + | |||
| + | J' | ||
| + | |||
| + | Pour aller plus loin : | ||
| + | |||
| + | http:// | ||
| + | https:// | ||
| + | http:// | ||
| + | https:// | ||
issue91/command_conquer.1420210515.txt.gz · Dernière modification : 2015/01/02 15:55 de andre_domenech
