summaryrefslogtreecommitdiff
path: root/app/views/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/layouts')
-rw-r--r--app/views/layouts/_footer.haml7
-rw-r--r--app/views/layouts/_masthead.html.haml7
-rw-r--r--app/views/layouts/_topnav.html.haml8
-rw-r--r--app/views/layouts/application.html.haml29
-rw-r--r--app/views/layouts/blog.html.haml6
-rw-r--r--app/views/layouts/blog/_summary.html.haml17
-rw-r--r--app/views/layouts/blog/show.html.haml20
7 files changed, 94 insertions, 0 deletions
diff --git a/app/views/layouts/_footer.haml b/app/views/layouts/_footer.haml
new file mode 100644
index 0000000..94ea6dc
--- /dev/null
+++ b/app/views/layouts/_footer.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/app/views/layouts/_masthead.html.haml b/app/views/layouts/_masthead.html.haml
new file mode 100644
index 0000000..5055c81
--- /dev/null
+++ b/app/views/layouts/_masthead.html.haml
@@ -0,0 +1,7 @@
+.container.masthead
+ .contents
+ .text
+ %h1 LEAP Encryption Access Project
+ %ul#topnav
+ = top_level_navigation_links
+
diff --git a/app/views/layouts/_topnav.html.haml b/app/views/layouts/_topnav.html.haml
new file mode 100644
index 0000000..d0d553e
--- /dev/null
+++ b/app/views/layouts/_topnav.html.haml
@@ -0,0 +1,8 @@
+%ul#topnav
+ = top_level_navigation_links
+ %li.tab.first
+ %a.tab{:href => '#'} Home
+ %li.tab
+ %a.tab.active{:href => '#'} Technology
+ %li.tab
+ %a.tab About Us \ No newline at end of file
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
new file mode 100644
index 0000000..fe0888a
--- /dev/null
+++ b/app/views/layouts/application.html.haml
@@ -0,0 +1,29 @@
+!!! 5
+%html{:dir=>'ltr'}
+ %head
+ %title #{SITE_TITLE} - #{page_title}
+ = stylesheet_link_tag "application", :media => "all"
+ = javascript_include_tag "application"
+ = csrf_meta_tags
+ %body
+ .top
+ .column_container
+ .column_content
+ .masthead
+ .contents
+ %h1 LEAP Encryption Access Project
+ %ul#topnav
+ = top_level_navigation_links
+ .middle
+ .column_container
+ .column_content
+ - if has_side_column?
+ .side_column
+ = side_column_navigation_links
+ .main_column{:class => main_column_class}
+ = content_for?(:content) ? yield(:content) : yield
+ .bottom
+ .column_container
+ .column_content
+ = render :partial => 'layouts/footer'
+ .background
diff --git a/app/views/layouts/blog.html.haml b/app/views/layouts/blog.html.haml
new file mode 100644
index 0000000..3e693c9
--- /dev/null
+++ b/app/views/layouts/blog.html.haml
@@ -0,0 +1,6 @@
+- content_for :content do
+ - if @page
+ = render :template => 'layouts/blog/show'
+ - else
+ = yield
+= render :template => 'layouts/application' \ No newline at end of file
diff --git a/app/views/layouts/blog/_summary.html.haml b/app/views/layouts/blog/_summary.html.haml
new file mode 100644
index 0000000..c1f7784
--- /dev/null
+++ b/app/views/layouts/blog/_summary.html.haml
@@ -0,0 +1,17 @@
+%article.blog_summary
+ %heading.h3= link_to(page.title, page_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.body.try(:any?)
+ = link_to(I18n.t(:read_more), page_path(page))
+ - else
+ = render :template => page.template_path \ No newline at end of file
diff --git a/app/views/layouts/blog/show.html.haml b/app/views/layouts/blog/show.html.haml
new file mode 100644
index 0000000..b5bc983
--- /dev/null
+++ b/app/views/layouts/blog/show.html.haml
@@ -0,0 +1,20 @@
+%article.blog_full
+
+ %h1.first= @page.title
+
+ .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, :pubdate => true)
+
+ - content_for :blog_content do
+ = yield
+
+ - if content_for?(:blog_content)
+ = yield(:blog_content)
+ - else
+ = @page.props.preview \ No newline at end of file