Add tailwindcss
This commit is contained in:
parent
24123c99cf
commit
9a5489c170
17 changed files with 1833 additions and 102 deletions
|
@ -50,6 +50,9 @@ INSTALLED_APPS = [
|
|||
"django.contrib.sessions",
|
||||
"django.contrib.messages",
|
||||
"django.contrib.staticfiles",
|
||||
"tailwind",
|
||||
"theme",
|
||||
"django_browser_reload"
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
|
@ -61,7 +64,8 @@ MIDDLEWARE = [
|
|||
"django.middleware.clickjacking.XFrameOptionsMiddleware",
|
||||
"django.middleware.security.SecurityMiddleware",
|
||||
"wagtail.contrib.redirects.middleware.RedirectMiddleware",
|
||||
"blog.middleware.BlogRedirectMiddleware"
|
||||
"blog.middleware.BlogRedirectMiddleware",
|
||||
"django_browser_reload.middleware.BrowserReloadMiddleware"
|
||||
]
|
||||
|
||||
ROOT_URLCONF = "iamkonstantin_web.urls"
|
||||
|
@ -197,4 +201,10 @@ WAGTAIL_CODE_BLOCK_LANGUAGES = (
|
|||
('yaml', 'YAML'),
|
||||
)
|
||||
|
||||
WAGTAIL_CODE_BLOCK_THEME = 'twilight'
|
||||
WAGTAIL_CODE_BLOCK_THEME = 'twilight'
|
||||
|
||||
TAILWIND_APP_NAME = 'theme'
|
||||
|
||||
INTERNAL_IPS = [
|
||||
"127.0.0.1",
|
||||
]
|
|
@ -1,26 +1,3 @@
|
|||
*,
|
||||
::before,
|
||||
::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif, Apple Color Emoji, "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
}
|
||||
|
||||
body {
|
||||
min-height: 100vh;
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
padding: 10px;
|
||||
display: grid;
|
||||
gap: 3vw;
|
||||
grid-template-rows: min-content 1fr min-content;
|
||||
}
|
||||
|
||||
a {
|
||||
color: currentColor;
|
||||
}
|
||||
|
||||
footer {
|
||||
border-top: 2px dotted;
|
||||
|
@ -31,10 +8,6 @@ header {
|
|||
border-bottom: 2px dotted;
|
||||
}
|
||||
|
||||
.template-homepage main {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.skip-link {
|
||||
position: absolute;
|
||||
top: -30px;
|
||||
|
@ -42,22 +15,4 @@ header {
|
|||
|
||||
.skip-link:focus-visible {
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
.page-form label {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.page-form :is(textarea, input, select) {
|
||||
width: 100%;
|
||||
max-width: 500px;
|
||||
min-height: 40px;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.page-form .helptext {
|
||||
font-style: italic;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{% load static wagtailcore_tags %}
|
||||
{% load static wagtailcore_tags tailwind_tags %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
@ -16,7 +16,9 @@
|
|||
{% if page.search_description %}
|
||||
<meta name="description" content="{{ page.search_description }}"/>
|
||||
{% endif %}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
{% tailwind_css %}
|
||||
|
||||
{# Force all links in the live preview panel to be opened in a new tab #}
|
||||
{% if request.in_preview_panel %}
|
||||
|
@ -37,7 +39,7 @@
|
|||
{% endblock %}
|
||||
</head>
|
||||
|
||||
<body class="{% block body_class %}{% endblock %}">
|
||||
<body class="bg-gray-50 font-serif leading-normal tracking-normal {% block body_class %}{% endblock %}">
|
||||
|
||||
{% include "includes/header.html" %}
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ if settings.DEBUG:
|
|||
# Serve static and media files from development server
|
||||
urlpatterns += staticfiles_urlpatterns()
|
||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
urlpatterns += path("__reload__/", include("django_browser_reload.urls")),
|
||||
|
||||
urlpatterns = urlpatterns + [
|
||||
# For anything not caught by a more specific rule above, hand over to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue