• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

news4 - RSS aggrigation system


Commit MetaInfo

Révision31b5cb717dfa55fa8c830f0cc73fa91842575337 (tree)
l'heure2012-10-26 19:54:16
Auteurhylom <hylom@user...>
Commiterhylom

Message de Log

Merge branch 'master' into live

Change Summary

Modification

--- a/css/gnews.css
+++ b/css/gnews.css
@@ -10,6 +10,14 @@ a {
1010 margin-bottom: 1em;
1111 }
1212
13+.entry-header .thumbnail {
14+ width: 100px;
15+ float: right;
16+ margin-left: 10px;
17+ margin-bottom: 10px;
18+ pagging: 1px;
19+}
20+
1321 .entry-continue {
1422 margin-bottom: 1em;
1523 }
--- /dev/null
+++ b/filters/remove_tracker.py
@@ -0,0 +1,15 @@
1+# remove images for tracking
2+# -*- coding: utf-8 -*-
3+
4+import re
5+
6+re_rssad_url = re.compile(r'^http://rss.rssad.jp/')
7+
8+def entry_filter(entry):
9+ if "images" in entry:
10+ for i in range(len(entry["images"])):
11+ if re_rssad_url.search(entry["images"][i]):
12+ entry["images"].pop(i)
13+
14+ return entry
15+
--- a/templates/index.tmpl.html
+++ b/templates/index.tmpl.html
@@ -59,6 +59,9 @@ s.parentNode.insertBefore(ga, s);
5959 <div class="entry">
6060 <!-- ヘッダ -->
6161 <div class="entry-header">
62+ % if 'images' in entry and len(entry.images) > 0:
63+ <img class="thumbnail" src="${entry.images[0]}">
64+ % endif
6265 <h3>
6366 <a href='${entry.link}' target="_blank_">${entry.title}</a>
6467 </h3>
@@ -66,7 +69,9 @@ s.parentNode.insertBefore(ga, s);
6669
6770
6871 <!-- 本文テキスト -->
69- <div class="entry-body">${entry.body}</div>
72+ <div class="entry-body">
73+ ${entry.body}
74+ </div>
7075
7176 <!-- フッタ -->
7277 <div class="entry-footer">
@@ -80,12 +85,6 @@ s.parentNode.insertBefore(ga, s);
8085 % for tag in entry.tags:
8186 <span>${tag} </span>
8287 % endfor
83- % if 'images' in entry:
84- <span>画像:</span>
85- % for imgurl in entry.images:
86- <span><a href="${imgurl}">*</a></span>
87- % endfor
88- % endif
8988 </div>
9089 </div>
9190 </div>