From 6c83d11e5b68d5142380e54be8847ee44c71c272 Mon Sep 17 00:00:00 2001 From: marc Date: Sun, 16 Mar 2025 18:45:08 +0100 Subject: [PATCH] Tune editor --- flake.lock | 61 ++++ flake.nix | 46 +-- folkugat_web/api/tema/editor.py | 45 +++ folkugat_web/api/tema/index.py | 125 ++++++- folkugat_web/api/temes/index.py | 19 +- folkugat_web/assets/static/css/main.css | 304 +++++++++--------- .../templates/fragments/tema/editor/link.html | 31 +- .../fragments/tema/editor/link_file.html | 16 + .../fragments/tema/editor/link_url.html | 23 ++ .../fragments/tema/editor/property.html | 45 +++ .../assets/templates/fragments/tema/link.html | 2 + .../templates/fragments/tema/links.html | 7 +- .../templates/fragments/tema/pagina.html | 18 +- .../templates/fragments/tema/properties.html | 24 ++ .../templates/fragments/tema/property.html | 27 ++ .../templates/fragments/tema/score.html | 15 + .../templates/fragments/tema/title.html | 9 +- .../templates/fragments/tema/visibility.html | 15 + .../templates/fragments/temes/pagina.html | 26 +- .../templates/fragments/temes/result.html | 44 --- .../fragments/temes/result_links.html | 27 ++ .../templates/fragments/temes/results.html | 19 ++ folkugat_web/config/db.py | 11 +- folkugat_web/dal/sql/temes/ddl.py | 5 +- folkugat_web/dal/sql/temes/query.py | 1 - folkugat_web/dal/sql/temes/write.py | 13 + folkugat_web/fragments/tema.py | 115 ++++++- folkugat_web/fragments/temes.py | 18 +- folkugat_web/main.py | 6 +- folkugat_web/model/temes.py | 3 + folkugat_web/services/files.py | 58 ++++ folkugat_web/services/temes/search.py | 36 ++- folkugat_web/services/temes/write.py | 58 ++++ 33 files changed, 960 insertions(+), 312 deletions(-) create mode 100644 flake.lock create mode 100644 folkugat_web/assets/templates/fragments/tema/editor/link_file.html create mode 100644 folkugat_web/assets/templates/fragments/tema/editor/link_url.html create mode 100644 folkugat_web/assets/templates/fragments/tema/editor/property.html create mode 100644 folkugat_web/assets/templates/fragments/tema/properties.html create mode 100644 folkugat_web/assets/templates/fragments/tema/property.html create mode 100644 folkugat_web/assets/templates/fragments/tema/score.html create mode 100644 folkugat_web/assets/templates/fragments/tema/visibility.html delete mode 100644 folkugat_web/assets/templates/fragments/temes/result.html create mode 100644 folkugat_web/assets/templates/fragments/temes/result_links.html create mode 100644 folkugat_web/assets/templates/fragments/temes/results.html create mode 100644 folkugat_web/services/files.py diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..0dc7e31 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1741865919, + "narHash": "sha256-4thdbnP6dlbdq+qZWTsm4ffAwoS8Tiq1YResB+RP6WE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "573c650e8a14b2faa0041645ab18aed7e60f0c9a", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix index 0bdd488..8b0cb8b 100644 --- a/flake.nix +++ b/flake.nix @@ -13,41 +13,51 @@ # custom-python = import ./custom-python.nix { inherit pkgs; }; + coreDependencies = with pythonPackages; [ + # IDE tools + pylsp-mypy + isort + autopep8 + # Development tools + pytest + setuptools + ipython + ]; + projectDependencies = with pythonPackages; [ # API fastapi + python-multipart jinja2 uvicorn + # Files + magic # Auth pyjwt # Search levenshtein - # Test - pytest ]; + pythonEnv = python.withPackages ( + ps: projectDependencies ++ coreDependencies + ); + in { devShells.default = pkgs.mkShell { - nativeBuildInputs = [ pkgs.bashInteractive ]; + # nativeBuildInputs = [ pkgs.bashInteractive ]; buildInputs = with pkgs; [ - # Core python dependencies + # Python dependencies python - pythonPackages.pip - pythonPackages.virtualenv - # Other dependencies - nodePackages_latest.tailwindcss - # IDE tools - pythonPackages.pylsp-mypy - pythonPackages.isort - pythonPackages.autopep8 - nodePackages.pyright - # Development tools + pythonEnv + pyright black - pythonPackages.ipython - pythonPackages.pytest - pythonPackages.setuptools - ] ++ projectDependencies; + # Project dependencies + nodePackages_latest.tailwindcss + ]; + shellHook = '' + export PYTHONPATH=${pythonEnv}/${python.sitePackages}:$PYTHONPATH + ''; }; }); } diff --git a/folkugat_web/api/tema/editor.py b/folkugat_web/api/tema/editor.py index 054e3a6..4ae8578 100644 --- a/folkugat_web/api/tema/editor.py +++ b/folkugat_web/api/tema/editor.py @@ -41,3 +41,48 @@ def link_editor( tema_id=tema_id, link_id=link_id, ) + + +@router.get("/api/tema/{tema_id}/editor/link/{link_id}/url") +def link_editor_url_input( + request: Request, + logged_in: auth.RequireLogin, + tema_id: int, + link_id: int, +): + return tema.link_editor_url( + request=request, + logged_in=logged_in, + tema_id=tema_id, + link_id=link_id, + ) + + +@router.get("/api/tema/{tema_id}/editor/link/{link_id}/file") +def link_editor_file_input( + request: Request, + logged_in: auth.RequireLogin, + tema_id: int, + link_id: int, +): + return tema.link_editor_file( + request=request, + logged_in=logged_in, + tema_id=tema_id, + link_id=link_id, + ) + + +@router.get("/api/tema/{tema_id}/editor/property/{property_id}") +def property_editor( + request: Request, + logged_in: auth.RequireLogin, + tema_id: int, + property_id: int, +): + return tema.property_editor( + request=request, + logged_in=logged_in, + tema_id=tema_id, + property_id=property_id, + ) diff --git a/folkugat_web/api/tema/index.py b/folkugat_web/api/tema/index.py index 3edaca6..74f5f15 100644 --- a/folkugat_web/api/tema/index.py +++ b/folkugat_web/api/tema/index.py @@ -1,12 +1,13 @@ -from typing import Annotated +from typing import Annotated, Optional -from fastapi import Request -from fastapi.params import Form, Param +from fastapi import Request, UploadFile +from fastapi.params import File, Form, Param from fastapi.responses import HTMLResponse from folkugat_web.api import router +from folkugat_web.config import db from folkugat_web.fragments import tema, temes from folkugat_web.model import temes as model -from folkugat_web.services import auth +from folkugat_web.services import auth, files from folkugat_web.services.temes import write as temes_w from folkugat_web.services.temes.links import guess_link_type from folkugat_web.templates import templates @@ -30,6 +31,22 @@ def contingut(request: Request, logged_in: auth.LoggedIn, tema_id: int): return temes.tema(request, tema_id, logged_in) +@router.delete("/api/tema/{tema_id}") +def delete_tema(request: Request, _: auth.RequireLogin, tema_id: int): + temes_w.delete_tema(tema_id=tema_id) + return HTMLResponse(headers={ + 'HX-Redirect': '/temes' + }) + + +@router.post("/api/tema") +def create_tema(request: Request, _: auth.RequireLogin, title: Annotated[str, Form()] = ""): + new_tema = temes_w.create_tema(title=title) + return HTMLResponse(headers={ + 'HX-Redirect': f'/tema/{new_tema.id}' + }) + + @router.get("/api/tema/{tema_id}/title") def title(request: Request, logged_in: auth.LoggedIn, tema_id: int): return tema.title(request=request, tema_id=tema_id, logged_in=logged_in) @@ -98,24 +115,28 @@ def link(request: Request, logged_in: auth.LoggedIn, tema_id: int, link_id: int) @router.put("/api/tema/{tema_id}/link/{link_id}") -def set_link( +async def set_link( request: Request, logged_in: auth.RequireLogin, tema_id: int, link_id: int, content_type: Annotated[model.ContentType, Form()], - url: Annotated[str, Form()] = "", - title: Annotated[str, Form()] = "", + title: Annotated[Optional[str], Form()] = None, + url: Annotated[Optional[str], Form()] = None, + upload_file: Annotated[Optional[UploadFile], File()] = None, ): - link_type = guess_link_type(url) + if upload_file: + url = await files.store_file(tema_id=tema_id, upload_file=upload_file) + + link_type = guess_link_type(url or '') new_link = model.Link( id=link_id, content_type=content_type, link_type=link_type, - url=url, - title=title, + url=url or '', + title=title or '', ) - temes_w.update_link(tema_id=tema_id, link_id=link_id, link=new_link) + new_tema = temes_w.update_link(tema_id=tema_id, link_id=link_id, link=new_link) return tema.link(request=request, logged_in=logged_in, tema_id=tema_id, link_id=link_id) @@ -144,7 +165,11 @@ def delete_link( link_id: int, ): temes_w.delete_link(tema_id=tema_id, link_id=link_id) - return HTMLResponse() + return HTMLResponse( + headers={ + "HX-Trigger": f"reload-tema-{tema_id}-score" + } + ) @router.get("/api/tema/{tema_id}/link/{link_id}/icon") @@ -164,3 +189,79 @@ def link_icon( url=url, content_type=content_type, ) + + +@router.get("/api/tema/{tema_id}/score") +def get_score( + request: Request, + logged_in: auth.LoggedIn, + tema_id: int, +): + return tema.score( + request=request, + logged_in=logged_in, + tema_id=tema_id, + ) + + +@router.get("/api/tema/{tema_id}/property/{property_id}") +def property_(request: Request, logged_in: auth.LoggedIn, tema_id: int, property_id: int): + return tema.property_(request=request, logged_in=logged_in, tema_id=tema_id, property_id=property_id) + + +@router.put("/api/tema/{tema_id}/property/{property_id}") +def set_property( + request: Request, + logged_in: auth.RequireLogin, + tema_id: int, + property_id: int, + field: Annotated[model.PropertyField, Form()], + value: Annotated[str, Form()], +): + new_property = model.Property(id=property_id, field=field, value=value.strip()) + temes_w.update_property(tema_id=tema_id, property_id=property_id, prop=new_property) + return tema.property_(request=request, logged_in=logged_in, tema_id=tema_id, property_id=property_id) + + +@router.post("/api/tema/{tema_id}/property") +def add_property( + request: Request, + logged_in: auth.RequireLogin, + tema_id: int, +): + new_tema = temes_w.add_property(tema_id=tema_id) + property_id = new_tema.properties[-1].id + if property_id is None: + raise RuntimeError("Invalid property_id on newly created property!") + return tema.property_editor( + request=request, + logged_in=logged_in, + tema_id=tema_id, + property_id=property_id, + ) + + +@router.delete("/api/tema/{tema_id}/property/{property_id}") +def delete_property(_: auth.RequireLogin, tema_id: int, property_id: int): + temes_w.delete_property(tema_id=tema_id, property_id=property_id) + return HTMLResponse() + + +@router.put("/api/tema/{tema_id}/visible") +def set_visible(request: Request, logged_in: auth.RequireLogin, tema_id: int): + new_tema = temes_w.set_visibility(tema_id=tema_id, hidden=False) + return tema.visibility( + request=request, + logged_in=logged_in, + tema=new_tema, + ) + + +@router.put("/api/tema/{tema_id}/invisible") +def set_invisible(request: Request, logged_in: auth.RequireLogin, tema_id: int): + new_tema = temes_w.set_visibility(tema_id=tema_id, hidden=True) + return tema.visibility( + request=request, + logged_in=logged_in, + tema=new_tema, + ) diff --git a/folkugat_web/api/temes/index.py b/folkugat_web/api/temes/index.py index 359cfbc..ceb63d8 100644 --- a/folkugat_web/api/temes/index.py +++ b/folkugat_web/api/temes/index.py @@ -1,4 +1,7 @@ +from typing import Annotated, Optional + from fastapi import Request +from fastapi.params import Param from folkugat_web.api import router from folkugat_web.fragments import temes from folkugat_web.services import auth @@ -6,13 +9,17 @@ from folkugat_web.templates import templates @router.get("/temes") -def page(request: Request, logged_in: auth.LoggedIn): +def page( + request: Request, + logged_in: auth.LoggedIn, + query: Annotated[str, Param()] = "", +): return templates.TemplateResponse( "index.html", { "request": request, "page_title": "Folkugat", - "content": "/api/content/temes", + "content": f"/api/content/temes?query={query}", "logged_in": logged_in, "animate": False, } @@ -20,8 +27,12 @@ def page(request: Request, logged_in: auth.LoggedIn): @router.get("/api/content/temes") -def content(request: Request, logged_in: auth.LoggedIn): - return temes.temes_pagina(request, logged_in) +def content( + request: Request, + logged_in: auth.LoggedIn, + query: Annotated[str, Param()] = "", +): + return temes.temes_pagina(request, logged_in, query) @router.get("/api/temes/busca") diff --git a/folkugat_web/assets/static/css/main.css b/folkugat_web/assets/static/css/main.css index 76752a4..462f760 100644 --- a/folkugat_web/assets/static/css/main.css +++ b/folkugat_web/assets/static/css/main.css @@ -1,5 +1,113 @@ +*, ::before, ::after { + --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: rgb(59 130 246 / 0.5); + --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: ; + --tw-contain-size: ; + --tw-contain-layout: ; + --tw-contain-paint: ; + --tw-contain-style: ; +} + +::backdrop { + --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: rgb(59 130 246 / 0.5); + --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: ; + --tw-contain-size: ; + --tw-contain-layout: ; + --tw-contain-paint: ; + --tw-contain-style: ; +} + /* -! tailwindcss v3.3.3 | MIT License | https://tailwindcss.com +! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com */ /* @@ -32,9 +140,11 @@ 4. Use the user's configured `sans` font-family by default. 5. Use the user's configured `sans` font-feature-settings by default. 6. Use the user's configured `sans` font-variation-settings by default. +7. Disable tap highlights on iOS */ -html { +html, +:host { line-height: 1.5; /* 1 */ -webkit-text-size-adjust: 100%; @@ -44,12 +154,14 @@ html { -o-tab-size: 4; tab-size: 4; /* 3 */ - 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-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */ font-feature-settings: normal; /* 5 */ font-variation-settings: normal; /* 6 */ + -webkit-tap-highlight-color: transparent; + /* 7 */ } /* @@ -121,8 +233,10 @@ strong { } /* -1. Use the user's configured `mono` font family by default. -2. Correct the odd `em` font sizing in all browsers. +1. Use the user's configured `mono` font-family by default. +2. Use the user's configured `mono` font-feature-settings by default. +3. Use the user's configured `mono` font-variation-settings by default. +4. Correct the odd `em` font sizing in all browsers. */ code, @@ -131,8 +245,12 @@ samp, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */ - font-size: 1em; + font-feature-settings: normal; /* 2 */ + font-variation-settings: normal; + /* 3 */ + font-size: 1em; + /* 4 */ } /* @@ -201,6 +319,8 @@ textarea { /* 1 */ line-height: inherit; /* 1 */ + letter-spacing: inherit; + /* 1 */ color: inherit; /* 1 */ margin: 0; @@ -224,9 +344,9 @@ select { */ button, -[type='button'], -[type='reset'], -[type='submit'] { +input:where([type='button']), +input:where([type='reset']), +input:where([type='submit']) { -webkit-appearance: button; /* 1 */ background-color: transparent; @@ -430,108 +550,16 @@ video { /* Make elements with the HTML hidden attribute stay hidden by default */ -[hidden] { +[hidden]:where(:not([hidden="until-found"])) { display: none; } -*, ::before, ::after { - --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: rgb(59 130 246 / 0.5); - --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: ; +.visible { + visibility: visible; } -::backdrop { - --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: rgb(59 130 246 / 0.5); - --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: ; +.invisible { + visibility: hidden; } .static { @@ -574,10 +602,6 @@ video { margin: 0.75rem; } -.m-4 { - margin: 1rem; -} - .m-6 { margin: 1.5rem; } @@ -645,18 +669,18 @@ video { display: flex; } +.table { + display: table; +} + +.hidden { + display: none; +} + .h-4\/5 { height: 80%; } -.h-80 { - height: 20rem; -} - -.h-full { - height: 100%; -} - .h-px { height: 1px; } @@ -669,14 +693,14 @@ video { width: 50%; } -.w-80 { - width: 20rem; -} - .w-full { width: 100%; } +.min-w-full { + min-width: 100%; +} + .max-w-3xl { max-width: 48rem; } @@ -685,10 +709,6 @@ video { max-width: 56rem; } -.max-w-5xl { - max-width: 64rem; -} - .max-w-xl { max-width: 36rem; } @@ -815,6 +835,10 @@ video { justify-content: center; } +.gap-2 { + gap: 0.5rem; +} + .overflow-hidden { overflow: hidden; } @@ -839,8 +863,8 @@ video { border-width: 0px; } -.border-solid { - border-style: solid; +.border-b { + border-bottom-width: 1px; } .border-none { @@ -849,27 +873,22 @@ video { .border-beige { --tw-border-opacity: 1; - border-color: rgb(178 124 9 / var(--tw-border-opacity)); + border-color: rgb(178 124 9 / var(--tw-border-opacity, 1)); } .border-yellow-50 { --tw-border-opacity: 1; - border-color: rgb(254 252 232 / var(--tw-border-opacity)); + border-color: rgb(254 252 232 / var(--tw-border-opacity, 1)); } .bg-beige { --tw-bg-opacity: 1; - background-color: rgb(178 124 9 / var(--tw-bg-opacity)); + background-color: rgb(178 124 9 / var(--tw-bg-opacity, 1)); } .bg-brown { --tw-bg-opacity: 1; - background-color: rgb(62 56 52 / var(--tw-bg-opacity)); -} - -.bg-yellow-50 { - --tw-bg-opacity: 1; - background-color: rgb(254 252 232 / var(--tw-bg-opacity)); + background-color: rgb(62 56 52 / var(--tw-bg-opacity, 1)); } .p-0 { @@ -972,22 +991,17 @@ video { .text-beige { --tw-text-opacity: 1; - color: rgb(178 124 9 / var(--tw-text-opacity)); -} - -.text-brown { - --tw-text-opacity: 1; - color: rgb(62 56 52 / var(--tw-text-opacity)); + color: rgb(178 124 9 / var(--tw-text-opacity, 1)); } .text-white { --tw-text-opacity: 1; - color: rgb(255 255 255 / var(--tw-text-opacity)); + color: rgb(255 255 255 / var(--tw-text-opacity, 1)); } .text-yellow-50 { --tw-text-opacity: 1; - color: rgb(254 252 232 / var(--tw-text-opacity)); + color: rgb(254 252 232 / var(--tw-text-opacity, 1)); } .opacity-0 { diff --git a/folkugat_web/assets/templates/fragments/tema/editor/link.html b/folkugat_web/assets/templates/fragments/tema/editor/link.html index 05058db..daa00ad 100644 --- a/folkugat_web/assets/templates/fragments/tema/editor/link.html +++ b/folkugat_web/assets/templates/fragments/tema/editor/link.html @@ -1,10 +1,10 @@