From 1dfde65556c4ffd4b182030e39b4734f7b71b44a Mon Sep 17 00:00:00 2001 From: goobertron Date: Thu, 16 Jan 2014 16:59:42 +0000 Subject: [PATCH 1/2] Alter link behaviour of OG previews --- app/assets/stylesheets/mobile/mobile.css.scss | 32 ++++++++++--------- app/assets/stylesheets/opengraph.css.scss | 32 +++++++++++-------- app/assets/templates/opengraph_tpl.jst.hbs | 15 +++++---- 3 files changed, 44 insertions(+), 35 deletions(-) diff --git a/app/assets/stylesheets/mobile/mobile.css.scss b/app/assets/stylesheets/mobile/mobile.css.scss index 8da30b618..f77786099 100644 --- a/app/assets/stylesheets/mobile/mobile.css.scss +++ b/app/assets/stylesheets/mobile/mobile.css.scss @@ -1127,23 +1127,25 @@ select#aspect_ids_ { .opengraph { width: 100%; + display: block; + text-decoration: none; + margin: 5px 0px 5px 0px; + border-top: solid 1px $border-grey; + border-bottom: solid 1px $border-grey; + padding: 5px 0px 2px 0px; + overflow: hidden; a { - display: block; - text-decoration: none; color: #000; - margin: 5px 0px 5px 0px; - border-top: solid 1px $border-grey; - border-bottom: solid 1px $border-grey; - padding: 5px 0px 2px 0px; - overflow: hidden; - img { - margin: 0px 3px 3px 0px; - float: left; - max-width: 80px; - } - .og-title { - margin-bottom: 3px; - } + } + img { + margin: 3px 3px 3px 0px; + float: left; + max-width: 80px; + padding-right: 5px; + } + .og-title { + margin-bottom: 3px; + font-weight: bold; } } diff --git a/app/assets/stylesheets/opengraph.css.scss b/app/assets/stylesheets/opengraph.css.scss index fc2be5447..b0f877e4c 100644 --- a/app/assets/stylesheets/opengraph.css.scss +++ b/app/assets/stylesheets/opengraph.css.scss @@ -1,24 +1,30 @@ -.opengraph { +.opengraph-container { width: 100%; - + display: block; + text-decoration: none; + font-style: normal; + margin: 10px 0px 10px 0px; + border-top: solid 1px $border-grey; + border-bottom: solid 1px $border-grey; + padding: 10px 0px 5px 0px; + overflow: hidden; a { - display: block; - text-decoration: none;; color: #000; - margin: 10px 0px 10px 0px; - border-top: solid 1px $border-grey; - border-bottom: solid 1px $border-grey; - padding: 10px 0px 5px 0px; - overflow: hidden; - img { - margin: 0px 5px 5px 0px; + margin: 5px 5px 5px 0px; float: left; - max-width: 155px; + max-width: 150px; + padding-right: 5px; } - .og-title { margin-bottom: 5px; + font-weight: bold; } } + a:hover { + color: $blue; + } + .og-description { + color: $text-grey; + } } diff --git a/app/assets/templates/opengraph_tpl.jst.hbs b/app/assets/templates/opengraph_tpl.jst.hbs index 15da820eb..d3c5ae272 100644 --- a/app/assets/templates/opengraph_tpl.jst.hbs +++ b/app/assets/templates/opengraph_tpl.jst.hbs @@ -1,11 +1,12 @@ {{#unless o_embed_cache}} {{#if open_graph_cache}} - -
- - {{open_graph_cache.title}} -

{{open_graph_cache.description}}

-
-
+
+ + +

{{open_graph_cache.title}}

+
+

{{open_graph_cache.description}}

+
{{/if}} {{/unless}} + From 57d796be1dda964f59b8fe163520f767e7308382 Mon Sep 17 00:00:00 2001 From: goobertron Date: Fri, 28 Mar 2014 15:21:22 +0000 Subject: [PATCH 2/2] Fix indentation --- app/assets/templates/opengraph_tpl.jst.hbs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/assets/templates/opengraph_tpl.jst.hbs b/app/assets/templates/opengraph_tpl.jst.hbs index d3c5ae272..fd1a66853 100644 --- a/app/assets/templates/opengraph_tpl.jst.hbs +++ b/app/assets/templates/opengraph_tpl.jst.hbs @@ -1,11 +1,11 @@ {{#unless o_embed_cache}} {{#if open_graph_cache}}
- - -

{{open_graph_cache.title}}

-
-

{{open_graph_cache.description}}

+ + +

{{open_graph_cache.title}}

+
+

{{open_graph_cache.description}}

{{/if}} {{/unless}}