From f3ceb18ea48e8185b763766b9507bc6924813303 Mon Sep 17 00:00:00 2001 From: ebremner <ebremner@uwaterloo.ca> Date: Tue, 6 Oct 2020 15:20:30 -0400 Subject: [PATCH] ISTWCMS-4124: adding view on source to Facebook --- css/styles.css | 3 +++ .../_patterns/04-components/facebook/_facebook.scss | 5 +++++ .../_patterns/04-components/facebook/facebook.twig | 13 +++++++++++-- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/css/styles.css b/css/styles.css index 13db3a5a..55bda436 100644 --- a/css/styles.css +++ b/css/styles.css @@ -3063,6 +3063,9 @@ details.details { max-width: 500px; text-align: center; width: 100%; } + .uw-facebook__view-on-source { + padding: 1rem 0; + text-align: center; } .uw-facebook .fb-post, .uw-facebook .fb-page { diff --git a/source/_patterns/04-components/facebook/_facebook.scss b/source/_patterns/04-components/facebook/_facebook.scss index 7947f617..905b4d7d 100644 --- a/source/_patterns/04-components/facebook/_facebook.scss +++ b/source/_patterns/04-components/facebook/_facebook.scss @@ -10,6 +10,11 @@ text-align: center; width: 100%; } + + &__view-on-source { + padding: 1rem 0; + text-align: center; + } } .uw-facebook { diff --git a/source/_patterns/04-components/facebook/facebook.twig b/source/_patterns/04-components/facebook/facebook.twig index 667533f2..64421b45 100644 --- a/source/_patterns/04-components/facebook/facebook.twig +++ b/source/_patterns/04-components/facebook/facebook.twig @@ -7,12 +7,21 @@ data-width="500" data-hide-cover="false" data-show-facepile="false" - adapt_container_width="true"></div> + adapt_container_width="true"> + </div> {% else %} <div class="fb-post" data-href="{{ url }}" - data-width="500"></div> + data-width="500"> + </div> {% endif %} <script src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.2"></script> </div> + <div class="uw-facebook__view-on-source"> + {% if feed_type == 'timeline' %} + View on <a href="https://facebook.com/{{ username }}">Facebook</a> + {% else %} + View on <a href="{{ url }}">Facebook</a> + {% endif %} + </div> </div> -- GitLab