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)
|
Image.target_dir = os.path.join(os.getcwd(), "build", gallery)
|
||||||
|
|
||||||
template_to_render = page_template if gallery_settings.get("static") else gallery_index_template
|
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"]))
|
front_page_galleries_cover = reversed(sorted(front_page_galleries_cover, key=lambda x: x["date"]))
|
||||||
|
|
||||||
|
@ -148,7 +148,6 @@ footer {
|
|||||||
|
|
||||||
.back-to-home hr {
|
.back-to-home hr {
|
||||||
width: 14%;
|
width: 14%;
|
||||||
margin-top: 8em;
|
|
||||||
color: #DDD;
|
color: #DDD;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -253,3 +252,61 @@ footer a {
|
|||||||
margin-right: 11.5%;
|
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,49 +1,53 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<link type="text/css" rel="stylesheet" href="../static/css/fonts.css" media="screen,projection"/>
|
<link type="text/css" rel="stylesheet" href="../static/css/fonts.css" media="screen,projection"/>
|
||||||
<link type="text/css" rel="stylesheet" href="../static/css/style-page.css" media="screen,projection"/>
|
<link type="text/css" rel="stylesheet" href="../static/css/style-page.css" media="screen,projection"/>
|
||||||
<link type="text/css" rel="stylesheet" href="../static/css/baguetteBox.min.css" media="screen,projection"/>
|
<link type="text/css" rel="stylesheet" href="../static/css/baguetteBox.min.css" media="screen,projection"/>
|
||||||
<link type="text/css" rel="stylesheet" href="../static/css/panorama_viewer.css" media="screen,projection"/>
|
<link type="text/css" rel="stylesheet" href="../static/css/panorama_viewer.css" media="screen,projection"/>
|
||||||
|
|
||||||
<!--Let browser know website is optimized for mobile-->
|
<!--Let browser know website is optimized for mobile-->
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
<title>{{ gallery.title }} · {{ settings.title }}</title>
|
<title>{{ gallery.title }} · {{ settings.title }}</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
{% for section in gallery.sections %}
|
{% for section in gallery.sections %}
|
||||||
{% include "sections/" + section.type + ".html" %}
|
{% include "sections/" + section.type + ".html" %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
<div class="back-to-home">
|
{% if settings.share %}
|
||||||
<hr>
|
{% include "share.html" %}
|
||||||
<a href="../">
|
{% endif %}
|
||||||
<div id="logo" src="./../static/img/logo.svg"/>
|
|
||||||
HOME
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script type="text/javascript" src="../static/js/jquery-2.1.4.min.js" charset="utf-8"></script>
|
<div class="back-to-home">
|
||||||
<script type="text/javascript" src="../static/js/baguetteBox.min.js" charset="utf-8"></script>
|
<hr>
|
||||||
<script type="text/javascript" src="../static/js/jquery.panorama_viewer.min.js" charset="utf-8"></script>
|
<a href="../">
|
||||||
<script type="text/javascript" charset="utf-8">
|
<div id="logo" src="./../static/img/logo.svg"/>
|
||||||
$(function() {
|
HOME
|
||||||
baguetteBox.run(".baguette", {});
|
</div>
|
||||||
$(".panorama").panorama_viewer({
|
</a>
|
||||||
repeat: true,
|
</div>
|
||||||
direction: "horizontal",
|
|
||||||
animationTime: 150,
|
<script type="text/javascript" src="../static/js/jquery-2.1.4.min.js" charset="utf-8"></script>
|
||||||
easing: "linear",
|
<script type="text/javascript" src="../static/js/baguetteBox.min.js" charset="utf-8"></script>
|
||||||
overlay: true
|
<script type="text/javascript" src="../static/js/jquery.panorama_viewer.min.js" charset="utf-8"></script>
|
||||||
});
|
<script type="text/javascript" charset="utf-8">
|
||||||
|
$(function() {
|
||||||
|
baguetteBox.run(".baguette", {});
|
||||||
|
$(".panorama").panorama_viewer({
|
||||||
|
repeat: true,
|
||||||
|
direction: "horizontal",
|
||||||
|
animationTime: 150,
|
||||||
|
easing: "linear",
|
||||||
|
overlay: true
|
||||||
});
|
});
|
||||||
</script>
|
});
|
||||||
<footer>
|
</script>
|
||||||
<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>
|
{% include "footer.html" %}
|
||||||
</body>
|
|
||||||
|
</body>
|
||||||
</html>
|
</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" %}
|
{% include "sections/" + section.type + ".html" %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
|
{% if settings.share %}
|
||||||
|
{% include 'share.html' -%}
|
||||||
|
{% else -%}
|
||||||
<div class="fixed-action-btn" style="bottom: 45px; right: 24px;">
|
<div class="fixed-action-btn" style="bottom: 45px; right: 24px;">
|
||||||
<a href="../" class="btn-floating btn-large red">
|
<a href="../" class="btn-floating btn-large red">
|
||||||
<i class="mdi-action-home"></i>
|
<i class="mdi-action-home"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</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/jquery-2.1.4.min.js" charset="utf-8"></script>
|
||||||
<script type="text/javascript" src="../static/js/materialize.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