Layout update

master
Laurent 6 years ago
parent 209dd1be5b
commit 14dee885de
  1. BIN
      db.sqlite3
  2. BIN
      news/__pycache__/choices.cpython-37.pyc
  3. 3
      news/choices.py
  4. BIN
      news/static/media/96d8ba65-c5f8-48e6-8ad4-e7befef9373a
  5. BIN
      news/static/media/96d8ba65-c5f8-48e6-8ad4-e7befef9373a.old
  6. BIN
      news/static/media/a1f5bf0d-2dbb-4cd7-8cc0-dc39b93935d4 copie.png
  7. 94
      news/static/news/css/app.css
  8. 70
      news/templates/news/index.html
  9. 5
      news/templates/news/post.html

Binary file not shown.

@ -1,4 +1,5 @@
STYLE_CHOICES = ( STYLE_CHOICES = (
(0, "Standard"), (0, "Standard"),
(1, "Quote") (1, "Quote"),
(2, "Image Only")
) )

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

@ -14,6 +14,44 @@ body {
padding: 0px; padding: 0px;
} }
article h1 {
font-family: 'LibreBaskervilleBold';
font-size: 18px;
}
@media print, screen and (min-width: 40em) {
article h1 {
font-size: 28px;
}
}
.padding {
padding: 8px;
}
@media print, screen and (min-width: 40em) {
.padding {
padding: 12px;
}
}
.inside_image_top {
position: absolute;
top: 12px;
left: 12px;
}
.inside_image_bottom {
position: absolute;
bottom: 12px;
left: 12px;
}
/* @media print, screen and (min-width: 40em) {
.inside_image {
bottom: 8px;
top: auto;
}
} */
.postcontainer { .postcontainer {
} }
@ -33,11 +71,6 @@ body {
/* background-color: #aaa; */ /* background-color: #aaa; */
} }
.imgcontainer {
position: relative;
color: white;
}
/* @media print, screen and (min-width: 40em) { /* @media print, screen and (min-width: 40em) {
.imgcontainer { .imgcontainer {
position: relative; position: relative;
@ -45,15 +78,13 @@ body {
} }
} */ } */
.crop { /* .crop {
width: 1000px; width: 1000px;
/* width: 1000px; */
height: 200px; height: 200px;
overflow: hidden; overflow: hidden;
border-radius: 0px;/*0px 20px 20px 0px;*/ } */
}
@media print, screen and (min-width: 40em) { /* @media print, screen and (min-width: 40em) {
.crop { .crop {
border-radius: 20px; border-radius: 20px;
} }
@ -63,7 +94,7 @@ body {
width: 1000px; width: 1000px;
height: 200px; height: 200px;
margin: -100px 0 0 -200px; margin: -100px 0 0 -200px;
} } */
.header h1 { .header h1 {
font-size: 36px; font-size: 36px;
@ -78,7 +109,6 @@ body {
article { article {
margin-bottom: 20px; margin-bottom: 20px;
} }
@media print, screen and (min-width: 40em) { @media print, screen and (min-width: 40em) {
article { article {
padding: 16px; padding: 16px;
@ -92,26 +122,31 @@ article {
padding: 0px; padding: 0px;
} */ } */
.imgcontainer {
position: relative;
color: white;
}
@media print, screen and (min-width: 40em) {
.imgcontainer {
width: 500px;
}
}
.imgcontainer a { .imgcontainer a {
color: #fff; color: #FFD540;
} }
.imgcontainer a:hover { .imgcontainer a:hover {
color: #aaa; color: #ccc;
} }
/* .content { .content {
padding: 12px 12px 0px 12px; /* background-color: #eee; */
} }
.content p {
font-family: 'LibreBaskerville';
} */
.body { .body {
padding: 0px 12px; padding: 0px 12px;
} }
.body p { .body p {
font-family: 'LibreBaskerville'; font-family: 'LibreBaskerville';
} }
@ -133,21 +168,6 @@ article {
} }
} */ } */
article h1 {
font-family: 'LibreBaskervilleBold';
font-size: 18px;
position: absolute;
top: 12px;
left: 12px;
}
@media print, screen and (min-width: 40em) {
article h1 {
font-size: 28px;
width: 24em;
bottom: 8px;
top: auto;
}
}
.padded { .padded {
padding: 8px; padding: 8px;
@ -155,7 +175,7 @@ article h1 {
.comments { .comments {
font-size: 14px; font-size: 14px;
color: #666; color: #ccc;
/* padding: 0px 10px; */ /* padding: 0px 10px; */
/* background-color: #efe; */ /* background-color: #efe; */
/* border-radius: 16px; */ /* border-radius: 16px; */

@ -16,21 +16,22 @@
<article> <article>
{{ post.date }} - {{ post.author.username }}
<div class="imgcontainer"> <div class="imgcontainer">
<a href="{{ post.url }}">
<img class="crop" src="{% static 'media/' %}{{ post.image_url }}"/> <img class="crop" src="{% static 'media/' %}{{ post.image_url }}"/>
<div> <div class="inside_image_top">
{% if post.url %}<a href="{{ post.url }}">{% endif %}
<h1>{{ post.title }}</h1> <h1>{{ post.title }}</h1>
</div> {% if post.url %}</a>{% endif %}
</a>
</div>
<div class="body">
<p> <p>
{{ post.body }} {{ post.body }}
</p> </p>
</div>
<div class="inside_image_bottom">
<div class="info"> <div class="info">
{{ post.date }} - {{ post.author.username }} - <a href="{% url 'news:post' post.id %}">{% if post.comment_set.count > 0 %}{{ post.comment_set.count }} comments{% else %}write comment{% endif %}</a> <a href="{% url 'news:post' post.id %}">{% if post.comment_set.count > 0 %}{{ post.comment_set.count }} comments{% else %}write comment{% endif %}</a>
</div> </div>
<!-- Some comments --> <!-- Some comments -->
<div class="comments"> <div class="comments">
@ -39,38 +40,13 @@
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
</article>
<!-- <div class="grid-x post">
<div class="cell large-2 large-offset-2 info">
<br/>
{{ post.date }}
<br/>
{{ post.author.username }}
<br/>
<a href="{% url 'news:post' post.id %}">comments</a>
</div>
<div class="cell large-4">
<div class="grid-y">
<div class="cell large-4">
<img src="{% static 'media/' %}{{ post.image_url }}"/>
<h1><a href="{{ post.url }}">{{ post.title }}</a></h1>
{{ post.body }}
</div>
<div class="cell large-4 comments">
{% for comment in post.top_comments %}
<div class="grid-x">
<div class="cell small-2 large-2">{{ comment.body }}</div>
</div>
{% endfor %}
</div> </div>
</div> </article>
</div>
</div> -->
{% else %} <!-- Quote -->
{% elif post.style == 1 %}
<div class="post"> <div class="post">
<div class="grid-x"> <div class="grid-x">
@ -97,6 +73,28 @@
</div> </div>
<!-- Picture no title no link -->
{% elif post.style == 2 %}
<article>
{{ post.date }} - {{ post.author.username }}
<div class="imgcontainer">
<img class="crop" src="{% static 'media/' %}{{ post.image_url }}"/>
</div>
<div class="info">
<a href="{% url 'news:post' post.id %}">{% if post.comment_set.count > 0 %}{{ post.comment_set.count }} comments{% 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>
</article>
{% endif %} {% endif %}
<!-- </div> --> <!-- </div> -->

@ -8,6 +8,8 @@
<img src="{% static 'media/' %}{{ post.image_url }}"/> <img src="{% static 'media/' %}{{ post.image_url }}"/>
<div class="padding">
<h1><a href="{{ post.url }}">{{ post.title }}</a></h1> <h1><a href="{{ post.url }}">{{ post.title }}</a></h1>
<p class="contentbody"> <p class="contentbody">
{{ post.body }} {{ post.body }}
@ -38,7 +40,6 @@
</script> </script>
<br/> <br/>
<p>----Comments----</p>
{% for comment in comments %} {% for comment in comments %}
<p> <p>
{% for n in comment.level %}<ul>{% endfor %} {% for n in comment.level %}<ul>{% endfor %}
@ -77,6 +78,8 @@
{% for n in comment.level %}</ul>{% endfor %} {% for n in comment.level %}</ul>{% endfor %}
</p> </p>
</div>
{% endfor %} {% endfor %}
{% endblock content %} {% endblock content %}

Loading…
Cancel
Save