From 94345e0e468db2c11e9799ba006f91caf69c81db Mon Sep 17 00:00:00 2001 From: Shahryar Tayeb Date: Tue, 6 Feb 2024 18:14:18 +0430 Subject: [PATCH] removed vite plugin --- README.md | 4 +- build.sh | 4 - docs/README.md | 4 +- poetry.lock | 13 +--- pyproject.toml | 1 - src/base/templates/base/feed_component.html | 86 +++++++++++---------- src/core/settings/base.py | 1 - src/package.json | 8 +- src/static/js/main.js | 4 - src/static/styles/out.css | 3 + src/templates/main.html | 10 ++- src/vite.config.js | 11 --- 12 files changed, 61 insertions(+), 88 deletions(-) create mode 100644 src/static/styles/out.css delete mode 100644 src/vite.config.js diff --git a/README.md b/README.md index bc085ce..b1e2130 100644 --- a/README.md +++ b/README.md @@ -72,10 +72,10 @@ python src/manage.py runserver --setting=core.settings.local # local settings python src/manage.py runserver --setting=core.settings.production # production settings ``` -- Run the vite server +- Run the tailwind watch ```shell -make vite +make t-watch ``` ## Docs diff --git a/build.sh b/build.sh index b6d14a7..ad6a5ac 100644 --- a/build.sh +++ b/build.sh @@ -3,9 +3,5 @@ set -o errexit poetry install - -make npm-install -make npm-build - python src/manage.py collectstatic --no-input python src/manage.py migrate \ No newline at end of file diff --git a/docs/README.md b/docs/README.md index f4820e4..0de0a62 100644 --- a/docs/README.md +++ b/docs/README.md @@ -78,10 +78,10 @@ python src/manage.py runserver --setting=core.settings.local # local settings python src/manage.py runserver --setting=core.settings.production # production settings ``` -- Run the vite server +- Run the tailwind watch ```shell -make vite +make t-watch ``` ## Docs diff --git a/poetry.lock b/poetry.lock index 2afbc2e..96d618e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -553,17 +553,6 @@ textual = [ ] trogon = "*" -[[package]] -name = "django-vite-plugin" -version = "1.3.3" -description = "Vite build tools integration for django" -optional = false -python-versions = ">=3.7" -files = [ - {file = "django_vite_plugin-1.3.3-py3-none-any.whl", hash = "sha256:d9ee9089d118bdf140e1340ea4da0ece29193f4456ce7a229558420041af7406"}, - {file = "django_vite_plugin-1.3.3.tar.gz", hash = "sha256:16a071f4b79a90678928d169caa1bc0d64a6d429cbd34c56856b415f8db01376"}, -] - [[package]] name = "djangorestframework" version = "3.14.0" @@ -1622,4 +1611,4 @@ brotli = ["Brotli"] [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "f17e4d342cb0ec37169caf94ba2f3097851dfd85f881d280bba1367b17cb3d83" +content-hash = "e77ee83b7189ebe4e2f9dea1ec50e4c4a0d46863bdea71906751fe0ff26a929d" diff --git a/pyproject.toml b/pyproject.toml index 2984960..819b727 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,6 @@ mysqlclient = "^2.2.0" django-invitations = "^2.0.0" django-htmx = "^1.17.0" django-mdeditor = "^0.1.20" -django-vite-plugin = "^1.3.3" django-guardian = "^2.4.0" gunicorn = "^21.2.0" environ = "^1.0" diff --git a/src/base/templates/base/feed_component.html b/src/base/templates/base/feed_component.html index bc9c624..b424947 100644 --- a/src/base/templates/base/feed_component.html +++ b/src/base/templates/base/feed_component.html @@ -1,50 +1,52 @@ {% load static %} {% for room in page_obj.object_list %} {% if forloop.last and page_obj.has_next %} -
- {% else %} -
- {% endif %} -
- -
- user-avatar -
- @{{ room.host.username }} -
-
- {{ room.created|timesince }} ago +
+ {% else %} + {% endfor %} diff --git a/src/core/settings/base.py b/src/core/settings/base.py index 113f431..8c28ae5 100644 --- a/src/core/settings/base.py +++ b/src/core/settings/base.py @@ -75,7 +75,6 @@ "django_extensions", "easyaudit", "mdeditor", - "django_vite_plugin", "django_structlog", # my apps "accounts.apps.AccountsConfig", diff --git a/src/package.json b/src/package.json index e843e99..c0eac4c 100644 --- a/src/package.json +++ b/src/package.json @@ -4,10 +4,8 @@ "description": "", "main": "", "scripts": { - "dev": "vite", - "build": "vite build", - "preview": "vite preview", - "start": "vite" + "build": "tailwindcss -i ./static/styles/tailwind.css -o ./static/styles/out.css --minify", + "dev": "tailwindcss -i ./static/styles/tailwind.css -o ./static/styles/out.css --watch" }, "author": "Shahryar Tayeb ", "license": "ISC", @@ -18,7 +16,5 @@ "vite": "^4.4.0" }, "dependencies": { - "django-vite-plugin": "^2.0.0", - "htmx.org": "^1.9.3" } } diff --git a/src/static/js/main.js b/src/static/js/main.js index f9c4e67..d8c0132 100644 --- a/src/static/js/main.js +++ b/src/static/js/main.js @@ -1,9 +1,5 @@ -import htmx from "htmx.org"; import "./htmx-extensions.js"; -window.htmx = htmx; - - // Menu const dropdownMenu = document.querySelector(".dropdown-menu"); const dropdownButton = document.querySelector(".dropdown-button"); diff --git a/src/static/styles/out.css b/src/static/styles/out.css new file mode 100644 index 0000000..c09f3c1 --- /dev/null +++ b/src/static/styles/out.css @@ -0,0 +1,3 @@ +@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap");:root{--color-main:#71c6dd;--color-main-light:#e1f6fb;--color-dark:#3f4156;--color-dark-medium:#51546e;--color-dark-light:#696d97;--color-light:#e5e5e5;--color-gray:#8b8b8b;--color-light-gray:#b2bdbd;--color-bg:#2d2d39;--color-success:#79d6a3;--color-error:#fc4b0b;--color-warning:#dbc039}.w-full{width:100%}.success{background-color:var(--color-success)}.success,.warning{border-radius:5px;padding:5px 8px;color:#000}.warning{background-color:var(--color-warning)}.error{background-color:var(--color-error);border-radius:5px;padding:5px 8px;color:#000}*{font-family:DM Sans,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;margin:0;padding:0;box-sizing:border-box;text-rendering:optimizeLegibility;font-size:inherit}html{font-size:56.25%}@media only screen and (min-width:1200px){html{font-size:62.5%}}@media only screen and (min-width:2100px){html{font-size:75%}}body{line-height:1.6;font-weight:400;font-size:1.5rem;color:var(--color-light-gray);background-color:var(--color-bg);min-height:100vh}img{width:100%}a{display:inline-block;color:var(--color-main);text-decoration:none}.my_container{max-width:120rem;width:90%;margin:auto}.btn{background-color:initial;border:none;display:inline-flex;align-items:center;gap:1rem;cursor:pointer;transition:all .3s ease-in-out;padding:1rem 2rem;border-radius:5px;box-shadow:1px 1px 3px 1px #00000026;font-weight:500}.btn--link{border-radius:0;padding:0;color:var(--color-main);box-shadow:none}.btn--link:hover{text-decoration:underline}.btn--main{background-color:var(--color-main)!important;color:var(--color-dark)}.btn:hover{opacity:.9}.btn--dark{background-color:var(--color-dark-light)!important;color:var(--color-light)}.btn>img{fill:currentColor;width:1.6rem;height:1.6rem}.btn--pill{border-radius:10rem;font-size:1.4rem;font-weight:700;padding:6px 2.5rem;color:var(--color-main);background:#0000;border:2px solid var(--color-main)}.action-button{background:#0000;border:none;outline:none;cursor:pointer}.avatar{position:relative;display:inline-block;border-radius:50%;border:2px solid var(--color-dark)}.avatar img{-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center}.avatar img,.avatar:after{display:block;border-radius:50%}.avatar:after{content:"";position:absolute;background-color:var(--color-gray);z-index:111;border:.3rem solid var(--color-dark)}.avatar.active{border:2px solid var(--color-success)}.avatar.active:after{background-color:var(--color-success)}.avatar.avatar--small img{width:2.8rem;height:2.8rem}.avatar.avatar--small:after{width:.7rem;height:.7rem;bottom:0;right:-6px}.avatar.avatar--medium img{width:3.6rem;height:3.6rem;border-radius:50%}.avatar.avatar--medium:after{width:.7rem;height:.7rem;bottom:0;right:-6px}.avatar.avatar--large img{display:block;width:8rem;height:8rem;border-radius:50%}.avatar.avatar--large:after{width:1rem;height:1rem;bottom:2px;right:3.5px}.scroll::-webkit-scrollbar{width:.6rem;background-color:#29292e}.scroll::-webkit-scrollbar-thumb{border-radius:1rem;background-color:var(--color-gray)}.dropdown-menu{z-index:111;position:absolute;top:5rem;right:.5rem;background:var(--color-dark-light);border-radius:5px;box-shadow:1px 1px 3px 1px #00000026;overflow:hidden;display:none}.dropdown-menu.show{display:block}.dropdown-menu a{padding:1.2rem 4rem;display:block;color:var(--color-light)!important;font-weight:500;font-size:1.4rem}.dropdown-menu a:hover{background-color:var(--color-dark-medium)}.dropdown-menu>a:not(:last-child){border-bottom:1px solid var(--color-dark-medium)}.dropdown-menu a svg{fill:var(--color-light)}.mobile-menu{margin-bottom:3rem}.mobile-menuItems{display:flex;align-items:center;justify-content:center;gap:1rem}@media screen and (min-width:500px){.mobile-menu{display:none}}.header{padding:1.5rem;background-color:var(--color-dark)}.header>.my_container{display:flex;gap:9.5rem}.header__logo,.header__user{display:flex;gap:2rem;align-items:center}.header__logo>img{height:3.2rem;width:3.2rem}.header__logo>h1{font-weight:700;font-size:2rem;color:var(--color-light)}.header__search>label{background-color:var(--color-dark-medium);padding:1.3rem 1rem;display:flex;align-items:center;gap:1rem;border-radius:4px}.header__search img{fill:var(--color-gray);width:2rem;height:2rem;margin-left:1rem}.header__search input{width:30rem;background:#0000;border:none;outline:none;color:var(--color-light)}@media screen and (max-width:800px){.header__search input{width:20rem}.header>.my_container{gap:3rem}}@media screen and (max-width:700px){.header__logo h1{display:none}}@media screen and (max-width:500px){.header__search{display:none}}.header__menu{margin-left:auto;position:relative}.header__menu a{display:flex;gap:1.5rem;align-items:center;font-weight:500;text-decoration:none;color:var(--color-gray)}.header__menu img{height:3.6rem}.header__menu p{line-height:1.2}.header__menu span{color:var(--color-main);font-weight:500;font-size:1.4rem;display:block}.header__menu svg{width:1.6rem;height:1.6rem;fill:var(--color-dark-light)}.dropdown-button{background:#0000;border:0;outline:0;cursor:pointer}.dropdown-button:hover svg{fill:var(--color-main)}.layout{margin-top:2.4rem}.layout>.my_container{display:flex;justify-content:center;gap:2.5rem}.layout--3>.my_container>div:first-child{flex-basis:18%;max-width:22.5rem}.layout--3>.my_container>div:nth-child(2){flex-basis:50%}.layout--2-v2>.my_container>div:first-child,.layout--3>.my_container>div:last-child{flex-basis:25%}.layout--2-v2>.my_container>div:last-child,.layout--2>.my_container>div:first-child{flex-basis:72%}.layout--2>.my_container>div:last-child{flex-basis:25%}.layout__box{width:90%;max-width:48rem;background-color:var(--color-dark);border-radius:1rem;box-shadow:1px 1px 6px 3px #0000001a}.layout__boxHeader{display:flex;padding:1.5rem;background-color:var(--color-dark-light);border-top-left-radius:.7rem;border-top-right-radius:.7rem}.layout__boxTitle{display:flex;gap:1.5rem;align-items:center}.layout__boxTitle h3{text-transform:uppercase;font-weight:500;color:var(--color-light)}.layout__boxTitle img{width:1.6rem;height:1.6rem;fill:var(--color-main)}.layout__body{margin:3rem}@media screen and (max-width:900px){.activities,.topics{display:none}.layout--3>.my_container>div:nth-child(2){flex-basis:100%}.layout>.my_container{display:block;justify-content:center}}.form__group{margin-bottom:2rem;width:100%}.form__split{display:flex;gap:1.5rem}.form__group label{display:block;font-size:1.5rem;margin-bottom:1rem}.form__group input,.form__group select,.form__group textarea{background:#0000;border:1px solid var(--color-dark-light);padding:1rem;border-radius:3px;width:100%;color:var(--color-light);font-weight:500;outline:none}.form__group input:focus,.form__group textarea:focus{border-color:var(--color-main)}.form__group textarea{background:#0000;height:10rem;resize:none}.form__group select{color:var(--color-gray);font-weight:400}.form__group select option{background-color:var(--color-dark-light);color:var(--color-light);padding:0 10rem}.form__action{display:flex;justify-content:flex-end;gap:3rem}.form__hide{position:absolute;left:-9999px}.form__avatar label{text-align:center;font-size:1.8rem;font-weight:500;color:var(--color-main);cursor:pointer}.form__avatar label:hover{text-decoration:underline}.topics__header{margin-bottom:2rem}.topics__header h2{text-transform:uppercase;font-weight:500;color:var(--color-dark-light)}.topics__list{list-style:none}.topics__list li a{display:flex;justify-content:space-between;margin-bottom:3rem;font-weight:500;color:var(--color-light-gray);transition:all .3s ease-in-out}.topics__list li a.active,.topics__list li a:hover{color:var(--color-main)}.topics__list li a span{padding:.5rem 1rem;background-color:var(--color-dark);border-radius:3px;font-size:1.3rem;font-weight:700;letter-spacing:1px}.topics-page a:hover{text-decoration:underline}.topics-page .topics__list li:not(:last-child) a{margin:2rem 0;padding-bottom:1rem;text-decoration:none;border-bottom:1px solid var(--color-dark-medium)}.topics-page .header__search{display:block}@media screen and (max-width:500px){.mobile-menu .header__search{display:block;margin-bottom:2.4rem}}.roomList__header{display:flex;justify-content:space-between;align-items:center;margin-bottom:2.4rem}.roomList__header h2{text-transform:uppercase;font-weight:500;color:var(--color-light);letter-spacing:1px}.roomList__header p{font-weight:500;color:var(--color-dark-light)}.roomListRoom{margin-bottom:2.4rem;background-color:var(--color-dark);border-radius:1rem;padding:2rem}.roomListRoom__header{display:flex;justify-content:space-between;align-items:center}.roomListRoom__author{font-weight:500;display:flex;align-items:center;gap:1rem}.roomListRoom__actions{display:flex;align-items:flex-start;gap:1rem;position:relative}.roomListRoom__actions span{font-size:1.4rem;font-weight:500}.roomListRoom__actions svg{fill:var(--color-main);width:1.6rem;height:1.6rem}.roomListRoom__content{margin:1rem 0}.roomListRoom__content a{font-size:2rem;font-weight:500;margin-bottom:1.5rem;color:var(--color-light);transition:all .3s ease-in-out}.roomListRoom__content a:hover{color:var(--color-main)}.roomListRoom__meta{border-top:1px solid var(--color-dark-medium);padding-top:1rem;display:flex;align-items:center;justify-content:space-between}.roomListRoom__joined{color:var(--color-light-gray);display:flex;align-items:center;gap:1rem;font-size:1.4rem;font-weight:500}.roomListRoom__joined img{fill:var(--color-main);width:1.6rem;height:1.6rem}.roomListRoom__topic{padding:5px 1.5rem;background-color:var(--color-dark-medium);border-radius:5rem;font-weight:500;font-size:1.3rem}.activities{background:var(--color-dark);border-radius:5px;overflow:hidden}.activities__header h2{background-color:var(--color-dark-light);text-transform:uppercase;font-weight:500;padding:1rem 1.5rem;color:var(--color-light);letter-spacing:1px;font-size:1.4rem}.activities__box{margin:1.5rem;padding:1.5rem;border:2px solid var(--color-dark-medium);border-radius:5px}.activities__boxHeader p{font-size:1.4rem;line-height:1.3;border-top-left-radius:.7rem;border-top-right-radius:.7rem}.activities__boxHeader p span{color:var(--color-gray);font-size:1.2rem;display:block}.activities__boxContent{margin-left:4.2rem;font-size:1.4rem}.activities__boxContent a:hover{text-decoration:underline}.activities__boxRoomContent{background:var(--color-bg);padding:1rem;border-radius:5px;margin-top:1rem;margin-left:-4.2rem}.roomListRoom__actions svg{fill:var(--color-light-gray)}.create-room.layout .layout__box,.delete-item.layout .layout__box,.update-account.layout .layout__box{max-width:68rem}.auth{min-height:100vh;display:flex;justify-content:center;align-items:center}.auth__tagline{text-align:center;margin-bottom:3rem;color:var(--color-main);font-weight:500;font-size:1.8rem}.auth .layout__boxHeader{text-align:center;justify-content:center}.auth__action{margin-top:3rem;text-align:center}.settings__avatar{text-align:center;margin:0 auto;display:flex;justify-content:center}.settings__avatar .avatar{margin:1rem}.profile{margin-bottom:3rem}.profile__avatar,.profile__info{text-align:center}.profile__info h3{font-size:2rem;color:var(--color-light);font-weight:400}.profile__info p{color:var(--color-main);font-weight:500;margin-bottom:1rem}.profile__about{margin-top:2rem}.profile__about h3{text-transform:uppercase;color:var(--color-dark-light);margin-bottom:.5rem}.profile-page .roomList__header{margin-bottom:1.5rem}.profile-page .roomList__header h2{color:var(--color-dark-light)}.sticky_panel{border-radius:.7rem;max-height:87.5vh;overflow:hidden;position:sticky;position:-webkit-sticky;top:1.5rem}.sticky_right_panel{background:var(--color-dark)}.participants{max-height:87.5vh;overflow:hidden;position:sticky;position:-webkit-sticky;top:1.5rem}.participants,.room{background:var(--color-dark);border-radius:.7rem}.room{position:relative}@media screen and (max-width:900px){.participants{display:none}.layout--2>.my_container>div:first-child{flex-basis:100%}}.participants__top,.room__top{background:var(--color-dark-light);display:flex;justify-content:space-between;align-items:center;padding:1rem 2rem;position:relative;border-top-left-radius:.7rem;border-top-right-radius:.7rem}.room__top svg,.thread__top svg{width:1.6rem;height:1.6rem;fill:var(--color-light);cursor:pointer}.room__topLeft{display:flex;align-items:flex-end;gap:1rem}.participants__top,.room__topLeft h3{text-transform:uppercase;font-weight:500;color:var(--color-light)}.room__topLeft img{width:1.6rem;height:1.6rem;fill:var(--color-light)}.room__topRight{display:flex;-moz-column-gap:1em;column-gap:1em;align-items:center}.room__topRight svg{fill:var(--color-main-light)}.room__header{overflow-y:auto;width:95%;background:var(--color-dark);z-index:999;top:4.4rem;padding-top:2rem;padding-bottom:1rem}@media screen and (max-width:500px){.room__header{top:4.3rem;padding-right:2rem}}.room__box{padding-left:2rem;padding-right:2rem;padding-bottom:0}@media screen and (max-width:500px){.room__box{padding-left:2.5rem;padding-right:2rem;height:80.5vh;overflow-y:auto;padding-bottom:0}}.room__info{display:flex;justify-content:space-between}.room__info h3{font-size:2.4rem;font-weight:500;color:var(--color-main)}.room__hosted p{text-transform:uppercase;color:var(--color-gray);font-size:1.2rem;font-weight:700;line-height:2}.room__author{display:flex;gap:1rem;align-items:center;margin-bottom:1rem;transition:all .3s ease-in-out}.room__author:hover{text-decoration:underline}.room__topics{padding:.5rem 1.5rem;background:var(--color-dark-light);color:var(--color-light);display:inline-block;font-size:1.4rem;border-radius:1.5rem;margin:1rem 0}.room__conversation{margin-top:1rem;margin-bottom:4rem;height:64%}.threads h3{text-transform:uppercase;font-weight:500;color:var(--color-gray)}.threads{background:var(--color-bg);border-radius:.7rem;overflow-y:auto;height:100%;padding:0 2rem 4rem}.thread__footer{display:flex;gap:10px;margin:1.5rem 0}.thread__footer .item{padding:0 8px;border-radius:.7rem}.thread__footer .item:hover{background-color:var(--color-dark-light);cursor:pointer}.message_replies .thread:before{content:"";width:43px;height:2px;background:var(--color-dark);position:absolute;left:-2rem;top:3.5rem}.reply-body{margin-left:32px;position:relative}.message_replies .thread{margin:2rem 0;padding:2rem}details summary{position:relative;list-style:none;cursor:pointer}details::-webkit-details-marker{display:none}.thread__author:after{display:inline-block;position:absolute;right:5px;align-self:center;font-size:12px}details.thread[open] .thread__author:after{content:"Click to hide";color:var(--color-light)}details.thread:not([open]) .thread__author:after{content:"Click to show";color:var(--color-light)}.reply-form textarea{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-size:16px;width:100%;max-width:100%;margin-top:15px;margin-bottom:5px}.d-none{display:none}.border-l{border-left:2px solid var(--color-dark)}.thread{margin:2rem 0;padding:2rem;position:relative}.thread__top{display:flex;align-items:center;justify-content:space-between}.thread__top svg{fill:var(--color-dark-light)}.thread__author{display:flex;align-items:center;gap:1.5rem;font-size:1.4rem}.thread__authorInfo{display:flex;align-items:center;gap:1rem}.thread__details{font-size:1.4rem;margin-top:.5rem}.room__message{margin:2rem 0;background:#0000}.room__message>form>textarea{background-color:var(--color-dark-light);color:var(--color-light);border:none;outline:none;border-radius:.7rem;width:100%;margin-top:-1rem;padding:1.2rem;font-size:1.4rem;font-weight:500}.room__message>form>textarea::-moz-placeholder{color:var(--color-light-gray)}.room__message>form>textarea::placeholder{color:var(--color-light-gray)}.participants__top span{color:var(--color-main);font-size:1.3rem;text-transform:none}.participants__top{justify-content:flex-start;gap:.5rem}.activities__list{height:82.5vh;overflow-y:scroll;padding-bottom:0}.participants__list{height:82.5vh;overflow-y:scroll;padding:2rem 2rem 0}.participant{display:flex;align-items:center;gap:1.5rem;margin-bottom:2rem}.participant p{color:var(--color-light-gray);line-height:1.2}.participant span{display:block;font-weight:500;color:var(--color-main);font-weight:1.4rem}pre{background-color:var(--color-dark);margin:8px 0}.thread__details>>>code{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}.error-validation{color:var(--color-error)}.messages{list-style:none;text-decoration:none}.blockLabels{padding:5px;border-radius:5px}.buttonHolder{margin:5px}.socialaccount_ballot{display:flex;justify-content:center}.size-sm{width:1.6rem;height:1.6rem} + +/*! tailwindcss v3.3.5 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.static{position:static!important}.\!absolute,.absolute{position:absolute!important}.relative{position:relative!important}.\!-m-px{margin:-1px!important}.m-0{margin:0!important}.m-12{margin:3rem!important}.my-10{margin-top:2.5rem!important;margin-bottom:2.5rem!important}.my-16{margin-top:4rem!important;margin-bottom:4rem!important}.my-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.mb-0{margin-bottom:0!important}.mb-10{margin-bottom:2.5rem!important}.mb-5{margin-bottom:1.25rem!important}.block{display:block!important}.inline-block{display:inline-block!important}.flex{display:flex!important}.grid{display:grid!important}.hidden{display:none!important}.\!h-px{height:1px!important}.h-1{height:.25rem!important}.h-5{height:1.25rem!important}.h-6{height:1.5rem!important}.h-8{height:2rem!important}.h-px{height:1px!important}.\!w-px{width:1px!important}.w-12{width:3rem!important}.w-5{width:1.25rem!important}.w-6{width:1.5rem!important}.w-8{width:2rem!important}.w-fit{width:-moz-fit-content!important;width:fit-content!important}.w-full{width:100%!important}.-translate-x-4{--tw-translate-x:-1rem!important}.-translate-x-4,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite!important}.cursor-pointer{cursor:pointer!important}.flex-col{flex-direction:column!important}.flex-wrap{flex-wrap:wrap!important}.items-start{align-items:flex-start!important}.items-center{align-items:center!important}.justify-normal{justify-content:normal!important}.justify-between{justify-content:space-between!important}.gap-16{gap:4rem!important}.gap-2{gap:.5rem!important}.gap-3{gap:.75rem!important}.gap-4{gap:1rem!important}.gap-5{gap:1.25rem!important}.gap-8{gap:2rem!important}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))!important;margin-bottom:calc(.5rem*var(--tw-space-y-reverse))!important}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))!important;margin-bottom:calc(.75rem*var(--tw-space-y-reverse))!important}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))!important;margin-bottom:calc(1rem*var(--tw-space-y-reverse))!important}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-top:calc(1.25rem*(1 - var(--tw-space-y-reverse)))!important;margin-bottom:calc(1.25rem*var(--tw-space-y-reverse))!important}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0!important;margin-top:calc(2rem*(1 - var(--tw-space-y-reverse)))!important;margin-bottom:calc(2rem*var(--tw-space-y-reverse))!important}.\!overflow-hidden{overflow:hidden!important}.\!whitespace-nowrap{white-space:nowrap!important}.break-words{overflow-wrap:break-word!important}.rounded-full{border-radius:9999px!important}.rounded-md{border-radius:.375rem!important}.rounded-xl{border-radius:.75rem!important}.rounded-b{border-bottom-right-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.\!border-0{border-width:0!important}.border{border-width:1px!important}.border-0{border-width:0!important}.border-4{border-width:4px!important}.border-y{border-top-width:1px!important}.border-b,.border-y{border-bottom-width:1px!important}.border-l{border-left-width:1px!important}.border-t{border-top-width:1px!important}.border-solid{border-style:solid!important}.border-current{border-color:currentColor!important}.border-dark{border-color:rgb(63 65 86/var(--tw-border-opacity))!important}.border-dark,.border-dark-light{--tw-border-opacity:1!important}.border-dark-light{border-color:rgb(105 109 151/var(--tw-border-opacity))!important}.border-dark-medium{--tw-border-opacity:1!important;border-color:rgb(81 84 110/var(--tw-border-opacity))!important}.border-gray-600{--tw-border-opacity:1!important;border-color:rgb(75 85 99/var(--tw-border-opacity))!important}.border-gray-700{--tw-border-opacity:1!important;border-color:rgb(55 65 81/var(--tw-border-opacity))!important}.border-r-transparent{border-right-color:#0000!important}.bg-bg{background-color:rgb(45 45 57/var(--tw-bg-opacity))!important}.bg-bg,.bg-dark{--tw-bg-opacity:1!important}.bg-dark{background-color:rgb(63 65 86/var(--tw-bg-opacity))!important}.bg-dark-light{--tw-bg-opacity:1!important;background-color:rgb(105 109 151/var(--tw-bg-opacity))!important}.bg-dark-medium{--tw-bg-opacity:1!important;background-color:rgb(81 84 110/var(--tw-bg-opacity))!important}.bg-dark\/50{background-color:#3f415680!important}.bg-gray-200{background-color:rgb(229 231 235/var(--tw-bg-opacity))!important}.bg-gray-200,.bg-red-700{--tw-bg-opacity:1!important}.bg-red-700{background-color:rgb(185 28 28/var(--tw-bg-opacity))!important}.bg-transparent{background-color:initial!important}.bg-white{background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.bg-white,.bg-yellow-600{--tw-bg-opacity:1!important}.bg-yellow-600{background-color:rgb(202 138 4/var(--tw-bg-opacity))!important}.fill-white{fill:#fff!important}.\!p-0{padding:0!important}.p-1{padding:.25rem!important}.p-10{padding:2.5rem!important}.p-2{padding:.5rem!important}.p-3{padding:.75rem!important}.p-4{padding:1rem!important}.p-5{padding:1.25rem!important}.p-8{padding:2rem!important}.px-4{padding-left:1rem!important;padding-right:1rem!important}.px-8{padding-left:2rem!important;padding-right:2rem!important}.py-12{padding-top:3rem!important;padding-bottom:3rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-4{padding-top:1rem!important;padding-bottom:1rem!important}.py-5{padding-top:1.25rem!important}.pb-5,.py-5{padding-bottom:1.25rem!important}.text-center{text-align:center!important}.align-\[-0\.125em\]{vertical-align:-.125em!important}.text-2xl{font-size:1.5rem!important;line-height:2rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-xl{font-size:1.25rem!important;line-height:1.75rem!important}.font-medium{font-weight:500!important}.font-semibold{font-weight:600!important}.uppercase{text-transform:uppercase!important}.text-gray-400{color:rgb(156 163 175/var(--tw-text-opacity))!important}.text-gray-400,.text-gray-500{--tw-text-opacity:1!important}.text-gray-500{color:rgb(107 114 128/var(--tw-text-opacity))!important}.text-gray-600{color:rgb(75 85 99/var(--tw-text-opacity))!important}.text-gray-600,.text-gray-700{--tw-text-opacity:1!important}.text-gray-700{color:rgb(55 65 81/var(--tw-text-opacity))!important}.text-red-500{--tw-text-opacity:1!important;color:rgb(239 68 68/var(--tw-text-opacity))!important}.underline{text-decoration-line:underline!important}.opacity-0{opacity:0!important}.outline-none{outline:2px solid #0000!important;outline-offset:2px!important}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.duration-300{transition-duration:.3s!important}.\!\[clip\:rect\(0\2c 0\2c 0\2c 0\)\]{clip:rect(0,0,0,0)!important}.progress{position:fixed;top:0;z-index:1000;height:4px;width:100%;border-radius:2px;background-clip:padding-box;overflow:hidden}.progress .indeterminate:before{animation:indeterminate 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.progress .indeterminate:after,.progress .indeterminate:before{content:"";position:absolute;background-color:inherit;top:0;left:0;bottom:0;will-change:left,right}.progress .indeterminate:after{animation:indeterminate-short 2.1s cubic-bezier(.165,.84,.44,1) infinite;animation-delay:1.15s}.progress{display:none}.htmx-request .progress,.htmx-request.progress{display:inline}@keyframes indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}.wmd-wrapper{border:none}.editormd{margin-bottom:0!important}.errorlist{margin-top:1.25rem;margin-bottom:1.25rem;border-radius:.375rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(252 75 11/var(--tw-border-opacity));background-color:#fc4b0b1a;padding:.75rem;--tw-text-opacity:1;color:rgb(252 75 11/var(--tw-text-opacity))}.hover\:z-\[1\]:hover{z-index:1!important}.hover\:rounded-md:hover{border-radius:.375rem!important}.hover\:bg-dark:hover{--tw-bg-opacity:1!important;background-color:rgb(63 65 86/var(--tw-bg-opacity))!important}.hover\:bg-dark-light:hover{--tw-bg-opacity:1!important;background-color:rgb(105 109 151/var(--tw-bg-opacity))!important}.hover\:bg-dark-medium:hover{--tw-bg-opacity:1!important;background-color:rgb(81 84 110/var(--tw-bg-opacity))!important}.hover\:bg-main:hover{--tw-bg-opacity:1!important;background-color:rgb(113 198 221/var(--tw-bg-opacity))!important}.hover\:bg-red-900:hover{--tw-bg-opacity:1!important;background-color:rgb(127 29 29/var(--tw-bg-opacity))!important}.hover\:font-semibold:hover{font-weight:600!important}.hover\:shadow-2xl:hover{--tw-shadow:0 25px 50px -12px #00000040!important;--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.hover\:shadow-gray-600\/10:hover{--tw-shadow-color:#4b55631a!important;--tw-shadow:var(--tw-shadow-colored)!important}.focus\:outline-none:focus{outline:2px solid #0000!important;outline-offset:2px!important}.disabled\:bg-dark:disabled{--tw-bg-opacity:1!important;background-color:rgb(63 65 86/var(--tw-bg-opacity))!important}.group:hover .group-hover\:translate-x-0{--tw-translate-x:0px!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.group:hover .group-hover\:opacity-100{opacity:1!important}@media (prefers-reduced-motion:reduce){@keyframes spin{to{transform:rotate(1turn)}}.motion-reduce\:animate-\[spin_1\.5s_linear_infinite\]{animation:spin 1.5s linear infinite!important}}@media (prefers-color-scheme:dark){.dark\:bg-gray-600{--tw-bg-opacity:1!important;background-color:rgb(75 85 99/var(--tw-bg-opacity))!important}.dark\:bg-gray-800{--tw-bg-opacity:1!important;background-color:rgb(31 41 55/var(--tw-bg-opacity))!important}.dark\:text-gray-300{--tw-text-opacity:1!important;color:rgb(209 213 219/var(--tw-text-opacity))!important}.dark\:text-white{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity))!important}}@media (min-width:768px){.md\:m-12{margin:3rem!important}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}}@media (min-width:1024px){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}} \ No newline at end of file diff --git a/src/templates/main.html b/src/templates/main.html index 30bcd29..d3c89d1 100644 --- a/src/templates/main.html +++ b/src/templates/main.html @@ -1,5 +1,4 @@ {% load static %} -{% load vite %} @@ -10,7 +9,7 @@ href="{% static 'images/favicon.ico' %}" type="image/x-icon" /> - {% vite 'styles/tailwind.css' %} + {% block meta_tags %}
+ {% include "components/navbar.html" %}
{% include "components/messages.html" %}
+ {% block content %} {% endblock content %} - {% vite "js/main.js" %} + + + + {% block extra_scripts %} {% endblock extra_scripts %} diff --git a/src/vite.config.js b/src/vite.config.js deleted file mode 100644 index 0aec4e8..0000000 --- a/src/vite.config.js +++ /dev/null @@ -1,11 +0,0 @@ -//vite.config.js -import { defineConfig } from "vite"; -import { djangoVitePlugin } from "django-vite-plugin"; - -export default defineConfig({ - plugins: [ - djangoVitePlugin({ - input: ["./static/js/main.js", "./static/styles/tailwind.css"], - }), - ], -});