config update

master
Laurent 6 years ago
parent a374bd2171
commit 1ecc99ea52
  1. 4
      news/models.py
  2. BIN
      news/static/image/favicon.png
  3. BIN
      news/static/image/icon128_transparent.png
  4. BIN
      news/static/image/icon128_transparent_black.png
  5. BIN
      news/static/image/icon128_transparent_white.png
  6. BIN
      news/static/image/icon_square.png
  7. 11
      news/static/news/css/app.css
  8. 6
      news/templates/base.html
  9. 82
      news/templates/news/index.html
  10. 9
      pokercc/settings.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]

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

@ -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;

@ -6,6 +6,7 @@
<head>
<link rel="stylesheet" type="text/css" href="{% static 'news/css/app.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'news/css/foundation.min.css' %}">
<link rel="shortcut icon" type="image/png" href="{% static 'image/favicon.png' %}"/>
<title>{% block title %}My amazing site{% endblock %}</title>
</head>
@ -26,7 +27,10 @@
<!-- Header -->
<header>
<div class="title">
<h1><a href="{% url 'news:index' %}">poker rumble</a></h1>
<h1>
<!-- <img src="{% static 'image/icon_square.png' %}" alt="Poker Rumble icon" width="64" height="56"/> -->
<a href="{% url 'news:index' %}">poker rumble</a>
</h1>
</div>
<!-- <h2>HOME OF NEWS GRINDERS</h2> -->

@ -20,32 +20,37 @@
<!-- A post -->
{% if post.style == 0 %}
<div class="imgcontainer">
<img src="{% static 'media/' %}{{ post.image_url }}"/>
<div class="inside_image_top">
{% if post.url %}<a href="{{ post.url }}">{% endif %}
<h1>{{ post.title }}</h1>
{% if post.url %}</a>{% endif %}
<p>
{{ post.body }}
</p>
</div>
<div class="inside_image_bottom">
<div class="details">
<a href="{% url 'news:post' post.id %}">{% if post.comment_set.count > 0 %}{{ post.comment_set.count }} comment{% if post.comment_set.count > 1 %}s{% endif %}{% else %}write comment{% endif %}</a>
</div>
<!-- Some comments -->
<div class="comments">
{% for comment in post.top_comments %}
<span>{{ comment.body }} - {{ comment.author.username }}</span><br/>
{% endfor %}
{% if post.is_youtube_video %}
<a href="{{ post.url }}">
<h1>{{ post.title }}</h1>
</a>
<iframe src="{{ post.url }}" width="600" height="400"></iframe>
{% else %}
<div class="imgcontainer">
<img src="{% static 'media/' %}{{ post.image_url }}"/>
<div class="inside_image_top">
{% if post.url %}<a href="{{ post.url }}">{% endif %}
<h1>{{ post.title }}</h1>
{% if post.url %}</a>{% endif %}
{% if post.body %}
<p>
{{ post.body }}
</p>
{% endif %}
</div>
</div>
{% endif %}
<div class="details">
<a href="{% url 'news:post' post.id %}">{% if post.comment_set.count > 0 %}{{ post.comment_set.count }} comment{% if post.comment_set.count > 1 %}s{% endif %}{% else %}write comment{% endif %}</a>
</div>
<!-- Some comments -->
<div class="comments">
{% for comment in post.top_comments %}
<span>{{ comment.body }} - {{ comment.author.username }}</span><br/>
{% endfor %}
</div>
<!-- Quote -->
{% elif post.style == 1 %}
@ -69,25 +74,28 @@
</div>
</div>
<!-- Picture no title no link -->
<!-- Media no title no link -->
{% elif post.style == 2 %}
<div class="imgcontainer">
<img class="crop" src="{% static 'media/' %}{{ post.image_url }}"/>
</div>
{% if post.is_youtube_video %}
<iframe src="{{ post.url }}" width="600" height="400"></iframe>
{% else %}
<div class="imgcontainer">
<img class="crop" src="{% static 'media/' %}{{ post.image_url }}"/>
</div>
{% endif %}
<div class="post_padding">
<div class="details info">
<a href="{% url 'news:post' post.id %}">{% if post.comment_set.count > 0 %}{{ post.comment_set.count }} comment{% if post.comment_set.count > 1 %}s{% endif %}{% else %}write comment{% endif %}</a>
</div>
<!-- Some comments -->
<div class="comments">
{% for comment in post.top_comments %}
<span>{{ comment.body }} - {{ comment.author.username }}</span><br/>
{% endfor %}
</div>
<div class="post_padding">
<div class="details info">
<a href="{% url 'news:post' post.id %}">{% if post.comment_set.count > 0 %}{{ post.comment_set.count }} comment{% if post.comment_set.count > 1 %}s{% endif %}{% else %}write comment{% endif %}</a>
</div>
<!-- Some comments -->
<div class="comments">
{% for comment in post.top_comments %}
<span>{{ comment.body }} - {{ comment.author.username }}</span><br/>
{% endfor %}
</div>
</div>
{% endif %}
</article>

@ -79,12 +79,15 @@ WSGI_APPLICATION = 'pokercc.wsgi.application'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql' #'django.db.backends.sqlite3',
'NAME': 'stax_rumble' #os.path.join(BASE_DIR, 'db.sqlite3'),
# 'ENGINE': 'django.db.backends.sqlite3',
# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'stax_rumble',
'USER': 'stax',
'PASSWORD': 'staxkikoo',
'HOST': 'postgresql-stax.alwaysdata.net',
# 'PORT': '5432',
'PORT': '5432',
}
}

Loading…
Cancel
Save