diff --git a/app/views/frontend/_article_list.haml b/app/views/frontend/_article_list.haml index f0fa419e..b765c279 100644 --- a/app/views/frontend/_article_list.haml +++ b/app/views/frontend/_article_list.haml @@ -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. diff --git a/app/views/frontend/article.haml b/app/views/frontend/article.haml index 7c614195..c0f6c919 100644 --- a/app/views/frontend/article.haml +++ b/app/views/frontend/article.haml @@ -10,7 +10,10 @@ - elsif @draft.attribution.present? && !@draft.attribution.match(/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 diff --git a/app/views/frontend/homepage/_below_fold.haml b/app/views/frontend/homepage/_below_fold.haml index 868e4f9f..204cfe97 100644 --- a/app/views/frontend/homepage/_below_fold.haml +++ b/app/views/frontend/homepage/_below_fold.haml @@ -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 diff --git a/app/views/frontend/homepage/_below_fold_article.haml b/app/views/frontend/homepage/_below_fold_article.haml index 3e171e7c..6ea290a8 100644 --- a/app/views/frontend/homepage/_below_fold_article.haml +++ b/app/views/frontend/homepage/_below_fold_article.haml @@ -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 @@ -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 diff --git a/app/views/frontend/homepage/_nameplate.haml b/app/views/frontend/homepage/_nameplate.haml index 20750c75..40bf0569 100644 --- a/app/views/frontend/homepage/_nameplate.haml +++ b/app/views/frontend/homepage/_nameplate.haml @@ -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')} diff --git a/app/views/frontend/homepage/modules/fragments/_article.haml b/app/views/frontend/homepage/modules/fragments/_article.haml index 8f23eb62..9de6d6a0 100644 --- a/app/views/frontend/homepage/modules/fragments/_article.haml +++ b/app/views/frontend/homepage/modules/fragments/_article.haml @@ -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