Extend Bootstrap mpo na ko profiter na ba styles na ba composants oyo ekotisami, ainsi que ba variables na ba mixins LESS.
Bootstrap esalemi na LESS na moboko na yango, monoko ya stylesheet dynamique oyo esalemi na moninga na biso ya malamu, Alexis Sellier . Ezali kosala ete kosala CSS oyo esalemi na ba systèmes ezala mbangu, pete, mpe esengo.
Moko ya baye basalaki Bootstrap akomaki mokanda ya mbangu ya blog na ntina ya likambo oyo , na bokuse awa:
Lokola bobakisi ya CSS, LESS ezali na ba variables, ba mixins mpo na ba fragments ya code oyo ekoki kosalelama lisusu, ba opérations mpo na matematiki ya pete, nesting, mpe ata ba fonctions ya couleur.
Kota na site internet ya officiel na http://lesscss.org/ mpo na koyeba makambo mingi.
Lokola CSS na biso ekomami na Less mpe esalelaka ba variables mpe ba mixins, esengeli e compiler yango mpo na mise en œuvre ya production finale. Tala ndenge nini.
Landa malako na projet readme na GitHub pona compilation via ligne de commande.
Télécharger Less.js ya sika mpe kotia nzela ya kokende na yango (mpe Bootstrap) na <head>
.
<link rel = "lokasa ya lolenge/moke" href = "/nzela/na/bootstrap.moke" > <script src = "/nzela/na/moke.js" ></script>
Pona ko recompiler ba fichiers .less, bomba kaka yango pe recharger page na yo. Less.js e compiler yango mpe ebombaka yango na stockage local.
Application Mac oyo ezali officielle te etalaka ba répertoires ya ba fichiers .less mpe e compiler code na ba fichiers locales après chaque sauvegarde ya fichier .less oyo etali. Soki olingi, okoki kobongola makambo oyo olingaka na programɛ yango mpo na kosala minifying automatique mpe répertoire nini ba fichiers compilés esukaka na yango.
Crunch ezali éditeur mpe compilateur ya LESS oyo ezali komonana malamu oyo etongami na Adobe Air.
Esalemi na mobali moko na appli Mac oyo ezali officielle te, CodeKit ezali appli Mac oyo esangisi LESS, SASS, Stylus, mpe CoffeeScript.
Mac, Linux, mpe Windows app mpo na kobenda mpe kobwaka kosangisa ba fichiers LESS. Plus, code source ezali na GitHub .
Bandá nokinoki projet web nyonso na kobwaka na kati ya CSS mpe JS oyo esangisi to oyo esili kopɛtolama. Couche na ba styles personnalisés separatement pona ba mises à niveau facile na entretien kokende liboso.
Télécharger Bootstrap ya sika oyo esalemi mpe tia yango na projet na yo. Na ndakisa, okoki kozala na likambo ya ndenge oyo:
app/ ba layouts/ . ba modèles/ ya bato nyonso/ css/ . bootstrap.min.css na mokili mobimba js/ . bootstrap.min.js na mokili mobimba img/ . ba glyphicons-ba ndambo.png ba glyphicons-ba-halflings-ya pembe.png
Kopi HTML ya base oyo elandi mpo na kobanda.
- <html>
- <motó>
- <title> Modèle ya 101 ya bobandi </title>
- <!-- Mokanda ya kofungola -->
- <lien href = "public/css/bootstrap.min.css" rel = "lokasa ya lolenge" >
- </motó>
- <nzoto>
- <h1> Mbote, mokili! </h1>
- <!-- Mokanda ya kofungola -->
- <script src = "ya bato banso/js/bobandi.min.js" ></script>
- </nzoto>
- </html>
Sala na CSS na yo personnalisé, JS, mpe mingi lokola esengeli mpo na kosala Bootstrap ya yo moko na ba fichiers CSS mpe JS na yo moko ekeseni.
- <html>
- <motó>
- <title> Modèle ya 101 ya bobandi </title>
- <!-- Mokanda ya kofungola -->
- <lien href = "public/css/bootstrap.min.css" rel = "lokasa ya lolenge" >
- <!-- Mosala -->
- <link href = "public/css/application.css" rel = "lokasa ya lolenge" >
- </motó>
- <nzoto>
- <h1> Mbote, mokili! </h1>
- <!-- Mokanda ya kofungola -->
- <script src = "ya bato banso/js/bobandi.min.js" ></script>
- <!-- Mosala -->
- <script src = "ya bato banso/js/ya kosalela.js" </script>
- </nzoto>
- </html>