This repository has been archived by the owner on Aug 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 264
/
portfolio.html
70 lines (58 loc) · 1.76 KB
/
portfolio.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{% extends 'layout.html' %}
{% block body %}
<link rel="stylesheet" href="/css/socialmedia.css">
<div class='portfolio'>
{% if message %}
<div class='message-container'>
<div class="alert alert-info">
<a class="close" data-dismiss="alert">×</a>
{{message}}
{{socialcode}}
</div>
</div>
{% endif %}
{% if owner %}
<div class='edit'>
<a href="edit" class='edit btn btn-primary'>Edit this page</a>
</div>
{% endif %}
<header>
{% if portfolio.attributes.title %}
<h1>{{portfolio.attributes.title}}</h1>
{% endif %}
{% if portfolio.attributes.subtitle %}
<h2>{{portfolio.attributes.subtitle}}</h1>
{% endif %}
</header>
<ul class='badges'>
{% for badge in portfolio.badges %}
<li>
<h3>{{badge.attributes.body.badge.name}}</h3>
<p class='story'>{{badge.attributes.body._userStory}}</p>
{% include 'badge-data.html' %}
</li>
{% endfor %}
</ul>
{% if postamble %}
<section class='postamble'>
{{postamble}}
</section>
{% endif %}
</div>
<script type="text/javascript" src="/js/social-media.js"></script>
<script>
function injectSocialMedia(container) {
// prevent this element from injecting social media again
container.onclick = function() { return false; }
var socialMedia = new SocialMedia();
var url = window.location.toString();
// inject twitter, g+ and facebook
socialMedia.hotLoad(container.querySelector(".twitter"), socialMedia.twitter, url);
socialMedia.hotLoad(container.querySelector(".google"), socialMedia.google, url);
socialMedia.hotLoad(container.querySelector(".facebook"), socialMedia.facebook, url);
// kill off the text label
var label = container.querySelector("span");
$(label).remove();
}
</script>
{% endblock %}