Skip to content

Commit

Permalink
update for Django-5, no more CDN usage
Browse files Browse the repository at this point in the history
  • Loading branch information
memphis-tools committed Aug 9, 2024
1 parent d3135e1 commit 59f2289
Show file tree
Hide file tree
Showing 25 changed files with 71 additions and 17 deletions.
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
43 changes: 38 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,34 @@
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;
}

body {
height: 100vh;
Expand Down Expand Up @@ -70,11 +98,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 +153,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 +171,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 +216,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.

16 changes: 6 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,12 +11,10 @@
<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>
<header>
Expand Down Expand Up @@ -120,10 +114,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
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ 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 59f2289

Please sign in to comment.