From 9de59307c9cddf689ea3f302571bb6cfd0d689fa Mon Sep 17 00:00:00 2001 From: Lars Henrik Mai Date: Sun, 21 Sep 2014 11:31:35 +0200 Subject: converted templates from erb to haml --- source/layouts/layout.erb | 45 --------------------------------------------- source/layouts/layout.haml | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 45 deletions(-) delete mode 100644 source/layouts/layout.erb create mode 100644 source/layouts/layout.haml (limited to 'source/layouts') diff --git a/source/layouts/layout.erb b/source/layouts/layout.erb deleted file mode 100644 index 030e78c..0000000 --- a/source/layouts/layout.erb +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - <%= current_page.data.title || "sublab" %> - - <%= stylesheet_link_tag "base" %> - <%#= stylesheet_link_tag "http://localhost:9393/status.css" %> - - <%= javascript_include_tag "all"%> - - - - - -
- -
- - - - - -
-
- <%= yield %> -
-
- - - diff --git a/source/layouts/layout.haml b/source/layouts/layout.haml new file mode 100644 index 0000000..53cf1ae --- /dev/null +++ b/source/layouts/layout.haml @@ -0,0 +1,25 @@ + +%html + %head + %meta{:charset => "utf-8"}/ + / Always force latest IE rendering engine or request Chrome Frame + %meta{:content => "IE=edge,chrome=1", "http-equiv" => "X-UA-Compatible"}/ + / For proper display on mobile + %meta{:content => "width=device-width, initial-scale=1", :name => "viewport"}/ + / Use title if it's in the page YAML frontmatter + %title= current_page.data.title || "sublab" + = stylesheet_link_tag "base" + = javascript_include_tag "all" + %body{:class => page_classes} + / header + %header + #logo + - link_to '/index.html' do + = image_tag 'sublab-logo.png', class: "img-responsive" + / main navigation + %nav + = partial "navigation" + / content + #content + %section#main + = yield -- cgit v1.2.1 From ba9fb4dae31cbf6969ed1ec917faca956044e063 Mon Sep 17 00:00:00 2001 From: Lars Henrik Mai Date: Sun, 21 Sep 2014 12:42:12 +0200 Subject: configure foundation --- source/layouts/layout.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/layouts') diff --git a/source/layouts/layout.haml b/source/layouts/layout.haml index 53cf1ae..d932c9b 100644 --- a/source/layouts/layout.haml +++ b/source/layouts/layout.haml @@ -9,7 +9,7 @@ / Use title if it's in the page YAML frontmatter %title= current_page.data.title || "sublab" = stylesheet_link_tag "base" - = javascript_include_tag "all" + = javascript_include_tag "modernizr", "all" %body{:class => page_classes} / header %header -- cgit v1.2.1 From a767ac373836d9ea9601635e3c3843ef2cde2dbd Mon Sep 17 00:00:00 2001 From: Lars Henrik Mai Date: Sun, 21 Sep 2014 13:58:29 +0200 Subject: migrate index and navigation to foundation --- source/layouts/layout.haml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/layouts') diff --git a/source/layouts/layout.haml b/source/layouts/layout.haml index d932c9b..23e524e 100644 --- a/source/layouts/layout.haml +++ b/source/layouts/layout.haml @@ -17,9 +17,11 @@ - link_to '/index.html' do = image_tag 'sublab-logo.png', class: "img-responsive" / main navigation - %nav - = partial "navigation" + = partial "navigation" / content #content %section#main = yield + / javascript initialization + :javascript + $(document).foundation(); -- cgit v1.2.1 From 63dbddf6c3d36549e55b80d4c720303d04dd3175 Mon Sep 17 00:00:00 2001 From: Lars Henrik Mai Date: Sun, 21 Sep 2014 15:00:33 +0200 Subject: migrate blog to foundation --- source/layouts/article_layout.html.haml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 source/layouts/article_layout.html.haml (limited to 'source/layouts') diff --git a/source/layouts/article_layout.html.haml b/source/layouts/article_layout.html.haml new file mode 100644 index 0000000..30fd382 --- /dev/null +++ b/source/layouts/article_layout.html.haml @@ -0,0 +1,9 @@ +-# TODO de-duplicate with _article partial += wrap_layout :layout do + .row + .column + %article + %aside.blog-date= current_article.date.strftime('%e %b %Y') + .blog-inner + %h3.blog-article-heading= current_article.title + = yield -- cgit v1.2.1 From a16c6ca3a257960e0e9beee981f963f5ac6382e2 Mon Sep 17 00:00:00 2001 From: Lars Henrik Mai Date: Sun, 21 Sep 2014 15:45:39 +0200 Subject: wrap main content in row and column --- source/layouts/article_layout.html.haml | 10 ++++------ source/layouts/layout.haml | 4 +++- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'source/layouts') diff --git a/source/layouts/article_layout.html.haml b/source/layouts/article_layout.html.haml index 30fd382..450d470 100644 --- a/source/layouts/article_layout.html.haml +++ b/source/layouts/article_layout.html.haml @@ -1,9 +1,7 @@ -# TODO de-duplicate with _article partial = wrap_layout :layout do - .row - .column - %article - %aside.blog-date= current_article.date.strftime('%e %b %Y') - .blog-inner - %h3.blog-article-heading= current_article.title + %article + %aside.blog-date= current_article.date.strftime('%e %b %Y') + .blog-inner + %h3.blog-article-heading= current_article.title = yield diff --git a/source/layouts/layout.haml b/source/layouts/layout.haml index 23e524e..cd62804 100644 --- a/source/layouts/layout.haml +++ b/source/layouts/layout.haml @@ -21,7 +21,9 @@ / content #content %section#main - = yield + .row + .columns + = yield / javascript initialization :javascript $(document).foundation(); -- cgit v1.2.1