summaryrefslogtreecommitdiff
path: root/amber/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'amber/layouts')
-rw-r--r--amber/layouts/_blog_summary.html.haml16
-rw-r--r--amber/layouts/_footer.html.haml7
-rw-r--r--amber/layouts/_masthead.html.haml17
-rw-r--r--amber/layouts/_sidebar.html.haml13
-rw-r--r--amber/layouts/_titlebox.html.haml16
-rw-r--r--amber/layouts/default.html.haml38
6 files changed, 107 insertions, 0 deletions
diff --git a/amber/layouts/_blog_summary.html.haml b/amber/layouts/_blog_summary.html.haml
new file mode 100644
index 0000000..b14f6d0
--- /dev/null
+++ b/amber/layouts/_blog_summary.html.haml
@@ -0,0 +1,16 @@
+- page = locals[:page]
+%article.page-summary
+ %h2= link(page.title => amber_path(page))
+ .byline
+ - if page.props.author
+ %span.author>= page.props.author
+ - if page.props.author && page.props.posted_at
+ \.
+ - if page.props.posted_at
+ %i
+ = time_tag(page.props.posted_at.to_date, :format => :long, :pubdate => true)
+ %div.content
+ - if page.props.preview
+ = page.props.preview
+ - if page.props.more
+ = link(I18n.t(:read_more) => amber_path(page)) \ No newline at end of file
diff --git a/amber/layouts/_footer.html.haml b/amber/layouts/_footer.html.haml
new file mode 100644
index 0000000..94ea6dc
--- /dev/null
+++ b/amber/layouts/_footer.html.haml
@@ -0,0 +1,7 @@
+%div{:style => 'max-width:500px; margin: 3em auto 0 auto; text-align: center; font-size: 0.85em'}
+ (cc) Attribution, Share-Alike
+  
+ %a{:rel => "license", :href => "https://creativecommons.org/licenses/by-sa/3.0/"}<
+ %img{:alt => "Creative Commons License", :style => "border-width:0; vertical-align: middle", :src => "/img/by-sa-3.0-80x15.png"}
+ &nbsp;
+ (c) 2012 LEAP Encryption Access Project \ No newline at end of file
diff --git a/amber/layouts/_masthead.html.haml b/amber/layouts/_masthead.html.haml
new file mode 100644
index 0000000..f37d6e9
--- /dev/null
+++ b/amber/layouts/_masthead.html.haml
@@ -0,0 +1,17 @@
+.masthead-inner
+ .container
+ .row
+ -# if has_navigation?
+ .col-sm-3.col-md-2
+ .col-sm-9.col-md-10
+ %h1 LEAP Encryption Access Project
+ %ul.list-unstyled#top-menu
+ - top_navigation_items(include_home:true) do |item|
+ %li{:class => [item[:class], 'tab'].join(' ')}
+ %a{:href => item[:href], :class => [item[:class], 'tab'].join(' ')}= item[:label]
+ .col-sm-12.logo
+ %h1 LEAP Encryption Access Project
+ %ul.list-unstyled#top-menu
+ - top_navigation_items(include_home:true) do |item|
+ %li{:class => [item[:class], 'tab'].join(' ')}
+ %a{:href => item[:href], :class => [item[:class], 'tab'].join(' ')}= item[:label]
diff --git a/amber/layouts/_sidebar.html.haml b/amber/layouts/_sidebar.html.haml
new file mode 100644
index 0000000..87a00f9
--- /dev/null
+++ b/amber/layouts/_sidebar.html.haml
@@ -0,0 +1,13 @@
+#navigation
+ %ul.nav.nav-pills.nav-stacked
+ - navigation_items do |item|
+ %li{:class => "#{item[:active]} level#{item[:level]}"}
+ %a{:href => item[:href], :class => ''}= item[:label]
+
+-# .sidebar-addendum
+-# .locale-links
+-# - available_languages.each do |name, code, url|
+-# %a.label{:href => url, :class => (I18n.locale == code ? 'label-primary' : '')}= name
+-#
+-# .sidebar-addendum
+-# = link(t(:support_riseup) => 'donate', :class => 'btn btn-block btn-default')
diff --git a/amber/layouts/_titlebox.html.haml b/amber/layouts/_titlebox.html.haml
new file mode 100644
index 0000000..beef995
--- /dev/null
+++ b/amber/layouts/_titlebox.html.haml
@@ -0,0 +1,16 @@
+- if @page.props.author || @page.props.posted_at
+ .byline
+ - if @page.props.author
+ %span.author>= I18n.t('posted_by') + ' ' + @page.props.author
+ - if @page.props.author && @page.props.posted_at
+ \.
+ - if @page.props.posted_at
+ %i
+ = time_tag(@page.props.posted_at.to_date, :format => :long, :pubdatwe => true)
+
+- if @page.props.summary
+ .summary
+ = @page.props.summary
+-# elsif page.props.preview
+ .summary
+ = @page.props.preview \ No newline at end of file
diff --git a/amber/layouts/default.html.haml b/amber/layouts/default.html.haml
new file mode 100644
index 0000000..d252806
--- /dev/null
+++ b/amber/layouts/default.html.haml
@@ -0,0 +1,38 @@
+!!!
+%html{:lang => @locals[:locale].to_s}
+ %head
+ %title
+ = @page.nav_title + ' - ' + @site.title
+ %meta(name="viewport" content="width=device-width, initial-scale=1.0")
+ %meta(charset="UTF-8")
+ %link(rel="stylesheet" href="/assets/style.css")
+ %link(rel="stylesheet" href="/assets/font-awesome/css/font-awesome.min.css")
+ = html_head_base
+ %body
+ #wrap
+ #masthead
+ = render 'layouts/masthead'
+ #main.container
+ .row
+ - if has_navigation?
+ #sidebar.col-sm-4.col-md-3
+ = render 'layouts/sidebar'
+ .col-sm-8.col-md-9
+ .title-box
+ = yield :title
+ = render 'layouts/titlebox'
+ .content-box
+ - if translation_missing?
+ .alert.alert-info= t(:missing_translation)
+ = yield :content
+ - else
+ .col-sm-12
+ - unless @page.props.show_title === false
+ .title-box
+ = yield :title
+ .content-box
+ = yield :content
+
+ #footer
+ = render 'layouts/footer'
+ #background