diff --git a/news/models.py b/news/models.py index c652a2c..cbc0a4d 100644 --- a/news/models.py +++ b/news/models.py @@ -31,6 +31,10 @@ class Post(models.Model): # flat.append(comment) flat.extend(comment.flat_children(0, user)) return flat + + def is_youtube_video(self): + return "youtube.com" in self.url + # return self.comment_set.annotate(ratings_num=count('voters')).order_by('-ratings_num')[:5] # return self.comment_set.order_by('voters_num').all()[:5] diff --git a/news/static/image/favicon.png b/news/static/image/favicon.png new file mode 100644 index 0000000..e00a48a Binary files /dev/null and b/news/static/image/favicon.png differ diff --git a/news/static/image/icon128_transparent.png b/news/static/image/icon128_transparent.png new file mode 100644 index 0000000..b30104f Binary files /dev/null and b/news/static/image/icon128_transparent.png differ diff --git a/news/static/image/icon128_transparent_black.png b/news/static/image/icon128_transparent_black.png new file mode 100644 index 0000000..7e961fa Binary files /dev/null and b/news/static/image/icon128_transparent_black.png differ diff --git a/news/static/image/icon128_transparent_white.png b/news/static/image/icon128_transparent_white.png new file mode 100644 index 0000000..508be27 Binary files /dev/null and b/news/static/image/icon128_transparent_white.png differ diff --git a/news/static/image/icon_square.png b/news/static/image/icon_square.png new file mode 100644 index 0000000..54f5ef5 Binary files /dev/null and b/news/static/image/icon_square.png differ diff --git a/news/static/news/css/app.css b/news/static/news/css/app.css index 928ba73..e68f179 100644 --- a/news/static/news/css/app.css +++ b/news/static/news/css/app.css @@ -9,7 +9,11 @@ :root { --main-bg-color: #FFD540; - --header-bg-color: #EAC33B; + --header-bg-color: #FFD540; +} + +iframe { + border: 0; } a { @@ -142,6 +146,11 @@ a h1 { .lat_padding { padding: 0px 8px; } +@media print, screen and (min-width: 40em) { + .lat_padding { + padding: 0px; + } +} .inside_image_top { position: absolute; diff --git a/news/templates/base.html b/news/templates/base.html index 9f65d5d..a761eb5 100644 --- a/news/templates/base.html +++ b/news/templates/base.html @@ -6,6 +6,7 @@
+- {{ post.body }} -
-
- {% endfor %} + {% if post.is_youtube_video %} + +
{{ post.title }}
+ + + {% else %} +{{ post.title }}
+ {% if post.url %}{% endif %} + + {% if post.body %} ++ {{ post.body }} +
+ {% endif %}+ {% endfor %}