Social sharing on homepage

This commit is contained in:
Alicia Sykes
2018-01-07 13:19:56 +00:00
parent 110ea533c1
commit 7e4b919f37
6 changed files with 47 additions and 10 deletions

View File

@@ -58,7 +58,22 @@ $(document).ready ->
$(this).fadeTo 0, max
fade true
# Sharing stuff
$("#share").jsSocials({
shares: ["email", "twitter", "facebook", "googleplus", "linkedin", "pinterest", "stumbleupon", "whatsapp"]
});
$(window).scroll ->
threshold = 5
op = ($(document).height() - $(window).height() - $(window).scrollTop()) / threshold
if op <= 0
window.setTimeout( (()-> $('#scroll-3').slideDown(100)), 2000)
fade false
return
$('#scroll-3').click(()->
$(this).fadeOut('fast', (()-> $(this).remove() )) # Get rid of more info button
$('#more-info-section').slideDown(200, ()-> $('html, body').animate { scrollTop: $('#more-info-section').offset().top }, 850)
)

View File

@@ -88,4 +88,5 @@ h3{
.sml-margin{margin: 5px;}
.auto-overflow{overflow: auto; }
.bold{font-weight: bold;}
.text-center{ text-align: center;}
.text-center{ text-align: center;}
.cursor-pointer{ cursor: pointer; }

View File

@@ -1,4 +1,3 @@
.card-panel
#share
.github-button
a(class='github-button', href='https://github.com/lissy93/twitter-sentiment-visualisation', data-show-count='true', data-icon='octicon-star' aria-label='Star lissy93/twitter-sentiment-visualisation on GitHub') Star this project on GitHub
#share
.github-button
a(class='github-button', href='https://github.com/lissy93/twitter-sentiment-visualisation', data-show-count='true', data-icon='octicon-star' aria-label='Star lissy93/twitter-sentiment-visualisation on GitHub') Star this project on GitHub

View File

@@ -22,5 +22,9 @@ footer.page-footer.zero-padding
.footer-copyright
.container
a.flow-text.white-text(href='http://aliciasykes.com') &copy; Alicia Sykes 2016
a.flow-text.white-text.right(href='https://github.com/Lissy93/twitter-sentiment-visualisation') Source Code & Documentation
.row
.col.s12.m6
a.flow-text.white-text(href='http://aliciasykes.com') &copy; Alicia Sykes 2018
a.flow-text.white-text.right(href='https://github.com/Lissy93/twitter-sentiment-visualisation') Source Code & Documentation
.col.s12.m6
a(class='github-button', href='https://github.com/lissy93/twitter-sentiment-visualisation', data-show-count='true', data-icon='octicon-star' aria-label='Star lissy93/twitter-sentiment-visualisation on GitHub') Star this project on GitHub

View File

@@ -75,6 +75,24 @@ block content
.card-content
span.card-title.grey-text.text-darken-4= page.title
a#scroll-3.cursor-pointer.hide-mobile(style='display: none;')
p.center-align Scroll Down for More Information
div#more-info-section(style='display: none;')
.row
.col.s12.offset-m2.m8.l6.offset-l3.xl4.offset-xl4
.card-panel.more-info
h4.flow-text For more information....
a.waves-effect.waves-teal.btn-flat.btn(href='/now') The World Now
a.waves-effect.waves-teal.btn-flat.btn(href='/Search') Make a new Search
a.waves-effect.waves-teal.btn-flat.btn(href='/about') About Sentiment Sweep
a.waves-effect.waves-teal.btn-flat.btn(href='https://github.com/Lissy93/twitter-sentiment-visualisation') Source Code + Documentation
a(href='http://aliciasykes.com') © Alicia Sykes 2018
a(href='https://github.com/Lissy93/twitter-sentiment-visualisation/blob/dev/docs/LICENSE.md') Open sourced under MIT
.card-panel
include ./component_social
footer
.footer-copyright
.row.text-center
@@ -83,7 +101,7 @@ block content
.col.s12.m4
a.small-grey(href='https://github.com/Lissy93/twitter-sentiment-visualisation') Source Code and Documentation
.col.s12.m4
a.small-grey(href='http://aliciasykes.com') &copy; Alicia Sykes 2016
a.small-grey(href='http://aliciasykes.com') &copy; Alicia Sykes 2018
block scripts
script.

View File

@@ -156,8 +156,8 @@ block content
a.waves-effect.waves-teal.btn-flat.btn(href='https://github.com/Lissy93/twitter-sentiment-visualisation') Source Code + Documentation
a(href='http://aliciasykes.com') © Alicia Sykes 2018
a(href='https://github.com/Lissy93/twitter-sentiment-visualisation/blob/dev/docs/LICENSE.md') Open sourced under MIT
include ./component_social
.card-panel
include ./component_social
include ./footer