Skip to content
This repository was archived by the owner on Sep 30, 2020. It is now read-only.

Commit f848b0b

Browse files
committed
Includes & layouts
1 parent 1ce0afd commit f848b0b

File tree

5 files changed

+104
-0
lines changed

5 files changed

+104
-0
lines changed

_includes/fr-FR/example.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Ce code est éditable et exécutable !
2+
fn main() {
3+
// Une calculatrice simple avec des entiers:
4+
// `+` ou `-` signifie ajouter ou soustraire 1
5+
// `*` ou `/` signifie multiplier ou diviser par 2
6+
7+
let programme = "+ + * - /";
8+
let mut accumulateur = 0;
9+
10+
for symbole in programme.chars() {
11+
match symbole {
12+
'+' => accumulateur += 1,
13+
'-' => accumulateur -= 1,
14+
'*' => accumulateur *= 2,
15+
'/' => accumulateur /= 2,
16+
_ => { /* on ne tiens pas compte des autres symboles */ }
17+
}
18+
}
19+
20+
println!("Le programme \"{}\" à calculé la valeur {}",
21+
programme, accumulateur);
22+
}

_includes/fr-FR/example.rs.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<pre class='rust'>
2+
<span class='kw'>fn</span> main() {
3+
<span class='comment'>// Une calculatrice simple avec des entiers:
4+
// `+` ou `-` signifie ajouter ou soustraire 1
5+
// `*` ou `/` signifie multiplier ou diviser par 2</span>
6+
7+
<span class='kw'>let</span> programme = <span class='string'>"+ + * - /"</span>;
8+
<span class='kw'>let</span> <span class='kw'>mut</span> accumulateur = <span class='number'>0</span>;
9+
10+
<span class='kw'>for</span> symbole in programme.chars() {
11+
<span class='kw'>match</span> symbole {
12+
<span class='string'>'+'</span> => accumulateur <span class='op'>+=</span> <span class='number'>1</span>,
13+
<span class='string'>'-'</span> => accumulateur <span class='op'>-=</span> <span class='number'>1</span>,
14+
<span class='string'>'*'</span> => accumulateur <span class='op'>*=</span> <span class='number'>2</span>,
15+
<span class='string'>'/'</span> => accumulateur <span class='op'>/=</span> <span class='number'>2</span>,
16+
_ => { <span class='comment'>/* on ignore tout le reste */</span> }
17+
}
18+
}
19+
20+
<span class='prelude-val'>println!</span>(<span class='string'>"Le programme \"{}\" à calculé la valeur {}"</span>,
21+
programme, accumulateur);
22+
}
23+
</pre>

_layouts/fr-FR/basic.html

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<!DOCTYPE html>
2+
<!-- Page last generated {{ site.time }} -->
3+
<html lang="en">
4+
<head>
5+
<meta charset="utf-8">
6+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7+
<meta name="viewport" content="width=device-width, initial-scale=1">
8+
<title>{{ page.title }}</title>
9+
<meta name="keywords" content="Rust, Rust programming language, langage de programmation Rust, rustlang, rust-lang, Mozilla Rust">
10+
<meta name="description" content="Un langage de programmation système incroyablement rapide, qui empèche les erreurs de segmentation, et garantie la sécurité des threads.">
11+
12+
<link rel="stylesheet" href="/css/bootstrap.css">
13+
<link rel="stylesheet" href="/css/style.css">
14+
</head>
15+
16+
<body class="container">
17+
<a href="https://github.com/rust-lang/rust">
18+
<img class="ribbon" style="display: none" src="/logos/forkme.png" alt="Fork me on GitHub" width="298" height="298">
19+
</a>
20+
21+
<header>
22+
<ul class="row menu">
23+
<li class="col-xs-12 col-md-2">
24+
<a href="/index.html">
25+
<img class="img-responsive" src="/logos/rust-logo-blk.svg" onerror="this.src='/logos/rust-logo-256x256-blk.png'" height="128" width="128" alt="Rust logo" />
26+
</a>
27+
</li>
28+
<li class="col-xs-12 col-md-10 menu">
29+
<h2><a href="/documentation.html">Documentation</a></h2>
30+
<h2><a href="/community.html">Communauté</a></h2>
31+
<h2><a href="/downloads.html">Téléchargements</a></h2>
32+
<h2><a href="/contribute.html">Contribuer</a></h2>
33+
</li>
34+
</ul>
35+
</header>
36+
37+
{{ content }}
38+
39+
<script>
40+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
41+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
42+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
43+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
44+
45+
ga('create', 'UA-58390457-1', 'auto');
46+
ga('send', 'pageview');
47+
48+
</script>
49+
</body>
50+
</html>

_layouts/fr-FR/default.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
layout: fr-FR/basic
3+
---
4+
5+
<div class="content">
6+
{{ content }}
7+
</div>

_layouts/redirect.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
"pt-BR": "pt-BR",
1414
"ru": "ru-RU",
1515
"ru-RU": "ru-RU",
16+
"fr": "fr-FR",
17+
"fr-FR": "fr-FR",
1618
};
1719

1820
// look up the provided language in the map

0 commit comments

Comments
 (0)