From d9edcfe0174fad774558890d81da7e1a8f17472f Mon Sep 17 00:00:00 2001 From: John Franey <1728528+johnfraney@users.noreply.github.com> Date: Mon, 30 Dec 2024 21:36:41 -0400 Subject: [PATCH] wip --- docs/blurry_docs/__init__.py | 6 - docs/poetry.lock | 12 +- docs/pyproject.toml | 6 +- docs/templates/assets/docs.css | 387 --------------------------------- docs/templates/base.html.jinja | 10 + docs/tests/__init__.py | 0 6 files changed, 18 insertions(+), 403 deletions(-) delete mode 100644 docs/blurry_docs/__init__.py create mode 100644 docs/tests/__init__.py diff --git a/docs/blurry_docs/__init__.py b/docs/blurry_docs/__init__.py deleted file mode 100644 index 0040c66..0000000 --- a/docs/blurry_docs/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -from urllib.parse import urlparse - - -def url_path(url: str) -> str: - url_instance = urlparse(url) - return url_instance.path diff --git a/docs/poetry.lock b/docs/poetry.lock index 1fe0497..9b6ed11 100644 --- a/docs/poetry.lock +++ b/docs/poetry.lock @@ -53,13 +53,13 @@ files = [ [[package]] name = "click" -version = "8.1.7" +version = "8.1.8" description = "Composable command line interface toolkit" optional = false python-versions = ">=3.7" files = [ - {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, - {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, + {file = "click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2"}, + {file = "click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a"}, ] [package.dependencies] @@ -175,13 +175,13 @@ files = [ [[package]] name = "jinja2" -version = "3.1.4" +version = "3.1.5" description = "A very fast and expressive template engine." optional = false python-versions = ">=3.7" files = [ - {file = "jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d"}, - {file = "jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369"}, + {file = "jinja2-3.1.5-py3-none-any.whl", hash = "sha256:aba0f4dc9ed8013c424088f68a5c226f7d6097ed89b246d7749c2ec4175c6adb"}, + {file = "jinja2-3.1.5.tar.gz", hash = "sha256:8fefff8dc3034e27bb80d67c671eb8a9bc424c0ef4c0826edbff304cceff43bb"}, ] [package.dependencies] diff --git a/docs/pyproject.toml b/docs/pyproject.toml index 71b7204..6165aef 100644 --- a/docs/pyproject.toml +++ b/docs/pyproject.toml @@ -3,7 +3,8 @@ name = "blurry-docs" version = "0.1.0" description = "" authors = ["Your Name "] -readme = "README.md" +package-mode = false +packages = [] [tool.poetry.dependencies] python = "^3.11" @@ -12,6 +13,3 @@ blurry-cli = { path = "..", develop = true } [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" - -[tool.poetry.plugins."blurry.jinja_filter_plugins"] -url_path = "blurry_docs:url_path" diff --git a/docs/templates/assets/docs.css b/docs/templates/assets/docs.css index 8381975..fb4214f 100644 --- a/docs/templates/assets/docs.css +++ b/docs/templates/assets/docs.css @@ -1,12 +1,3 @@ -:root:not([data-theme=dark]), -[data-theme=light] { - --pico-aside-link-current-background-color:#eff1f4; - --pico-scale-color-1:#006d46; - --pico-scale-color-2:#4d6600; - --pico-scale-color-3:#785800; - --pico-scale-color-4:#8b4f00; - --pico-scale-color-5:#af291d -} :root:not([data-theme=dark]) article footer.code[data-theme=dark], [data-theme=light] article footer.code[data-theme=dark] { --pico-card-background-color:#181c25; @@ -14,24 +5,6 @@ --pico-card-box-shadow:var(--pico-box-shadow); --pico-card-sectioning-background-color:#1c212c } -@media only screen and (prefers-color-scheme:dark) { - :root:not([data-theme]) { - --pico-aside-link-current-background-color:#202632; - --pico-scale-color-1:#7edcbb; - --pico-scale-color-2:#bad675; - --pico-scale-color-3:#d5bb69; - --pico-scale-color-4:#e1b585; - --pico-scale-color-5:#daa099 - } -} -[data-theme=dark] { - --pico-aside-link-current-background-color:#202632; - --pico-scale-color-1:#7edcbb; - --pico-scale-color-2:#bad675; - --pico-scale-color-3:#d5bb69; - --pico-scale-color-4:#e1b585; - --pico-scale-color-5:#daa099 -} body { --pico-main-top-offset:0rem } @@ -434,180 +407,6 @@ main>[role=document] article>:last-child:not(footer, .grid) { margin-bottom:0 } -main>[role=document] .edit-on-github svg { - width:auto; - height:1rem; - margin-right:calc(var(--pico-spacing) * .25); - transform:translateY(-.0625rem) -} -main.page-brand .grid>article { - position:relative -} -main.page-brand .grid>article img { - display:block; - aspect-ratio:1; - width:66%; - height:auto; - margin:0 auto -} -main.page-brand .grid>article footer { - position:absolute; - right:0; - bottom:0; - left:0; - margin:0; - padding:1rem; - border:none; - background:0 0; - text-align:right -} -main.page-brand .grid>article footer a { - padding:.25rem .5rem; - font-size:14px -} -main.page-brand .grid>article footer a:not(:last-child) { - margin-right:.25rem -} -main.page-card article { - --pico-block-spacing-vertical:var(--pico-spacing); - --pico-block-spacing-horizontal:var(--pico-spacing) -} -main.page-color-schemes article#theme-switcher button { - display:block; - width:100%; - margin-inline:auto -} -main.page-color-schemes article#theme-switcher button svg.theme-toggle { - display:inline-block; - width:auto; - height:1.25rem; - margin-right:calc(var(--pico-spacing) * .5); - transform:translateY(-.0625rem) -} -@media (min-width:576px) { - main.page-color-schemes article#theme-switcher button { - width:50%; - min-width:-moz-fit-content; - min-width:fit-content - } -} -main.page-grid .btn-group button { - width:100%; - margin-bottom:var(--pico-spacing) -} -main.page-grid .btn-group button svg { - display:inline-block; - width:1em; - height:1em; - margin-right:.5em; - transform:translateY(-.125em) -} -@media (min-width:576px) { - main.page-grid .btn-group button { - width:auto - } - main.page-grid .btn-group button:not(:last-child) { - margin-right:var(--pico-spacing) - } -} -main.page-grid .grid>div { - padding:calc(var(--pico-spacing)/ 2) 0; - border-radius:var(--pico-border-radius); - background-color:var(--pico-code-background-color); - color:var(--pico-muted-color); - font-size:.875rem; - text-align:center -} -main.page-loading .grid#buttons { - margin-bottom:var(--pico-spacing) -} -main.page-mission blockquote { - max-width:30em; - font-weight:600 -} -main.page-mission blockquote footer { - font-weight:400 -} -main.page-modal article#modal-demo button { - display:block; - width:100%; - margin-inline:auto -} -@media (min-width:576px) { - main.page-modal article#modal-demo button { - width:50%; - min-width:-moz-fit-content; - min-width:fit-content - } -} -main.page-nav section#overflow article nav { - border:1px dashed var(--pico-del-color) -} -main.page-nav section#overflow article nav:not(:last-child) { - border-bottom-color:transparent -} -main.page-nav section#overflow article nav ul li a.focused { - box-shadow:0 0 0 var(--pico-outline-width) var(--pico-primary-focus); - color:var(--pico-primary-hover) -} -main.page-typography table#responsive-font-sizes { - font-size:16px -} -main.page-typography table#responsive-font-sizes caption { - display:none -} -main.page-typography table#responsive-font-sizes td, -main.page-typography table#responsive-font-sizes th { - width:14.2857142857%; - padding:calc(var(--pico-spacing)/ 2); - white-space:nowrap -} -main.page-typography table#responsive-font-sizes [data-tooltip] { - border-bottom-color:var(--pico-muted-color) -} -main.page-typography table#responsive-font-sizes [data-tooltip]:after, -main.page-typography table#responsive-font-sizes [data-tooltip]:before { - font-size:12px -} -main.page-usage-scenarios table { - font-size:16px -} -main.page-usage-scenarios table tr td:first-of-type, -main.page-usage-scenarios table tr th:first-of-type { - min-width:10em -} -main.page-usage-scenarios table tr td:last-of-type, -main.page-usage-scenarios table tr th:last-of-type { - min-width:15em -} -main.page-usage-scenarios table th { - white-space:nowrap -} -main.page-usage-scenarios .scale-color-1 { - color:var(--pico-scale-color-1) -} -main.page-usage-scenarios .scale-color-2 { - color:var(--pico-scale-color-2) -} -main.page-usage-scenarios .scale-color-3 { - color:var(--pico-scale-color-3) -} -main.page-usage-scenarios .scale-color-4 { - color:var(--pico-scale-color-4) -} -main.page-usage-scenarios .scale-color-5 { - color:var(--pico-scale-color-5) -} -main.page-usage-scenarios .muted { - color:var(--pico-muted-color) -} -main.page-v2 h3 { - font-weight:400; - font-size:1.25rem -} -main.page-version-picker select+small { - margin-bottom:calc(var(--pico-spacing) * 2)!important -} main>aside>nav details>summary:focus-visible:not([role]), main>aside>nav details>ul li a:not([role=button]):focus-visible:not([role]) { outline:0; @@ -615,188 +414,6 @@ main>aside>nav details>ul li a:not([role=button]):focus-visible:not([role]) { color:var(--pico-primary-hover); text-decoration:underline } -article.color-picker>header { - grid-gap:var(--pico-block-spacing-horizontal); - display:grid; - grid-template-columns:repeat(5,1fr); - overflow:hidden; - border-top-right-radius:var(--pico-border-radius); - border-top-left-radius:var(--pico-border-radius) -} -article.color-picker>header a { - display:flex; - align-items:center; - justify-content:center; - aspect-ratio:1/1; - border-radius:50% -} -article.color-picker>header a[aria-busy=true]:before { - max-width:1.5rem; - filter:brightness(0) invert(1); - opacity:.875 -} -article.color-picker>header a[aria-busy=true].pico-background-amber:before, -article.color-picker>header a[aria-busy=true].pico-background-grey:before, -article.color-picker>header a[aria-busy=true].pico-background-lime:before, -article.color-picker>header a[aria-busy=true].pico-background-pumpkin:before, -article.color-picker>header a[aria-busy=true].pico-background-sand:before, -article.color-picker>header a[aria-busy=true].pico-background-yellow:before { - filter:brightness(0) -} -article.color-picker>header a svg { - width:50%; - max-width:1.5rem; - height:auto; - opacity:.875 -} -@media (min-width:768px) { - article.color-picker>header { - grid-gap:calc(var(--pico-block-spacing-horizontal) * .5); - grid-template-columns:repeat(10,1fr) - } -} -@media (min-width:1280px) { - article.color-picker>header { - grid-gap:0; - grid-template-columns:repeat(20,1fr); - padding:0 - } - article.color-picker>header a { - border-radius:0 - } -} -article.color-picker h2 { - color:var(--pico-primary); - font-size:1.5rem; - line-height:1.175 -} -article.color-picker>footer, -article.color-picker>form, -article.color-picker>hgroup { - transition:opacity var(--pico-transition),filter var(--pico-transition) -} -.color-families { - grid-column-gap:2rem; - grid-row-gap:4rem; - display:grid; - grid-template-columns:1fr -} -@media (min-width:768px) { - .color-families { - grid-template-columns:1fr 1fr - } -} -.color-families .family { - margin:0; - padding:0; - background-color:transparent; - box-shadow:none -} -.color-families .family header { - aspect-ratio:16/9; - margin:0; - margin-bottom:.75rem; - padding:0; - padding:1rem 2rem; - border-radius:var(--pico-border-radius); - border-color:transparent; - text-align:left; - cursor:pointer -} -.color-families .family main { - display:grid; - grid-template-columns:repeat(5,1fr); - gap:.75rem -} -.color-families .family main>button { - display:flex; - position:relative; - align-items:center; - justify-content:center; - aspect-ratio:1/1; - margin-bottom:0; - padding:0; - border-width:0; - border-radius:var(--pico-border-radius); - font-size:.75rem -} -dialog.color { - --pico-font-size:.875rem; - padding:0 -} -dialog.color article { - transform:translateZ(0); - background:var(--pico-background-color); - box-shadow:0 0 0 var(--pico-border-width) var(--pico-secondary-focus),0 0 6rem 0 var(--pico-glowing-color),var(--pico-box-shadow); - transition:box-shadow var(--pico-transition) -} -@media (min-width:1024px) { - dialog.color article { - max-width:950px - } -} -dialog.color article p { - color:inherit -} -dialog.color article p, -dialog.color article pre { - margin-bottom:0 -} -dialog.color article header { - font-weight:700; - transition:color var(--pico-transition),background-color var(--pico-transition) -} -dialog.color article header a.close { - z-index:1; - position:relative; - height:inherit; - background-image:none; - background-position:inherit; - background-size:inherit; - background-repeat:inherit; - color:inherit; - line-height:initial -} -dialog.color article header hgroup { - margin-bottom:0 -} -dialog.color article header hgroup h3 { - color:inherit -} -dialog.color article header hgroup p { - --pico-font-size:.875em; - opacity:.5 -} -dialog.color article pre { - --pico-block-spacing-vertical:var(--pico-spacing) -} -dialog.color article .grid .code { - margin-bottom:0; - box-shadow:none -} -@media (min-width:768px) { - dialog.color article .grid { - grid-template-columns:min-content auto; - align-items:center; - white-space:nowrap - } -} -dialog.example { - z-index:inherit; - position:relative; - min-height:inherit; - margin:0 calc(var(--pico-spacing) * -1) var(--pico-block-spacing-vertical) calc(var(--pico-spacing) * -1); - inset:inherit -} -@media (min-width:576px) { - dialog.example { - margin:0; - margin-bottom:var(--pico-block-spacing-vertical) - } -} -dialog.example>article { - animation:none -} :is(h1, h2, h3, @@ -864,7 +481,3 @@ h5, h6):hover>a[id]:focus-visible { opacity:1 } -img.rounded-bordered { - border:1px solid var(--pico-muted-border-color); - border-radius:var(--pico-border-radius) -} diff --git a/docs/templates/base.html.jinja b/docs/templates/base.html.jinja index 45c9b74..d9b8c9e 100644 --- a/docs/templates/base.html.jinja +++ b/docs/templates/base.html.jinja @@ -111,6 +111,16 @@

{% block body %}{% endblock %} diff --git a/docs/tests/__init__.py b/docs/tests/__init__.py new file mode 100644 index 0000000..e69de29