From 34b042c3c11e42fa166d915e28ad068aff99b2a3 Mon Sep 17 00:00:00 2001 From: Godwin Date: Fri, 1 Jul 2016 18:17:04 -0700 Subject: [PATCH] Improved stcky footer, removed nav on unavailable locale pages, added facebook meta image --- app/assets/stylesheets/_application.scss | 26 +++++++++++++++++++++++- app/views/application/_header.html.haml | 2 ++ app/views/conferences/_header.html.haml | 2 ++ app/views/layouts/application.html.haml | 2 ++ 4 files changed, 31 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/_application.scss b/app/assets/stylesheets/_application.scss index 35d4107..69b8c86 100644 --- a/app/assets/stylesheets/_application.scss +++ b/app/assets/stylesheets/_application.scss @@ -988,6 +988,10 @@ ul.warnings li, font-size: 0.6333em; } } + + body.error-locale-not-available & { + display: none; + } } .logo { @@ -1019,6 +1023,10 @@ ul.warnings li, overflow: hidden; text-overflow: ellipsis; } + + body.error-locale-not-available & { + display: none; + } } } @@ -1368,6 +1376,7 @@ ul.warnings li, position: relative; background-color: $white; padding-bottom: rems(2); + flex: 1; article { padding: rems(2.5) 0; @@ -1493,6 +1502,11 @@ a.logo { font-size: 1.15em; } } + + .secondary { + font-size: 0.85em; + line-height: 2em; + } } $header-tilt: 8deg; @@ -1703,11 +1717,21 @@ $header-tilt: 8deg; padding: 0; list-style: none; } + + body.error-locale-not-available & { + .github, .facebook, .locales { + visibility: hidden; + } + } } body { #primary-content { @include _(transition, 'filter 250ms ease-in-out, -webkit-filter 250ms ease-in-out'); + display: flex; + flex-direction: column; + min-height: 100vh; + overflow: hidden; } &.has-overlay { @@ -3301,7 +3325,7 @@ html[data-ontop] { #main { padding-left: $sidebar-width; - min-height: 100vh; + //min-height: 100vh; } #header-title { diff --git a/app/views/application/_header.html.haml b/app/views/application/_header.html.haml index 8f0782c..9d273a1 100644 --- a/app/views/application/_header.html.haml +++ b/app/views/application/_header.html.haml @@ -16,3 +16,5 @@ = row do = columns do %h1=_(@main_title || "page_titles.#{page_group.to_s}.#{page_key.to_s}", :t, @main_title_vars) + - content_for :og_image do + = image diff --git a/app/views/conferences/_header.html.haml b/app/views/conferences/_header.html.haml index 79e6555..ba86ac4 100644 --- a/app/views/conferences/_header.html.haml +++ b/app/views/conferences/_header.html.haml @@ -6,3 +6,5 @@ .secondary = date_span(@conference.start_date.to_date, @conference.end_date.to_date) %img{src: @conference.poster.full.url || image_path('default_poster.jpg'), role: :presentation, alt: ''} +- content_for :og_image do + = @conference.poster.full.url || image_path('default_poster.jpg') diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 648e2e1..ed8a180 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -12,6 +12,8 @@ %link{ href: asset_path('favicon.ico'), rel: 'icon', type: 'image/x-icon' } - @alt_lang_urls.each do |locale, url| %link{ rel: :alternate, hreflang: locale, href: url } + - if content_for?(:og_image) + %meta{property: 'og:image', content: (yield :og_image)} -#%link{ href: asset_path('apple-touch-icon.png'), rel: 'apple-touch-icon' } -#%link{ href: asset_path('apple-touch-icon-72x72.png'), rel: 'apple-touch-icon', sizes: '72x72' } -#%link{ href: asset_path('apple-touch-icon-114x114.png'), rel: 'apple-touch-icon', sizes: '114x114' }