Merge lp:~cjohnston/summit/open-graph into lp:summit

Proposed by Chris Johnston
Status: Merged
Approved by: Michael Hall
Approved revision: 256
Merged at revision: 261
Proposed branch: lp:~cjohnston/summit/open-graph
Merge into: lp:summit
Diff against target: 222 lines (+129/-42)
3 files modified
summit/media/css/style.css (+18/-0)
summit/schedule/templates/schedule/meeting.html (+45/-11)
summit/schedule/templates/schedule/summit.html (+66/-31)
To merge this branch: bzr merge lp:~cjohnston/summit/open-graph
Reviewer Review Type Date Requested Status
Michael Hall (community) Approve
Review via email: mp+89602@code.launchpad.net

Commit message

Starts adding social media to summit by adding opengraph

To post a comment you must log in.
lp:~cjohnston/summit/open-graph updated
255. By Chris Johnston

Fixes meeting page.

256. By Chris Johnston

Adds cof and updates links

Revision history for this message
Michael Hall (mhall119) wrote :

Looks good. Has a minor conflict with trunk, so I'm going to land it manually with the fix

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'summit/media/css/style.css'
2--- summit/media/css/style.css 2010-10-05 13:21:41 +0000
3+++ summit/media/css/style.css 2012-01-22 18:53:23 +0000
4@@ -48,3 +48,21 @@
5 a.launchpad img {
6 border: 0;
7 }
8+
9+.double-side-content {
10+ float: left;
11+ margin: 5px 10px;
12+ padding: 10px;
13+ width: 600px;
14+}
15+
16+.summit-columns { -webkit-box-shadow: 0px 1px 1px #CCC; -moz-box-shadow:0 1px 1px #CCC; }
17+.summit-columns { clear: both; background-color: #F7F7F7; padding: 5px; margin-bottom: -3px; }
18+.summit-columns h2 { color: #444; font-weight: normal; border-bottom: 1px solid #EDEDED; text-indent: 10px; margin-bottom: 0; }
19+.summit-columns ul { list-style: none; margin: 0; border-top: 1px solid #FFF; }
20+.summit-columns ul li { width: 23%; float: left; padding-left: 10px; }
21+.summit-columns ul li h3,
22+.summit-columns ul li h3 a { color: #DD4814; text-decoration: none; margin-bottom: 0; margin-top: 5px; }
23+.summit-columns ul li h3 a:hover { text-decoration: underline; }
24+.summit-columns ul li img { padding: 10px 0 5px; }
25+.summit-columns p { margin-bottom: 5px; }
26
27=== added file 'summit/media/images/cof_orange_hex1.png'
28Binary files summit/media/images/cof_orange_hex1.png 1970-01-01 00:00:00 +0000 and summit/media/images/cof_orange_hex1.png 2012-01-22 18:53:23 +0000 differ
29=== modified file 'summit/schedule/templates/schedule/meeting.html'
30--- summit/schedule/templates/schedule/meeting.html 2012-01-20 22:30:57 +0000
31+++ summit/schedule/templates/schedule/meeting.html 2012-01-22 18:53:23 +0000
32@@ -2,11 +2,25 @@
33 {% load datetime %}
34
35 {% block title %}
36- {{ meeting.title }} -
37- {% if schedule.date %}{{ schedule.date|strftime:"%Y-%m-%d" }}{% endif %}
38+ {{ meeting.title }}
39+ {% if schedule.date %} - {{ schedule.date|strftime:"%Y-%m-%d" }}{% endif %}
40 {% if schedule.room %}{{ schedule.room.title }}{% endif %}
41 {% endblock %}
42
43+{% block extrahead %}{{ block.super }}
44+<meta property="fb:app_id" content="310260202349342" />
45+<meta property="og:title" content="{{ meeting.title }}{% if schedule.date %} - {{ schedule.date|strftime:"%Y-%m-%d" }}{% endif %}{% if schedule.room %}{{ schedule.room.title }}{% endif %}" />
46+{% if meeting.description %}
47+<meta property="og:description" content="{{ meeting.description|linebreaks|striptags }}" />
48+{% endif %}
49+<meta property="og:url" content="http://summit.ubuntu.com{% url schedule.views.meeting meeting.summit.name, meeting.id, meeting.name %}" />
50+<meta property="og:image" content="http://summit.ubuntu.com/media/images/cof_orange_hex1.png" />
51+<meta property="og:site_name" content="The Summit Scheduler" />
52+<meta property="og:type" content="article" />
53+<meta itemprop="name" content="{{ meeting.title }}{% if schedule.date %} - {{ schedule.date|strftime:"%Y-%m-%d" }}{% endif %}{% if schedule.room %}{{ schedule.room.title }}{% endif %}" />
54+<meta itemprop="description" content="{{ meeting.description|linebreaks|striptags }}" />
55+{% endblock %}
56+
57 {% block sub_nav_links %}
58 {% if meeting.private %}
59 {% if meeting.private_key and meeting.private_key != '' %}
60@@ -29,19 +43,39 @@
61 {% endblock %}
62
63 {% block content %}
64-
65-<article class="main-content">
66-
67- <h2>{{ meeting.title }}</h2>
68-
69- {% for ai in agenda_items %}
70- <h3>{{ ai.slot }} in {{ ai.room.name }}</h3>
71- {% endfor %}
72-
73+<section class="double-side-content">
74+ <h2>{{ meeting.title }}</h2>
75+ {% for ai in agenda_items %}
76+ <h3>{{ ai.slot }} in {{ ai.room.name }}</h3>
77+ {% endfor %}
78 <div id="description">
79 {{ meeting.description }}
80 </div>
81
82+</section>
83+{% if meeting.private %}
84+{% else %}
85+<article class="side-content alone">
86+<div class="share">
87+ <a href="http://www.reddit.com/submit" onclick="window.location = 'http://www.reddit.com/submit?url=' + encodeURIComponent(window.location); return false"> <img style="padding-bottom: 4px;"src="http://www.reddit.com/static/spreddit7.gif" alt="submit to reddit" border="0" /></a><br />
88+ <div id="fb-root"></div>
89+ <script>(function(d, s, id) {
90+ var js, fjs = d.getElementsByTagName(s)[0];
91+ if (d.getElementById(id)) {return;}
92+ js = d.createElement(s); js.id = id;
93+ js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=310260202349342";
94+ fjs.parentNode.insertBefore(js, fjs);
95+ }(document, 'script', 'facebook-jssdk'));</script>
96+ <div class="fb-like" data-href="" data-send="false" data-layout="box_count" data-width="40" data-show-faces="false" data-font="arial"></div>
97+ <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
98+ <g:plusone size="tall"></g:plusone>
99+ <a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-lang="en">Tweet</a>
100+ <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
101+ <script src="http://www.stumbleupon.com/hostedbadge.php?s=5"></script>
102+</div>
103+</article>
104+{% endif %}
105+
106 {% if meeting.private %}
107 <h3>WARNING: Contents of this pad may not be private, and may be searcheable by non-attendees!</h3>
108 {% endif %}
109
110=== modified file 'summit/schedule/templates/schedule/summit.html'
111--- summit/schedule/templates/schedule/summit.html 2012-01-19 21:26:08 +0000
112+++ summit/schedule/templates/schedule/summit.html 2012-01-22 18:53:23 +0000
113@@ -4,6 +4,20 @@
114
115 {% block title %}{{ summit.title }}{% endblock %}
116
117+{% block extrahead %}{{ block.super }}
118+<meta property="fb:app_id" content="310260202349342" />
119+<meta property="og:title" content="{{ summit.title }} {{ summit.start|strftime:"%d" }} - {{ summit.end|strftime:"%d, %b. %Y" }}" />
120+{% if summit.description %}
121+<meta property="og:description" content="{{ summit.description|safe }}" />
122+{% endif %}
123+<meta property="og:url" content="http://summit.ubuntu.com{% url schedule.views.summit summit.name %}" />
124+<meta property="og:image" content="http://summit.ubuntu.com/media/images/cof_orange_hex1.png"/>
125+<meta property="og:site_name" content="The Summit Scheduler"/>
126+<meta property="og:type" content="summit-scheduler:meeting"/>
127+<meta itemprop="name" content="{{ summit.title }} {{ summit.start|strftime:"%d" }} - {{ summit.end|strftime:"%d, %b. %Y" }}" />
128+<meta itemprop="description" content="{{ summit.description|linebreaks|striptags }}" />
129+{% endblock %}
130+
131 {% block sub_nav_links %}
132
133 {% ifequal summit.state "sponsor" %}
134@@ -31,36 +45,57 @@
135
136 {% block content %}
137
138-<article class="main-content">
139-<h1>{{ summit.title }}</h1>
140-<p>
141-{% include "schedule/summit_info.html" %}
142-</p>
143-</article>
144-
145-<article class="main-content">
146-{% if attendee %}
147-<p>You are attending, you can update the days and times of your attendance in
148-<a class="launchpad" href="http://launchpad.net/sprints/{{ summit.name }}/+attend"><img src="/media/img/gem-sm.png" /> Launchpad</a>.</p>
149-<p>Download your
150-<a href="/{{ summit.name }}/participant/my_schedule_{{ attendee.secret_key }}.ical">Participation Schedule</a> to import into your Calendar.
151-</p>
152-{% else %}
153-{% if request.user.is_authenticated %}
154-<p><strong>You are not registered as attending.</strong></p>
155-<p>You can register your attendance in
156-<a class="launchpad" href="http://launchpad.net/sprints/{{ summit.name }}/+attend"><img src="/media/img/gem-sm.png" /> Launchpad</a>.
157-If you have recently done so, wait a few minutes and reload this page.</p>
158-{% else %}
159-<p><strong>You are not logged in.</strong></p>
160-<p><a href="/openid/login?next={{login_next}}">Log in now</a></p>
161-{% endif %}
162-{% endif %}
163-</article>
164-
165-<article class="main-content">
166-<p>
167-{% include "schedule/schedule_list.html" %}
168-</p>
169+<section class="double-side-content">
170+ <h1>{{ summit.title }}</h1>
171+ <p>
172+ {% include "schedule/summit_info.html" %}
173+ </p>
174+</section>
175+<article class="side-content alone">
176+ <div class="share">
177+ <a href="http://www.reddit.com/submit" onclick="window.location = 'http://www.reddit.com/submit?url=' + encodeURIComponent(window.location); return false"> <img style="padding-bottom: 4px;"src="http://www.reddit.com/static/spreddit7.gif" alt="submit to reddit" border="0" /></a><br />
178+ <div id="fb-root"></div>
179+ <script>(function(d, s, id) {
180+ var js, fjs = d.getElementsByTagName(s)[0];
181+ if (d.getElementById(id)) {return;}
182+ js = d.createElement(s); js.id = id;
183+ js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=310260202349342";
184+ fjs.parentNode.insertBefore(js, fjs);
185+ }(document, 'script', 'facebook-jssdk'));</script>
186+ <div class="fb-like" data-href="" data-send="false" data-layout="box_count" data-width="40" data-show-faces="false" data-font="arial"></div>
187+ <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
188+ <g:plusone size="tall"></g:plusone>
189+ <a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-lang="en">Tweet</a>
190+ <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
191+ <script src="http://www.stumbleupon.com/hostedbadge.php?s=5"></script>
192+ </div>
193+</article>
194+
195+<article class="main-content">
196+ {% if attendee %}
197+ <p>You are attending, you can update the days and times of your attendance in
198+ <a class="launchpad" href="http://launchpad.net/sprints/{{ summit.name }}/+attend"><img src="/media/img/gem-sm.png" /> Launchpad</a>.
199+ </p>
200+ <p>Download your
201+ <a href="/{{ summit.name }}/participant/my_schedule_{{ attendee.secret_key }}.ical">Participation Schedule</a> to import into your Calendar.
202+ </p>
203+ {% else %}
204+ {% if request.user.is_authenticated %}
205+ <p><strong>You are not registered as attending.</strong></p>
206+ <p>You can register your attendance in
207+ <a class="launchpad" href="http://launchpad.net/sprints/{{ summit.name }}/+attend"><img src="/media/img/gem-sm.png" /> Launchpad</a>.
208+ If you have recently done so, wait a few minutes and reload this page.
209+ </p>
210+ {% else %}
211+ <p><strong>You are not logged in.</strong></p>
212+ <p><a href="/openid/login?next={{login_next}}">Log in now</a></p>
213+ {% endif %}
214+ {% endif %}
215+</article>
216+
217+<article class="main-content">
218+ <p>
219+ {% include "schedule/schedule_list.html" %}
220+ </p>
221 </article>
222 {% endblock %}

Subscribers

People subscribed via source and target branches