Skip to content

Commit

Permalink
Update to latest version (#1)
Browse files Browse the repository at this point in the history
* Persian quotation instead of ugly double quotation

* Persian quotation instead of ugly double quotation

* Added German translation file

* german translation for the home page

* fixed copy paste error

* fixed lines

Fixed missing lines according to the english original to maintain
documents readability

* 初步校验,未完成,回去继续

* started translation for position

* translated float and position

Translated Chapters  "position" and "float" to german

* ok, that's all!

* add new stuff

* 修改一些语句

* add sunnylost into index.translator

* translated float layout example

* translated chapter percent width to german

Signed-off-by: g12n <[email protected]>

* Localize table of contents label on toc.html template

* initial ads implementation

* branding ads with learn layout and bocoup

* ads and styling to accomodate

* a bunch of stuff

* closes incompl#41

* Portuguese translation (pt_PT)

* Updated "Sie" to "Du"

for the beginning part (rest was directly translated into informa "Du")

* Brazilian Portuguese translation completed (pt_BR)

* closes incompl#62

* started adding german and french

* dont show german link just yet, its not done

* make sure فارسی is correct in every translation

* Implementation of a Dutch translated version of this site

* Removed unneeded comments

* dutch and g+ button closes incompl#68

* closes incompl#63

* closes incompl#50

* closes incompl#30

* adds info about what inline-block is. closes incompl#21

* closes incompl#19

* page progression markers closes incompl#14

* translation latest

* track subdomains too you dummy

* revision of translation pt-br

* Fixed a few typos, replaced … with real ellipsis

* German translation of media queries chapter

* German translation of inline-block chapter

* German translation of inline-block layout chapter

* updated jekyll-localize, moving language names to new defaults.yaml file

* translation finished!

It surely would profit from some proofreading but at least it's all
translated now. I don't know the real name of mi1980ge who did a lot of
work.

* add german to language picker

* improved display of language links

* korean!

* lets make the default english

* Update ko.yaml

the title, 'CSS를 배웁시다' should be 'CSS 레이아웃을 배웁시다'.

* I think '한국어' is more common

* dont need br in language list anymore

* remove whitespace from between inline-block elements

* French typo pointed out on Twitter https://twitter.com/laurentolivares/status/405289740582129664

* Fixing pt-BR translation

There were many errors in the pt-BR translation, so I fixed the translation for:
- semantics
- grammar
- missing sentences
- broken code (html inside the strings)
- etc

* update build process for latest jekyll

* Readme update

Setting npm install to install package dependencies
Setting new grunt serve and default commands

* Changed a few words in Persian,
Fixed a few writing styles.

* better handling of code in rtl languages

* Update README.textile

* Update README.textile

* pt-BR review

* Line 72 - Replacing "vão" with "espaço"
* Line 74 - Adding character "<" missing
* Line 125 - General review
* Line 127 - Replacing "veja mais na" with "consulte a"
* Line 139 - Replacing "o inline-block ativa algo chamado" with "o inline-block ativando algo chamado"
* Line 143 - Added ";"
* Line 144 - Added ";"
* Line 145 - Replacing "haja" with "exista"
* Line 153 - Adding character "<" missing
* Line 154 - Replacing "desatualizaos" with "desatualizados"
* Line 155 - General review
* Line 167 - Replacing "Assim como layout em CSS é complicado" with "Criar layouts com CSS pode ser um pouco complicado, entretanto,"
* Line 167 - Replacing "Não há substituto para entender como o CSS funciona." with "Mas eles não substituem o conhecimento sobre o funcionamento do CSS."

* italian translation 2/19

* italian translation 3-4/19

* italian translation 5/19

* italian translation 6/19

* italian translation 7/19

* italian translation 8/19

* italian translation 9/19

* italian translation: cleaning labels for page 9

* italian translation 10/19

* add semantic ui framework with image

* italian translation 11/19

* italian translation 12/19

* italian translation 13/19

* italian translation 14/19

* italian translation 15/19

* italian translation 16/19

* italian translation 17/19

* italian translation 18/19

* italian translation 19/19 and about page

* typos, minor style changes to make it more fluid

* reverted default lang to english

* start creating armenian translation based on incompl#99

* added italian translators credits

* Fixing a bunch of typos and slightly off wording in german translation

* move italian next to other european languages in translation list

* Fix a few more typos in german translation

* Add Traditional Chinese translation.

* Fixed a translation error in Trad. Chinese

Fixed for position.absolute.1

* Fine tune for Trad. Chinese translation

* fix typo

* Update pt-br.yaml

utilziar -> utilizar

* Update pt-br.yaml

O elemento vai ocupar a largura especificada, então o espaço restante será dividido igualmente entre as duas margens.

* Update pt-br.yaml

navegadore->navegador

* Update pt-br.yaml

faze-lo -> fazê-lo

* Update README.textile

* Update README.textile

* Fix some typos in pt-br translation.

* Add a japanese version as draft.

* Fix a position part

* Fix a percent width part

* Fix flexbox and column parts.

* Add a newline character

* rearrange languages a bit, loosely sorted by character set

* ru.yaml

Learn CSS Layout |RU| by daGo

* finish russian translation

* russian translation credit and tweaks

* Really LATEST update for ru.yaml

Upgrade please

* Ads: Switch to Bocoup's Revive ad server tag

* fix alignment for new ad provider

* Some upgrades for yaml.ru

Fix some little things |16 september 2014|

* start on deploy task

* change russian site title

* grammar fix in russian title

* update vertical centering flexbox example to work in IE11

* deploy all languages at once

* added purecss.io to frameworks

* Update Bocoup ad zone id

* add ftp-deploy to dependencies

* add grunt-ftp-deploy to dependencies

* Translated word 'Errors'

* fixes incompl#122

* Being kinder to math

* Being kinder to math

* Update to work with latest jekyll + pygments

* fix textile sub-bullets

* Fixed typo

* Fix spanish traslations

* // fix a chinese translation problem

* fix typo

fix typo

* Fix italian typo

* Fix typo 

Fixes Issue incompl#125

* Local changes

Worded a sentence better. Also added some padding to the #share section.

* modified some CHS translation

* Fixed some typos in Spanish translation

* arabic

* work on ar

* ar3

* ar-translator

* remove dead frameworks

* Update README.textile

* Update README.textile

* Remove "screen and" from media query examples

Per email discussion, sending as a pull request.

Co-authored-by: Mostafa Shahverdy <[email protected]>
Co-authored-by: g12n <[email protected]>
Co-authored-by: sunzhidong <[email protected]>
Co-authored-by: mzhou <[email protected]>
Co-authored-by: Gustavo Cunha <[email protected]>
Co-authored-by: Greg <[email protected]>
Co-authored-by: Boaz Sender <[email protected]>
Co-authored-by: Tiago Fernandes <[email protected]>
Co-authored-by: Christian Zumbrunnen <[email protected]>
Co-authored-by: Beto Muniz <[email protected]>
Co-authored-by: mstalfoort <[email protected]>
Co-authored-by: Kristina Schneider <kristinaschneider@mba.(none)>
Co-authored-by: leedaeyeop <[email protected]>
Co-authored-by: Ephemera <[email protected]>
Co-authored-by: Leonardo Balter <[email protected]>
Co-authored-by: Greg Smith <[email protected]>
Co-authored-by: eliezerb <[email protected]>
Co-authored-by: NKjoep <[email protected]>
Co-authored-by: Francesco Serra <[email protected]>
Co-authored-by: William Ghelfi <[email protected]>
Co-authored-by: Kristina Schneider <[email protected]>
Co-authored-by: Will <[email protected]>
Co-authored-by: Johnathan Douglas de Souza Santos <[email protected]>
Co-authored-by: Marcel dos Santos <[email protected]>
Co-authored-by: Maru <[email protected]>
Co-authored-by: dagolinuxoid <[email protected]>
Co-authored-by: adam j. sontag <[email protected]>
Co-authored-by: Gregor G <[email protected]>
Co-authored-by: Rodrigo Prado <[email protected]>
Co-authored-by: Ryo Narita <[email protected]>
Co-authored-by: Greg <[email protected]>
Co-authored-by: Luis Carlos Martinez <[email protected]>
Co-authored-by: benniks <[email protected]>
Co-authored-by: isdh <[email protected]>
Co-authored-by: Santhosh Kumar Srinivasan <[email protected]>
Co-authored-by: Hamza Suwae <[email protected]>
Co-authored-by: edwardwang0302 <[email protected]>
Co-authored-by: Pablo Castellano <[email protected]>
Co-authored-by: Jonathan Berger <[email protected]>
  • Loading branch information
1 parent 5103186 commit 4977420
Show file tree
Hide file tree
Showing 54 changed files with 2,184 additions and 439 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.DS_Store
dev
prod
node_modules
_site
node_modules
.ftppass
101 changes: 64 additions & 37 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,44 +1,71 @@
// Sample grunt-jekyll grunt.js file
// https://github.com/dannygarcia/grunt-jekyll
/* jshint node:true, camelcase:false */

var fs = require('fs');

/*global module:false*/
module.exports = function(grunt) {

// Project configuration.
grunt.initConfig({

jekyll: {
server : {
src : 'templates',
dest: 'dev',
server : true,
server_port : 8000,
auto : true,
pygments: true
},
dev: {
src: 'templates',
dest: 'dev',
pygments: true
},
prod: {
src: 'templates',
dest: 'prod',
pygments: true
}
},
// params
var lang = grunt.option('lang') || 'en';
var ftpDir = 'learnlayout';
if (lang !== 'en') {
ftpDir += '_' + lang;
}

// test for valid language
try {
fs.statSync('translations/' + lang + '.yaml');
}
catch (e) {
grunt.fail.fatal('Invalid language "' + lang + '"');
}
grunt.log.write('Language: ' + lang);

// config
grunt.initConfig({

watch: { // for development run 'grunt watch'
jekyll: {
files: ['templates/*.html'],
tasks: ['jekyll:dev']
}
jekyll: {
options: {
src: 'templates',
plugins: '_plugins',
dest: '_site',
pygments: true,
raw: 'lang: ' + lang
},
build: {},
serve: {
options: {
watch: true,
serve: true
}
});
}
},

'ftp-deploy': {
build: {
auth: {
host: 'startcontinue.com',
port: 21
},
src: '_site',
dest: ftpDir,
exclusions: [
'Gruntfile.js',
'package.json',
'.git*',
'node_modules'
]
}
}

});

// plugins
grunt.loadNpmTasks('grunt-jekyll');
grunt.loadNpmTasks('grunt-ftp-deploy');

// Default task. Run standard jekyll server.
grunt.registerTask('default', 'jekyll:server');
// tasks
grunt.registerTask('default', ['jekyll:build']);
grunt.registerTask('serve', ['jekyll:serve']);
grunt.registerTask('deploy', ['default', 'ftp-deploy']);

// plugin tasks
grunt.loadNpmTasks('grunt-jekyll');
};
};
21 changes: 16 additions & 5 deletions README.textile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,18 @@ This is the source for "learnlayout.com":http://learnlayout.com in case you're c
h2. How to Build

* If needed, install "NPM":https://npmjs.org/
* If needed, install "grunt":http://gruntjs.com
** Last tested version was 0.12.7
* If needed, install "grunt":http://gruntjs.com @npm install -g grunt-cli@
** Last tested grunt-cli version was 0.1.10
** Last tested grunt version was 0.4.5
* If needed, do a @npm install@
* If needed, install jekyll @sudo gem install jekyll@
* If needed, install "pygments":http://pygments.org/docs/installation/
* Build + run test server with @grunt jekyll@
* or build only with @grunt jekyll:dev@ or @grunt jekyll:prod@
** Last tested version was 3.0.1
* If needed, install "pygments":http://pygments.org/download/
** I have used `sudo easy_install pygments` on Mac
** Last tested version was 2.0.2
* Build + run test server with @grunt serve@
* or build only with @grunt@

h2. How to Translate

Expand All @@ -17,4 +24,8 @@ If you're not familiar with YAML, it's a very simple human-readable data format.

To contribute to a translation, start with "en.yaml":https://github.com/incompl/csslayoutsite/blob/master/translations/en.yaml and either "email me":mailto:[email protected] translated YAML files or make pull requests against this repository if you know how.

To test a translation, change the @lang@ property in "_config.yml":https://github.com/incompl/csslayoutsite/blob/master/templates/_config.yml before you build.
To test a translation, change the @lang@ property in "_config.yml":https://github.com/incompl/csslayoutsite/blob/master/templates/_config.yml before you build. If you choose an RTL language you need to add the line @rtl: true@ to the config.

h2. License

"Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)":https://creativecommons.org/licenses/by-nc/4.0/
12 changes: 11 additions & 1 deletion _plugins/localize.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ def initialize(tag_name, key, tokens)
end

def render(context)
defaultsPath = "translations/defaults.yaml"
@lang = context.registers[:site].config['lang']
@translations = YAML::load(File.open("translations/#{@lang}.yaml"))
if File.exist? defaultsPath
@defaults = YAML::load(File.open(defaultsPath))
end
@init = true

if @key[0..3] == 'page'
Expand All @@ -23,13 +27,19 @@ def render(context)

result = @translations[@key]

if result.nil? and defined? @defaults
result = @defaults[@key]
end

"#{result}"
end
end

class RtlTag < Liquid::Tag
def render(context)
rtl = context.registers[:site].config['rtl']
@lang = context.registers[:site].config['lang']
@translations = YAML::load(File.open("translations/#{@lang}.yaml"))
rtl = @translations['rtl']
if rtl == true
"rtl"
else
Expand Down
16 changes: 16 additions & 0 deletions deploy-all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
grunt deploy --lang=en
grunt deploy --lang=de
grunt deploy --lang=es
grunt deploy --lang=fa
grunt deploy --lang=fr
grunt deploy --lang=hy
grunt deploy --lang=it
grunt deploy --lang=ja
grunt deploy --lang=ko
grunt deploy --lang=nl
grunt deploy --lang=pt-br
grunt deploy --lang=pt-pt
grunt deploy --lang=ru
grunt deploy --lang=zh
grunt deploy --lang=zh-tw
grunt deploy --lang=ar
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "learn-css-layout",
"version": "1.0.0",
"version": "1.1.0",
"devDependencies": {
"grunt": "~0.4.0",
"grunt-jekyll": "0.2.2"
"grunt": "~0.4.2",
"grunt-ftp-deploy": "^0.1.10",
"grunt-jekyll": "~0.4.2"
}
}
}
1 change: 0 additions & 1 deletion templates/_config.yml

