diff --git a/db.sqlite3 b/db.sqlite3 index f6f97dd..9821825 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ diff --git a/news/__pycache__/choices.cpython-37.pyc b/news/__pycache__/choices.cpython-37.pyc index 6271ed9..5796143 100644 Binary files a/news/__pycache__/choices.cpython-37.pyc and b/news/__pycache__/choices.cpython-37.pyc differ diff --git a/news/choices.py b/news/choices.py index cdb6499..74ac3e2 100644 --- a/news/choices.py +++ b/news/choices.py @@ -1,4 +1,5 @@ STYLE_CHOICES = ( (0, "Standard"), - (1, "Quote") + (1, "Quote"), + (2, "Image Only") ) diff --git a/news/static/media/96d8ba65-c5f8-48e6-8ad4-e7befef9373a b/news/static/media/96d8ba65-c5f8-48e6-8ad4-e7befef9373a index 6e0bf94..a948d0c 100644 Binary files a/news/static/media/96d8ba65-c5f8-48e6-8ad4-e7befef9373a and b/news/static/media/96d8ba65-c5f8-48e6-8ad4-e7befef9373a differ diff --git a/news/static/media/96d8ba65-c5f8-48e6-8ad4-e7befef9373a.old b/news/static/media/96d8ba65-c5f8-48e6-8ad4-e7befef9373a.old new file mode 100644 index 0000000..6e0bf94 Binary files /dev/null and b/news/static/media/96d8ba65-c5f8-48e6-8ad4-e7befef9373a.old differ diff --git a/news/static/media/a1f5bf0d-2dbb-4cd7-8cc0-dc39b93935d4 copie.png b/news/static/media/a1f5bf0d-2dbb-4cd7-8cc0-dc39b93935d4 copie.png deleted file mode 100644 index a948d0c..0000000 Binary files a/news/static/media/a1f5bf0d-2dbb-4cd7-8cc0-dc39b93935d4 copie.png and /dev/null differ diff --git a/news/static/news/css/app.css b/news/static/news/css/app.css index 9a5a5ee..654ada8 100644 --- a/news/static/news/css/app.css +++ b/news/static/news/css/app.css @@ -14,6 +14,44 @@ body { 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 { } @@ -33,11 +71,6 @@ body { /* background-color: #aaa; */ } -.imgcontainer { - position: relative; - color: white; -} - /* @media print, screen and (min-width: 40em) { .imgcontainer { position: relative; @@ -45,15 +78,13 @@ body { } } */ -.crop { +/* .crop { width: 1000px; - /* width: 1000px; */ height: 200px; overflow: hidden; - border-radius: 0px;/*0px 20px 20px 0px;*/ -} +} */ -@media print, screen and (min-width: 40em) { +/* @media print, screen and (min-width: 40em) { .crop { border-radius: 20px; } @@ -63,7 +94,7 @@ body { width: 1000px; height: 200px; margin: -100px 0 0 -200px; -} +} */ .header h1 { font-size: 36px; @@ -78,7 +109,6 @@ body { article { margin-bottom: 20px; } - @media print, screen and (min-width: 40em) { article { padding: 16px; @@ -92,26 +122,31 @@ article { padding: 0px; } */ +.imgcontainer { + position: relative; + color: white; +} +@media print, screen and (min-width: 40em) { + .imgcontainer { + width: 500px; + } +} + .imgcontainer a { - color: #fff; + color: #FFD540; } .imgcontainer a:hover { - color: #aaa; + color: #ccc; } -/* .content { - padding: 12px 12px 0px 12px; +.content { + /* background-color: #eee; */ } -.content p { - font-family: 'LibreBaskerville'; -} */ - .body { padding: 0px 12px; } - .body p { 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 { padding: 8px; @@ -155,7 +175,7 @@ article h1 { .comments { font-size: 14px; - color: #666; + color: #ccc; /* padding: 0px 10px; */ /* background-color: #efe; */ /* border-radius: 16px; */ diff --git a/news/templates/news/index.html b/news/templates/news/index.html index e9cb2b2..9c26891 100644 --- a/news/templates/news/index.html +++ b/news/templates/news/index.html @@ -16,61 +16,37 @@
+ {{ post.date }} - {{ post.author.username }}
- - -
-

{{ post.title }}

-
-
-
- -
-

- {{ post.body }} -

-
- {{ post.date }} - {{ post.author.username }} - {% if post.comment_set.count > 0 %}{{ post.comment_set.count }} comments{% else %}write comment{% endif %} + +
+ {% if post.url %}{% endif %} +

{{ post.title }}

+ {% if post.url %}
{% endif %} +

+ {{ post.body }} +

- -
- {% for comment in post.top_comments %} - {{ comment.body }} - {{ comment.author.username }}
- {% endfor %} + +
+ + + +
+ {% for comment in post.top_comments %} + {{ comment.body }} - {{ comment.author.username }}
+ {% endfor %} +
-
-
+ - + - {% else %} + + {% elif post.style == 1 %}
@@ -97,6 +73,28 @@
+ + {% elif post.style == 2 %} + +
+ + {{ post.date }} - {{ post.author.username }} +
+ +
+ + + +
+ {% for comment in post.top_comments %} + {{ comment.body }} - {{ comment.author.username }}
+ {% endfor %} +
+ +
+ {% endif %} diff --git a/news/templates/news/post.html b/news/templates/news/post.html index 23e3503..1522713 100644 --- a/news/templates/news/post.html +++ b/news/templates/news/post.html @@ -8,74 +8,77 @@ -

{{ post.title }}

-

- {{ post.body }} -

-
- {{ post.date }} - {{ post.author.username }} -
-
+
-
- {% csrf_token %} -

Add comment

-

- +

{{ post.title }}

+

+ {{ post.body }}

- -
- - + -
-

----Comments----

-{% for comment in comments %} -

- {% for n in comment.level %}

{% endfor %} +

+ +
{% endfor %}