From 627f0488e5bd3c31359fc9e78acffbfea4a86a8b Mon Sep 17 00:00:00 2001 From: elijah Date: Fri, 24 Aug 2012 21:12:36 -0700 Subject: committed website v. 0.1.0 --- app/views/layouts/_footer.haml | 7 +++++++ app/views/layouts/_masthead.html.haml | 7 +++++++ app/views/layouts/_topnav.html.haml | 8 ++++++++ app/views/layouts/application.html.haml | 29 +++++++++++++++++++++++++++++ app/views/layouts/blog.html.haml | 6 ++++++ app/views/layouts/blog/_summary.html.haml | 17 +++++++++++++++++ app/views/layouts/blog/show.html.haml | 20 ++++++++++++++++++++ 7 files changed, 94 insertions(+) create mode 100644 app/views/layouts/_footer.haml create mode 100644 app/views/layouts/_masthead.html.haml create mode 100644 app/views/layouts/_topnav.html.haml create mode 100644 app/views/layouts/application.html.haml create mode 100644 app/views/layouts/blog.html.haml create mode 100644 app/views/layouts/blog/_summary.html.haml create mode 100644 app/views/layouts/blog/show.html.haml (limited to 'app/views/layouts') 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"} +   + (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 -- cgit v1.2.3