mirror of
https://github.com/Rushilwiz/NewViewsNews.git
synced 2025-04-09 23:00:16 -04:00
overhauled cards and detail looks, final stretch
This commit is contained in:
parent
54dd9e8880
commit
cc72ead5d9
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -16,3 +16,6 @@ pip-delete-this-directory.txt
|
||||||
.venv/
|
.venv/
|
||||||
venv/
|
venv/
|
||||||
env/
|
env/
|
||||||
|
|
||||||
|
# WSL
|
||||||
|
*:Zone.Identifier
|
||||||
|
|
BIN
media/article-headers/5e71e370cc113.image.jpg
Normal file
BIN
media/article-headers/5e71e370cc113.image.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 50 KiB |
Binary file not shown.
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 35 KiB |
BIN
news/static/news/css/fonts/Segoe UI Bold Italic.woff
Normal file
BIN
news/static/news/css/fonts/Segoe UI Bold Italic.woff
Normal file
Binary file not shown.
BIN
news/static/news/css/fonts/Segoe UI Bold.woff
Normal file
BIN
news/static/news/css/fonts/Segoe UI Bold.woff
Normal file
Binary file not shown.
BIN
news/static/news/css/fonts/Segoe UI Italic.woff
Normal file
BIN
news/static/news/css/fonts/Segoe UI Italic.woff
Normal file
Binary file not shown.
BIN
news/static/news/css/fonts/Segoe UI.woff
Normal file
BIN
news/static/news/css/fonts/Segoe UI.woff
Normal file
Binary file not shown.
|
@ -1,11 +1,6 @@
|
||||||
@font-face {
|
|
||||||
font-family: Futura;
|
|
||||||
src: url(futura.ttf);
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Segoe UI';
|
font-family: 'Segoe UI';
|
||||||
src: url('Segoe UI.ttf');
|
src: url('fonts/Segoe UI.woff');
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
|
@ -1,22 +1,26 @@
|
||||||
{% extends "news/base.html" %}
|
{% extends "news/base.html" %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<article class="media content-section">
|
<a class="btn btn-secondary btn-sm mt-1 mb-1" href="{% url 'home' %}">Back</a>
|
||||||
<img class="rounded-circle article-img" src="{{ object.author.profile.profile_pic.url}}" alt="Profile Picture">
|
<h1>{{ article.headline }}</h1>
|
||||||
<div class="media-body">
|
<figure class="figure">
|
||||||
<div class="article-metadata">
|
<img src="{{ object.header.url }}" class="float-center figure-img img-fluid rounded" alt="Article Header">
|
||||||
<a class="mr-2" href="{% url 'user-articles' object.author.username %}">{{ object.author.get_full_name }}</a>
|
<figcaption class="figure-caption">{{ object.header_caption }}</figcaption>
|
||||||
<small class="text-muted">@{{ object.author }} · {{ object.date_published }}</small>
|
</figure>
|
||||||
|
|
||||||
{% if object.author == user %}
|
<div class="media-body">
|
||||||
<div>
|
<div class="article-metadata pb-2">
|
||||||
<a class="btn btn-secondary btn-sm mt-1 mb-1" href="{% url 'article-update' object.id %}">Edit article</a>
|
<img class="rounded-circle article-img" src="{{ object.author.profile.profile_pic.url}}" alt="Profile Picture">
|
||||||
<a class="btn btn-danger btn-sm mt-1 mb-1" href="{% url 'article-delete' object.id %}">Delete article</a>
|
<a class="mr-2" href="{% url 'user-articles' object.author.username %}">{{ object.author.get_full_name }}</a>
|
||||||
|
<small class="text-muted">@{{ object.author }} · {{ object.date_published }}</small>
|
||||||
|
|
||||||
|
{% if object.author == user %}
|
||||||
|
<div>
|
||||||
|
<a class="btn btn-secondary btn-sm mt-1 mb-1" href="{% url 'article-update' object.id %}">Edit article</a>
|
||||||
|
<a class="btn btn-danger btn-sm mt-1 mb-1" href="{% url 'article-delete' object.id %}">Delete article</a>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
<p class="article-content font-weight-light">{{ article.content|safe }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<img class="img-fluid" src="{{ object.header.url }}">
|
|
||||||
<p class="article-content font-weight-light">{{ article.content|safe }}</p>
|
|
||||||
</div>
|
|
||||||
</article>
|
</article>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
<!-- Font Awesome -->
|
<!-- Font Awesome -->
|
||||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
<!-- Favicon -->
|
<!-- Favicon -->
|
||||||
<link rel="shortcut icon" href="{% static 'news/favicon2.ico' %}" type="image/x-icon">
|
<link rel="shortcut icon" href="{% static 'news/favicon.ico' %}" type="image/x-icon">
|
||||||
<link rel="icon" href="{% static 'news/favicon2.ico' %}/favicon2.ico" type="image/x-icon">
|
<link rel="icon" href="{% static 'news/favicon.ico' %}" type="image/x-icon">
|
||||||
|
|
||||||
<title>NewViewsNews</title>
|
<title>NewViewsNews</title>
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<div class="col-lg-4 col-sm-6 mb-4" style="margin-top: 2%">
|
<div class="col-lg-4 col-sm-6 mb-4" style="margin-top: 2%">
|
||||||
<div class="card shadow border-0 h-100"><a href="">
|
<div class="card shadow border-0 h-100"><a href="">
|
||||||
<img src="{{ article.header.url }}" alt="..." class="img-fluid card-img-top"></a>
|
<img src="{{ article.header.url }}" alt="..." class="img-fluid card-img-top"></a>
|
||||||
<div class="card-body"><a href="" class="text-uppercase text-muted text-sm letter-spacing-2">{{ post.category }} </a>
|
<div class="card-body"><a href="{% url 'article-detail' article.id %}" class="text-uppercase text-muted text-sm letter-spacing-2">{{ article.tag }} </a>
|
||||||
<h5 class="my-2"><a href="post.html" class="text-dark">{{ article.headline }}</a></h5>
|
<h5 class="my-2"><a href="{% url 'article-detail' article.id %}" class="nounderline text-dark">{{ article.headline }}</a></h5>
|
||||||
<a href="{% url 'user-articles' article.author.username %}">{{ article.author.get_full_name }}<small class="text-muted"> · @{{ article.author }} · {{ article.date_published }}</small></a>
|
<a href="{% url 'user-articles' article.author.username %}">{{ article.author.get_full_name }}<small class="text-muted"> · @{{ article.author }} · {{ article.date_published }}</small></a>
|
||||||
<p class="my-2 text-muted text-sm">{{ article.content|safe|truncatechars_html:70|linebreaks }}</p>
|
<p class="my-2 text-muted text-sm">{{ article.content|safe|truncatechars_html:70|linebreaks }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -82,7 +82,7 @@
|
||||||
<button type="submit" class="btn btn-outline-info">Save changes</button>
|
<button type="submit" class="btn btn-outline-info">Save changes</button>
|
||||||
</form>
|
</form>
|
||||||
<hr>
|
<hr>
|
||||||
<canvas class="mx-auto" id="compass" width="500" height="500" style="border:1px solid #000000;">
|
<canvas class="float-center mx-auto" id="compass" width="500" height="500" style="border:1px solid #000000;">
|
||||||
Your browser does not support the HTML canvas tag.
|
Your browser does not support the HTML canvas tag.
|
||||||
</canvas>
|
</canvas>
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,6 @@ def profile(request):
|
||||||
|
|
||||||
valueX = user.profile.economicScore * 2.5 + 250
|
valueX = user.profile.economicScore * 2.5 + 250
|
||||||
valueY = user.profile.socialScore * -2.5 + 250
|
valueY = user.profile.socialScore * -2.5 + 250
|
||||||
print("VALUEX IS " + str(valueX))
|
|
||||||
|
|
||||||
context = {
|
context = {
|
||||||
'userForm': userForm,
|
'userForm': userForm,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user