This file was deleted.

70 changes: 58 additions & 12 deletions templates/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-35945753-1']);
_gaq.push(['_setDomainName', 'learnlayout.com']);
_gaq.push(['_trackPageview']);

(function() {
Expand All @@ -42,38 +43,83 @@

<div id="container">

<h1 class="content">{% localize page.title %}</h1>
{% if page.title %}
<h1 class="content">{% localize page.title %}</h1>
{% endif %}

{{ content }}

<div class="nav-wrapper">
{% if page.prev or page.next %}

{% if page.prev %}
<a class="nav prev" href="{{ page.prev }}.html">{% localize global.previous %}</a>
{% endif %}
<div class="nav-wrapper">

{% if page.next %}
<a class="nav next" href="{{ page.next }}.html">{% localize global.next %}</a>
{% endif %}
{% if page.prev %}
<a class="nav prev" href="{{ page.prev }}.html">{% localize global.previous %}</a>
{% endif %}

</div>
{% if page.next %}
<a class="nav next" href="{{ page.next }}.html">{% localize global.next %}</a>
{% endif %}

</div>

{% endif %}

{% if page.noFooter != true %}
<footer>
<a href="https://github.com/incompl/csslayoutsite/issues">{% localize global.feedback %}</a>
{{ page.num }} / 19
</footer>
{% endif %}

</div>

<div id="share">

<li>
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://learnlayout.com/">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</li>

<li>
<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Flearnlayout.com%2F&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=false&amp;font&amp;colorscheme=light&amp;action=like&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:110px; height:21px;" allowTransparency="true"></iframe>
</li>

<li>
<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://learnlayout.com/">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
<div class="g-plusone" data-size="medium"></div>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</li>

<li id="license">
<a rel="license" href="http://creativecommons.org/licenses/by/3.0/deed.en_US"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by/3.0/80x15.png"></a>
</li>

</div>
<div id="advertisements">
<span>Ads by <a href="http://bocoup.com">Bocoup</a></span>
<div>
<!--/* Revive Adserver Javascript Tag v3.0.5 */-->
<script type='text/javascript'><!--//<![CDATA[
var m3_u = (location.protocol=='https:'?'https://revive.bocoup.com/www/delivery/ajs.php':'http://revive.bocoup.com/www/delivery/ajs.php');
var m3_r = Math.floor(Math.random()*99999999999);
if (!document.MAX_used) document.MAX_used = ',';
document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
document.write ("?zoneid=9");
document.write ('&amp;cb=' + m3_r);
if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);
document.write (document.charset ? '&amp;charset='+document.charset : (document.characterSet ? '&amp;charset='+document.characterSet : ''));
document.write ("&amp;loc=" + escape(window.location));
if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));
if (document.context) document.write ("&context=" + escape(document.context));
if (document.mmm_fo) document.write ("&amp;mmm_fo=1");
document.write ("'><\/scr"+"ipt>");
//]]>--></script><noscript><a href='http://revive.bocoup.com/www/delivery/ck.php?n=a9ab3fcf&amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://revive.bocoup.com/www/delivery/avw.php?zoneid=4&amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;n=a9ab3fcf' border='0' alt='' /></a></noscript>
</div>
</div>

