Skip to content

Commit

Permalink
new bitcoin.org
Browse files Browse the repository at this point in the history
implement multilanguage
new improved clients list page
update history and statistics in the "about" page
add "Some things you need to know" page
add "Support Bitcoin" page
add a contextual presentation for each category of users (individuals, organizations, developers and enthusiasts)
add a short and concise "how it works" page
add a "vocabulary" page for Bitcoin technical words definitions
give more visibility for the foundation
new website design and layout
  • Loading branch information
saivann committed Mar 18, 2013
1 parent 6d00273 commit 2718222
Show file tree
Hide file tree
Showing 191 changed files with 9,435 additions and 2,716 deletions.
22 changes: 17 additions & 5 deletions README.md
Expand Up @@ -2,30 +2,42 @@

Installing dependencies

sudo apt-get install rubygems
sudo apt-get install rubygems ruby1.9.1-dev build-essential
sudo gem install jekyll aquarium json less therubyracer

# Usage

* update DOWNLOAD\_VERSION in index.html
* update DOWNLOAD\_VERSION in _config.yml
* run ./_contrib/updatesitemap if you changed a page
* run jekyll
* output will be in \_site/

# Translation

* Find the two letter ISO 639-1 code for your language (fr, en, jp)
* Run ./_contrib/translate (language code) (language name)
* Make sure that languages are listed in alphabetical order in _config.yml
* Rename html files in (lang)/ according to your language. And update links in _layouts/base-(lang).html and (lang)/*.html to reflect your changes.
* Translate all .html and images files in (lang)/ and _layouts/base-(lang).html
* A tips for translators, you can preview your work in a simple Google chrome browser with no HTTP server. Just go to the existing english page, open the javascript console with CTRL + SHIFT + J and use the following command to make the page editable : document.body.contentEditable=true

## Advanced Usage

### Alerts

You can easily put alerts on the homepage by changing the ALERT and ALERT\_CLASS variables in index.html.
You can easily put a global alert on the website by changing the ALERT and ALERT\_CLASS variables in _config.yml.
And you can also set an alert specific to a language by appending the language code to the ALERT.

Example:

```
ALERT_CLASS: error
ALERT: <strong>Security alert:</strong> Please upgrade to 0.3.25 as soon as possible!
ALERT_fr: <strong>Alerte de sécurité:</strong> Mettez Bitcoin à jour vers la version 0.3.25 sans délais!
```


will produce a red alert box. Possible classes are: error (red), info (blue), success (green) and warning (yellow)
will produce an english red alert box for all languages, and a translated red alert box for french language.
Possible classes are: error (red), info (blue), success (green) and warning (yellow)

### Release Notes

Expand Down
26 changes: 11 additions & 15 deletions _config.yml
@@ -1,3 +1,13 @@
DOWNLOAD_VERSION: 0.8.1
ALERT_CLASS:
ALERT:

langs:
- langcode: fr
langtext: Français
- langcode: en
langtext: English

safe: false
auto: false
server: false
Expand Down Expand Up @@ -38,21 +48,7 @@ kramdown:
coderay_tab_width: 4
coderay_bold_every: 10
coderay_css: style

navigation:
- text: Home
url: /
section: index
- text: News
url: /news.html
section: news
- text: About
url: /about.html
section: about
- text: Clients
url: /clients.html
section: clients


aliases:
s_nakamoto: Satoshi Nakamoto
--author=Satoshi Nakamoto: Satoshi Nakamoto
Expand Down
23 changes: 23 additions & 0 deletions _contrib/translate
@@ -0,0 +1,23 @@
#!/bin/bash

if [[ -z ${1} || -z ${2} ]]; then
echo 'You must provide language code and language name. Ex : ./_contrib/translate fr "Français"'
exit
fi

cp -R en ${1}
cp _layouts/base-en.html _layouts/base-${1}.html
sed -i "s_layout: base-en_layout: base-${1}_g" ${1}/*.html
sed -i "s_href=\"/en/_href=\"/${1}/_g" ${1}/*.html
sed -i "s_src=\"/en/_src=\"/${1}/_g" ${1}/*.html
sed -i "s_href=\"/en/_href=\"/${1}/_g" _layouts/base-${1}.html
sed -i "s_src=\"/en/_src=\"/${1}/_g" _layouts/base-${1}.html
sed -i "s_langcode: en_langcode: ${1}_g" _layouts/base-${1}.html
sed -i "s_langtext: English_langtext: ${2}_g" _layouts/base-${1}.html
sed -i "s/ALERT_CLASS_en/ALERT_CLASS_${1}/g" _layouts/base-${1}.html
sed -i "s/ALERT_en/ALERT_${1}/g" _layouts/base-${1}.html
sed -i "/langcode: ${1}/d" _config.yml
sed -i "/langtext: ${2}/d" _config.yml
sed -i "/langs:/a - langtext: ${2}" _config.yml
sed -i "/langs:/a - langcode: ${1}" _config.yml
sed -i "s_- langtext: ${2}_ langtext: ${2}_g" _config.yml
Empty file modified _contrib/update_website.sh 100644 → 100755
Empty file.
26 changes: 26 additions & 0 deletions _contrib/updatesitemap
@@ -0,0 +1,26 @@
#!/bin/bash
#Should be called each time a page is updated, added or removed to update sitemaps
echo '<?xml version="1.0" encoding="UTF-8"?>' > sitemap.xml
echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' >> sitemap.xml
for l in *; do
if [[ ! -d $l || $l == "_site" || $l == "_layouts" ]]; then
continue
fi
files=`find ${l} -name "*.html" -type f`
for f in $files; do
c=(${f//"."/ })
c=${c[@]:0:1}
if [[ $c == "${l}/index" ]]; then
c=(${c//"/"/ })
c="${c[@]:0:1}/"
fi
t=$(stat -c "%y" ${f})
t=(${t//" "/ })
t=${t[@]:0:1}
echo "<url>" >> sitemap.xml
echo " <loc>http://bitcoin.org/${c}</loc>" >> sitemap.xml
echo " <lastmod>${t}</lastmod>" >> sitemap.xml
echo "</url>" >> sitemap.xml
done
done
echo '</urlset>' >> sitemap.xml
17 changes: 0 additions & 17 deletions _includes/nav.html

This file was deleted.

95 changes: 95 additions & 0 deletions _layouts/base-en.html
@@ -0,0 +1,95 @@
---
langcode: en
langtext: English
menufor:
- text: Individuals
url: /en/bitcoin-for-individuals
- text: Organizations
url: /en/bitcoin-for-organizations
- text: Developers
url: /en/bitcoin-for-developers
- text: Enthusiasts
url: /en/bitcoin-for-enthusiasts
menu:
- text: How it works
url: /en/how-it-works
- text: Vocabulary
url: /en/vocabulary
- text: Resources
url: /en/resources
- text: Community
url: /en/community
- text: Development
url: /en/development
- text: Foundation
url: /en/foundation
- text: About
url: /en/about
---
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="{{ page.langcode }}">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>{{ page.title }}</title>
{% lesscss bootstrap.less %}
<script type="text/javascript" src="/js/main.js"></script>
<link rel="shortcut icon" href="/favicon.png">
{% for lang in site.langs %}{% if lang.langcode != page.langcode %}
<link rel="alternate" hreflang="{{ lang.langcode }}" href="/{{ lang.langcode }}" />
{% endif %}{% endfor %}
</head>
<body>
{% if site.ALERT or site.ALERT_en %}
{% if site.ALERT_CLASS %}{% assign class = site.ALERT_CLASS%}{% endif %}{% if site.ALERT_CLASS_en %}{% assign class = site.ALERT_CLASS_en%}{% endif %}
{% if site.ALERT %}{% assign alert = site.ALERT%}{% endif %}{% if site.ALERT_en %}{% assign alert = site.ALERT_en%}{% endif %}
<div class="alert-message {{ class }}">
<div><div>{{ alert }}</div></div>
</div>
{% endif %}
<div id="head">
<div class="wrap">
<ul id="lang">
<li><a href="javascript:void();">{{ page.langtext }}</a>
<ul>
{% for lang in site.langs %}{% if lang.langcode != page.langcode %}
<li><a href="/{{ lang.langcode }}/">{{ lang.langtext }}</a></li>
{% endif %}{% endfor %}
</ul>
</li>
</ul>
<div id="logo"><a href="/{{ page.langcode }}/"><span>Bitcoin</span></a></div>
<ul id="menufor">
{% for link in page.menufor %}{% assign active = nil %}{% capture fullurl %}{{ link.url | append:'.html' }}{% endcapture %}{% if page.url == fullurl %}{% assign active = 'active' %}{% endif %}
<li{% if active %} class="{{ active }}"{% endif %}><a href="{{ link.url }}">{{ link.text }}</a></li>
{% endfor %}
</ul>
</div>
<ul id="menu" class="wrap">
{% for link in page.menu %}{% assign active = nil %}{% capture fullurl %}{{ link.url | append:'.html' }}{% endcapture %}{% if page.url == fullurl %}{% assign active = 'active' %}{% endif %}
<li{% if active %} class="{{ active }}"{% endif %}><a href="{{ link.url }}">{{ link.text }}</a></li>
{% endfor %}
</ul>
</div>
<div id="body">
<div class="wrap">
<div id="content">
{{ content }}
</div>
<div id="rightbox">
<div id="choose">
<a href="/en/choose-your-wallet"><img src="/img/but_start.svg" alt="Choose your wallet">Choose your wallet</a>
</div>
<div id="before">
<a href="/en/you-need-to-know"><img src="/img/but_warn.svg" alt="You need to know">You need to know</a>
</div>
<div id="support">
<a href="/en/support-bitcoin"><img src="/img/but_involve.svg" alt="Support Bitcoin">Support Bitcoin</a>
</div>
</div>
<div id="footer"><div>© <a href="https://bitcoinfoundation.org/" target="_blank">The Bitcoin Foundation</a> 2009–2013 Released under the <a href="http://creativecommons.org/licenses/MIT/" target="_blank">MIT license</a></div></div>
</div>
</div>
<script type="text/javascript">svgfallback();</script>
</body>

</html>
97 changes: 97 additions & 0 deletions _layouts/base-fr.html
@@ -0,0 +1,97 @@
---
ALERT_CLASS:
ALERT:
langcode: fr
langtext: Français
menufor:
- text: Particuliers
url: /fr/bitcoin-pour-particuliers
- text: Organisations
url: /fr/bitcoin-pour-organisations
- text: Développeurs
url: /fr/bitcoin-pour-developpeurs
- text: Passionnés
url: /fr/bitcoin-pour-passionnes
menu:
- text: Comment ça marche
url: /fr/comment-ca-marche
- text: Vocabulaire
url: /fr/vocabulaire
- text: Ressources
url: /fr/ressources
- text: Communauté
url: /fr/communaute
- text: Développement
url: /fr/developpement
- text: Fondation
url: /fr/fondation
- text: À propos
url: /fr/a-propos
---
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="{{ page.langcode }}">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>{{ page.title }}</title>
{% lesscss bootstrap.less %}
<script type="text/javascript" src="/js/main.js"></script>
<link rel="shortcut icon" href="/favicon.png">
{% for lang in site.langs %}{% if lang.langcode != page.langcode %}
<link rel="alternate" hreflang="{{ lang.langcode }}" href="/{{ lang.langcode }}" />
{% endif %}{% endfor %}
</head>
<body>
{% if site.ALERT or site.ALERT_fr %}
{% if site.ALERT_CLASS %}{% assign class = site.ALERT_CLASS%}{% endif %}{% if site.ALERT_CLASS_fr %}{% assign class = site.ALERT_CLASS_fr%}{% endif %}
{% if site.ALERT %}{% assign alert = site.ALERT%}{% endif %}{% if site.ALERT_fr %}{% assign alert = site.ALERT_fr%}{% endif %}
<div class="alert-message {{ class }}">
<div><div>{{ alert }}</div></div>
</div>
{% endif %}
<div id="head">
<div class="wrap">
<ul id="lang">
<li><a href="javascript:void();">{{ page.langtext }}</a>
<ul>
{% for lang in site.langs %}{% if lang.langcode != page.langcode %}
<li><a href="/{{ lang.langcode }}/">{{ lang.langtext }}</a></li>
{% endif %}{% endfor %}
</ul>
</li>
</ul>
<div id="logo"><a href="/{{ page.langcode }}/"><span>Bitcoin</span></a></div>
<ul id="menufor">
{% for link in page.menufor %}{% assign active = nil %}{% capture fullurl %}{{ link.url | append:'.html' }}{% endcapture %}{% if page.url == fullurl %}{% assign active = 'active' %}{% endif %}
<li{% if active %} class="{{ active }}"{% endif %}><a href="{{ link.url }}">{{ link.text }}</a></li>
{% endfor %}
</ul>
</div>
<ul id="menu" class="wrap">
{% for link in page.menu %}{% assign active = nil %}{% capture fullurl %}{{ link.url | append:'.html' }}{% endcapture %}{% if page.url == fullurl %}{% assign active = 'active' %}{% endif %}
<li{% if active %} class="{{ active }}"{% endif %}><a href="{{ link.url }}">{{ link.text }}</a></li>
{% endfor %}
</ul>
</div>
<div id="body">
<div class="wrap">
<div id="content">
{{ content }}
</div>
<div id="rightbox">
<div id="choose">
<a href="/fr/choisir-votre-porte-monnaie"><img src="/img/but_start.svg" alt="Choisissez votre porte-monnaie">Choisissez votre porte-monnaie</a>
</div>
<div id="before">
<a href="/fr/vous-devez-savoir"><img src="/img/but_warn.svg" alt="Vous devez savoir">Vous devez savoir</a>
</div>
<div id="support">
<a href="/fr/supporter-bitcoin"><img src="/img/but_involve.svg" alt="Support Bitcoin">Supporter Bitcoin !</a>
</div>
</div>
<div id="footer"><div>© <a href="https://bitcoinfoundation.org/" target="_blank">The Bitcoin Foundation</a> 2009–2013 Released under the <a href="http://creativecommons.org/licenses/MIT/" target="_blank">MIT license</a></div></div>
</div>
</div>
<script type="text/javascript">svgfallback();</script>
</body>

</html>
49 changes: 0 additions & 49 deletions _layouts/base.html

This file was deleted.

1 comment on commit 2718222

@SatoshiNakamoto-MAM
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes will come

Bitcoin and cryptocurency #1 rank market both are owned by miguel angel mejia
Aka satoshi nakamoto ""

Please sign in to comment.