Commit 7f8da9502367f8764fffaa8338d09743edb8db25
Exists in
master
and in
39 other branches
Merge branch 'xmpp' of github.com:TracyWebTech/colab into xmpp
Showing
17 changed files
with
255 additions
and
2 deletions
Show diff stats
requirements.txt
src/colab/custom_settings.py
... | ... | @@ -16,6 +16,7 @@ LANGUAGES = ( |
16 | 16 | LANGUAGE_CODE = 'pt-br' |
17 | 17 | |
18 | 18 | INSTALLED_APPS = INSTALLED_APPS + ( |
19 | + | |
19 | 20 | # Not standard apps |
20 | 21 | 'south', |
21 | 22 | 'cliauth', |
... | ... | @@ -25,6 +26,12 @@ INSTALLED_APPS = INSTALLED_APPS + ( |
25 | 26 | 'api', |
26 | 27 | 'rss', |
27 | 28 | 'colab.deprecated', |
29 | + 'planet', | |
30 | + | |
31 | + # Feedzilla and deps | |
32 | + 'feedzilla', | |
33 | + 'tagging', | |
34 | + 'common', | |
28 | 35 | ) |
29 | 36 | |
30 | 37 | LOGGING = { |
... | ... | @@ -87,6 +94,11 @@ STATICFILES_DIRS = ( |
87 | 94 | os.path.join(BASE_DIR, 'colab', 'static'), |
88 | 95 | ) |
89 | 96 | |
97 | +from feedzilla.settings import * | |
98 | +FEEDZILLA_PAGE_SIZE = 5 | |
99 | +FEEDZILLA_SITE_TITLE = gettext(u'Planet Colab') | |
100 | +FEEDZILLA_SITE_DESCRIPTION = gettext(u'Colab blog aggregator') | |
101 | + | |
90 | 102 | try: |
91 | 103 | from local_settings import * |
92 | 104 | except ImportError: | ... | ... |
src/colab/deprecated/templates/base.html
src/colab/static/css/screen.css
... | ... | @@ -168,17 +168,34 @@ label.avatar-placeholder { |
168 | 168 | } |
169 | 169 | |
170 | 170 | .tag { |
171 | + text-decoration: none; | |
171 | 172 | background-color: #2183b3; |
172 | 173 | padding: 2px 4px; |
173 | - border-radius: 5; | |
174 | + border-radius: 5px; | |
174 | 175 | font-size: 90%; |
175 | 176 | color: #fff; |
176 | 177 | margin-right: 5px; |
178 | + line-height: 2; | |
179 | + white-space: nowrap; | |
177 | 180 | } |
178 | 181 | |
179 | 182 | .tag:hover, |
180 | 183 | .tag:focus { |
181 | 184 | background-color: #21b6e6; |
185 | + color: #fff; | |
186 | +} | |
187 | + | |
188 | +.tag-cloud .size-1 { | |
189 | + font-size: 90%; | |
190 | +} | |
191 | +.tag-cloud .size-2 { | |
192 | + font-size: 100%; | |
193 | +} | |
194 | +.tag-cloud .size-3 { | |
195 | + font-size: 130%; | |
196 | +} | |
197 | +.tag-cloud .size-4 { | |
198 | + font-size: 150%; | |
182 | 199 | } |
183 | 200 | |
184 | 201 | .quiet { |
... | ... | @@ -342,3 +359,19 @@ form#set-custom-xmpp-status .custom-xmpp-status { |
342 | 359 | #available-chatrooms .available-chatroom { |
343 | 360 | margin-left: 1px; |
344 | 361 | } |
362 | + | |
363 | +.blog-post-item h3 a { | |
364 | + text-decoration: none; | |
365 | +} | |
366 | + | |
367 | +.blog-post-item h3 { | |
368 | + margin-bottom: 0.5em; | |
369 | +} | |
370 | + | |
371 | +.blog-post-item .post-meta { | |
372 | + margin-bottom: 2em; | |
373 | +} | |
374 | + | |
375 | +.blog-post-item .tags { | |
376 | + margin-top: 1em; | |
377 | +} | ... | ... |
src/colab/urls.py
... | ... | @@ -51,6 +51,8 @@ urlpatterns = patterns('', |
51 | 51 | |
52 | 52 | url(r'^account/logout/$', 'django.contrib.auth.views.logout', |
53 | 53 | {'next_page': '/'}, name='logout'), |
54 | + | |
55 | + url(r'^planet/', include('feedzilla.urls')), | |
54 | 56 | |
55 | 57 | # Uncomment the next line to enable the admin: |
56 | 58 | url(r'^colab/admin/', include(admin.site.urls)), | ... | ... |
No preview for this file type
... | ... | @@ -0,0 +1,67 @@ |
1 | +# SOME DESCRIPTIVE TITLE. | |
2 | +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | |
3 | +# This file is distributed under the same license as the PACKAGE package. | |
4 | +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | |
5 | +# | |
6 | +msgid "" | |
7 | +msgstr "" | |
8 | +"Project-Id-Version: PACKAGE VERSION\n" | |
9 | +"Report-Msgid-Bugs-To: \n" | |
10 | +"POT-Creation-Date: 2013-07-24 18:36-0300\n" | |
11 | +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | |
12 | +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | |
13 | +"Language-Team: LANGUAGE <LL@li.org>\n" | |
14 | +"Language: \n" | |
15 | +"MIME-Version: 1.0\n" | |
16 | +"Content-Type: text/plain; charset=UTF-8\n" | |
17 | +"Content-Transfer-Encoding: 8bit\n" | |
18 | +"Plural-Forms: nplurals=2; plural=(n > 1);\n" | |
19 | + | |
20 | +#: templates/common/pagination.html:5 templates/common/pagination.html.py:7 | |
21 | +msgid "previous" | |
22 | +msgstr "anterior" | |
23 | + | |
24 | +#: templates/common/pagination.html:31 templates/common/pagination.html:33 | |
25 | +msgid "next" | |
26 | +msgstr "próxima" | |
27 | + | |
28 | +#: templates/feedzilla/_post_template.html:9 | |
29 | +msgid "From" | |
30 | +msgstr "De" | |
31 | + | |
32 | +#: templates/feedzilla/_post_template.html:9 | |
33 | +msgid "on" | |
34 | +msgstr "em" | |
35 | + | |
36 | +#: templates/feedzilla/_post_template.html:17 | |
37 | +msgid "Read original" | |
38 | +msgstr "Ler original" | |
39 | + | |
40 | +#: templates/feedzilla/base.html:6 | |
41 | +msgid "Planet" | |
42 | +msgstr "Planet" | |
43 | + | |
44 | +#: templates/feedzilla/base.html:15 | |
45 | +msgid "Submit a blog" | |
46 | +msgstr "Solicite a inclusão de um blog" | |
47 | + | |
48 | +#: templates/feedzilla/base.html:18 | |
49 | +msgid "Tags" | |
50 | +msgstr "Tags" | |
51 | + | |
52 | +#: templates/feedzilla/base.html:22 | |
53 | +msgid "Source Blogs" | |
54 | +msgstr "Blogs Fonte" | |
55 | + | |
56 | +#: templates/feedzilla/tag.html:5 | |
57 | +#, python-format | |
58 | +msgid "Posts with «%(tag)s» label" | |
59 | +msgstr "" | |
60 | + | |
61 | +#: templates/feedzilla/tag.html:14 | |
62 | +msgid "No posts with such label" | |
63 | +msgstr "" | |
64 | + | |
65 | +#, fuzzy | |
66 | +#~ msgid "Blogs fonte" | |
67 | +#~ msgstr "Blogs" | ... | ... |
... | ... | @@ -0,0 +1,38 @@ |
1 | +{% load i18n %} | |
2 | +{% if page.paginator.num_pages > 1 %} | |
3 | +<div class="pagination"> | |
4 | + {% if page.has_previous %} | |
5 | + <a href="{{ alterpath }}{{ page.previous_page_url }}">« {% trans "previous" %}</a> | |
6 | + {% else %} | |
7 | + <span class="control">« {% trans "previous" %}</span> | |
8 | + {% endif %} | |
9 | + | |
10 | + {% if page.paginator.frame_start_page > 1 %} | |
11 | + <a href="{{ alterpath }}{{ page.first_page_url }}">1</a> | |
12 | + {% if page.paginator.frame_start_page > 2 %} | |
13 | + <span class="control">...</span> | |
14 | + {% endif %} | |
15 | + {% endif %} | |
16 | + | |
17 | + {% for number, url in page.paginator.frame %} | |
18 | + {% if not url %}..{% else %} | |
19 | + <a {% ifequal page.number number%}class="active"{% endifequal %} href="{{ alterpath }}{{ url }}">{{ number }}</a> | |
20 | + {% endif %} | |
21 | + {% endfor %} | |
22 | + | |
23 | + {% if page.paginator.frame_end_page != page.paginator.num_pages %} | |
24 | + {% if page.paginator.frame_end_page != page.paginator.num_pages|add:"-1" %} | |
25 | + <span class="control">...</span> | |
26 | + {% endif %} | |
27 | + <a href="{{ alterpath }}{{ page.last_page_url }}">{{ page.paginator.num_pages }}</a> | |
28 | + {% endif %} | |
29 | + | |
30 | + {% if page.has_next %} | |
31 | + <a href="{{ alterpath }}{{ page.next_page_url }}">{% trans "next" %} »</a> | |
32 | + {% else %} | |
33 | + <span class="control">{% trans "next" %} »</span> | |
34 | + {% endif %} | |
35 | + | |
36 | + <div class="clear"></div> | |
37 | +</div> | |
38 | +{% endif %} | ... | ... |
... | ... | @@ -0,0 +1,30 @@ |
1 | +{% load tagging_tags %} | |
2 | +{% load i18n %} | |
3 | + | |
4 | +<div class="blog-post-item"> | |
5 | + <a name="post-{{ post.pk }}"></a> | |
6 | + | |
7 | + <h3><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></h3> | |
8 | + | |
9 | + <div class="post-meta">{% trans "From" %} <a href="{{ post.feed.site_url }}">{{ post.feed.author_or_title }}</a> {% trans "on" %} {{ post.created }}</div> | |
10 | + | |
11 | + | |
12 | + <div class="content"> | |
13 | + {{ post.summary|safe }} | |
14 | + </div> | |
15 | + | |
16 | + <div> | |
17 | + <b><a href="{{ post.get_absolute_url }}">{% trans "Read original" %}</a></b> | |
18 | + </div> | |
19 | + | |
20 | + {% if post.tags %} | |
21 | + <div class="tags"> | |
22 | + <span><b>Tags:</b> | |
23 | + {% tags_for_object post as tags %} | |
24 | + {% for tag in tags %} | |
25 | + <a href="{% url "feedzilla_tag" tag.name %}" class="tag">{{ tag }}</a> | |
26 | + {% endfor %} | |
27 | + </span> | |
28 | + </div> | |
29 | + {% endif %} | |
30 | +</div> | ... | ... |
... | ... | @@ -0,0 +1,26 @@ |
1 | +{% extends 'base.html' %} | |
2 | +{% load i18n %} | |
3 | +{% load feedzilla_tags %} | |
4 | + | |
5 | +{% block main-content %} | |
6 | + <h2>{% trans 'Planet' %}</h2> | |
7 | + <hr/> | |
8 | + | |
9 | + <div class="span-18"> | |
10 | + {% block feedzilla_content %}{% endblock %} | |
11 | + </div> | |
12 | + | |
13 | + <div class="span-6 last"> | |
14 | + <div class="box"> | |
15 | + <a href="{% url "feedzilla_submit_blog" %}">{% trans "Submit a blog" %}</a> | |
16 | + </div> | |
17 | + <div class="box"> | |
18 | + <h3>{% trans 'Tags' %}</h3> | |
19 | + {% feedzilla_tag_cloud %} | |
20 | + </div> | |
21 | + <div class="box"> | |
22 | + <h3>{% trans 'Source Blogs' %}</h3> | |
23 | + {% feedzilla_donor_list %} | |
24 | + </div> | |
25 | + </div> | |
26 | +{% endblock %} | ... | ... |
... | ... | @@ -0,0 +1,11 @@ |
1 | +{% extends 'feedzilla/base.html' %} | |
2 | +{% load i18n %} | |
3 | + | |
4 | +{% block feedzilla_content %} | |
5 | + {% for post in page.object_list %} | |
6 | + {% include 'feedzilla/_post_template.html' %} | |
7 | + <hr> | |
8 | + {% endfor %} | |
9 | + | |
10 | + {% include "pagination.html" %} | |
11 | +{% endblock %} | ... | ... |
... | ... | @@ -0,0 +1,16 @@ |
1 | +{% extends 'feedzilla/base.html' %} | |
2 | +{% load i18n %} | |
3 | + | |
4 | +{% block feedzilla_content %} | |
5 | +<h3>{% block title %}{% blocktrans %}Posts with «{{ tag }}» label{% endblocktrans %}{% endblock title %}</h3> | |
6 | +<hr> | |
7 | +{% if page.object_list %} | |
8 | + {% for post in page.object_list %} | |
9 | + {% include 'feedzilla/_post_template.html' %} | |
10 | + <hr> | |
11 | + {% endfor %} | |
12 | + {% include "pagination.html" %} | |
13 | +{% else %} | |
14 | + <p>{% trans "No posts with such label" %}</p> | |
15 | +{% endif %} | |
16 | +{% endblock %} | ... | ... |