Skip to content

Commit

Permalink
v3.0.2
Browse files Browse the repository at this point in the history
Merge pull request #713 from TechforgoodCAST/develop
  • Loading branch information
suninthesky authored Nov 1, 2018
2 parents c12d101 + bc080b9 commit e88b346
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 24 deletions.
27 changes: 14 additions & 13 deletions app/views/articles/index.html.haml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
= content_for :title, 'Blog'

%header
= cell :breadcrumb, { 'Blog' => articles_path }, color: 'blue'
%main.bg-ice
%header
= render partial: 'shared/nav', locals: { color: 'blue' }
= cell(:breadcrumb, { 'Blog' => articles_path }, color: 'blue')

%main
%section.maxw1080.mx-auto
.mb40.mx40
%h1.center Blog

.maxw790.mx-auto
%section.col2.mx-auto.mb40.px15
%h1.h2.center Blog

- @articles.each do |article|
%hr.maxw1000.mx40
.bg-white.rounded.shadow.my40
.p20.border-bottom.border-mist
%h3= link_to(article.title, article_path(article))
.p20.markdown= strip_tags(article.body_html).truncate_words(50, omission: "... #{link_to('more', article_path(article))}").html_safe

-# TODO: pagination
%section.p40
.mb20
%h3= link_to(article.title, article_path(article), class: 'blue')
.markdown= strip_tags(article.body_html).truncate_words(50, omission: "... #{link_to('more', article_path(article), class: 'bold')}").html_safe
.bg-ice
= render partial: 'shared/footer', locals: { color: 'slate' }
20 changes: 11 additions & 9 deletions app/views/articles/show.html.haml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
= content_for :title, @article.title

%header
= cell :breadcrumb, { 'Blog' => articles_path, @article.title => article_path(@article) }, color: 'blue'
%main.bg-ice
%header
= render partial: 'shared/nav', locals: { color: 'blue' }
= cell :breadcrumb, { 'Blog' => articles_path, @article.title => article_path(@article) }, color: 'blue'

%main
%section.maxw790.mx-auto.mt40
%section.col2.mx-auto.my40.px15
.bg-white.rounded.shadow
.p20.border-bottom.border-mist
%h3= link_to(@article.title, article_path(@article))

.mb40.mx40
%h1.center= @article.title
.pt20.px20.pb5.markdown= raw(@article.body_html)

.maxw790.mx-auto
.px40
.markdown= raw(@article.body_html)
.bg-ice
= render partial: 'shared/footer', locals: { color: 'slate' }
3 changes: 1 addition & 2 deletions app/views/shared/_footer.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

.flex.flex-wrap.justify-between.items-center.mb40
.footer-links
-# TODO: to /articles/about
= link_to('About', about_path, class: 'mr10')
= link_to('Pricing', pricing_path, class: 'mx10')
= link_to('Blog', articles_path, class: 'mx10')
Expand All @@ -19,4 +18,4 @@
= link_to('Privacy', privacy_path, class: 'mx10')
= link_to('Terms', terms_path, class: 'mx10')

= link_to("© #{Date.today.year} CAST", 'http://www.wearecast.org.uk', class: 'ml10', target: '_blank')
= link_to("© #{Date.today.year} CAST", 'http://www.wearecast.org.uk', class: 'ml10', target: '_blank', onclick: "trackOutboundLink('http://www.wearecast.org.uk');")

0 comments on commit e88b346

Please sign in to comment.