Skip to content

Commit

Permalink
Merge pull request #3 from memphis-tools/development
Browse files Browse the repository at this point in the history
update for manual django messages rendering
  • Loading branch information
memphis-tools authored Aug 9, 2024
2 parents 5d0ea5b + a1defd7 commit f9558ea
Show file tree
Hide file tree
Showing 41 changed files with 119 additions and 19 deletions.
2 changes: 1 addition & 1 deletion dummy_django_blog/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.13.0b4-alpine3.20
FROM python:3.12.5-alpine3.19

RUN mkdir -p /home/dummy-operator; \
addgroup -S dummy-operator; \
Expand Down
1 change: 0 additions & 1 deletion dummy_django_blog/dummy_django_blog/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
"django.contrib.staticfiles",
"authentication",
"blog",
"bootstrap5",
"django_bootstrap_icons",
]

Expand Down
Binary file added dummy_django_blog/media/avatars/dummy_image.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dummy_django_blog/media/billet_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dummy_django_blog/media/dummy_image.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dummy_django_blog/media/photo_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dummy_django_blog/media/photo_10.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dummy_django_blog/media/photo_11.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dummy_django_blog/media/photo_2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dummy_django_blog/media/photo_3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dummy_django_blog/media/photo_4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dummy_django_blog/media/photo_5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dummy_django_blog/media/photo_6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dummy_django_blog/media/photo_7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dummy_django_blog/media/photo_8.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dummy_django_blog/media/photo_9.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 73 additions & 5 deletions dummy_django_blog/static/assets/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,69 @@
box-sizing: border-box;
}

@font-face {
font-family: 'ArsenalSC';
src: url('../fonts/ArsenalSC-Regular.ttf') format('truetype');
font-weight: 400;
font-style: normal;
}

@font-face {
font-family: 'Caveat';
src: url('../fonts/Caveat-Regular.ttf') format('truetype');
font-weight: 400;
font-style: normal;
}

@font-face {
font-family: 'Caveat-large';
src: url('../fonts/Caveat-Medium.ttf') format('truetype');
font-weight: 700;
font-style: normal;
font-size: 2rem;
}

@font-face {
font-family: 'Ubuntu';
src: url('../fonts/Ubuntu-Regular.ttf') format('truetype');
font-weight: 500;
font-style: normal;
}

/* Django message */
.django-messages li {
list-style: none;
}

.django-messages .success {
color: green;
background-color: #d4edda;
padding: 10px;
border-radius: 5px;
}

.django-messages .error {
color: red;
background-color: #f8d7da;
padding: 10px;
border-radius: 5px;
}

.django-messages .warning {
color: orange;
background-color: #fff3cd;
padding: 10px;
border-radius: 5px;
}

.django-messages .info {
color: blue;
background-color: #d1ecf1;
padding: 10px;
border-radius: 5px;
}

/* End Django messages */

body {
height: 100vh;
Expand Down Expand Up @@ -70,11 +133,11 @@ body .dropdown-item {
}

.navbar-brand {
font-family: "Caveat", cursive;
font-family: "Caveat-large", cursive;
font-optical-sizing: auto;
font-weight: 700;
font-style: normal;
font-size: 2rem;
font-size: 24px;
color: white !important;
}

Expand Down Expand Up @@ -125,9 +188,10 @@ body .dropdown-item {
}

h1, h2, h3, h4, h5, h6 {
font-family: "Arsenal SC", sans-serif;
font-family: "ArsenalSC", sans-serif;
font-weight: 400;
font-style: normal;
color: white;
}

.feed-container {
Expand All @@ -142,14 +206,14 @@ h1, h2, h3, h4, h5, h6 {
.feed-intro {
padding: 5%;
font-size: 1.5rem;
font-family: "Caveat", cursive;
font-family: "Caveat-large", cursive;
font-optical-sizing: auto;
font-weight: 700;
font-style: normal;
}

.feed-intro h3 {
font-family: "Caveat", cursive;
font-family: "Caveat-large", cursive;
font-optical-sizing: auto;
font-weight: 700;
font-style: normal;
Expand Down Expand Up @@ -187,6 +251,10 @@ h1, h2, h3, h4, h5, h6 {
border-radius:
}

.home-elements {
color: white;
}

.home-elements h2 {
font-size: 2rem;
}
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
7 changes: 7 additions & 0 deletions dummy_django_blog/static/vendors/css/bootstrap.min.css

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions dummy_django_blog/static/vendors/js/bootstrap.bundle.min.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions dummy_django_blog/static/vendors/js/jquery-1.12.4.min.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions dummy_django_blog/static/vendors/js/popper.min.js

Large diffs are not rendered by default.

27 changes: 17 additions & 10 deletions dummy_django_blog/templates/base.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{% load static %}
{% load bootstrap5 %}
{% load bootstrap_icons %}
{% bootstrap_css %}
{% bootstrap_javascript %}
{% bootstrap_messages %}

<!DOCTYPE html>
<html lang="fr">
Expand All @@ -15,14 +11,23 @@
<meta name="generator" content="Django">
<meta name="author" content="Tommy Doe">
<link rel="icon" type="image/x-icon" href="{% static 'favicon.ico' %}">
<!-- Bootstrap -->
<link rel="stylesheet" type="text/css" href="{% static 'vendors/css/bootstrap.min.css' %}">
<!-- Custom css -->
<link rel="stylesheet" type="text/css" href="{% static 'assets/css/styles.css' %}">
<!-- Google fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Arsenal+SC:ital,wght@0,400;0,700;1,400;1,700&family=Caveat:wght@400..700&family=family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap" rel="stylesheet">
</head>
<body>
<div class="django-messages">
{% if messages %}
<ul>
{% for message in messages %}
<li class="{% if message.tags %}{{ message.tags }}{% endif %}">
{{ message }}
</li>
{% endfor %}
</ul>
{% endif %}
</div>
<header>
<nav class="navbar navbar-light navbar-light sticky-top navbar-custom">
<div class="w-100 container-fluid">
Expand Down Expand Up @@ -120,10 +125,12 @@ <h6 class="dropdown-header">billets</h6>
</div>
</footer>
<script src="{% static 'assets/js/scripts.js' %}"></script>
<!-- Bootstrap -->
<script src="{% static 'vendors/js/bootstrap.bundle.min.js' %}"></script>
<!-- Popper -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="{% static 'vendors/js/popper.min.js' %}"></script>
<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="{% static 'vendors/js/jquery-1.12.4.min.js' %}"></script>
<!-- custom blur for navbar -->
<script>
$(document).ready(function() {
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ readme = "README.md"

[tool.poetry.dependencies]
python = ">3.11,<3.13"
django = ">4.2.0"
django = ">5.0.7"
gunicorn = "^22.0.0"
pillow = "^10.4.0"
django-bootstrap-icons = "^0.9.0"
pytest = "^8.2.2"
django-pytest = "^0.2.0"
coverage = "6.5.0"
pylint = "^3.2.5"
django-bootstrap-v5 = "1.0.11"
python-dotenv = "^1.0.1"
whitenoise = "^6.7.0"
pytest-django = "^4.8.0"
Expand Down

0 comments on commit f9558ea

Please sign in to comment.