From 9d590e098b24ed94475c56b0b57047a546b278bc Mon Sep 17 00:00:00 2001 From: Saivann Date: Mon, 1 Apr 2013 16:34:55 -0400 Subject: [PATCH] mobile responsive design and many design fixes adapt CSS to be either responsive, or specific to mobiles add mobile menu icon to show the hidden menu on touch add optimized language bar menu for mobiles remove 1200px width workaround for the wallet page, description now fit on 1 remove links on wallet icons for :hover compatibility with mobile devices move right buttons into the page (fixes #67) fix contributors plugin to produce W3C valid HTML drop useless classes like .list clean and organize CSS add icon for ios touch devices (fixes #111) --- _layouts/base-en.html | 46 +-- _layouts/base-fr.html | 46 +-- _less/main.less | 490 +++++++++++++++++----------- en/about.html | 6 +- en/choose-your-wallet.html | 28 +- en/development.html | 35 +- en/index.html | 8 +- fr/a-propos.html | 6 +- fr/choisir-votre-porte-monnaie.html | 28 +- fr/developpement.html | 35 +- fr/index.html | 8 +- img/logo_ios.png | Bin 0 -> 3132 bytes img/menumobile.png | Bin 0 -> 489 bytes img/menumobile.svg | 77 +++++ js/main.js | 13 +- 15 files changed, 500 insertions(+), 326 deletions(-) create mode 100644 img/logo_ios.png create mode 100644 img/menumobile.png create mode 100644 img/menumobile.svg diff --git a/_layouts/base-en.html b/_layouts/base-en.html index e6a2a1b0..21cbebd6 100644 --- a/_layouts/base-en.html +++ b/_layouts/base-en.html @@ -30,10 +30,12 @@ menu: + {{ page.title }} {% lesscss bootstrap.less %} + {% if site.ALERT or site.ALERT_en %} @@ -43,8 +45,12 @@ menu:
{{ alert }}
{% endif %} -
-
-
+
{{ content }} -
- -
+ +
diff --git a/_layouts/base-fr.html b/_layouts/base-fr.html index 8250e7c1..b9b67b04 100644 --- a/_layouts/base-fr.html +++ b/_layouts/base-fr.html @@ -30,10 +30,12 @@ menu: + {{ page.title }} {% lesscss bootstrap.less %} + {% if site.ALERT or site.ALERT_fr %} @@ -43,8 +45,12 @@ menu:
{{ alert }}
{% endif %} -
-
-
+
{{ content }} -
- -
+ +
diff --git a/_less/main.less b/_less/main.less index 07ab5b96..633eeebb 100644 --- a/_less/main.less +++ b/_less/main.less @@ -1,21 +1,26 @@ +/*Styles for HTML tags*/ + body{ -background-color:#fafafa; -color:#646464; font-family:"Helvetica Neue", "Liberation Sans", Arial, sans-serif; margin:0; padding:0; +color:#646464; +background-color:#fafafa; background-repeat:repeat; background-image:url(/img/innerbg.png); } -h1,h2{ -font-family:'UbuntuBold', sans-serif; -font-weight:normal; +h1,h2,h3{ +text-align:left; } h1{ +font-family:'UbuntuBold', sans-serif; +font-weight:normal; color:#0d579b; font-size:160%; } h2{ +font-family:'UbuntuBold', sans-serif; +font-weight:normal; color:#383838; font-size:130%; } @@ -33,7 +38,7 @@ color:#4892b2; a:link:hover,a:visited:hover,a:active:hover{ color:#75bfdf; } -a img{ +a img,a:link img,a:visited img,a:active img{ border:0; } blockquote{ @@ -56,6 +61,81 @@ border-radius:3px; white-space:pre-wrap; word-wrap:break-word; } +ul{ +padding-left:20px; +} +li{ +padding:5px 0px; +text-align:left; +} + +/*Styles for whole website*/ + +@font-face{ +font-family:'UbuntuRegular'; +src:url('/font/ubuntu-r-webfont.eot'); +src:url('/font/ubuntu-r-webfont.eot?iefix') format('eot'), +url('/font/ubuntu-r-webfont.woff') format('woff'), +url('/font/ubuntu-r-webfont.ttf') format('truetype'), +url('/font/ubuntu-r-webfont.svg#webfontKT0zjHSC') format('svg'); +font-weight:normal; +font-style:normal; +} +@font-face{ +font-family:'UbuntuItalic'; +src:url('/font/ubuntu-ri-webfont.eot'); +src:url('/font/ubuntu-ri-webfont.eot?iefix') format('eot'), +url('/font/ubuntu-ri-webfont.woff') format('woff'), +url('/font/ubuntu-ri-webfont.ttf') format('truetype'), +url('/font/ubuntu-ri-webfont.svg#webfontGetaoUfe') format('svg'); +font-weight:normal; +font-style:normal; +} +@font-face{ +font-family:'UbuntuBold'; +src:url('/font/ubuntu-b-webfont.eot'); +src:url('/font/ubuntu-b-webfont.eot?iefix') format('eot'), +url('/font/ubuntu-b-webfont.woff') format('woff'), +url('/font/ubuntu-b-webfont.ttf') format('truetype'), +url('/font/ubuntu-b-webfont.svg#webfontEreyFiHC') format('svg'); +font-weight:normal; +font-style:normal; +} +@font-face{ +font-family:'UbuntuBoldItalic'; +src:url('/font/ubuntu-bi-webfont.eot'); +src:url('/font/ubuntu-bi-webfont.eot?iefix') format('eot'), +url('/font/ubuntu-bi-webfont.woff') format('woff'), +url('/font/ubuntu-bi-webfont.ttf') format('truetype'), +url('/font/ubuntu-bi-webfont.svg#webfontf1YowZka') format('svg'); +font-weight:normal; +font-style:normal; +} + +.alert-message{ +background-color:#fff; +} +.alert-message>div{ +background-color:#fff; +background-color:#c5251f; +} +.alert-message.error>div{ +background-color:#c5251f; +} +.alert-message.success>div{ +background-color:#489e48; +} +.alert-message.info>div{ +background-color:#517ea7; +} +.alert-message>div>div{ +margin:auto; +width:960px; +padding:10px; +} +.alert-message,.alert-message a,.alert-message a:link,.alert-message a:active,.alert-message a:visited{ +color:#fff; +} #head{ background-image:linear-gradient(bottom, rgba(255, 255, 255,0) 14%, #fff 70%); @@ -63,9 +143,23 @@ background-image:-o-linear-gradient(bottom, rgba(255, 255, 255,0) 14%, #fff 70%) background-image:-moz-linear-gradient(bottom, rgba(255, 255, 255,0) 14%, #fff 70%); background-image:-webkit-linear-gradient(bottom, rgba(255, 255, 255,0) 14%, #fff 70%); background-image:-ms-linear-gradient(bottom, rgba(255, 255, 255,0) 14%, #fff 70%); -height:90px; +} +#head>div{ +max-width:1040px; +margin:auto; +position:relative; +overflow:hidden; } +#body{ +max-width:1040px; +margin:auto; +position:relative; +} + +#langselect{ +display:none; +} #lang,#lang li,#lang ul{ display:block; list-style:none; @@ -77,6 +171,7 @@ cursor:pointer; #lang{ position:absolute; right:0px; +top:0px; height:30px; border-left:1px solid transparent; border-right:1px solid transparent; @@ -127,92 +222,30 @@ color:#000; } #logo{ -position:absolute; -left:0px; -top:10px; -} -#logo a{ display:block; -background-image:url(/img/logotop.svg); +position:absolute; +left:40px; +top:12px; width:191px; height:40px; } -#logo span{ + +#menumobile{ display:none; } -#rightbox{ -width:210px; -height:200px; -position:absolute; -right:0px; -top:16px; -border-radius:5px; --webkit-border-radius:5px; -padding:5px; -} -#choose>a:first-child,#before>a:first-child,#start>a:first-child,#support>a:first-child{ -padding:10px 8px 10px 48px; -color:#fff; -display:block; -text-align:left; -margin-bottom:10px; -text-decoration:none; -font-weight:bold; -border-radius:5px; --webkit-border-radius:5px; -} -#choose img,#before img,#start img,#support img{ -vertical-align:middle; -margin-right:8px; -margin-left:-40px; -} -#before>a:first-child,#start>a:first-child,#support>a:first-child{ -background-color:#2c6fad; -border:1px solid #20598f; -background-image:linear-gradient(bottom, #20598f 14%, #2c6fad 70%); -background-image:-o-linear-gradient(bottom, #20598f 14%, #2c6fad 70%); -background-image:-moz-linear-gradient(bottom, #20598f 14%, #2c6fad 70%); -background-image:-webkit-linear-gradient(bottom, #20598f 14%, #2c6fad 70%); -background-image:-ms-linear-gradient(bottom, #20598f 14%, #2c6fad 70%); -} -#before>a:first-child:hover,#start>a:first-child:hover,#support>a:first-child:hover{ -background-image:linear-gradient(bottom, #2c6fad 14%, #2c6fad 70%); -background-image:-o-linear-gradient(bottom, #2c6fad 14%, #2c6fad 70%); -background-image:-moz-linear-gradient(bottom, #2c6fad 14%, #2c6fad 70%); -background-image:-webkit-linear-gradient(bottom, #2c6fad 14%, #2c6fad 70%); -background-image:-ms-linear-gradient(bottom, #2c6fad 14%, #2c6fad 70%); -} -#choose>a:first-child{ -padding:12px 8px 12px 48px; -background-color:#e7750c; -border:1px solid #cc6100; -background-image:linear-gradient(bottom, #cc6100 14%, #e7750c 70%); -background-image:-o-linear-gradient(bottom, #cc6100 14%, #e7750c 70%); -background-image:-moz-linear-gradient(bottom, #cc6100 14%, #e7750c 70%); -background-image:-webkit-linear-gradient(bottom, #cc6100 14%, #e7750c 70%); -background-image:-ms-linear-gradient(bottom, #cc6100 14%, #e7750c 70%); -} -#choose>a:first-child:hover{ -background-image:linear-gradient(bottom, #e7750c 14%, #e7750c 70%); -background-image:-o-linear-gradient(bottom, #e7750c 14%, #e7750c 70%); -background-image:-moz-linear-gradient(bottom, #e7750c 14%, #e7750c 70%); -background-image:-webkit-linear-gradient(bottom, #e7750c 14%, #e7750c 70%); -background-image:-ms-linear-gradient(bottom, #e7750c 14%, #e7750c 70%); -} - #menufor{ -width:660px; +max-width:660px; position:relative; bottom:-18px; -margin:2px 0px 0px 210px; +margin:2px 0px 0px 250px; padding:0px; height:35px; -overflow:hidden; } #menufor li{ list-style:none; float:left; +padding:0px; margin:0px 10px; border-radius:5px; -webkit-left-radius:5px; @@ -245,36 +278,26 @@ border-radius:5px; color:#fff; } -.wrap{ -width:980px; -margin:auto; -position:relative; -} - #menu{ padding:0px; -margin:0px; -margin:auto; -position:relative; -left:-6px; -top:24px; +margin:24px auto 0px 32px; height:32px; } #menu li{ list-style:none; float:left; +padding:0px; border:1px solid transparent; border-radius:3px; -webkit-border-radius:3px; } #menu li a,#menu li a:active,#menu li a:visited,#menu li a:link{ font-family:'Ubuntu', sans-serif; -height:24px; font-size:16px; display:block; color:#3f3f3f; text-decoration:none; -padding:6px 10px; +padding:6px 10px 10px 10px; } #menu li:hover a,#menu li.active a{ color:#000; @@ -288,11 +311,10 @@ box-shadow:0px 0px 14px rgba(0,0,0,0.15); } #content{ -margin-top:5px; position:relative; -left:-40px; -padding:15px 210px 20px 40px; -width:740px; +top:-2px; +padding:15px 250px 20px 40px; +max-width:780px; text-align:justify; background-color:#fff; min-height:400px; @@ -304,6 +326,75 @@ box-shadow:0px 15px 70px rgba(0, 0, 0, 0.2); -webkit-box-shadow:0px 15px 70px rgba(0, 0, 0, 0.2); } +#rightbox{ +width:210px; +position:absolute; +right:16px; +top:14px; +border-radius:5px; +-webkit-border-radius:5px; +padding:5px; +} +#choose>a:first-child,#before>a:first-child,#support>a:first-child{ +padding:10px 8px 10px 48px; +color:#fff; +display:block; +text-align:left; +margin-bottom:10px; +text-decoration:none; +font-weight:bold; +border-radius:5px; +-webkit-border-radius:5px; +} +#choose img,#before img,#support img{ +vertical-align:middle; +margin-right:8px; +margin-left:-40px; +} +#before>a:first-child,#support>a:first-child{ +background-color:#2c6fad; +border:1px solid #20598f; +background-image:linear-gradient(bottom, #20598f 14%, #2c6fad 70%); +background-image:-o-linear-gradient(bottom, #20598f 14%, #2c6fad 70%); +background-image:-moz-linear-gradient(bottom, #20598f 14%, #2c6fad 70%); +background-image:-webkit-linear-gradient(bottom, #20598f 14%, #2c6fad 70%); +background-image:-ms-linear-gradient(bottom, #20598f 14%, #2c6fad 70%); +} +#choose>a:first-child{ +padding:12px 8px 12px 48px; +background-color:#e78406; +border:1px solid #d57700; +background-image:linear-gradient(bottom, #d57700 14%, #e78406 70%); +background-image:-o-linear-gradient(bottom, #d57700 14%, #e78406 70%); +background-image:-moz-linear-gradient(bottom, #d57700 14%, #e78406 70%); +background-image:-webkit-linear-gradient(bottom, #d57700 14%, #e78406 70%); +background-image:-ms-linear-gradient(bottom, #d57700 14%, #e78406 70%); +} +#choose>a:first-child:hover,#before>a:first-child:hover,#support>a:first-child:hover{ +background-image:none; +} + +#footer{ +position:relative; +top:-2px; +padding-left:40px; +padding-bottom:40px; +text-align:left; +font-size:14px; +background-color:#fff; +max-width:1040px; +border-right:2px solid #ebebeb; +border-left:2px solid #ebebeb; +border-bottom:2px solid #ebebeb; +} +#footer>div{ +float:left; +padding-top:6px; +border-top:#cfcfcf 2px solid; +} + +/*Styles specific to elements in pages*/ + .index,.index ul,.index li{ list-style:none; padding:0px; @@ -326,19 +417,23 @@ text-decoration:none; } .box{ -width:600px; border:2px dashed #4892b2; padding:0px 20px 0px 20px; +margin-right:80px; } .contributors{ width:900px; +text-align:left; } -.contributors a{ +.contributors>span>a{ font-size:13px; } -.contributors td{ +.contributors>span{ padding:6px 0px; +width:170px; +overflow:hidden; +display:inline-block; } .ressources li{ @@ -355,12 +450,14 @@ font-weight:bold; font-weight:normal; } -.list>li{ -padding:5px 0px 5px 0px; -} - .preview{ -width:900px; +width:880px; +padding-left:40px; +padding-top:15px; +border:2px solid #eee; +margin-top:30px; +border-radius:8px; +-webkit-border-radius:8px; } .previewcol{ clear:both; @@ -370,9 +467,9 @@ padding-left:0px; } .previewrow{ float:left; -width:270px; +width:260px; text-align:justify; -padding-left:40px; +padding-left:30px; position:relative; } .previewrow>h2{ @@ -422,8 +519,8 @@ height:280px; display:inline-block; zoom:1;*display:inline;/*IE7 support*/ position:relative; -margin-right:22px; -margin-bottom:22px; +margin-right:12px; +margin-bottom:12px; vertical-align:top; } .previewrow>div.last{ @@ -462,38 +559,14 @@ background:url(/img/bubblewarn.svg) bottom center no-repeat; background:url(/img/bubble.svg) bottom center no-repeat; } - -.alert-message{ -background-color:#fff; -} -.alert-message>div{ -background-color:#fff; -background-color:#c5251f; -} -.alert-message.error>div{ -background-color:#c5251f; -} -.alert-message.success>div{ -background-color:#489e48; -} -.alert-message.info>div{ -background-color:#517ea7; -} -.alert-message>div>div{ -margin:auto; -width:960px; -padding:10px; -} -.alert-message,.alert-message a,.alert-message a:link,.alert-message a:active,.alert-message a:visited{ -color:#fff; -} - .versiontext{ text-align:left; } .download a{ font-size:20px; +display:inline-block; +margin:5px 0px; } .summary{ @@ -501,7 +574,7 @@ font-size:20px; } .foundation{ -width:500px; +max-width:500px; margin:40px auto; border:2px dashed #dfdfdf; padding:40px; @@ -509,64 +582,103 @@ border-radius:9px; -webkit-border-radius:9px; } -#footer{ -position:relative; -left:-40px; -padding-left:40px; -padding-bottom:40px; -text-align:left; -margin-right:30px; -font-size:14px; -background-color:#fff; -width:950px; -border-right:2px solid #ebebeb; -border-left:2px solid #ebebeb; -border-bottom:2px solid #ebebeb; -} -#footer>div{ -float:left; -margin-right:200px; -padding-top:6px; -border-top:#cfcfcf 2px solid; -} +/*Styles specific to mobiles*/ -@font-face{ -font-family:'UbuntuRegular'; -src:url('/font/ubuntu-r-webfont.eot'); -src:url('/font/ubuntu-r-webfont.eot?iefix') format('eot'), -url('/font/ubuntu-r-webfont.woff') format('woff'), -url('/font/ubuntu-r-webfont.ttf') format('truetype'), -url('/font/ubuntu-r-webfont.svg#webfontKT0zjHSC') format('svg'); -font-weight:normal; -font-style:normal; +@media handheld, only screen and (max-device-width:700px) { +img{ +max-width:100%; } -@font-face{ -font-family:'UbuntuItalic'; -src:url('/font/ubuntu-ri-webfont.eot'); -src:url('/font/ubuntu-ri-webfont.eot?iefix') format('eot'), -url('/font/ubuntu-ri-webfont.woff') format('woff'), -url('/font/ubuntu-ri-webfont.ttf') format('truetype'), -url('/font/ubuntu-ri-webfont.svg#webfontGetaoUfe') format('svg'); -font-weight:normal; -font-style:normal; +#langselect{ +background-color:transparent; +border:0px; +font-size:18px; +position:absolute; +right:-20px; +top:10px; } -@font-face{ -font-family:'UbuntuBold'; -src:url('/font/ubuntu-b-webfont.eot'); -src:url('/font/ubuntu-b-webfont.eot?iefix') format('eot'), -url('/font/ubuntu-b-webfont.woff') format('woff'), -url('/font/ubuntu-b-webfont.ttf') format('truetype'), -url('/font/ubuntu-b-webfont.svg#webfontEreyFiHC') format('svg'); -font-weight:normal; -font-style:normal; +#menumobile{ +display:inline-block; +float:right; +height:40px; +width:40px; +padding:12px; +background-image:url(/img/menumobile.svg); +background-repeat:no-repeat; +background-position:center center; +} +#lang,#menufor,#menu{ +display:none; +} +#menufor{ +position:static; +bottom:0x; +margin:0px 0px 10px 10px; +height:auto; +} +#menufor li{ +float:none; +display:inline-block; +} +#menufor li a,#menufor li a:active,#menufor li a:visited,#menufor li a:link{ +padding:6px 0px 0px 0px; +} +#menufor>li:hover>a,#menufor>li.active>a{ +padding:6px 6px 0px 6px; +} +#menufor li{ +margin:6px 6px; +} +#menufor>li:hover,#menufor>li.active{ +margin:6px 0px; +} +#menu{ +position:relative; +left:10px; +top:0px; +height:auto; +margin:0px 0px 5px 0px; +} +#menu li{ +float:none; +display:inline-block; +} +#menu li a,#menu li a:active,#menu li a:visited,#menu li a:link{ +padding:5px; +} +#logo{ +position:static; +display:inline-block; +margin:10px; +} +#rightbox{ +position:static; +margin:30px auto 20px auto; +} +#content{ +position:static; +padding:15px 10px 20px 10px; +} +#footer{ +padding-left:0px; +background-color:transparent; +} +.contributors{ +width:auto; +} +.box{ +margin-right:0px; +} +.foundation{ +padding:20px; +} +.preview{ +width:auto; +border:0px; +padding:0px; +} +.previewrow{ +float:none; +padding-left:0px; +margin:auto; } -@font-face{ -font-family:'UbuntuBoldItalic'; -src:url('/font/ubuntu-bi-webfont.eot'); -src:url('/font/ubuntu-bi-webfont.eot?iefix') format('eot'), -url('/font/ubuntu-bi-webfont.woff') format('woff'), -url('/font/ubuntu-bi-webfont.ttf') format('truetype'), -url('/font/ubuntu-bi-webfont.svg#webfontf1YowZka') format('svg'); -font-weight:normal; -font-style:normal; } diff --git a/en/about.html b/en/about.html index b1611ffd..e08f1a12 100644 --- a/en/about.html +++ b/en/about.html @@ -13,7 +13,7 @@ title: About - Bitcoin

Technical features

These are the basic features of any Bitcoin-like network.

-
- bitcoin walletBitcoin
Wallet
+ bitcoin walletBitcoin
Wallet
@@ -81,7 +79,7 @@ title: Choose your wallet - Bitcoin

Web wallets host your bitcoins. That means it is possible for them to lose your bitcoins following any incident on their side. As of today, no web wallet service provide enough insurance to be used to store value like a bank.

OK, I understand

- hidden + hidden
@@ -90,7 +88,7 @@ title: Choose your wallet - Bitcoin

Web wallets host your bitcoins. That means it is possible for them to lose your bitcoins following any incident on their side. As of today, no web wallet service provide enough insurance to be used to store value like a bank.

OK, I understand

- hidden + hidden
@@ -104,7 +102,7 @@ title: Choose your wallet - Bitcoin

Web wallets host your bitcoins. That means it is possible for them to lose your bitcoins following any incident on their side. As of today, no web wallet service provide enough insurance to be used to store value like a bank.

OK, I understand

- hidden + hidden
@@ -113,7 +111,7 @@ title: Choose your wallet - Bitcoin

Web wallets host your bitcoins. That means it is possible for them to lose your bitcoins following any incident on their side. As of today, no web wallet service provide enough insurance to be used to store value like a bank.

OK, I understand

- hidden + hidden
@@ -122,7 +120,7 @@ title: Choose your wallet - Bitcoin

Web wallets host your bitcoins. That means it is possible for them to lose your bitcoins following any incident on their side. As of today, no web wallet service provide enough insurance to be used to store value like a bank.

OK, I understand

- hidden + hidden
@@ -131,7 +129,7 @@ title: Choose your wallet - Bitcoin

Web wallets host your bitcoins. That means it is possible for them to lose your bitcoins following any incident on their side. As of today, no web wallet service provide enough insurance to be used to store value like a bank.

OK, I understand

- hidden + hidden
diff --git a/en/development.html b/en/development.html index 08fbb10b..5a78eb35 100644 --- a/en/development.html +++ b/en/development.html @@ -7,14 +7,14 @@ title: Development - Bitcoin

Specification

If you are interested in learning more about the technical details of Bitcoin it is recommended you start with these documents.

-