add social share
This commit is contained in:
parent
aba2e4fc59
commit
916bf03adc
@ -157,7 +157,7 @@ def main():
|
||||
Image.target_dir = os.path.join(os.getcwd(), "build", gallery)
|
||||
|
||||
template_to_render = page_template if gallery_settings.get("static") else gallery_index_template
|
||||
open(os.path.join("build", gallery, "index.html"), "w").write(template_to_render.render(settings=settings, gallery=gallery_settings, Image=Image).encode("Utf-8"))
|
||||
open(os.path.join("build", gallery, "index.html"), "w").write(template_to_render.render(settings=settings, gallery=gallery_settings, Image=Image, link=gallery).encode("Utf-8"))
|
||||
|
||||
front_page_galleries_cover = reversed(sorted(front_page_galleries_cover, key=lambda x: x["date"]))
|
||||
|
||||
|
@ -148,7 +148,6 @@ footer {
|
||||
|
||||
.back-to-home hr {
|
||||
width: 14%;
|
||||
margin-top: 8em;
|
||||
color: #DDD;
|
||||
}
|
||||
|
||||
@ -253,3 +252,61 @@ footer a {
|
||||
margin-right: 11.5%;
|
||||
}
|
||||
|
||||
.center, .center-align {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
.share {
|
||||
text-align: center;
|
||||
height: auto;
|
||||
position: relative;
|
||||
bottom: 0;
|
||||
padding: 0 0 10px 0;
|
||||
}
|
||||
|
||||
|
||||
ul.icon {
|
||||
padding: 0;
|
||||
margin: 10px 0 0 0;
|
||||
}
|
||||
|
||||
ul.icon li {
|
||||
padding: 0;
|
||||
list-style-type: none;
|
||||
display:inline-block;
|
||||
}
|
||||
|
||||
ul.icon a {
|
||||
display: block;
|
||||
float: left;
|
||||
background: url(../img/social-share.png) no-repeat;
|
||||
background-size: 196px 23px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
ul.icon li, ul.icon a {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
text-indent: -999999em;
|
||||
overflow: hidden;
|
||||
list-style-type: none;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
a.twitter {
|
||||
background-position: 5px 0 !important;
|
||||
}
|
||||
|
||||
a.facebook {
|
||||
background-position: -57px 0 !important;
|
||||
}
|
||||
|
||||
a.pinterest {
|
||||
background-position: -114px 0 !important;
|
||||
}
|
||||
|
||||
a.google {
|
||||
background-position: -172px 0 !important;
|
||||
}
|
||||
|
||||
|
BIN
prosopopee/themes/exposure/static/img/social-share.png
Normal file
BIN
prosopopee/themes/exposure/static/img/social-share.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
@ -1,6 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta charset="UTF-8">
|
||||
<link type="text/css" rel="stylesheet" href="../static/css/fonts.css" media="screen,projection"/>
|
||||
@ -11,13 +11,17 @@
|
||||
<!--Let browser know website is optimized for mobile-->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>{{ gallery.title }} · {{ settings.title }}</title>
|
||||
</head>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body>
|
||||
{% for section in gallery.sections %}
|
||||
{% include "sections/" + section.type + ".html" %}
|
||||
{% endfor %}
|
||||
|
||||
{% if settings.share %}
|
||||
{% include "share.html" %}
|
||||
{% endif %}
|
||||
|
||||
<div class="back-to-home">
|
||||
<hr>
|
||||
<a href="../">
|
||||
@ -31,7 +35,7 @@
|
||||
<script type="text/javascript" src="../static/js/baguetteBox.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../static/js/jquery.panorama_viewer.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$(function() {
|
||||
$(function() {
|
||||
baguetteBox.run(".baguette", {});
|
||||
$(".panorama").panorama_viewer({
|
||||
repeat: true,
|
||||
@ -40,10 +44,10 @@
|
||||
easing: "linear",
|
||||
overlay: true
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<footer>
|
||||
<p>Generated using <a href="https://github.com/psycojoker/prosopopee">Prosopopée</a> · content under <a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a> · atom logo by <a href="https://thenounproject.com/jjjon/">Jonathan Li</a> under <a href="https://creativecommons.org/licenses/by/3.0/">CC-BY</a></p>
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
{% include "footer.html" %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
17
prosopopee/themes/exposure/templates/share.html
Normal file
17
prosopopee/themes/exposure/templates/share.html
Normal file
@ -0,0 +1,17 @@
|
||||
{% set absolute_url = settings.url + "/" + link -%}
|
||||
<div class=share>
|
||||
<ul class="icon">
|
||||
<li>
|
||||
<a class="twitter" href="https://twitter.com/share?text={{ gallery.name }}&url={{absolute_url}}&hashtags=weareawesome&via=bluleadz" target="_blank" class="twitter">Twitter</i></a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="facebook" href="http://www.facebook.com/share.php?u={{absolute_url}}" target="_blank" class="facebook">Facebook</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="pinterest" href="http://www.pinterest.com/pin/create/button/?url={{absolute_url}}" target="_blank" class="linkedin">Pinterest</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="google" href="https://plus.google.com/share?url={{absolute_url}}" target="_blank" class="google">Google +</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
@ -21,11 +21,16 @@
|
||||
{% include "sections/" + section.type + ".html" %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% if settings.share %}
|
||||
{% include 'share.html' -%}
|
||||
{% else -%}
|
||||
<div class="fixed-action-btn" style="bottom: 45px; right: 24px;">
|
||||
<a href="../" class="btn-floating btn-large red">
|
||||
<i class="mdi-action-home"></i>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<script type="text/javascript" src="../static/js/jquery-2.1.4.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../static/js/materialize.min.js" charset="utf-8"></script>
|
||||
|
23
prosopopee/themes/material/templates/share.html
Normal file
23
prosopopee/themes/material/templates/share.html
Normal file
@ -0,0 +1,23 @@
|
||||
{% set absolute_url = settings.url + "/" + link -%}
|
||||
<div class="fixed-action-btn horizontal click-to-toggle" style="bottom: 45px; right: 24px;">
|
||||
<a class="btn-floating btn-large red">
|
||||
<i class="mdi-content-add"></i>
|
||||
</a>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="../" class="btn-floating btn-large red"><i class="mdi-action-home"></i></a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn-floating grey lighten-3" href="https://twitter.com/share?text={{ gallery.name }}&url={{absolute_url}}&hashtags=weareawesome&via=bluleadz" target="_blank" class="twitter">Twitter</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn-floating grey lighten-3" href="http://www.facebook.com/share.php?u={{absolute_url}}" target="_blank" class="facebook">Facebook</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn-floating grey lighten-3" href="http://www.pinterest.com/pin/create/button/?url={{absolute_url}}" target="_blank" class="linkedin">Pinterest</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn-floating grey lighten-3" href="https://plus.google.com/share?url={{absolute_url}}" target="_blank" class="google">Google +</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
Loading…
x
Reference in New Issue
Block a user