Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/views/frontend/_article_list.haml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
#{draft.attribution}
- else
Authored by Group
%span.timestamp= article.published_at.strftime('%b. %-d, %Y')
%span.timestamp= article.published_at.strftime('%B').length > 5 ? article.published_at.strftime('%b. %-d, %Y') : article.published_at.strftime('%B %-d, %Y')

%p.lede= draft.lede
- else
%h1.list-empty No results found.
5 changes: 4 additions & 1 deletion app/views/frontend/article.haml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
- elsif @draft.attribution.present? && [email protected](/unknown/i)
%span.byline By #{@draft.attribution}
%span.timestamp
= link_to @article.published_at.strftime('%b. %-d, %Y'), frontend_path(@article.issue)
- if @article.published_at.strftime('%B').length > 5
= link_to @article.published_at.strftime('%b. %-d, %Y'), frontend_path(@article.issue)
- else
= link_to @article.published_at.strftime('%B %-d, %Y'), frontend_path(@article.issue)
%ul.article-social
-
%li.article-social-fb
Expand Down
2 changes: 1 addition & 1 deletion app/views/frontend/homepage/_below_fold.haml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
- elsif draft.attribution.present? && !draft.attribution.match(/unknown/i)
%span.byline
By #{draft.attribution}
%span.timestamp= a.published_at.strftime('%b. %-d, %Y')
%span.timestamp= a.published_at.strftime('%B').length > 5 ? a.published_at.strftime('%b. %-d, %Y') : a.published_at.strftime('%B %-d, %Y')
%li
= link_to "Read more in #{s.name} »", frontend_path(s), class: 'btf-section-link'
- if has_ad
Expand Down
4 changes: 2 additions & 2 deletions app/views/frontend/homepage/_below_fold_article.haml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
- elsif draft.attribution.present? && !draft.attribution.match(/unknown/i)
%span.byline
By #{draft.attribution}
%span.timestamp= article.published_at.strftime('%b. %-d, %Y')
%span.timestamp= article.published_at.strftime('%B').length > 5 ? article.published_at.strftime('%b. %-d, %Y') : article.published_at.strftime('%B %-d, %Y')
- else
.btf-article.btf-article-noimg
%h1.headline
Expand All @@ -34,5 +34,5 @@
- elsif draft.attribution.present? && !draft.attribution.match(/unknown/i)
%span.byline
By #{draft.attribution}
%span.timestamp= article.published_at.strftime('%b. %-d, %Y')
%span.timestamp= article.published_at.strftime('%B').length > 5 ? article.published_at.strftime('%b. %-d, %Y') : article.published_at.strftime('%B %-d, %Y')
%p.lede= lede
2 changes: 1 addition & 1 deletion app/views/frontend/homepage/_nameplate.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
.nameplate-top
%h1 The Tech
%ul
%li= Date.today.strftime('%b. %-d, %Y')
%li= Date.today.strftime('%B').length > 5 ? Date.today.strftime('%b. %-d, %Y') : Date.today.strftime('%B %-d, %Y')
%li
= link_to frontend_path(@latest_issue) do
This Week's Issue#{icon('newspaper-o', '', class: 'fa-fw')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
= author_links draft
- elsif draft.attribution.present? && !draft.attribution.match(/unknown/i)
= draft.attribution
%span.timestamp= article.published_at.strftime('%b. %-d, %Y')
%span.timestamp= article.published_at.strftime('%B').length > 5 ? article.published_at.strftime('%b. %-d, %Y') : article.published_at.strftime('%B %-d, %Y')
%p.lede= draft.lede