diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e978a35..924c78c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 @@ -46,7 +46,7 @@ jobs: - name: Set up Python & PDM uses: pdm-project/setup-pdm@v4 with: - python-version: "3.10" + python-version: "3.11" - name: Install dependencies run: pdm install @@ -71,7 +71,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.11" - name: Check release id: check_release diff --git a/.gitignore b/.gitignore index 6a61316..f76f94b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,5 @@ .vscode/ -### Tailwind ### -tailwind.config.js - ### Node ### package-lock.json node_modules diff --git a/CHANGELOG.md b/CHANGELOG.md index c692a5d..baf9c56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,10 @@ CHANGELOG 0.3.0 - 2025-02-20 ------------------ -* Fix NPM error (`could not determine executable to run`), perhaps related to Tailwind CSS 4.x release ([#8](https://github.com/pelican-plugins/tailwindcss/pull/8/)) -* Use PDM & Ruff instead of Poetry, Black, Flake8, and isort ([#9](https://github.com/pelican-plugins/tailwindcss/pull/9/)) +* Fix NPM error (`could not determine executable to run`), perhaps related to Tailwind CSS 4.x release ([#8](https://github.com/pelican-plugins/tailwindcss/pull/8)) +* Use PDM & Ruff instead of Poetry, Black, Flake8, and isort ([#9](https://github.com/pelican-plugins/tailwindcss/pull/9)) -Contributed by [Justin Mayer](https://github.com/justinmayer) via [PR #9](https://github.com/pelican-plugins/tailwindcss/pull/9/) +Contributed by [Justin Mayer](https://justinmayer.com) via [PR #8](https://github.com/pelican-plugins/tailwindcss/pull/8) & [PR #9](https://github.com/pelican-plugins/tailwindcss/pull/9) 0.2.0 - 2022-07-10 @@ -15,7 +15,7 @@ Contributed by [Justin Mayer](https://github.com/justinmayer) via [PR #9](https: Add support for installing and using Tailwind CSS plugins. -Contributed by [Luca Fedrizzi](https://github.com/lcfd) via [PR #3](https://github.com/pelican-plugins/tailwindcss/pull/3/) +Contributed by [Luca Fedrizzi](https://github.com/lcfd) via [PR #3](https://github.com/pelican-plugins/tailwindcss/pull/3) 0.1.0 - 2022-06-22 @@ -23,4 +23,4 @@ Contributed by [Luca Fedrizzi](https://github.com/lcfd) via [PR #3](https://gith Initial publication of this plugin. -Contributed by [Luca Fedrizzi](https://github.com/lcfd) via [PR #1](https://github.com/pelican-plugins/tailwindcss/pull/1/) +Contributed by [Luca Fedrizzi](https://github.com/lcfd) via [PR #1](https://github.com/pelican-plugins/tailwindcss/pull/1) diff --git a/README.md b/README.md index 431be71..dab0ea1 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,11 @@ This plugin helps you use [Tailwind CSS][] in your Pelican web site. ## Why Use This Plugin? -Because you want use [Tailwind CSS][] in seconds. Not hours. +Because you want use Tailwind CSS in seconds. Not hours. ## Requirements -In order to run this plugin, you need to install Node.JS. (Someday this dependency could be replaced with a Python package.) +This plugin is tested on Tailwind CSS 3.0.24. If you would like to add support for Tailwind CSS 4.0+, please submit a pull request along with appropriate additions to the test suite. ## Installation @@ -48,42 +48,22 @@ As long as you have not explicitly added a `PLUGINS` setting to your Pelican set @tailwind utilities; ``` -3. Add the build file (`output.css`) in your `base.html`. +3. Add the build file (`output.css`) in your `base.html`: ```html ``` -4. Done! You should be ready to use [Tailwind CSS][] in your website template. +4. In your Pelican settings, specify the target Tailwind CSS version via the `TAILWIND` setting: -## Advanced Usage - -In your settings you can configure the plugin's behavior using the `TAILWIND` setting. - -An example of a complete `TAILWIND` setting: - -```python -TAILWIND = { - "version": "3.0.0", - "plugins": [ - "@tailwindcss/typography", - "@tailwindcss/forms", - "@tailwindcss/line-clamp", - "@tailwindcss/aspect-ratio", - ], -} -``` - -### Tailwind Plugin Installation - -As you can see from the example above, it is possible to add the `plugins` property to the configuration. -Just add the name of a Tailwind plugin to the list, and the plugin will be installed. - -## Useful Information + ```python + TAILWIND = { + "version": "3.0.24", + } + ``` -### Plugins +5. Done! You should be ready to use Tailwind CSS in your web site templates. -Your `tailwind.config.js` file will only be copied when Pelican starts. This means that any changes made after starting Pelican will not be recognized. For example, if you want to install a new plugin for Tailwind, you will have to restart Pelican in order for that plugin to become active. ## Contributing diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000..6413dbb --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,3 @@ +Release type: minor + +Use Tailwind CSS standalone CLI instead of NPM diff --git a/pelican/plugins/tailwindcss/package.json b/pelican/plugins/tailwindcss/package.json deleted file mode 100644 index d7a9273..0000000 --- a/pelican/plugins/tailwindcss/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "tailwindcss", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "tailwindcss": "tailwindcss" - }, - "author": "", - "license": "AGPL-3.0", - "dependencies": { - "tailwindcss": "^3.1.4" - } -} diff --git a/pelican/plugins/tailwindcss/tailwindcss.py b/pelican/plugins/tailwindcss/tailwindcss.py index be7b20a..0f4026c 100644 --- a/pelican/plugins/tailwindcss/tailwindcss.py +++ b/pelican/plugins/tailwindcss/tailwindcss.py @@ -1,73 +1,64 @@ +import importlib.resources import os -from os import path -import shutil +from pathlib import Path import subprocess +import sysconfig + +from rich import print from pelican import signals -from .utils import commands, installs, utils +from .utils.utils import ( + LOG_PREFIX, + build_tailwind_css, + get_env_var_prefix, + get_tailwind_css_version, +) -BASE_DIR = os.path.dirname(__file__) +PLUGIN_BASE_DIR = importlib.resources.files(__package__) +SITE_PACKAGES_DIR = Path(sysconfig.get_path("purelib")) def initialize(po): - SETTINGS = po.settings - TAILWIND_SETTINGS = SETTINGS.get("TAILWIND", None) - THEME_PATH = path.abspath(path.join(po.path, "..")) - - node_modules_path = os.path.join(BASE_DIR, "node_modules/") - - # Copy the tailwind.config.js file in order - # to be able to use Tailwind plugins - twconfig_file_path = os.path.join(THEME_PATH, "tailwind.config.js") - shutil.copyfile(twconfig_file_path, os.path.join(BASE_DIR, "tailwind.config.js")) - - if os.path.isdir(node_modules_path): - j_version = subprocess.check_output( - "npm -j ls tailwindcss", - cwd=BASE_DIR, - shell=True, - ).decode("utf-8") - - installed_tailwind_version = utils.get_npm_package_version(j_version=j_version) - - print( - f"{utils.LOG_PREFIX} The version is right (v{installed_tailwind_version})" - ) - - if TAILWIND_SETTINGS: - print(f"{utils.LOG_PREFIX} Settings were found") - - installs.another_tailwind( - settings=TAILWIND_SETTINGS, - installed_tailwind_version=installed_tailwind_version, - ) - - installs.plugins(settings=TAILWIND_SETTINGS) - - else: - print(f"{utils.LOG_PREFIX} No settings were found") - else: - print(f"{utils.LOG_PREFIX} Initialization required -- first start") - commands.run_in_plugin("npm install") - if TAILWIND_SETTINGS: - print(f"{utils.LOG_PREFIX} Settings were found") - installs.tailwind(settings=TAILWIND_SETTINGS) - installs.plugins(settings=TAILWIND_SETTINGS) + # Print notice if TAILWIND settings are found. + tailwind_settings = po.settings.get("TAILWIND") + if tailwind_settings: + print(f"{LOG_PREFIX} Settings were found") + + # Get Tailwind CSS version if specified in settings. + prefix = "" + tailwind_version = get_tailwind_css_version(po.settings) + if tailwind_version != "latest": + tailwind_version = f"v{tailwind_version}" + prefix = f"TAILWINDCSS_VERSION={tailwind_version} " + + # Download Tailwind CSS version if not already present. + tailwind_cli = Path( + SITE_PACKAGES_DIR / "pytailwindcss" / "bin" / tailwind_version / "tailwindcss" + ) + if not tailwind_cli.exists(): + print(f"Downloading Tailwind CSS CLI {tailwind_version} to {tailwind_cli}") + subprocess.run(f"{prefix}tailwindcss_install", shell=True, check=False) def generate_css(po): - THEME_PATH = path.abspath(path.join(po.path, "..")) - input_file_path = os.path.join(THEME_PATH, "input.css") - output_file_path = os.path.join(THEME_PATH, "output/output.css") - twconfig_file_path = os.path.join(BASE_DIR, "tailwind.config.js") - - input_output = f"-i {input_file_path} -o {output_file_path}" - print(f"{utils.LOG_PREFIX} Build CSS ({output_file_path})") - - commands.run_in_plugin( - f"npx tailwindcss -c {twconfig_file_path} {input_output}", - ) + prefix = suffix = "" + # Get Tailwind CSS version if specified in settings. + # If not the latest version, compose prefix for Tailwind CLI & suffix for logging. + tailwind_version = get_tailwind_css_version(po.settings) + if tailwind_version != "latest": + prefix = get_env_var_prefix(tailwind_version) + suffix = f" via Tailwind CSS v{tailwind_version}" + + project_root = os.path.abspath(os.path.join(po.path, "..")) + input_file_path = os.path.join(project_root, "input.css") + output_dir = po.settings.get("OUTPUT_PATH", f"{project_root}/output") + output_file_path = Path(f"{output_dir}/output.css") + twconfig_file_path = os.path.join(project_root, "tailwind.config.js") + + print(f"{LOG_PREFIX} Build CSS @ {output_file_path}{suffix}") + + build_tailwind_css(prefix, input_file_path, output_file_path, twconfig_file_path) def register(): diff --git a/pelican/plugins/tailwindcss/test_data/input.css b/pelican/plugins/tailwindcss/test_data/input.css new file mode 100644 index 0000000..9d2b4ca --- /dev/null +++ b/pelican/plugins/tailwindcss/test_data/input.css @@ -0,0 +1,47 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +html { + /* Disable mobile browser tap background highlight */ + -webkit-tap-highlight-color: transparent; +} + +#toc ul li { + /* Table of contents styling */ + list-style-type: disc; +} + +.image-thumbnail { + @apply sm:w-1/6 shadow-md; +} + +.image-small { + @apply sm:w-1/3 shadow-md; +} + +.image-medium { + @apply sm:w-1/2 shadow-md; +} + +.image-large { + @apply w-full h-full shadow-md; +} + +.image-left { + @apply sm:float-left mr-5; +} + +.image-right { + @apply sm:float-right sm:ml-5; +} + +.image-center { + @apply mx-auto; +} +p a { + @apply text-slate-600 dark:text-slate-400 underline; +} +p a { + @layer font-normal; +} diff --git a/pelican/plugins/tailwindcss/test_data/tailwind.config.js b/pelican/plugins/tailwindcss/test_data/tailwind.config.js new file mode 100644 index 0000000..b783072 --- /dev/null +++ b/pelican/plugins/tailwindcss/test_data/tailwind.config.js @@ -0,0 +1,29 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + darkMode: "class", + content: ["./themes/**/*.html", "./themes/**/*.js"], + theme: { + extend: { + fontFamily: { + sans: ['-apple-system','BlinkMacSystemFont','"segoe ui"','Roboto','Oxygen','Ubuntu','Cantarell','"open sans"','"helvetica neue"','"sans-serif"'], + 'display': ['Georama',] + }, + typography: { + DEFAULT: { + css: { + 'code::before': { + content: '""' + }, + 'code::after': { + content: '""' + } + } + } + }, + }, + }, + plugins: [ + require("@tailwindcss/typography"), + require("@tailwindcss/aspect-ratio"), + ], +}; diff --git a/pelican/plugins/tailwindcss/test_data/themes/papyrus/static/css/main.css b/pelican/plugins/tailwindcss/test_data/themes/papyrus/static/css/main.css new file mode 100644 index 0000000..80baea3 --- /dev/null +++ b/pelican/plugins/tailwindcss/test_data/themes/papyrus/static/css/main.css @@ -0,0 +1 @@ +/*! tailwindcss v3.2.7 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;font-feature-settings:normal;font-family:-apple-system,BlinkMacSystemFont,segoe ui,Roboto,Oxygen,Ubuntu,Cantarell,open sans,helvetica neue,"sans-serif";line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}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:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-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}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,: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-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:rgba(59,130,246,.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: }::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-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:rgba(59,130,246,.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: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose] *)){margin-bottom:1.25em;margin-top:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-bottom:1.2em;margin-top:1.2em}.prose :where(a):not(:where([class~=not-prose] *)){color:var(--tw-prose-links);font-weight:500;text-decoration:underline}.prose :where(strong):not(:where([class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose] *)){list-style-type:decimal;margin-bottom:1.25em;margin-top:1.25em;padding-left:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose] *)){list-style-type:disc;margin-bottom:1.25em;margin-top:1.25em;padding-left:1.625em}.prose :where(ol>li):not(:where([class~=not-prose] *))::marker{color:var(--tw-prose-counters);font-weight:400}.prose :where(ul>li):not(:where([class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(hr):not(:where([class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-bottom:3em;margin-top:3em}.prose :where(blockquote):not(:where([class~=not-prose] *)){border-left-color:var(--tw-prose-quote-borders);border-left-width:.25rem;color:var(--tw-prose-quotes);font-style:italic;font-weight:500;margin-bottom:1.6em;margin-top:1.6em;padding-left:1em;quotes:"\201C""\201D""\2018""\2019"}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-size:2.25em;font-weight:800;line-height:1.1111111;margin-bottom:.8888889em;margin-top:0}.prose :where(h1 strong):not(:where([class~=not-prose] *)){color:inherit;font-weight:900}.prose :where(h2):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-size:1.5em;font-weight:700;line-height:1.3333333;margin-bottom:1em;margin-top:2em}.prose :where(h2 strong):not(:where([class~=not-prose] *)){color:inherit;font-weight:800}.prose :where(h3):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-size:1.25em;font-weight:600;line-height:1.6;margin-bottom:.6em;margin-top:1.6em}.prose :where(h3 strong):not(:where([class~=not-prose] *)){color:inherit;font-weight:700}.prose :where(h4):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;line-height:1.5;margin-bottom:.5em;margin-top:1.5em}.prose :where(h4 strong):not(:where([class~=not-prose] *)){color:inherit;font-weight:700}.prose :where(img):not(:where([class~=not-prose] *)){margin-bottom:2em;margin-top:2em}.prose :where(figure>*):not(:where([class~=not-prose] *)){margin-bottom:0;margin-top:0}.prose :where(figcaption):not(:where([class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose :where(code):not(:where([class~=not-prose] *)){color:var(--tw-prose-code);font-size:.875em;font-weight:600}.prose :where(code):not(:where([class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose] *)){background-color:var(--tw-prose-pre-bg);border-radius:.375rem;color:var(--tw-prose-pre-code);font-size:.875em;font-weight:400;line-height:1.7142857;margin-bottom:1.7142857em;margin-top:1.7142857em;overflow-x:auto;padding:.8571429em 1.1428571em}.prose :where(pre code):not(:where([class~=not-prose] *)){background-color:transparent;border-radius:0;border-width:0;color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;padding:0}.prose :where(pre code):not(:where([class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose] *)){font-size:.875em;line-height:1.7142857;margin-bottom:2em;margin-top:2em;table-layout:auto;text-align:left;width:100%}.prose :where(thead):not(:where([class~=not-prose] *)){border-bottom-color:var(--tw-prose-th-borders);border-bottom-width:1px}.prose :where(thead th):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;padding-bottom:.5714286em;padding-left:.5714286em;padding-right:.5714286em;vertical-align:bottom}.prose :where(tbody tr):not(:where([class~=not-prose] *)){border-bottom-color:var(--tw-prose-td-borders);border-bottom-width:1px}.prose :where(tbody tr:last-child):not(:where([class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose] *)){border-top-color:var(--tw-prose-th-borders);border-top-width:1px}.prose :where(tfoot td):not(:where([class~=not-prose] *)){vertical-align:top}.prose{--tw-prose-body:#374151;--tw-prose-headings:#111827;--tw-prose-lead:#4b5563;--tw-prose-links:#111827;--tw-prose-bold:#111827;--tw-prose-counters:#6b7280;--tw-prose-bullets:#d1d5db;--tw-prose-hr:#e5e7eb;--tw-prose-quotes:#111827;--tw-prose-quote-borders:#e5e7eb;--tw-prose-captions:#6b7280;--tw-prose-code:#111827;--tw-prose-pre-code:#e5e7eb;--tw-prose-pre-bg:#1f2937;--tw-prose-th-borders:#d1d5db;--tw-prose-td-borders:#e5e7eb;--tw-prose-invert-body:#d1d5db;--tw-prose-invert-headings:#fff;--tw-prose-invert-lead:#9ca3af;--tw-prose-invert-links:#fff;--tw-prose-invert-bold:#fff;--tw-prose-invert-counters:#9ca3af;--tw-prose-invert-bullets:#4b5563;--tw-prose-invert-hr:#374151;--tw-prose-invert-quotes:#f3f4f6;--tw-prose-invert-quote-borders:#374151;--tw-prose-invert-captions:#9ca3af;--tw-prose-invert-code:#fff;--tw-prose-invert-pre-code:#d1d5db;--tw-prose-invert-pre-bg:rgba(0,0,0,.5);--tw-prose-invert-th-borders:#4b5563;--tw-prose-invert-td-borders:#374151;font-size:1rem;line-height:1.75}.prose :where(video):not(:where([class~=not-prose] *)){margin-bottom:2em;margin-top:2em}.prose :where(figure):not(:where([class~=not-prose] *)){margin-bottom:2em;margin-top:2em}.prose :where(li):not(:where([class~=not-prose] *)){margin-bottom:.5em;margin-top:.5em}.prose :where(ol>li):not(:where([class~=not-prose] *)){padding-left:.375em}.prose :where(ul>li):not(:where([class~=not-prose] *)){padding-left:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose] *)){margin-bottom:.75em;margin-top:.75em}.prose :where(.prose>ul>li>:first-child):not(:where([class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>:last-child):not(:where([class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>:first-child):not(:where([class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>:last-child):not(:where([class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose] *)){margin-bottom:.75em;margin-top:.75em}.prose :where(hr+*):not(:where([class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose] *)){padding-left:0}.prose :where(thead th:last-child):not(:where([class~=not-prose] *)){padding-right:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose] *)){padding:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose] *)){padding-left:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose] *)){padding-right:0}.prose :where(.prose>:first-child):not(:where([class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose] *)){margin-bottom:0}.aspect-h-9{--tw-aspect-h:9}.aspect-w-16{--tw-aspect-w:16;padding-bottom:calc(var(--tw-aspect-h)/var(--tw-aspect-w)*100%);position:relative}.aspect-w-16>*{bottom:0;height:100%;left:0;position:absolute;right:0;top:0;width:100%}.absolute{position:absolute}.relative{position:relative}.left-0{left:0}.right-0{right:0}.m-1{margin:.25rem}.m-2{margin:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-10{margin-bottom:2.5rem;margin-top:2.5rem}.my-12{margin-bottom:3rem;margin-top:3rem}.my-2{margin-bottom:.5rem;margin-top:.5rem}.my-4{margin-bottom:1rem;margin-top:1rem}.my-6{margin-bottom:1.5rem;margin-top:1.5rem}.my-8{margin-bottom:2rem;margin-top:2rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.mr-4{margin-right:1rem}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-12{margin-top:3rem}.mt-3{margin-top:.75rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.contents{display:contents}.hidden{display:none}.h-10{height:2.5rem}.h-12{height:3rem}.h-3{height:.75rem}.h-5{height:1.25rem}.min-h-screen{min-height:100vh}.w-1\/2{width:50%}.w-3{width:.75rem}.w-5{width:1.25rem}.w-full{width:100%}.max-w-7xl{max-width:80rem}.flex-1{flex:1 1 0%}.flex-grow{flex-grow:1}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}.overflow-hidden,.truncate{overflow:hidden}.truncate{text-overflow:ellipsis;white-space:nowrap}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-l-lg{border-bottom-left-radius:.5rem;border-top-left-radius:.5rem}.rounded-r-lg{border-bottom-right-radius:.5rem;border-top-right-radius:.5rem}.border-2{border-width:2px}.border-b-2{border-bottom-width:2px}.border-zinc-500{--tw-border-opacity:1;border-color:rgb(113 113 122/var(--tw-border-opacity))}.border-zinc-800{--tw-border-opacity:1;border-color:rgb(39 39 42/var(--tw-border-opacity))}.bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.bg-neutral-100{--tw-bg-opacity:1;background-color:rgb(245 245 245/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-zinc-100{--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity))}.bg-zinc-200{--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity))}.bg-zinc-300{--tw-bg-opacity:1;background-color:rgb(212 212 216/var(--tw-bg-opacity))}.bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity))}.fill-current{fill:currentColor}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-2\.5{padding-bottom:.625rem;padding-top:.625rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-6{padding-bottom:1.5rem}.pl-4{padding-left:1rem}.pr-2{padding-right:.5rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-right{text-align:right}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.capitalize{text-transform:capitalize}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-zinc-100{--tw-text-opacity:1;color:rgb(244 244 245/var(--tw-text-opacity))}.text-zinc-600{--tw-text-opacity:1;color:rgb(82 82 91/var(--tw-text-opacity))}.text-zinc-700{--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity))}.text-zinc-800{--tw-text-opacity:1;color:rgb(39 39 42/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.placeholder-zinc-400::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity))}.placeholder-zinc-400::placeholder{--tw-placeholder-opacity:1;color:rgb(161 161 170/var(--tw-placeholder-opacity))}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}html{-webkit-tap-highlight-color:transparent}#toc ul li{list-style-type:disc}.image-thumbnail{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}@media (min-width:640px){.image-thumbnail{width:16.666667%}}.image-small{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}@media (min-width:640px){.image-small{width:33.333333%}}.image-medium{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}@media (min-width:640px){.image-medium{width:50%}}.image-large{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);height:100%;width:100%}.image-left{margin-right:1.25rem}@media (min-width:640px){.image-left{float:left}.image-right{float:right;margin-left:1.25rem}}.image-center{margin-left:auto;margin-right:auto}p a{color:rgb(71 85 105/var(--tw-text-opacity));text-decoration-line:underline}.dark p a,p a{--tw-text-opacity:1}.dark p a{color:rgb(148 163 184/var(--tw-text-opacity))}p a{@layer font-normal}.hover\:bg-zinc-300:hover{--tw-bg-opacity:1;background-color:rgb(212 212 216/var(--tw-bg-opacity))}.hover\:bg-zinc-400:hover{--tw-bg-opacity:1;background-color:rgb(161 161 170/var(--tw-bg-opacity))}.hover\:underline:hover{text-decoration-line:underline}.focus\:border-zinc-500:focus{--tw-border-opacity:1;border-color:rgb(113 113 122/var(--tw-border-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.active\:-translate-y-1:active{--tw-translate-y:-0.25rem}.active\:-translate-y-1:active,.active\:scale-110:active{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))}.active\:scale-110:active{--tw-scale-x:1.1;--tw-scale-y:1.1}.prose-headings\:font-semibold :is(:where(h1,h2,h3,h4,h5,h6,th):not(:where([class~=not-prose] *))){font-weight:600}.prose-headings\:text-zinc-800 :is(:where(h1,h2,h3,h4,h5,h6,th):not(:where([class~=not-prose] *))){--tw-text-opacity:1;color:rgb(39 39 42/var(--tw-text-opacity))}.prose-h1\:text-3xl :is(:where(h1):not(:where([class~=not-prose] *))){font-size:1.875rem;line-height:2.25rem}.prose-a\:font-normal :is(:where(a):not(:where([class~=not-prose] *))){font-weight:400}.prose-a\:text-gray-500 :is(:where(a):not(:where([class~=not-prose] *))){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.prose-a\:text-slate-600 :is(:where(a):not(:where([class~=not-prose] *))){--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity))}.prose-blockquote\:text-zinc-800 :is(:where(blockquote):not(:where([class~=not-prose] *))){--tw-text-opacity:1;color:rgb(39 39 42/var(--tw-text-opacity))}.prose-code\:bg-zinc-200 :is(:where(code):not(:where([class~=not-prose] *))){--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity))}.prose-code\:font-light :is(:where(code):not(:where([class~=not-prose] *))){font-weight:300}.prose-pre\:bg-zinc-200 :is(:where(pre):not(:where([class~=not-prose] *))){--tw-bg-opacity:1;background-color:rgb(228 228 231/var(--tw-bg-opacity))}.prose-pre\:text-zinc-800 :is(:where(pre):not(:where([class~=not-prose] *))){--tw-text-opacity:1;color:rgb(39 39 42/var(--tw-text-opacity))}.prose-img\:rounded-md :is(:where(img):not(:where([class~=not-prose] *))){border-radius:.375rem}.dark .dark\:border-zinc-300{--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity))}.dark .dark\:bg-neutral-700{--tw-bg-opacity:1;background-color:rgb(64 64 64/var(--tw-bg-opacity))}.dark .dark\:bg-neutral-900{--tw-bg-opacity:1;background-color:rgb(23 23 23/var(--tw-bg-opacity))}.dark .dark\:bg-zinc-300{--tw-bg-opacity:1;background-color:rgb(212 212 216/var(--tw-bg-opacity))}.dark .dark\:bg-zinc-700{--tw-bg-opacity:1;background-color:rgb(63 63 70/var(--tw-bg-opacity))}.dark .dark\:bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity))}.dark .dark\:text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.dark .dark\:text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity))}.dark .dark\:text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity))}.dark .dark\:text-zinc-800{--tw-text-opacity:1;color:rgb(39 39 42/var(--tw-text-opacity))}.dark .dark\:placeholder-zinc-300::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(212 212 216/var(--tw-placeholder-opacity))}.dark .dark\:placeholder-zinc-300::placeholder{--tw-placeholder-opacity:1;color:rgb(212 212 216/var(--tw-placeholder-opacity))}.dark .dark\:hover\:bg-zinc-800:hover{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity))}.dark .prose-headings\:dark\:text-zinc-300 :is(:where(h1,h2,h3,h4,h5,h6,th):not(:where([class~=not-prose] *))){--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity))}.dark .dark\:prose-a\:text-gray-400 :is(:where(a):not(:where([class~=not-prose] *))){--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.dark .dark\:prose-a\:text-slate-400 :is(:where(a):not(:where([class~=not-prose] *))){--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity))}.dark .dark\:prose-blockquote\:text-zinc-200 :is(:where(blockquote):not(:where([class~=not-prose] *))){--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity))}.dark .dark\:prose-strong\:text-zinc-200 :is(:where(strong):not(:where([class~=not-prose] *))){--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity))}.dark .dark\:prose-code\:bg-zinc-800 :is(:where(code):not(:where([class~=not-prose] *))){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity))}.dark .dark\:prose-code\:text-zinc-200 :is(:where(code):not(:where([class~=not-prose] *))){--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity))}.dark .dark\:prose-pre\:bg-zinc-800 :is(:where(pre):not(:where([class~=not-prose] *))){--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity))}.dark .dark\:prose-pre\:text-zinc-200 :is(:where(pre):not(:where([class~=not-prose] *))){--tw-text-opacity:1;color:rgb(228 228 231/var(--tw-text-opacity))}@media (min-width:640px){.sm\:flex{display:flex}.sm\:justify-between{justify-content:space-between}.sm\:text-left{text-align:left}}@media (min-width:768px){.md\:mx-auto{margin-left:auto;margin-right:auto}.md\:my-12{margin-bottom:3rem;margin-top:3rem}.md\:my-24{margin-bottom:6rem;margin-top:6rem}.md\:mt-14{margin-top:3.5rem}.md\:mt-16{margin-top:4rem}.md\:flex{display:flex}.md\:w-3\/4{width:75%}.md\:w-40{width:10rem}.md\:max-w-screen-md{max-width:768px}.md\:p-6{padding:1.5rem}.md\:px-3{padding-left:.75rem;padding-right:.75rem}.md\:px-4{padding-left:1rem;padding-right:1rem}.md\:pt-0{padding-top:0}.md\:text-justify{text-align:justify}}@media (min-width:1024px){.lg\:mr-24{margin-right:6rem}.lg\:max-w-none{max-width:none}.lg\:prose-h1\:text-3xl :is(:where(h1):not(:where([class~=not-prose] *))){font-size:1.875rem;line-height:2.25rem}}@media (min-width:1280px){.xl\:ml-32{margin-left:8rem}} \ No newline at end of file diff --git a/pelican/plugins/tailwindcss/test_data/themes/papyrus/static/css/pygment.css b/pelican/plugins/tailwindcss/test_data/themes/papyrus/static/css/pygment.css new file mode 100644 index 0000000..93fe9f9 --- /dev/null +++ b/pelican/plugins/tailwindcss/test_data/themes/papyrus/static/css/pygment.css @@ -0,0 +1,156 @@ +.highlight .hll { background-color: #E4E4E7 } +.highlight { background: #E4E4E7; } +.highlight .c { color: #854d0e; font-style: italic } /* Comment */ +.highlight .g { color: #292524 } /* Generic */ +.highlight .k { color: #581c87; font-weight: normal } /* Keyword */ +.highlight .l { color: #292524 } /* Literal */ +.highlight .n { color: #292524 } /* Name */ +.highlight .o { color: #b91c1c; font-weight: normal } /* Operator */ +.highlight .x { color: #292524 } /* Other */ +.highlight .p { color: #292524; font-weight: normal } /* Punctuation */ +.highlight .ch { color: #854d0e; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #854d0e; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #854d0e; font-style: italic } /* Comment.Preproc */ +.highlight .cpf { color: #854d0e; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #854d0e; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #854d0e; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #a40000 } /* Generic.Deleted */ +.highlight .ge { color: #292524; font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #ef2929 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: normal } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #292524; font-style: italic } /* Generic.Output */ +.highlight .gp { color: #854d0e } /* Generic.Prompt */ +.highlight .gs { color: #292524; font-weight: normal } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: normal } /* Generic.Subheading */ +.highlight .gt { color: #a40000; font-weight: normal } /* Generic.Traceback */ +.highlight .kc { color: #581c87; font-weight: normal } /* Keyword.Constant */ +.highlight .kd { color: #581c87; font-weight: normal } /* Keyword.Declaration */ +.highlight .kn { color: #581c87; font-weight: normal } /* Keyword.Namespace */ +.highlight .kp { color: #581c87; font-weight: normal } /* Keyword.Pseudo */ +.highlight .kr { color: #581c87; font-weight: normal } /* Keyword.Reserved */ +.highlight .kt { color: #581c87; font-weight: normal } /* Keyword.Type */ +.highlight .ld { color: #292524 } /* Literal.Date */ +.highlight .m { color: #1d4ed8; font-weight: normal } /* Literal.Number */ +.highlight .s { color: #166534 } /* Literal.String */ +.highlight .na { color: #b91c1c } /* Name.Attribute */ +.highlight .nb { color: #581c87 } /* Name.Builtin */ +.highlight .nc { color: #292524 } /* Name.Class */ +.highlight .no { color: #292524 } /* Name.Constant */ +.highlight .nd { color: #5c35cc; font-weight: normal } /* Name.Decorator */ +.highlight .ni { color: #b91c1c } /* Name.Entity */ +.highlight .ne { color: #cc0000; font-weight: normal } /* Name.Exception */ +.highlight .nf { color: #292524 } /* Name.Function */ +.highlight .nl { color: #ea580c } /* Name.Label */ +.highlight .nn { color: #292524 } /* Name.Namespace */ +.highlight .nx { color: #292524 } /* Name.Other */ +.highlight .py { color: #292524 } /* Name.Property */ +.highlight .nt { color: #581c87; font-weight: normal } /* Name.Tag */ +.highlight .nv { color: #292524 } /* Name.Variable */ +.highlight .ow { color: #581c87; font-weight: normal } /* Operator.Word */ +.highlight .w { color: #E4E4E7; text-decoration: underline } /* Text.Whitespace */ +.highlight .mb { color: #1d4ed8; font-weight: normal } /* Literal.Number.Bin */ +.highlight .mf { color: #1d4ed8; font-weight: normal } /* Literal.Number.Float */ +.highlight .mh { color: #1d4ed8; font-weight: normal } /* Literal.Number.Hex */ +.highlight .mi { color: #1d4ed8; font-weight: normal } /* Literal.Number.Integer */ +.highlight .mo { color: #1d4ed8; font-weight: normal } /* Literal.Number.Oct */ +.highlight .sa { color: #166534 } /* Literal.String.Affix */ +.highlight .sb { color: #166534 } /* Literal.String.Backtick */ +.highlight .sc { color: #166534 } /* Literal.String.Char */ +.highlight .dl { color: #166534 } /* Literal.String.Delimiter */ +.highlight .sd { color: #854d0e; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #166534 } /* Literal.String.Double */ +.highlight .se { color: #166534 } /* Literal.String.Escape */ +.highlight .sh { color: #166534 } /* Literal.String.Heredoc */ +.highlight .si { color: #166534 } /* Literal.String.Interpol */ +.highlight .sx { color: #166534 } /* Literal.String.Other */ +.highlight .sr { color: #166534 } /* Literal.String.Regex */ +.highlight .s1 { color: #166534 } /* Literal.String.Single */ +.highlight .ss { color: #166534 } /* Literal.String.Symbol */ +.highlight .bp { color: #3465a4 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #292524 } /* Name.Function.Magic */ +.highlight .vc { color: #292524 } /* Name.Variable.Class */ +.highlight .vg { color: #292524 } /* Name.Variable.Global */ +.highlight .vi { color: #292524 } /* Name.Variable.Instance */ +.highlight .vm { color: #292524 } /* Name.Variable.Magic */ +.highlight .il { color: #1d4ed8; font-weight: normal } /* Literal.Number.Integer.Long */ +.dark .highlight .hll { background-color: #27272A } +.dark .highlight { background: #27272A; color: #c9d1d9 } +.dark .highlight .c { color: #8b949e; font-style: italic } /* Comment */ +.dark .highlight .err { color: #f85149 } /* Error */ +.dark .highlight .esc { color: #c9d1d9 } /* Escape */ +.dark .highlight .g { color: #c9d1d9 } /* Generic */ +.dark .highlight .k { color: #ff7b72 } /* Keyword */ +.dark .highlight .l { color: #a5d6ff } /* Literal */ +.dark .highlight .n { color: #c9d1d9 } /* Name */ +.dark .highlight .o { color: #ff7b72; font-weight: bold } /* Operator */ +.dark .highlight .x { color: #c9d1d9 } /* Other */ +.dark .highlight .p { color: #c9d1d9 } /* Punctuation */ +.dark .highlight .ch { color: #8b949e; font-style: italic } /* Comment.Hashbang */ +.dark .highlight .cm { color: #8b949e; font-style: italic } /* Comment.Multiline */ +.dark .highlight .cp { color: #8b949e; font-weight: bold; font-style: italic } /* Comment.Preproc */ +.dark .highlight .cpf { color: #8b949e; font-style: italic } /* Comment.PreprocFile */ +.dark .highlight .c1 { color: #8b949e; font-style: italic } /* Comment.Single */ +.dark .highlight .cs { color: #8b949e; font-weight: bold; font-style: italic } /* Comment.Special */ +.dark .highlight .gd { color: #ffa198; background-color: #490202 } /* Generic.Deleted */ +.dark .highlight .ge { color: #c9d1d9; font-style: italic } /* Generic.Emph */ +.dark .highlight .gr { color: #ffa198 } /* Generic.Error */ +.dark .highlight .gh { color: #79c0ff; font-weight: bold } /* Generic.Heading */ +.dark .highlight .gi { color: #56d364; background-color: #0f5323 } /* Generic.Inserted */ +.dark .highlight .go { color: #8b949e } /* Generic.Output */ +.dark .highlight .gp { color: #8b949e } /* Generic.Prompt */ +.dark .highlight .gs { color: #c9d1d9; font-weight: bold } /* Generic.Strong */ +.dark .highlight .gu { color: #79c0ff } /* Generic.Subheading */ +.dark .highlight .gt { color: #ff7b72 } /* Generic.Traceback */ +.dark .highlight .g-Underline { color: #c9d1d9; text-decoration: underline } /* Generic.Underline */ +.dark .highlight .kc { color: #79c0ff } /* Keyword.Constant */ +.dark .highlight .kd { color: #ff7b72 } /* Keyword.Declaration */ +.dark .highlight .kn { color: #ff7b72 } /* Keyword.Namespace */ +.dark .highlight .kp { color: #79c0ff } /* Keyword.Pseudo */ +.dark .highlight .kr { color: #ff7b72 } /* Keyword.Reserved */ +.dark .highlight .kt { color: #ff7b72 } /* Keyword.Type */ +.dark .highlight .ld { color: #79c0ff } /* Literal.Date */ +.dark .highlight .m { color: #a5d6ff } /* Literal.Number */ +.dark .highlight .s { color: #a5d6ff } /* Literal.String */ +.dark .highlight .na { color: #c9d1d9 } /* Name.Attribute */ +.dark .highlight .nb { color: #c9d1d9 } /* Name.Builtin */ +.dark .highlight .nc { color: #f0883e; font-weight: bold } /* Name.Class */ +.dark .highlight .no { color: #79c0ff; font-weight: bold } /* Name.Constant */ +.dark .highlight .nd { color: #d2a8ff; font-weight: bold } /* Name.Decorator */ +.dark .highlight .ni { color: #ffa657 } /* Name.Entity */ +.dark .highlight .ne { color: #f0883e; font-weight: bold } /* Name.Exception */ +.dark .highlight .nf { color: #d2a8ff; font-weight: bold } /* Name.Function */ +.dark .highlight .nl { color: #79c0ff; font-weight: bold } /* Name.Label */ +.dark .highlight .nn { color: #ff7b72 } /* Name.Namespace */ +.dark .highlight .nx { color: #c9d1d9 } /* Name.Other */ +.dark .highlight .py { color: #79c0ff } /* Name.Property */ +.dark .highlight .nt { color: #7ee787 } /* Name.Tag */ +.dark .highlight .nv { color: #79c0ff } /* Name.Variable */ +.dark .highlight .ow { color: #ff7b72; font-weight: bold } /* Operator.Word */ +.dark .highlight .pm { color: #c9d1d9 } /* Punctuation.Marker */ +.dark .highlight .w { color: #27272A } /* Text.Whitespace */ +.dark .highlight .mb { color: #a5d6ff } /* Literal.Number.Bin */ +.dark .highlight .mf { color: #a5d6ff } /* Literal.Number.Float */ +.dark .highlight .mh { color: #a5d6ff } /* Literal.Number.Hex */ +.dark .highlight .mi { color: #a5d6ff } /* Literal.Number.Integer */ +.dark .highlight .mo { color: #a5d6ff } /* Literal.Number.Oct */ +.dark .highlight .sa { color: #79c0ff } /* Literal.String.Affix */ +.dark .highlight .sb { color: #a5d6ff } /* Literal.String.Backtick */ +.dark .highlight .sc { color: #a5d6ff } /* Literal.String.Char */ +.dark .highlight .dl { color: #79c0ff } /* Literal.String.Delimiter */ +.dark .highlight .sd { color: #a5d6ff } /* Literal.String.Doc */ +.dark .highlight .s2 { color: #a5d6ff } /* Literal.String.Double */ +.dark .highlight .se { color: #79c0ff } /* Literal.String.Escape */ +.dark .highlight .sh { color: #79c0ff } /* Literal.String.Heredoc */ +.dark .highlight .si { color: #a5d6ff } /* Literal.String.Interpol */ +.dark .highlight .sx { color: #a5d6ff } /* Literal.String.Other */ +.dark .highlight .sr { color: #79c0ff } /* Literal.String.Regex */ +.dark .highlight .s1 { color: #a5d6ff } /* Literal.String.Single */ +.dark .highlight .ss { color: #a5d6ff } /* Literal.String.Symbol */ +.dark .highlight .bp { color: #c9d1d9 } /* Name.Builtin.Pseudo */ +.dark .highlight .fm { color: #d2a8ff; font-weight: bold } /* Name.Function.Magic */ +.dark .highlight .vc { color: #79c0ff } /* Name.Variable.Class */ +.dark .highlight .vg { color: #79c0ff } /* Name.Variable.Global */ +.dark .highlight .vi { color: #79c0ff } /* Name.Variable.Instance */ +.dark .highlight .vm { color: #79c0ff } /* Name.Variable.Magic */ +.dark .highlight .il { color: #a5d6ff } /* Literal.Number.Integer.Long */ diff --git a/pelican/plugins/tailwindcss/test_data/themes/papyrus/static/css/stork-dark.css b/pelican/plugins/tailwindcss/test_data/themes/papyrus/static/css/stork-dark.css new file mode 100644 index 0000000..96f2b21 --- /dev/null +++ b/pelican/plugins/tailwindcss/test_data/themes/papyrus/static/css/stork-dark.css @@ -0,0 +1,38 @@ +@import url(https://files.stork-search.net/basic.css); + +body:not(.stork-multitheme), +.stork-wrapper-dark { + --stork-border-color: hsl(0, 0%, 36%); + --stork-background-color: hsl(0, 0%, 22%); + --stork-accent-color: hsl(194, 90%, 53%); + + --stork-input-text-color: white; + + --stork-results-hover-color: hsl(210, 83%, 16%); + --stork-results-title-color: white; + --stork-results-excerpt-color: hsla(0, 0%, 80%, 1); + --stork-results-highlight-color: rgb(94, 201, 186); + --stork-results-border-color: hsl(0, 0%, 30%); +} + +body:not(.stork-multitheme) .stork-close-button, +.stork-wrapper-dark .stork-close-button { + background: linear-gradient( + to bottom, + hsl(0, 0%, 60%) 0%, + hsl(0, 0%, 50%) 100% + ); + border: 1px solid hsla(0, 0%, 50%, 0.8); + color: hsl(0, 0%, 25%); +} + +body:not(.stork-multitheme) .stork-close-button:hover, +.stork-wrapper-dark .stork-close-button:hover { + background: hsla(0, 0%, 45%); + cursor: pointer; +} + +body:not(.stork-multitheme) .stork-close-button:active, +.stork-wrapper-dark .stork-close-button:active { + background: hsla(0, 0%, 40%); +} diff --git a/pelican/plugins/tailwindcss/test_data/themes/papyrus/static/css/stork.css b/pelican/plugins/tailwindcss/test_data/themes/papyrus/static/css/stork.css new file mode 100644 index 0000000..fe77648 --- /dev/null +++ b/pelican/plugins/tailwindcss/test_data/themes/papyrus/static/css/stork.css @@ -0,0 +1,215 @@ +:root { + --stork-border-color: hsl(0, 0%, 65%); + --stork-background-color: hsla(0, 0%, 97%, 1); + --stork-font-family: inherit; + --stork-size-multiplier: 1; + --stork-accent-color: hsl(210, 72%, 45%); + + --stork-input-width: 100%; + --stork-input-border-radius: 8px; + --stork-input-text-color: black; + --stork-input-shadow: 1; + + --stork-results-width: 100%; + --stork-results-border-radius: 4px; + --stork-results-shadow: 1; + --stork-results-hover-color: hsl(210, 65%, 75%); + --stork-results-title-color: black; + --stork-results-excerpt-color: black; + --stork-results-highlight-color: rgb(245, 230, 26); + --stork-results-border-color: var(--stork-border-color); +} + +.stork-wrapper { + position: relative; + font-family: var(--stork-font-family); + box-sizing: border-box; + font-size: 1em * var(--stork-size-multiplier); +} + +.stork-wrapper *, +.stork-wrapper *:before, +.stork-wrapper *:after { + box-sizing: border-box; +} + +.stork-input { + width: var(--stork-input-width); + height: 2.4em; + font-size: 1em; + padding: 0.4em 0.8em; + position: relative; + box-shadow: inset 0 0.1em 0.3em + hsla(0, 0%, 0%, calc(var(--stork-input-shadow) * 0.25)); + border: 1px solid var(--stork-border-color); + border-radius: var(--stork-input-border-radius); + background-color: var(--stork-background-color); + color: var(--stork-input-text-color); + font-family: var(--stork-font-family); +} + +.stork-input:focus { + outline: none; +} + +.stork-progress { + position: absolute; + display: block; + content: ""; + bottom: 1px; + background-color: var(--stork-accent-color); + box-shadow: 0 0 8px var(--stork-accent-color); + height: 1px; + transition: width 0.25s ease, opacity 0.4s ease 0.4s; +} + +.stork-output { + position: absolute; + width: var(--stork-results-width); + margin-top: 0.5em; + border-radius: var(--stork-results-border-radius); + display: flex; + flex-direction: column; + z-index: 100; + color: var(--stork-results-title-color); + font-weight: 400; + font-family: var(--stork-font-family); +} + +.stork-attribution a:link, +.stork-attribution a:visited { + color: var(--stork-accent-color); +} + +.stork-output-visible { + border: 1px solid var(--stork-border-color); + box-shadow: 0px 0px 2.2px + rgba(0, 0, 0, calc(var(--stork-results-shadow) * 0.02)), + 0px 0px 5.3px rgba(0, 0, 0, calc(var(--stork-results-shadow) * 0.028)), + 0px 0px 10px rgba(0, 0, 0, calc(var(--stork-results-shadow) * 0.035)), + 0px 0px 17.9px rgba(0, 0, 0, calc(var(--stork-results-shadow) * 0.042)), + 0px 0px 33.4px rgba(0, 0, 0, calc(var(--stork-results-shadow) * 0.05)), + 0px 0px 80px rgba(0, 0, 0, calc(var(--stork-results-shadow) * 0.07)); + background: var(--stork-background-color); +} + +.stork-message { + width: 100%; + padding: 0.5em 1em; + color: var(--stork-results-title-color); +} + +.stork-attribution { + width: 100%; + padding: 0.5em 1em; + font-size: 0.8em; + color: var(--stork-results-title-color); +} + +.stork-results { + margin: 0; + padding: 0.25em 0; + width: 100%; + list-style-type: none; + max-height: 25em; + overflow-y: scroll; + border-top: 1px solid var(--stork-border-color); + border-bottom: 1px solid var(--stork-border-color); + box-shadow: inset 0em 0.7em 0.7em -0.7em hsla(0, 0%, 0%, calc(var( + --stork-results-shadow + ) * 0.34)), + inset 0em -0.7em 0.7em -0.7em + hsl(0, 0%, 0%, calc(var(--stork-results-shadow) * 0.34)); +} + +.stork-result:not(:last-child) { + border-bottom: 1px solid var(--stork-results-border-color); +} + +.stork-result.selected { + background: var(--stork-results-hover-color); +} + +.stork-result a:link { + padding: 1em; + display: block; + color: currentcolor; + text-decoration: none; +} + +.stork-result p { + margin: 0; +} + +.stork-title { + font-weight: bold; + font-size: 0.95em; + margin: 0 0 0.75em 0; + color: var(--stork-results-title-color); + + /* Flexbox container for the title and the score, when debugging */ + display: flex; + justify-content: space-between; +} + +.stork-excerpt { + font-size: 0.8em; + line-height: 1; + margin: 0; + color: var(--stork-results-excerpt-color); + + /* Flexbox container for the title and the score, when debugging */ + display: flex; + justify-content: space-between; +} + +.stork-excerpt:not(:last-of-type) { + margin-bottom: 0.6em; +} + +.stork-highlight { + background-color: var(--stork-results-highlight-color); + padding: 0 0.1em; +} + +.stork-error { + outline: 2px solid hsl(0, 89%, 46%); +} + +.stork-close-button { + position: absolute; + bottom: 0; + right: 0; + margin: 0.3em 0.4em; + height: 1.5em; + width: 1.5em; + padding: 0px; + background: linear-gradient( + to bottom, + hsl(0, 0%, 85%) 0%, + hsl(0, 0%, 75%) 100% + ); + border: 1px solid hsla(0, 0%, 50%, 0.8); + font-size: 1.1em; + color: hsl(0, 0%, 45%); + border-radius: 15%; + line-height: 1; + display: flex; + justify-content: center; + align-items: center; +} + +.stork-close-button svg { + width: 0.8em; + position: relative; + top: 1px; +} + +.stork-close-button:hover { + background: hsla(0, 0%, 70%); + cursor: pointer; +} + +.stork-close-button:active { + background: hsla(0, 0%, 65%); +} diff --git a/pelican/plugins/tailwindcss/test_data/themes/papyrus/templates/analytics.html b/pelican/plugins/tailwindcss/test_data/themes/papyrus/templates/analytics.html new file mode 100644 index 0000000..9762933 --- /dev/null +++ b/pelican/plugins/tailwindcss/test_data/themes/papyrus/templates/analytics.html @@ -0,0 +1,33 @@ +{% if GOOGLE_ANALYTICS %} + +{% endif %} +{% if GAUGES %} + +{% endif %} \ No newline at end of file diff --git a/pelican/plugins/tailwindcss/test_data/themes/papyrus/templates/archives.html b/pelican/plugins/tailwindcss/test_data/themes/papyrus/templates/archives.html new file mode 100644 index 0000000..58f3d32 --- /dev/null +++ b/pelican/plugins/tailwindcss/test_data/themes/papyrus/templates/archives.html @@ -0,0 +1,120 @@ +{% extends "base.html" %} + +{% block title %}Archive | {{ SITENAME }}{% endblock %} +{% set current = "archive" %} + +{% macro countyear(year) %} +{% set name = namespace(y=0) %} +{% for article in dates %} +{% if article.date | strftime('%Y') == year %} +{% set name.y = name.y + 1 %} +{% endif %} +{% endfor %} +{{name.y}} +{% endmacro %} + +{% macro countmonth(month, year) %} +{% set name = namespace(m=0) %} +{% for article in dates %} +{% if article.date | strftime('%B') == month and article.date | strftime('%Y') == year %} +{% set name.m = name.m + 1 %} +{% endif %} +{% endfor %} +{{name.m}} +{% endmacro %} + +{% block content %} +
+ There are comments. +
+{% endif %} diff --git a/pelican/plugins/tailwindcss/test_data/themes/papyrus/templates/disqus_script.html b/pelican/plugins/tailwindcss/test_data/themes/papyrus/templates/disqus_script.html new file mode 100644 index 0000000..de2209a --- /dev/null +++ b/pelican/plugins/tailwindcss/test_data/themes/papyrus/templates/disqus_script.html @@ -0,0 +1,12 @@ +{% if DISQUS_SITENAME %} + +{% endif %} \ No newline at end of file diff --git a/pelican/plugins/tailwindcss/test_data/themes/papyrus/templates/index.html b/pelican/plugins/tailwindcss/test_data/themes/papyrus/templates/index.html new file mode 100644 index 0000000..8e1a288 --- /dev/null +++ b/pelican/plugins/tailwindcss/test_data/themes/papyrus/templates/index.html @@ -0,0 +1,90 @@ +{% extends "base.html" %} + +{% block content %} + +{% block content_title %} +{% if not category and not tag %} +{{ SUBTEXT }}
+ {% endif %} + {% if SOCIAL or FEED_ALL_ATOM or FEED_ALL_RSS %} + + {% endif %} +