diff --git a/.github/workflows/update-hydefront.yml b/.github/workflows/update-hydefront.yml index 73a18056..b63e982a 100644 --- a/.github/workflows/update-hydefront.yml +++ b/.github/workflows/update-hydefront.yml @@ -21,7 +21,7 @@ jobs: env: API_TOKEN_GITHUB: ${{ secrets.PAT }} with: - source_folder: 'resources/frontend/.' + source_folder: 'resources/assets/.' destination_folder: '/' destination_repo: 'hydephp/hydefront' destination_base_branch: 'master' diff --git a/.gitignore b/.gitignore index 1d46a611..159af21e 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,4 @@ phpDocumentor.phar phpstan.phar -resources/frontend/.github/ \ No newline at end of file +resources/assets/.github/ \ No newline at end of file diff --git a/resources/assets b/resources/assets new file mode 160000 index 00000000..860ab59f --- /dev/null +++ b/resources/assets @@ -0,0 +1 @@ +Subproject commit 860ab59f2bd0bd11652581cb07fd15aa8cf3aa4c diff --git a/resources/data/filecacheGenerator.php b/resources/data/filecacheGenerator.php index 829b976c..1c63d0d8 100644 --- a/resources/data/filecacheGenerator.php +++ b/resources/data/filecacheGenerator.php @@ -9,7 +9,7 @@ $filecache = []; $bladeFiles = glob(__DIR__.'/../../resources/views/**/*.blade.php'); -$frontendFiles = glob(__DIR__.'/../../resources/frontend/*.{css,scss,js}', GLOB_BRACE); +$frontendFiles = glob(__DIR__.'/../../resources/assets/*.{css,scss,js}', GLOB_BRACE); $files = array_merge($bladeFiles, $frontendFiles); diff --git a/resources/frontend/.github/workflows/codeql.yml b/resources/frontend/.github/workflows/codeql.yml deleted file mode 100644 index ef9f1a0a..00000000 --- a/resources/frontend/.github/workflows/codeql.yml +++ /dev/null @@ -1,70 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: [ master ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ master ] - schedule: - - cron: '15 21 * * 3' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'javascript' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] - # Learn more about CodeQL language support at https://git.io/codeql-language-support - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 - - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 diff --git a/resources/frontend/.github/workflows/dependency-review.yml b/resources/frontend/.github/workflows/dependency-review.yml deleted file mode 100644 index 0e72a00e..00000000 --- a/resources/frontend/.github/workflows/dependency-review.yml +++ /dev/null @@ -1,20 +0,0 @@ -# Dependency Review Action -# -# This Action will scan dependency manifest files that change as part of a Pull Reqest, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging. -# -# Source repository: https://github.com/actions/dependency-review-action -# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement -name: 'Dependency Review' -on: [pull_request] - -permissions: - contents: read - -jobs: - dependency-review: - runs-on: ubuntu-latest - steps: - - name: 'Checkout Repository' - uses: actions/checkout@v3 - - name: 'Dependency Review' - uses: actions/dependency-review-action@v1 diff --git a/resources/frontend/.github/workflows/devskim.yml b/resources/frontend/.github/workflows/devskim.yml deleted file mode 100644 index def07bba..00000000 --- a/resources/frontend/.github/workflows/devskim.yml +++ /dev/null @@ -1,34 +0,0 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -name: DevSkim - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - schedule: - - cron: '24 18 * * 1' - -jobs: - lint: - name: DevSkim - runs-on: ubuntu-20.04 - permissions: - actions: read - contents: read - security-events: write - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Run DevSkim scanner - uses: microsoft/DevSkim-Action@v1 - - - name: Upload DevSkim scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@v2 - with: - sarif_file: devskim-results.sarif diff --git a/resources/frontend/.gitignore b/resources/frontend/.gitignore deleted file mode 100644 index 30bc1627..00000000 --- a/resources/frontend/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules \ No newline at end of file diff --git a/resources/frontend/README.md b/resources/frontend/README.md deleted file mode 100644 index bf77dd05..00000000 --- a/resources/frontend/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# HydePHP Frontend Assets -![jsDelivr hits (GitHub)](https://img.shields.io/jsdelivr/gh/hm/hydephp/hydefront) - -## About this repository - -Contains the frontend assets for HydePHP stored in hydephp/framework under resources/frontend. - -### Source files -Source files are stored in the root of the repository. These can be published to your Hyde installation, or used to compile into the dist/ directory. - -### Compiled files -Compiled files are stored in the dist/ directory and can be loaded through a CDN. They are included in the Hyde/Framework package, and can be re-published using the hyde command `php hyde update:resources`. - -### About the files - -- **App.css**: -This file is mostly blank and only contains the TailwindCSS imports and is the suggested location for users to place their own custom CSS unless they add a custom.css file which in that case should be loaded after all the others. - -- **Hyde.scss**: -The Hyde stylesheet contains the custom base styles and should be loaded after App.css as it contains some Tailwind tweaks. - -- **Hyde.js**: -This file contains basic scripts to make the navigation menu and sidebars interactive. - -- **Tailwind.css**: -A compiled and minified file containing the styles for a base Hyde installation. - -## Usage - -### Using CDN -```html - - - -``` - -### Updating Framework assets -The frontend files are stored in the Hydephp/Framework repo in the `resources/frontend` directory and are by default loaded into Hyde installations and can be republished using the following command: - -```bash -php hyde update:resources -``` - -## Beta software notice -HydePHP is a currently in beta. Please report any bugs and issues in the appropriate issue tracker. Versions in the 0.x series are not stable and may change at any time. No backwards compatibility guarantees are made and breaking changes are possible expected. diff --git a/resources/frontend/app.css b/resources/frontend/app.css deleted file mode 100644 index a79f1bc6..00000000 --- a/resources/frontend/app.css +++ /dev/null @@ -1,7 +0,0 @@ -/* -* This file is loaded into your Hyde/Hyde installation and is used to generate the TailwindCSS for your project. -*/ - -@tailwind base; -@tailwind components; -@tailwind utilities; diff --git a/resources/frontend/dist/hyde.css b/resources/frontend/dist/hyde.css deleted file mode 100644 index 610f64dc..00000000 --- a/resources/frontend/dist/hyde.css +++ /dev/null @@ -1,145 +0,0 @@ -/** - * Core Stylesheet for the HydePHP Frontend - * - * @package HydePHP - HydeFront - * @version 0.4.0 (HydeFront) - * @author Caen De Silva - * - * @see app.css where TailwindCSS is included, - * to declare your own styles. - */ -/* Base styles for compatibility */ -.post-article { - max-width: 960px; -} -.post-article #byline { - margin-bottom: 1em; -} -.post-article #byline time, .post-article #byline address, .post-article #byline dl { - display: inline; -} -.post-article #byline time dt, .post-article #byline time dd, .post-article #byline address dt, .post-article #byline address dd, .post-article #byline dl dt, .post-article #byline dl dd { - display: inline; -} -.post-article h2:first-child { - margin-top: 0; -} - -#sidebar-navigation li.list-item-active a { - border-left: 4px solid #5956eb; - padding-left: calc(1rem - 4px); - margin-left: -1rem; - padding-top: 0.25rem; - padding-bottom: 0.25rem; - color: #5956eb; -} - -.dark #sidebar-navigation li.list-item-active a { - color: #fff; -} - -@media (max-width: 360px) { - #documentation-sidebar { - width: 100%; - } -} - -#documentation-content { - max-width: 100vw; -} -@media (min-width: 768px) { - #documentation-content { - max-width: calc(100vw - 20rem); - } -} -#documentation-content code { - max-width: 80vw; - overflow-x: auto; - display: inline-block; - vertical-align: top; -} -#documentation-content pre code { - display: block; - max-width: unset; -} - -#sidebar-backdrop { - width: 100vw; - height: 100vh; - background: rgba(128, 128, 128, 0.5); - position: fixed; - top: 0; - left: 0; - cursor: pointer; -} - -.sidebar-button-wrapper.open button.close { - display: none; -} -.sidebar-button-wrapper.closed button.open { - display: none; -} - -/** - * Styles for Torchlight - * - * Uses the styles from https://torchlight.dev/docs/css - */ -.torchlight-enabled pre { - border-radius: 0.25rem; - margin-top: 1rem; - margin-bottom: 1rem; - overflow-x: auto; - padding: 0; -} -.torchlight-enabled pre code.torchlight { - display: block; - min-width: -webkit-max-content; - min-width: -moz-max-content; - min-width: max-content; - padding-top: 1rem; - padding-bottom: 1rem; -} -.torchlight-enabled pre code.torchlight .line { - padding-left: 1rem; - padding-right: 1rem; -} -.torchlight-enabled pre code.torchlight .line-number, -.torchlight-enabled pre code.torchlight .summary-caret { - margin-right: 1rem; -} - -/** -* Styles for Accessibility -*/ -#skip-to-content { - left: -999px; - position: absolute; - top: auto; - width: 1px; - height: 1px; - overflow: hidden; - z-index: -999; -} -#skip-to-content:focus, #skip-to-content:active { - color: #fff; - background-color: #000; - left: auto; - top: auto; - width: 30%; - height: auto; - overflow: auto; - margin: 10px 35%; - padding: 5px; - border-radius: 15px; - border: 4px solid yellow; - text-align: center; - font-size: 1.2em; - z-index: 999; -} - -.text-indigo-500, .hover\:text-indigo-500:hover { - color: #5956eb; -} - -/*# sourceMappingURL=hyde.css.map */ diff --git a/resources/frontend/dist/hyde.css.map b/resources/frontend/dist/hyde.css.map deleted file mode 100644 index 6cf0be01..00000000 --- a/resources/frontend/dist/hyde.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sourceRoot":"","sources":["../hyde.scss"],"names":[],"mappings":"AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA;AAEA;EACC;;AACA;EACC;;AACA;EACC;;AACA;EACC;;AAIH;EACC;;;AAMA;EACC;EACA;EACA;EACA;EACA;EACA;;;AAMF;EACC;;;AAKD;EADD;IAEE;;;;AAIF;EACI;;AACA;EAFJ;IAGQ;;;AAGJ;EACI;EACA;EACA;EACA;;AAIN;EACC;EACA;;;AAKH;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;;AAKC;EACC;;AAID;EACC;;;AAKH;AAAA;AAAA;AAAA;AAAA;AAOC;EACC;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;;AAGD;AAAA;EAEC;;;AAMJ;AAAA;AAAA;AAOA;EACC;EACG;EACA;EACA;EACA;EACA;EACA;;AACH;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAKF;EACC","file":"hyde.css"} \ No newline at end of file diff --git a/resources/frontend/dist/hyde.js b/resources/frontend/dist/hyde.js deleted file mode 100644 index a791b128..00000000 --- a/resources/frontend/dist/hyde.js +++ /dev/null @@ -1,88 +0,0 @@ -const mainNavigationLinks = document.getElementById("main-navigation-links"); - -const openMainNavigationMenuIcon = document.getElementById("open-main-navigation-menu-icon"); - -const closeMainNavigationMenuIcon = document.getElementById("close-main-navigation-menu-icon"); - -let navigationOpen = false; - -function toggleNavigation() { - if (navigationOpen) { - hideNavigation(); - } else { - showNavigation(); - } -} - -function showNavigation() { - mainNavigationLinks.classList.remove("hidden"); - openMainNavigationMenuIcon.style.display = "none"; - closeMainNavigationMenuIcon.style.display = "block"; - navigationOpen = true; -} - -function hideNavigation() { - mainNavigationLinks.classList.add("hidden"); - openMainNavigationMenuIcon.style.display = "block"; - closeMainNavigationMenuIcon.style.display = "none"; - navigationOpen = false; -} - -var sidebarOpen = screen.width >= 768; - -const sidebar = document.getElementById("documentation-sidebar"); - -const backdrop = document.getElementById("sidebar-backdrop"); - -const toggleButtons = document.querySelectorAll(".sidebar-button-wrapper"); - -function toggleSidebar() { - if (sidebarOpen) { - hideSidebar(); - } else { - showSidebar(); - } -} - -function showSidebar() { - sidebar.classList.remove("hidden"); - sidebar.classList.add("flex"); - backdrop.classList.remove("hidden"); - document.getElementById("app").style.overflow = "hidden"; - toggleButtons.forEach(button => { - button.classList.remove("open"); - button.classList.add("closed"); - }); - sidebarOpen = true; -} - -function hideSidebar() { - sidebar.classList.add("hidden"); - sidebar.classList.remove("flex"); - backdrop.classList.add("hidden"); - document.getElementById("app").style.overflow = null; - toggleButtons.forEach(button => { - button.classList.add("open"); - button.classList.remove("closed"); - }); - sidebarOpen = false; -} - -function toggleTheme() { - if (isSelectedThemeDark()) { - setThemeToLight(); - } else { - setThemeToDark(); - } - function isSelectedThemeDark() { - return localStorage.getItem("color-theme") === "dark" || !("color-theme" in localStorage) && window.matchMedia("(prefers-color-scheme: dark)").matches; - } - function setThemeToDark() { - document.documentElement.classList.add("dark"); - localStorage.setItem("color-theme", "dark"); - } - function setThemeToLight() { - document.documentElement.classList.remove("dark"); - localStorage.setItem("color-theme", "light"); - } -} \ No newline at end of file diff --git a/resources/frontend/dist/hyde.min.css b/resources/frontend/dist/hyde.min.css deleted file mode 100644 index bae1cc67..00000000 --- a/resources/frontend/dist/hyde.min.css +++ /dev/null @@ -1 +0,0 @@ -.post-article{max-width:960px}.post-article #byline{margin-bottom:1em}.post-article #byline time,.post-article #byline address,.post-article #byline dl{display:inline}.post-article #byline time dt,.post-article #byline time dd,.post-article #byline address dt,.post-article #byline address dd,.post-article #byline dl dt,.post-article #byline dl dd{display:inline}.post-article h2:first-child{margin-top:0}#sidebar-navigation li.list-item-active a{border-left:4px solid #5956eb;padding-left:calc(1rem - 4px);margin-left:-1rem;padding-top:.25rem;padding-bottom:.25rem;color:#5956eb}.dark #sidebar-navigation li.list-item-active a{color:#fff}@media(max-width: 360px){#documentation-sidebar{width:100%}}#documentation-content{max-width:100vw}@media(min-width: 768px){#documentation-content{max-width:calc(100vw - 20rem)}}#documentation-content code{max-width:80vw;overflow-x:auto;display:inline-block;vertical-align:top}#documentation-content pre code{display:block;max-width:unset}#sidebar-backdrop{width:100vw;height:100vh;background:rgba(128,128,128,.5);position:fixed;top:0;left:0;cursor:pointer}.sidebar-button-wrapper.open button.close{display:none}.sidebar-button-wrapper.closed button.open{display:none}.torchlight-enabled pre{border-radius:.25rem;margin-top:1rem;margin-bottom:1rem;overflow-x:auto;padding:0}.torchlight-enabled pre code.torchlight{display:block;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content;padding-top:1rem;padding-bottom:1rem}.torchlight-enabled pre code.torchlight .line{padding-left:1rem;padding-right:1rem}.torchlight-enabled pre code.torchlight .line-number,.torchlight-enabled pre code.torchlight .summary-caret{margin-right:1rem}#skip-to-content{left:-999px;position:absolute;top:auto;width:1px;height:1px;overflow:hidden;z-index:-999}#skip-to-content:focus,#skip-to-content:active{color:#fff;background-color:#000;left:auto;top:auto;width:30%;height:auto;overflow:auto;margin:10px 35%;padding:5px;border-radius:15px;border:4px solid #ff0;text-align:center;font-size:1.2em;z-index:999}.text-indigo-500,.hover\:text-indigo-500:hover{color:#5956eb} diff --git a/resources/frontend/dist/hyde.min.js b/resources/frontend/dist/hyde.min.js deleted file mode 100644 index 1ee7d50c..00000000 --- a/resources/frontend/dist/hyde.min.js +++ /dev/null @@ -1 +0,0 @@ -const mainNavigationLinks=document.getElementById("main-navigation-links"),openMainNavigationMenuIcon=document.getElementById("open-main-navigation-menu-icon"),closeMainNavigationMenuIcon=document.getElementById("close-main-navigation-menu-icon");let navigationOpen=!1;function toggleNavigation(){(navigationOpen?hideNavigation:showNavigation)()}function showNavigation(){mainNavigationLinks.classList.remove("hidden"),openMainNavigationMenuIcon.style.display="none",closeMainNavigationMenuIcon.style.display="block",navigationOpen=!0}function hideNavigation(){mainNavigationLinks.classList.add("hidden"),openMainNavigationMenuIcon.style.display="block",closeMainNavigationMenuIcon.style.display="none",navigationOpen=!1}var sidebarOpen=768<=screen.width;const sidebar=document.getElementById("documentation-sidebar"),backdrop=document.getElementById("sidebar-backdrop"),toggleButtons=document.querySelectorAll(".sidebar-button-wrapper");function toggleSidebar(){(sidebarOpen?hideSidebar:showSidebar)()}function showSidebar(){sidebar.classList.remove("hidden"),sidebar.classList.add("flex"),backdrop.classList.remove("hidden"),document.getElementById("app").style.overflow="hidden",toggleButtons.forEach(e=>{e.classList.remove("open"),e.classList.add("closed")}),sidebarOpen=!0}function hideSidebar(){sidebar.classList.add("hidden"),sidebar.classList.remove("flex"),backdrop.classList.add("hidden"),document.getElementById("app").style.overflow=null,toggleButtons.forEach(e=>{e.classList.add("open"),e.classList.remove("closed")}),sidebarOpen=!1}function toggleTheme(){"dark"===localStorage.getItem("color-theme")||!("color-theme"in localStorage)&&window.matchMedia("(prefers-color-scheme: dark)").matches?(document.documentElement.classList.remove("dark"),localStorage.setItem("color-theme","light")):(document.documentElement.classList.add("dark"),localStorage.setItem("color-theme","dark"))} \ No newline at end of file diff --git a/resources/frontend/hyde.js b/resources/frontend/hyde.js deleted file mode 100644 index 51ca0304..00000000 --- a/resources/frontend/hyde.js +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Core Scripts for the HydePHP Frontend - * - * @package HydePHP - HydeFront - * @version v0.4.0 (HydeFront) - * @author Caen De Silva - */ - -// Handle the main navigation menu -const mainNavigationLinks = document.getElementById("main-navigation-links"); -const openMainNavigationMenuIcon = document.getElementById("open-main-navigation-menu-icon"); -const closeMainNavigationMenuIcon = document.getElementById("close-main-navigation-menu-icon"); - -let navigationOpen = false; - -// Toggle the navigation menu visibility when the menu button is clicked -function toggleNavigation() { - if (navigationOpen) { - hideNavigation(); - } else { - showNavigation(); - } -} - -// Show the navigation menu items -function showNavigation() { - mainNavigationLinks.classList.remove("hidden"); - openMainNavigationMenuIcon.style.display = "none"; - closeMainNavigationMenuIcon.style.display = "block"; - - navigationOpen = true; -} - -// Hide the navigation menu items -function hideNavigation() { - mainNavigationLinks.classList.add("hidden"); - openMainNavigationMenuIcon.style.display = "block"; - closeMainNavigationMenuIcon.style.display = "none"; - navigationOpen = false; -} - -// Handle the documentation page sidebar - -var sidebarOpen = screen.width >= 768; - -const sidebar = document.getElementById("documentation-sidebar"); -const backdrop = document.getElementById("sidebar-backdrop"); - -const toggleButtons = document.querySelectorAll(".sidebar-button-wrapper"); - -function toggleSidebar() { - if (sidebarOpen) { - hideSidebar(); - } else { - showSidebar(); - } -} - -function showSidebar() { - sidebar.classList.remove("hidden"); - sidebar.classList.add("flex"); - backdrop.classList.remove("hidden"); - document.getElementById("app").style.overflow = "hidden"; - - toggleButtons.forEach((button) => { - button.classList.remove("open"); - button.classList.add("closed"); - }); - - sidebarOpen = true; -} - -function hideSidebar() { - sidebar.classList.add("hidden"); - sidebar.classList.remove("flex"); - backdrop.classList.add("hidden"); - document.getElementById("app").style.overflow = null; - - toggleButtons.forEach((button) => { - button.classList.add("open"); - button.classList.remove("closed"); - }); - - sidebarOpen = false; -} - -function toggleTheme() { - if (isSelectedThemeDark()) { - setThemeToLight(); - } else { - setThemeToDark(); - } - - function isSelectedThemeDark() { - return localStorage.getItem('color-theme') === 'dark' || !('color-theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches; - } - - function setThemeToDark() { - document.documentElement.classList.add("dark"); - localStorage.setItem('color-theme', 'dark'); - } - - function setThemeToLight() { - document.documentElement.classList.remove("dark"); - localStorage.setItem('color-theme', 'light'); - } -} \ No newline at end of file diff --git a/resources/frontend/hyde.scss b/resources/frontend/hyde.scss deleted file mode 100644 index 125e27fc..00000000 --- a/resources/frontend/hyde.scss +++ /dev/null @@ -1,170 +0,0 @@ -/** - * Core Stylesheet for the HydePHP Frontend - * - * @package HydePHP - HydeFront - * @version 0.4.0 (HydeFront) - * @author Caen De Silva - * - * @see app.css where TailwindCSS is included, - * to declare your own styles. - */ - -/* Base styles for compatibility */ - -.post-article { - max-width: 960px; - #byline { - margin-bottom: 1em; - time, address, dl { - display: inline; - dt, dd { - display: inline; - } - } - } - h2:first-child { - margin-top: 0; - } -} - -#sidebar-navigation { - li.list-item-active { - a { - border-left: 4px solid #5956eb; - padding-left: calc(1rem - 4px); - margin-left: -1rem; - padding-top: 0.25rem; - padding-bottom: 0.25rem; - color: #5956eb; - } - } -} - -.dark { - #sidebar-navigation li.list-item-active a { - color: #fff; - } -} - -#documentation-sidebar { - @media (max-width: 360px) { - width: 100%; - } -} - -#documentation-content { - max-width: 100vw; - @media (min-width: 768px) { - max-width: calc(100vw - 20rem); - } - - code { - max-width: 80vw; - overflow-x: auto; - display: inline-block; - vertical-align: top; - } - - pre { - code { - display: block; - max-width: unset; - } - } -} - -#sidebar-backdrop { - width: 100vw; - height: 100vh; - background: rgba(128, 128, 128, 0.5); - position: fixed; - top: 0; - left: 0; - cursor: pointer; -} - -.sidebar-button-wrapper { - &.open { - button.close { - display: none; - } - } - &.closed { - button.open { - display: none; - } - } -} - -/** - * Styles for Torchlight - * - * Uses the styles from https://torchlight.dev/docs/css - */ - - .torchlight-enabled { - pre { - border-radius: 0.25rem; - margin-top: 1rem; - margin-bottom: 1rem; - overflow-x: auto; - padding: 0; - - code.torchlight { - display: block; - min-width: -webkit-max-content; - min-width: -moz-max-content; - min-width: max-content; - padding-top: 1rem; - padding-bottom: 1rem; - - .line { - padding-left: 1rem; - padding-right: 1rem; - } - - .line-number, - .summary-caret { - margin-right: 1rem; - } - } - } -} - -/** -* Styles for Accessibility -*/ - -// Skip to main content button -// Implementation based on https://accessibility.oit.ncsu.edu/it-accessibility-at-nc-state/developers/accessibility-handbook/mouse-and-keyboard-events/skip-to-main-content/ -// And complies with https://www.w3.org/TR/WCAG20-TECHS/G1.html -#skip-to-content { - left:-999px; - position:absolute; - top:auto; - width:1px; - height:1px; - overflow:hidden; - z-index:-999; - &:focus, &:active { - color: #fff; - background-color:#000; - left: auto; - top: auto; - width: 30%; - height: auto; - overflow:auto; - margin: 10px 35%; - padding:5px; - border-radius: 15px; - border:4px solid yellow; - text-align:center; - font-size:1.2em; - z-index:999; - } -} - -// Bump contrast of the primary Tailwind link color -.text-indigo-500, .hover\:text-indigo-500:hover { - color: #5956eb; -} \ No newline at end of file diff --git a/resources/frontend/package-lock.json b/resources/frontend/package-lock.json deleted file mode 100644 index 1c10ee5e..00000000 --- a/resources/frontend/package-lock.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "name": "hydefront", - "version": "1.2.1", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "requires": { - "fill-range": "^7.0.1" - } - }, - "chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "optional": true - }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "requires": { - "is-glob": "^4.0.1" - } - }, - "immutable": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0.tgz", - "integrity": "sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==" - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" - }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" - }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "requires": { - "picomatch": "^2.2.1" - } - }, - "sass": { - "version": "1.50.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.50.0.tgz", - "integrity": "sha512-cLsD6MEZ5URXHStxApajEh7gW189kkjn4Rc8DQweMyF+o5HF5nfEz8QYLMlPsTOD88DknatTmBWkOcw5/LnJLQ==", - "requires": { - "chokidar": ">=3.0.0 <4.0.0", - "immutable": "^4.0.0", - "source-map-js": ">=0.6.2 <2.0.0" - } - }, - "source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==" - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "requires": { - "is-number": "^7.0.0" - } - }, - "uglify-js": { - "version": "3.15.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.15.4.tgz", - "integrity": "sha512-vMOPGDuvXecPs34V74qDKk4iJ/SN4vL3Ow/23ixafENYvtrNvtbcgUeugTcUGRGsOF/5fU8/NYSL5Hyb3l1OJA==" - } - } -} diff --git a/resources/frontend/package.json b/resources/frontend/package.json deleted file mode 100644 index 6d823374..00000000 --- a/resources/frontend/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "hydefront", - "version": "1.2.1", - "description": "Frontend assets for HydePHP", - "scripts": { - "prod": "sass hyde.scss dist/hyde.min.css --style=compressed --no-source-map && uglifyjs --compress --mangle --output dist/hyde.min.js hyde.js", - "dev": "sass hyde.scss dist/hyde.css && uglifyjs --beautify --output dist/hyde.js hyde.js" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/hydephp/hydefront.git" - }, - "keywords": [ - "hydephp", - "hyde", - "tailwind" - ], - "author": "Caen De Silva", - "license": "MIT", - "bugs": { - "url": "https://github.com/hydephp/hydefront/issues" - }, - "homepage": "https://github.com/hydephp/hydefront#readme", - "dependencies": { - "sass": "1.50.0", - "uglify-js": "^3.15.4" - } -} diff --git a/resources/frontend/tailwind.min.css b/resources/frontend/tailwind.min.css deleted file mode 100644 index 1edc165e..00000000 --- a/resources/frontend/tailwind.min.css +++ /dev/null @@ -1 +0,0 @@ -/*! tailwindcss v3.0.23 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input:-ms-input-placeholder,textarea:-ms-input-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:after,:before{--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:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.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([class~=lead]):not(:where([class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~=not-prose] *)){color:#5956eb;text-decoration:none;font-weight:500}.prose :where(a):not(:where([class~=not-prose] *)):hover{color:#4f46e5}.prose :where(strong):not(:where([class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(ol):not(:where([class~=not-prose] *)){list-style-type:decimal;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;padding-left:1.625em}.prose :where(ol>li):not(:where([class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.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-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose] *)){font-weight:500;font-style:unset;color:unset;border-left-width:.25rem;border-left-color:#d1d5db;quotes:"\201C""\201D""\2018""\2019";margin-top:1em;margin-bottom:1em;padding-left:.75em;background-color:#80808020;line-height:1.25em;padding-top:.25em;padding-bottom:.25em}.prose :where(blockquote):not(:where([class~=not-prose] *)) p{padding-right:.25em;margin-top:.25em;margin-bottom:.25em}.prose :where(blockquote):not(:where([class~=not-prose] *)) p:before{content:unset}.prose :where(blockquote):not(:where([class~=not-prose] *)) p:after{content:unset}.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-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose] *)){font-weight:900}.prose :where(h2):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:1.5em;margin-bottom:.75em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~=not-prose] *)){font-weight:800}.prose :where(h3):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose] *)){font-weight:700}.prose :where(h4):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose] *)){font-weight:700}.prose :where(figure>*):not(:where([class~=not-prose] *)){margin-top:0;margin-bottom: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-weight:600;font-size:.875em;font:unset;background-color:#80808033;padding-left:4px;padding-right:4px;margin-left:-2px;margin-right:1px;border-radius:4px;white-space:pre}.prose :where(code):not(:where([class~=not-prose] *)):before{content:unset}.prose :where(code):not(:where([class~=not-prose] *)):after{content:unset}.prose :where(a code):not(:where([class~=not-prose] *)){color:var(--tw-prose-links)}.prose :where(pre):not(:where([class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding:.8571429em 1.1428571em}.prose :where(pre):not(:where([class~=not-prose] *)) code{font-family:Fira Code Regular,Consolas,Monospace,Courier New}.prose :where(pre code):not(:where([class~=not-prose] *)){background-color:initial;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.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] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.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:initial;padding:.5714286em}.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:#00000080;--tw-prose-invert-th-borders:#4b5563;--tw-prose-invert-td-borders:#374151;font-size:1rem;line-height:1.5em}.prose :where(p):not(:where([class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(img):not(:where([class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(video):not(:where([class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(figure):not(:where([class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(h2 code):not(:where([class~=not-prose] *)){font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose] *)){font-size:.9em}.prose :where(li):not(:where([class~=not-prose] *)){margin-top:.5em;margin-bottom:.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(ul>li p):not(:where([class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose>:where(ul>li>:first-child):not(:where([class~=not-prose] *)){margin-top:1.25em}.prose>:where(ul>li>:last-child):not(:where([class~=not-prose] *)){margin-bottom:1.25em}.prose>:where(ol>li>:first-child):not(:where([class~=not-prose] *)){margin-top:1.25em}.prose>:where(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-top:.75em;margin-bottom:.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:first-child):not(:where([class~=not-prose] *)){padding-left:0}.prose :where(tbody td:last-child):not(:where([class~=not-prose] *)){padding-right:0}.prose>:where(:first-child):not(:where([class~=not-prose] *)){margin-top:0}.prose>:where(:last-child):not(:where([class~=not-prose] *)){margin-bottom:0}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.top-0{top:0}.left-0{left:0}.z-30{z-index:30}.z-20{z-index:20}.float-right{float:right}.m-2{margin:.5rem}.m-8{margin:2rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-auto{margin-top:auto;margin-bottom:auto}.mx-3{margin-left:.75rem;margin-right:.75rem}.-mx-4{margin-left:-1rem;margin-right:-1rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mt-4{margin-top:1rem}.mb-8{margin-bottom:2rem}.mb-4{margin-bottom:1rem}.mt-2{margin-top:.5rem}.mt-8{margin-top:2rem}.mt-auto{margin-top:auto}.ml-auto{margin-left:auto}.mt-3{margin-top:.75rem}.-ml-6{margin-left:-1.5rem}.mb-0{margin-bottom:0}.block{display:block}.inline{display:inline}.flex{display:flex}.list-item{display:list-item}.hidden{display:none}.h-16{height:4rem}.h-screen{height:100vh}.h-6{height:1.5rem}.h-1{height:.25rem}.h-full{height:100%}.max-h-16{max-height:4rem}.min-h-screen{min-height:100vh}.w-fit{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.w-screen{width:100vw}.w-64{width:16rem}.w-full{width:100%}.w-6{width:1.5rem}.w-16{width:4rem}.max-w-7xl{max-width:80rem}.max-w-3xl{max-width:48rem}.max-w-lg{max-width:32rem}.max-w-5xl{max-width:64rem}.max-w-sm{max-width:24rem}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.list-none{list-style-type:none}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.rounded-lg{border-radius:.5rem}.border-2{border-width:2px}.border-t{border-top-width:1px}.border-l-4{border-left-width:4px}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-indigo-500{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity))}.bg-transparent{background-color:initial}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-cover{background-size:cover}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-no-repeat{background-repeat:no-repeat}.fill-current{fill:currentColor}.p-4{padding:1rem}.p-2{padding:.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.px-8{padding-left:2rem;padding-right:2rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-4{padding-left:1rem;padding-right:1rem}.py-32{padding-top:8rem;padding-bottom:8rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-4{padding-top:1rem;padding-bottom:1rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pb-12{padding-bottom:3rem}.pt-3{padding-top:.75rem}.pl-4{padding-left:1rem}.pl-2{padding-left:.5rem}.pr-4{padding-right:1rem}.pl-5{padding-left:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.font-sans{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}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-5xl{font-size:3rem;line-height:1}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-extrabold{font-weight:800}.font-light{font-weight:300}.font-black{font-weight:900}.uppercase{text-transform:uppercase}.leading-relaxed{line-height:1.625}.leading-10{line-height:2.5rem}.leading-normal{line-height:1.5}.tracking-tight{letter-spacing:-.025em}.tracking-normal{letter-spacing:0}.tracking-wide{letter-spacing:.025em}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-indigo-500{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity))}.text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}.text-transparent{color:#0000}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-75{opacity:.75}.shadow-lg{--tw-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-lg,.shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.drop-shadow-2xl{--tw-drop-shadow:drop-shadow(0 25px 25px #00000026);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-colors{transition-property:color,background-color,border-color,fill,stroke,-webkit-text-decoration-color;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,-webkit-text-decoration-color;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-75{transition-duration:75ms}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.hover\:text-indigo-500:hover{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity))}.hover\:underline:hover{-webkit-text-decoration-line:underline;text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.focus\:outline-none:focus{outline:2px solid #0000;outline-offset:2px}.focus\:ring-4:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-gray-200:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(229 231 235/var(--tw-ring-opacity))}.dark .dark\:prose-invert{--tw-prose-body:var(--tw-prose-invert-body);--tw-prose-headings:var(--tw-prose-invert-headings);--tw-prose-lead:var(--tw-prose-invert-lead);--tw-prose-links:var(--tw-prose-invert-links);--tw-prose-bold:var(--tw-prose-invert-bold);--tw-prose-counters:var(--tw-prose-invert-counters);--tw-prose-bullets:var(--tw-prose-invert-bullets);--tw-prose-hr:var(--tw-prose-invert-hr);--tw-prose-quotes:var(--tw-prose-invert-quotes);--tw-prose-quote-borders:var(--tw-prose-invert-quote-borders);--tw-prose-captions:var(--tw-prose-invert-captions);--tw-prose-code:var(--tw-prose-invert-code);--tw-prose-pre-code:var(--tw-prose-invert-pre-code);--tw-prose-pre-bg:var(--tw-prose-invert-pre-bg);--tw-prose-th-borders:var(--tw-prose-invert-th-borders);--tw-prose-td-borders:var(--tw-prose-invert-td-borders)}.dark .dark\:block{display:block}.dark .dark\:hidden{display:none}.dark .dark\:border-gray-700{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity))}.dark .dark\:bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.dark .dark\:bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.dark .dark\:fill-gray-200{fill:#e5e7eb}.dark .dark\:text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.dark .dark\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.dark .dark\:text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}.dark .dark\:text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.dark .dark\:hover\:bg-gray-700:hover{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.dark .dark\:hover\:fill-white:hover{fill:#fff}.dark .dark\:hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.dark .dark\:hover\:text-indigo-400:hover{--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity))}.dark .dark\:focus\:ring-gray-700:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(55 65 81/var(--tw-ring-opacity))}@media (min-width:640px){.sm\:mb-0{margin-bottom:0}.sm\:mt-4{margin-top:1rem}.sm\:leading-none{line-height:1}.sm\:shadow-xl{--tw-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px 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:768px){.md\:absolute{position:absolute}.md\:left-72{left:18rem}.md\:mx-2{margin-left:.5rem;margin-right:.5rem}.md\:my-6{margin-top:1.5rem;margin-bottom:1.5rem}.md\:my-0{margin-top:0;margin-bottom:0}.md\:mb-12{margin-bottom:3rem}.md\:mt-8{margin-top:2rem}.md\:mt-0{margin-top:0}.md\:ml-0{margin-left:0}.md\:inline-block{display:inline-block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:min-h-screen{min-height:100vh}.md\:w-auto{width:auto}.md\:w-1\/2{width:50%}.md\:max-w-none{max-width:none}.md\:max-w-2xl{max-width:42rem}.md\:flex-grow-0{flex-grow:0}.md\:flex-grow{flex-grow:1}.md\:items-center{align-items:center}.md\:border-none{border-style:none}.md\:bg-transparent{background-color:initial}.md\:bg-left{background-position:0}.md\:py-0{padding-top:0}.md\:pb-0,.md\:py-0{padding-bottom:0}.md\:pl-0{padding-left:0}.md\:text-center{text-align:center}.md\:text-4xl{font-size:2.25rem;line-height:2.5rem}.md\:text-6xl{font-size:3.75rem;line-height:1}.md\:text-5xl{font-size:3rem;line-height:1}.md\:text-3xl{font-size:1.875rem;line-height:2.25rem}.md\:shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.dark .dark\:md\:bg-transparent{background-color:initial}}@media (min-width:1024px){.lg\:mb-12{margin-bottom:3rem}.lg\:bg-center{background-position:50%}.lg\:text-5xl{font-size:3rem;line-height:1}.lg\:text-7xl{font-size:4.5rem;line-height:1}.lg\:text-lg{font-size:1.125rem;line-height:1.75rem}}@media (min-width:1280px){.xl\:left-80{left:20rem}.xl\:mb-16{margin-bottom:4rem}} diff --git a/src/Actions/PublishesDefaultFrontendResourceFiles.php b/src/Actions/PublishesDefaultFrontendResourceFiles.php index 0ca69cb4..fec86599 100644 --- a/src/Actions/PublishesDefaultFrontendResourceFiles.php +++ b/src/Actions/PublishesDefaultFrontendResourceFiles.php @@ -31,8 +31,8 @@ public function __construct(protected ?bool $force = false) public function __invoke(): void { - if (! is_dir(Hyde::path('resources/frontend'))) { - mkdir(Hyde::path('resources/frontend'), 0755, true); + if (! is_dir(Hyde::path('resources/assets'))) { + mkdir(Hyde::path('resources/assets'), 0755, true); } foreach (static::$files as $file) { @@ -43,8 +43,8 @@ public function __invoke(): void protected function handleFile(string $file): void { Hyde::copy( - Hyde::path('vendor/hyde/framework/resources/frontend/'.$file), - Hyde::path('resources/frontend/'.basename($file)), + Hyde::path('vendor/hyde/framework/resources/assets/'.$file), + Hyde::path('resources/assets/'.basename($file)), $this->force ); } diff --git a/src/Commands/HydePublishFrontendResourcesCommand.php b/src/Commands/HydePublishFrontendResourcesCommand.php index a891cffe..6b0127c2 100644 --- a/src/Commands/HydePublishFrontendResourcesCommand.php +++ b/src/Commands/HydePublishFrontendResourcesCommand.php @@ -37,7 +37,7 @@ public function handle(): int $this->newLine(); $this->warn('Please note that the following files will be overwritten:'); foreach (PublishesDefaultFrontendResourceFiles::$files as $file) { - $this->line(' - resources/frontend/'.$file); + $this->line(' - resources/assets/'.basename($file)); } $this->warn('You should make sure you have a backup of these files before proceeding. Tip: Use Git!'); diff --git a/src/Services/CollectionService.php b/src/Services/CollectionService.php index b2228ac2..aa1e891b 100644 --- a/src/Services/CollectionService.php +++ b/src/Services/CollectionService.php @@ -119,8 +119,8 @@ public static function getDocumentationPageList(): array public static function getMediaAssetFiles(): array { return array_merge(glob(Hyde::path('_media/*.{png,svg,jpg,jpeg,gif,ico,css,js}'), GLOB_BRACE), [ - Hyde::path('resources/frontend/hyde.css'), - Hyde::path('resources/frontend/hyde.js'), + Hyde::path('resources/assets/hyde.css'), + Hyde::path('resources/assets/hyde.js'), ]); } }