Skip to content

Commit

Permalink
feat: uikit 3.21.13; rm tailwind
Browse files Browse the repository at this point in the history
  • Loading branch information
fivehanz committed Nov 9, 2024
1 parent 689fbed commit f5efd71
Show file tree
Hide file tree
Showing 10 changed files with 199 additions and 175 deletions.
3 changes: 0 additions & 3 deletions assets/css/output.css

This file was deleted.

Binary file modified bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions hanz/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@
]
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "assets"),
os.path.join(BASE_DIR, "node_modules/uikit/dist")
]
STATIC_ROOT = os.path.join(BASE_DIR, "static")
STATIC_HOST = os.environ.get("DJANGO_STATIC_HOST", "")
Expand Down
9 changes: 1 addition & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
{
"dependencies": { "flowbite": "^2.2.1" },
"devDependencies": {
"@tailwindcss/forms": "^0.5.7",
"flowbite-typography": "^1.0.3",
"tailwindcss": "^3.3.6"
}
}
{ "dependencies": { "uikit": "^3.21.13" } }
44 changes: 41 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ celery = "^5.4.0"
django-celery-beat = "^2.6.0"
django-plausible = "^0.5.0"
whitenoise = "^6.7.0"
djhtml = "^3.0.7"
django-types = "^0.19.1"


[tool.poetry.group.dev.dependencies]
Expand Down
33 changes: 0 additions & 33 deletions tailwind.config.js

This file was deleted.

197 changes: 105 additions & 92 deletions templates/base.html
Original file line number Diff line number Diff line change
@@ -1,96 +1,109 @@
{% load compress static wagtailcore_tags %}

<!DOCTYPE html>
<!doctype html>
<html lang="en" class="{% block html_class %}{% endblock %}">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!-- SEO -->
{% include "wagtailseo/meta.html" %}

{# Force all links in the live preview panel to be opened in a new tab #}
{% if request.in_preview_panel %}
<base target="_blank">
{% endif %}

<title>
{% block title %}
{% if page.seo_title %}{{ page.seo_title }}{% else %}{{ page.title }}{% endif %}
{% endblock %}
{% block title_suffix %}
{% wagtail_site as current_site %}
{% if current_site and current_site.site_name %}- {{ current_site.site_name }}{% endif %}
{% endblock %}
</title>

{% if page.search_description %}
<meta name="description" content="{{ page.search_description }}" />
{% endif %}

<!-- Favicon -->
<link rel="icon" href="{% static 'favicon.ico' %}">

<!-- Tailwind -->
{% compress css file tailwind %}
<link rel="stylesheet" href="{% static 'css/output.css' %}">
{% endcompress %}

{% block extra_css %}
{# Override this in templates to add extra stylesheets #}
{% endblock %}

<!-- HTMX -->
{% compress js file htmx %}
<script defer src="{% static 'js/htmx.min.js' %}"></script>
{% endcompress %}

<!-- PLAUSIBLE ANALYTICS -->
{% load plausible_wagtail %}
{% plausible %}
</head>

<body class="bg-white dark:bg-gray-800 max-w-screen-xl mx-auto {% block body_class %}{% endblock %}" {% block body_attributes %}{% endblock %}>
<!-- navbar / header -->
{% include "includes/header.html" %}
<!-- end navbar / header -->

<!-- main content -->
<main id="main" class="px-4 mt-4 mx-auto lg:px-6">
<div class="prose format lg:format-lg dark:format-invert max-w-full">
<!--main content block-->
{% block content %} {% endblock content %}
</div>
</main>

<!-- footer -->
{% include "includes/footer.html" %}
<!-- end footer -->

<!-- Flowbite -->
{% compress js file flowbite %}
<script defer src="{% static 'js/flowbite.min.js' %}"></script>
{% endcompress %}

<!-- Alpinejs 3.13.3 -->
{% compress js file alpine %}
<script defer src="{% static 'js/alpine.min.js' %}"></script>
{% endcompress %}

{% compress js inline %}
<!-- <script> -->
<!-- htmx.onLoad(function(content) { -->
<!-- initFlowbite(); -->
<!-- }) -->
</script>
{% endcompress %}

{% block extra_js %}
{# Override this in templates to add extra javascript #}
{% endblock %}

<!-- SEO -->
{% include "wagtailseo/struct_data.html" %}
</body>
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<!-- UI Kit -->
{% compress css file uikit %}
<link rel="stylesheet" href="{% static 'css/uikit.min.css' %}">
{% endcompress %}

<!-- SEO -->
{% include "wagtailseo/meta.html" %}

<!-- Force all links in the live preview panel to be opened in a new tab -->
{% if request.in_preview_panel %}
<base target="_blank" />
{% endif %}
<!-- /preview panel -->

<title>
{# fmt:off #}
{% block title %}
{% if page.seo_title %}
{{ page.seo_title }}
{% else %}
{{ page.title }}
{% endif %}
{% endblock %}

{% block title_suffix %}
{% wagtail_site as current_site %}
{% if current_site and current_site.site_name %}- {{current_site.site_name }}{% endif %}
{% endblock %}
{# fmt:on #}
</title>

{% if page.search_description %}
<meta name="description" content="{{ page.search_description }}" />
{% endif %}

<!-- Favicon -->
<link rel="icon" href="{% static 'favicon.ico' %}" />

<!-- Tailwind -->
<!-- {% compress css file tailwind %} -->
<!-- <link rel="stylesheet" href="{% static 'css/output.css' %}"> -->
<!-- {% endcompress %} -->

{% block extra_css %}
<!-- Override this in templates to add extra stylesheets -->
{% endblock %}

<!-- HTMX -->
<!-- {% compress js file htmx %} -->
<!-- <script defer src="{% static 'js/htmx.min.js' %}"></script> -->
<!-- {% endcompress %} -->

<!-- PLAUSIBLE ANALYTICS -->
{% load plausible_wagtail %} {% plausible %}
</head>

<body
class="uk-container {% block body_class %}{% endblock %}"
{% block body_attributes %}{% endblock%}
>
<!-- navbar / header -->
{% include "includes/header.html" %}
<!-- end navbar / header -->

<!-- main content -->
<main id="main" class="uk-container">
<!--main content block-->
{% block content %} {% endblock content %}
</main>

<!-- footer -->
{% include "includes/footer.html" %}
<!-- end footer -->

<!-- UI Kit 3.21.13 -->
{% compress js file uikit %}
<script defer src="{% static 'js/uikit.min.js' %}"></script>
{% endcompress %}

<!-- Alpine.js 3.13.3 -->
{% compress js file alpine %}
<script defer src="{% static 'js/alpine.min.js' %}"></script>
{% endcompress %}

{% compress js inline %}
<!-- <script> -->
<!-- htmx.onLoad(function(content) { -->
<!-- initFlowbite(); -->
<!-- }) -->
<!-- </script> -->
{% endcompress %}

{% block extra_js %}
{# Override this in templates to add extra javascript #}
{% endblock %}

<!-- SEO -->
{% include "wagtailseo/struct_data.html" %}
</body>
</html>
Loading

0 comments on commit f5efd71

Please sign in to comment.