</body>
Expand Down
7 changes: 7 additions & 0 deletions templates/about.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
layout: default
title: about.title
noFooter: true
---

<style>
Expand Down Expand Up @@ -31,4 +32,10 @@

<div class="content">
{% localize about.credits %}
</div>

<div class="content">
<a href="https://github.com/incompl/csslayoutsite/issues">
{% localize global.feedback %}
</a>
</div>
5 changes: 3 additions & 2 deletions templates/box-model.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
title: box_model.title
next: box-sizing
prev: max-width
num: 5
---

<style>
Expand All @@ -18,7 +19,7 @@
width: 500px;
margin: 20px auto;
padding: 50px;
border: solid #6AC5AC 10px;
border-width: 10px;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
Expand All @@ -39,7 +40,7 @@
width: 500px;
margin: 20px auto;
padding: 50px;
border: solid blue 10px;
border-width: 10px;
}
{% endhighlight %}

Expand Down
1 change: 1 addition & 0 deletions templates/box-sizing.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
title: box_sizing.title
next: position
prev: box-model
num: 6
---

<style>
Expand Down
1 change: 1 addition & 0 deletions templates/clear.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
title: clear.title
next: clearfix
prev: float
num: 10
---

<p class="content">
Expand Down
1 change: 1 addition & 0 deletions templates/clearfix.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
title: clearfix.title
next: float-layout
prev: clear
num: 11
---

<p class="content">
Expand Down
Loading

0 comments on commit 4977420

Please sign in to comment.