mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-28 20:52:21 +01:00
add i18n for less.mustache
This commit is contained in:
parent
3aea86370d
commit
72117c3f97
138
docs/templates/pages/less.mustache
vendored
138
docs/templates/pages/less.mustache
vendored
@ -1,8 +1,8 @@
|
||||
<!-- Masthead
|
||||
================================================== -->
|
||||
<header class="jumbotron subhead" id="overview">
|
||||
<h1>Using LESS with Bootstrap</h1>
|
||||
<p class="lead">Customize and extend Bootstrap with <a href="http://lesscss.org" target="_blank">LESS</a>, a CSS preprocessor, to take advantage of the variables, mixins, and more used to build Bootstrap's CSS.</p>
|
||||
<h1>{{_i}}Using LESS with Bootstrap{{/i}}</h1>
|
||||
<p class="lead">{{_i}}Customize and extend Bootstrap with <a href="http://lesscss.org" target="_blank">LESS</a>, a CSS preprocessor, to take advantage of the variables, mixins, and more used to build Bootstrap's CSS.{{/i}}</p>
|
||||
</header>
|
||||
|
||||
|
||||
@ -10,35 +10,35 @@
|
||||
<!-- BUILT WITH LESS
|
||||
================================================== -->
|
||||
<div class="page-header">
|
||||
<h1>Built with LESS</h1>
|
||||
<h1>{{_i}}Built with LESS{{/i}}</h1>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h3>Why LESS?</h3>
|
||||
<p>Bootstrap is made with LESS at it's core, a dynamic stylesheet language created by <a href="http://cloudhead.io">Alexis Sellier</a>. It makes developing systems-based CSS faster, easier, and more fun.</p>
|
||||
<h3>{{_i}}Why LESS?{{/i}}</h3>
|
||||
<p>{{_i}}Bootstrap is made with LESS at it's core, a dynamic stylesheet language created by <a href="http://cloudhead.io">Alexis Sellier</a>. It makes developing systems-based CSS faster, easier, and more fun.{{/i}}</p>
|
||||
</div>
|
||||
<div class="span4">
|
||||
<h3>What's included?</h3>
|
||||
<p>As an extension of CSS, LESS includes variables, mixins for reusable snippets of code, operations for simple math, nesting, and even color functions.</p>
|
||||
<h3>{{_i}}What's included?{{/i}}</h3>
|
||||
<p>{{_i}}As an extension of CSS, LESS includes variables, mixins for reusable snippets of code, operations for simple math, nesting, and even color functions.{{/i}}</p>
|
||||
</div>
|
||||
<div class="span4">
|
||||
<h3>Learn more</h3>
|
||||
<h3>{{_i}}Learn more{{/i}}</h3>
|
||||
<img style="float: right; height: 36px;" src="assets/img/less-logo-large.png" alt="LESS CSS">
|
||||
<p>Visit the official website at <a href="http://lesscss.org">http://lesscss.org</a> to learn more.</p>
|
||||
<p>{{_i}}Visit the official website at <a href="http://lesscss.org">http://lesscss.org</a> to learn more.{{/i}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<h3>Variables</h3>
|
||||
<p>Managing colors and pixel values in CSS can be a bit of a pain, usually full of copy and paste. Not with LESS though—assign colors or pixel values as variables and change them once.</p>
|
||||
<h3>{{_i}}Variables{{/i}}</h3>
|
||||
<p>{{_i}}Managing colors and pixel values in CSS can be a bit of a pain, usually full of copy and paste. Not with LESS though—assign colors or pixel values as variables and change them once.{{/i}}</p>
|
||||
</div>
|
||||
<div class="span4">
|
||||
<h3>Mixins</h3>
|
||||
<p>Those three border-radius declarations you need to make in regular ol' CSS? Now they're down to one line with the help of mixins, snippets of code you can reuse anywhere.</p>
|
||||
<h3>{{_i}}Mixins{{/i}}</h3>
|
||||
<p>{{_i}}Those three border-radius declarations you need to make in regular ol' CSS? Now they're down to one line with the help of mixins, snippets of code you can reuse anywhere.{{/i}}</p>
|
||||
</div>
|
||||
<div class="span4">
|
||||
<h3>Operations</h3>
|
||||
<p>Make your grid, leading, and more super flexible by doing the math on the fly with operations. Multiple, divide, add, and subtract your way to CSS sanity.</p>
|
||||
<h3>{{_i}}Operations{{/i}}</h3>
|
||||
<p>{{_i}}Make your grid, leading, and more super flexible by doing the math on the fly with operations. Multiple, divide, add, and subtract your way to CSS sanity.{{/i}}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -47,35 +47,35 @@
|
||||
<!-- VARIABLES
|
||||
================================================== -->
|
||||
<div class="page-header" id="variables">
|
||||
<h1>Variables <small>from variables.less</small></h1>
|
||||
<h1>{{_i}}Variables <small>from variables.less</small>{{/i}}</h1>
|
||||
</div>
|
||||
|
||||
<h3>Hyperlinks</h3>
|
||||
<h3>{{_i}}Hyperlinks{{/i}}</h3>
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Variable</th>
|
||||
<th>Value</th>
|
||||
<th>Usage</th>
|
||||
<th>{{_i}}Variable{{/i}}</th>
|
||||
<th>{{_i}}Value{{/i}}</th>
|
||||
<th>{{_i}}Usage{{/i}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>@linkColor</code></td>
|
||||
<td>#0069d6</td>
|
||||
<td>Default link text color</td>
|
||||
<td>{{_i}}Default link text color{{/i}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>@linkColorHover</code></td>
|
||||
<td><code>darken(@linkColor, 15)</code></td>
|
||||
<td>Default link text hover color</td>
|
||||
<td>{{_i}}Default link text hover color{{/i}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="row">
|
||||
<div class="span6">
|
||||
<h3>Grayscale colors</h3>
|
||||
<h3>{{_i}}Grayscale colors{{/i}}</h3>
|
||||
<table class="table table-bordered table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
@ -106,7 +106,7 @@
|
||||
</table>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<h3>Accent colors</h3>
|
||||
<h3>{{_i}}Accent colors{{/i}}</h3>
|
||||
<table class="table table-bordered table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
@ -144,7 +144,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="span6">
|
||||
<h3>Grid system</h3>
|
||||
<h3>{{_i}}Grid system{{/i}}</h3>
|
||||
<table class="table table-bordered table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
@ -167,7 +167,7 @@
|
||||
</table>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<h3>Typography</h3>
|
||||
<h3>{{_i}}Typography{{/i}}</h3>
|
||||
<table class="table table-bordered table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
@ -190,7 +190,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="span3">
|
||||
<h3>Visuals</h3>
|
||||
<h3>{{_i}}Visuals{{/i}}</h3>
|
||||
</div>
|
||||
<div class="span9">
|
||||
<table class="table table-bordered table-striped">
|
||||
@ -209,7 +209,7 @@
|
||||
<!-- MIXINS
|
||||
================================================== -->
|
||||
<div class="page-header" id="mixins">
|
||||
<h1>Mixins <small>from mixins.less</small></h1>
|
||||
<h1>{{_i}}Mixins <small>from mixins.less</small>{{/i}}</h1>
|
||||
</div>
|
||||
|
||||
|
||||
@ -217,7 +217,7 @@
|
||||
<!-- OPERATIONS
|
||||
================================================== -->
|
||||
<div class="page-header" id="operations">
|
||||
<h1>Operations</h1>
|
||||
<h1>{{_i}}Operations{{/i}}</h1>
|
||||
</div>
|
||||
|
||||
|
||||
@ -225,7 +225,7 @@
|
||||
<!-- COMPILING LESS AND BOOTSTRAP
|
||||
================================================== -->
|
||||
<div class="page-header" id="compiling">
|
||||
<h1>Compiling LESS and Bootstrap</h1>
|
||||
<h1>{{_i}}Compiling LESS and Bootstrap{{/i}}</h1>
|
||||
</div>
|
||||
|
||||
|
||||
@ -235,25 +235,25 @@
|
||||
================================================== -->
|
||||
<section id="less">
|
||||
<div class="page-header">
|
||||
<h1>Using Bootstrap with Less <small>Supercharge your CSS with variables, mixins, and functions</small></h1>
|
||||
<h1>{{_i}}Using Bootstrap with Less <small>Supercharge your CSS with variables, mixins, and functions</small>{{/i}}</h1>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="span3">
|
||||
<p>Bootstrap was built with <a href="http://markdotto.com/bootstrap/">Preboot</a>, an open-source pack of mixins and variables to be used in conjunction with <a href="http://lesscss.org" target="_blank">Less</a>, a CSS preprocessor for faster and easier web development.</p>
|
||||
<p>Check out how we used Preboot in Bootstrap and how you can make use of it should you choose to run Less on your next project.</p>
|
||||
<p>{{_i}}Bootstrap was built with <a href="http://markdotto.com/bootstrap/">Preboot</a>, an open-source pack of mixins and variables to be used in conjunction with <a href="http://lesscss.org" target="_blank">Less</a>, a CSS preprocessor for faster and easier web development.{{/i}}</p>
|
||||
<p>{{_i}}Check out how we used Preboot in Bootstrap and how you can make use of it should you choose to run Less on your next project.{{/i}}</p>
|
||||
</div>
|
||||
<div class="span9">
|
||||
<h2>How to use it</h2>
|
||||
<p>Use this option to make full use of Bootstrap’s Less variables, mixins, and nesting in CSS via javascript in your browser.</p>
|
||||
<h2>{{_i}}How to use it{{/i}}</h2>
|
||||
<p>{{_i}}Use this option to make full use of Bootstrap’s Less variables, mixins, and nesting in CSS via javascript in your browser.{{/i}}</p>
|
||||
<pre class="prettyprint linenums">
|
||||
<link rel="stylesheet/less" href="less/bootstrap.less" media="all" />
|
||||
<script src="js/less-1.1.3.min.js"></script></pre>
|
||||
<p>Not feeling the .js solution? <a href="http://incident57.com/less" target="_blank">Try the Less Mac app</a> or <a href="http://lesscss.org/#-client-side-usage" target="_blank">use Node.js</a> to compile when you deploy your code.</p>
|
||||
<p>{{_i}}Not feeling the .js solution? <a href="http://incident57.com/less" target="_blank">Try the Less Mac app</a> or <a href="http://lesscss.org/#-client-side-usage" target="_blank">use Node.js</a> to compile when you deploy your code.{{/i}}</p>
|
||||
|
||||
<h2>What’s included</h2>
|
||||
<p>Here are some of the highlights of what’s included in Twitter Bootstrap as part of Bootstrap. Head over to the Bootstrap website or Github project page to download and learn more.</p>
|
||||
<h3>Variables</h3>
|
||||
<p>Variables in Less are perfect for maintaining and updating your CSS headache free. When you want to change a color value or a frequently used value, update it in one spot and you’re set.</p>
|
||||
<h2>{{_i}}What’s included{{/i}}</h2>
|
||||
<p>{{_i}}Here are some of the highlights of what’s included in Twitter Bootstrap as part of Bootstrap. Head over to the Bootstrap website or Github project page to download and learn more.{{/i}}</p>
|
||||
<h3>{{_i}}Variables{{/i}}</h3>
|
||||
<p>{{_i}}Variables in Less are perfect for maintaining and updating your CSS headache free. When you want to change a color value or a frequently used value, update it in one spot and you’re set.{{/i}}</p>
|
||||
<pre class="prettyprint linenums">
|
||||
// Links
|
||||
@linkColor: #8b59c2;
|
||||
@ -281,16 +281,16 @@
|
||||
@baseline: 18px;
|
||||
</pre>
|
||||
|
||||
<h3>Commenting</h3>
|
||||
<p>Less also provides another style of commenting in addition to CSS’s normal <code>/* ... */</code> syntax.</p>
|
||||
<h3>{{_i}}Commenting{{/i}}</h3>
|
||||
<p>{{_i}}Less also provides another style of commenting in addition to CSS’s normal <code>/* ... */</code> syntax.{{/i}}</p>
|
||||
<pre class="prettyprint linenums">
|
||||
// This is a comment
|
||||
/* This is also a comment */
|
||||
</pre>
|
||||
|
||||
<h3>Mixins up the wazoo</h3>
|
||||
<p>Mixins are basically includes or partials for CSS, allowing you to combine a block of code into one. They’re great for vendor prefixed properties like <code>box-shadow</code>, cross-browser gradients, font stacks, and more. Below is a sample of the mixins that are included with Bootstrap.</p>
|
||||
<h4>Font stacks</h4>
|
||||
<h3>{{_i}}Mixins up the wazoo{{/i}}</h3>
|
||||
<p>{{_i}}Mixins are basically includes or partials for CSS, allowing you to combine a block of code into one. They’re great for vendor prefixed properties like <code>box-shadow</code>, cross-browser gradients, font stacks, and more. Below is a sample of the mixins that are included with Bootstrap.{{/i}}</p>
|
||||
<h4>{{_i}}Font stacks{{/i}}</h4>
|
||||
<pre class="prettyprint linenums">
|
||||
#font {
|
||||
.shorthand(@weight: normal, @size: 14px, @lineHeight: 20px) {
|
||||
@ -307,7 +307,7 @@
|
||||
...
|
||||
}
|
||||
</pre>
|
||||
<h4>Gradients</h4>
|
||||
<h4>{{_i}}Gradients{{/i}}</h4>
|
||||
<pre class="prettyprint linenums">
|
||||
#gradient {
|
||||
...
|
||||
@ -326,8 +326,8 @@
|
||||
}
|
||||
</pre>
|
||||
|
||||
<h3>Operations</h3>
|
||||
<p>Get fancy and perform some math to generate flexible and powerful mixins like the one below.</p>
|
||||
<h3>{{_i}}Operations{{/i}}</h3>
|
||||
<p>{{_i}}Get fancy and perform some math to generate flexible and powerful mixins like the one below.{{/i}}</p>
|
||||
<pre class="prettyprint linenums">
|
||||
// Griditude
|
||||
@gridColumns: 16;
|
||||
@ -341,62 +341,62 @@
|
||||
}
|
||||
</pre>
|
||||
|
||||
<h2 id="compiling">Compiling Less</h2>
|
||||
<p>After modifying the <code>.less</code> files in /lib/, you'll need to recompile them in order to regenerate the bootstrap-*.*.*.css and bootstrap-*.*.*.min.css files. If you're submitting a pull request to GitHub, you must always recompile.</p>
|
||||
<h3>Ways to compile</h3>
|
||||
<h2 id="compiling">{{_i}}Compiling Less{{/i}}</h2>
|
||||
<p>{{_i}}After modifying the <code>.less</code> files in /lib/, you'll need to recompile them in order to regenerate the bootstrap-*.*.*.css and bootstrap-*.*.*.min.css files. If you're submitting a pull request to GitHub, you must always recompile.{{/i}}</p>
|
||||
<h3>{{_i}}Ways to compile{{/i}}</h3>
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 120px;">Method</th>
|
||||
<th>Steps</th>
|
||||
<th style="width: 120px;">{{_i}}Method{{/i}}</th>
|
||||
<th>{{_i}}Steps{{/i}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Node with makefile</td>
|
||||
<td>{{_i}}Node with makefile{{/i}}</td>
|
||||
<td>
|
||||
<p>Install the LESS command line compiler with npm by running the following command:</p>
|
||||
<p>{{_i}}Install the LESS command line compiler with npm by running the following command:{{/i}}</p>
|
||||
<pre>$ npm install less</pre>
|
||||
<p>Once installed just run <code>make</code> from the root of your bootstrap directory and you're all set.</p>
|
||||
<p>Additionally, if you have <a href="https://github.com/mynyml/watchr">watchr</a> installed, you may run <code>make watch</code> to have bootstrap automatically rebuilt every time you edit a file in the bootstrap lib (this isn't required, just a convenience method).</p>
|
||||
<p>{{_i}}Once installed just run <code>make</code> from the root of your bootstrap directory and you're all set.{{/i}}</p>
|
||||
<p>{{_i}}Additionally, if you have <a href="https://github.com/mynyml/watchr">watchr</a> installed, you may run <code>make watch</code> to have bootstrap automatically rebuilt every time you edit a file in the bootstrap lib (this isn't required, just a convenience method).{{/i}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<td>Javascript</td>
|
||||
<td>{{_i}}Javascript{{/i}}</td>
|
||||
<td>
|
||||
<p><a href="http://lesscss.org/">Download the latest Less.js</a> and include the path to it (and Bootstrap) in the <code><head></code>.</p>
|
||||
<p>{{_i}}<a href="http://lesscss.org/">Download the latest Less.js</a> and include the path to it (and Bootstrap) in the <code><head></code>.{{/i}}</p>
|
||||
<pre class="prettyprint">
|
||||
<link rel="stylesheet/less" href="/path/to/bootstrap.less">
|
||||
<script src="/path/to/less.js"></script>
|
||||
</pre>
|
||||
<p>To recompile the .less files, just save them and reload your page. Less.js compiles them and stores them in local storage.</p>
|
||||
<p>{{_i}}To recompile the .less files, just save them and reload your page. Less.js compiles them and stores them in local storage.{{/i}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Command line</td>
|
||||
<td>{{_i}}Command line{{/i}}</td>
|
||||
<td>
|
||||
<p>Install the LESS command line tool via Node and run the following command:</p>
|
||||
<p>{{_i}}Install the LESS command line tool via Node and run the following command:{{/i}}</p>
|
||||
<pre>$ lessc ./lib/bootstrap.less > bootstrap.css</pre>
|
||||
<p>Be sure to include <code>--compress</code> in that command if you're trying to save some bytes!</p>
|
||||
<p>{{_i}}Be sure to include <code>--compress</code> in that command if you're trying to save some bytes!{{/i}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://incident57.com/less/" target="_blank">Unofficial Mac app</a></td>
|
||||
<td><a href="http://incident57.com/less/" target="_blank">{{_i}}Unofficial Mac app{{/i}}</a></td>
|
||||
<td>
|
||||
<p><a href="http://incident57.com/less/">The unofficial Mac app</a> watches directories of .less files and compiles the code to local files after every save of a watched .less file.</p>
|
||||
<p>If you like, you can toggle preferences in the app for automatic minifying and which directory the compiled files end up in.</p>
|
||||
<p>{{_i}}<a href="http://incident57.com/less/">The unofficial Mac app</a> watches directories of .less files and compiles the code to local files after every save of a watched .less file.{{/i}}</p>
|
||||
<p>{{_i}}If you like, you can toggle preferences in the app for automatic minifying and which directory the compiled files end up in.{{/i}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://crunchapp.net/" target="_blank">Crunch</a></td>
|
||||
<td>Crunch is a great looking LESS editor and compiler built on Adobe Air.</td>
|
||||
<td>{{_i}}Crunch is a great looking LESS editor and compiler built on Adobe Air.{{/i}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://incident57.com/codekit/" target="_blank">CodeKit</a></td>
|
||||
<td>Created by the same guy as the unofficial Mac app, CodeKit is a Mac app that compiles LESS, SASS, Stylus, and CoffeeScript.</td>
|
||||
<td>{{_i}}Created by the same guy as the unofficial Mac app, CodeKit is a Mac app that compiles LESS, SASS, Stylus, and CoffeeScript.{{/i}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://wearekiss.com/simpless" target="_blank">Simpless</a></td>
|
||||
<td>Mac, Linux, and PC app for drag and drop compiling of LESS files. Plus, the <a href="https://github.com/Paratron/SimpLESS" target="_blank">source code is on GitHub</a>.</td>
|
||||
<td>{{_i}}Mac, Linux, and PC app for drag and drop compiling of LESS files. Plus, the <a href="https://github.com/Paratron/SimpLESS" target="_blank">source code is on GitHub</a>.{{/i}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
Loading…
x
Reference in New Issue
Block a user