Compare commits

...

2 Commits

Author SHA1 Message Date
Belle Aerni 368aaa44e3 Use Lightning CSS for minimization
This produces slightly smaller files than sass does when minimizing, is also faster at it, and doesn't make changes that could effect the behavior of the CSS
2023-08-11 23:58:44 -07:00
Belle Aerni a6591f5a70 Start replacing the usage of CDNs 2023-06-09 01:05:12 -07:00
8 changed files with 1530 additions and 859 deletions

View File

@ -21,8 +21,7 @@ jobs:
working-directory: ./src
- run: |
npm install -D tailwindcss
rm -f ./src/Themes/Default/Assets/Dist/tailwind.css
npx tailwindcss -i ./src/Themes/Default/Assets/tailwind.css -o ./src/Themes/Default/Assets/Dist/tailwind.css --minify
npm run build
- uses: ncipollo/release-action@v1
with:
artifacts: "./src/AntCMS.zip"

3
.gitignore vendored
View File

@ -2,4 +2,5 @@
node_modules
src/Cache/*
src/Config/Config.yaml
src/Config/Pages.yaml
src/Config/Pages.yaml
src/Themes/Bootstrap/Assets/Dist/styles.min.css

2321
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -2,20 +2,30 @@
"name": "antcms",
"description": "A simple CMS built with PHP and Markdown",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"build": "npm-run-all compile-bs-css compile-tw-css min-bs-css min-tw-css",
"compile-bs-css": "sass --load-path=node_modules --no-source-map src/Themes/Bootstrap/Assets/styles.scss src/Themes/Bootstrap/Assets/Dist/Bootstrap.min.css",
"compile-tw-css": "npx tailwindcss -i ./src/Themes/Default/Assets/tailwind.css -o ./src/Themes/Default/Assets/Dist/tailwind.css",
"min-bs-css": "lightningcss --minify --browserslist ./src/Themes/Bootstrap/Assets/Dist/Bootstrap.min.css -o ./src/Themes/Bootstrap/Assets/Dist/Bootstrap.min.css",
"min-tw-css": "lightningcss --minify --browserslist ./src/Themes/Default/Assets/Dist/tailwind.css -o ./src/Themes/Default/Assets/Dist/tailwind.css"
},
"repository": {
"type": "git",
"url": "git+https://github.com/BelleNottelling/AntCMS.git"
"url": "git+https://github.com/AntCMS-org/AntCMS.git"
},
"author": "BelleNottelling",
"bugs": {
"url": "https://github.com/BelleNottelling/AntCMS/issues"
"url": "https://github.com/AntCMS-org/AntCMS/issues"
},
"homepage": "https://github.com/BelleNottelling/AntCMS#readme",
"homepage": "https://github.com/AntCMS-org/AntCMS#readme",
"devDependencies": {
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/typography": "^0.5.9",
"lightningcss-cli": "^1.21.5",
"npm-run-all": "^4.1.5",
"sass": "^1.63.2",
"tailwindcss": "^3.3.2"
},
"dependencies": {
"bootstrap": "^5.3.0"
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,33 @@
// scss-docs-start import-stack
// Configuration
@import "bootstrap/scss/functions";
@import "bootstrap/scss/variables";
@import "bootstrap/scss/variables-dark";
@import "bootstrap/scss/maps";
@import "bootstrap/scss/mixins";
@import "bootstrap/scss/utilities";
// Layout & components
@import "bootstrap/scss/root";
@import "bootstrap/scss/reboot";
@import "bootstrap/scss/type";
@import "bootstrap/scss/images";
@import "bootstrap/scss/containers";
@import "bootstrap/scss/grid";
@import "bootstrap/scss/tables";
@import "bootstrap/scss/forms";
@import "bootstrap/scss/buttons";
@import "bootstrap/scss/transitions";
@import "bootstrap/scss/dropdown";
@import "bootstrap/scss/button-group";
@import "bootstrap/scss/nav";
@import "bootstrap/scss/navbar";
@import "bootstrap/scss/list-group";
@import "bootstrap/scss/card";
// Helpers
//@import "bootstrap/scss/helpers";
// Utilities
@import "bootstrap/scss/utilities/api";
// scss-docs-end import-stack

View File

@ -8,12 +8,8 @@
<meta name="author" content="{{ AntCMSAuthor }}">
<meta name="keywords" content="{{ AntCMSKeywords }}">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-aFq/bzH65dt+w6FI2ooMVUpc+21e0SRygnTpmBvdBgSdnuTN7QbdgL+OapgHtvPp" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-qKXV1j0HvMUeCBQ+QVp7JcfGl760yU08IQ+GpUo5hlbpg51QRiuqHAJz8+BrxE/N"
crossorigin="anonymous"></script>
<link href="{{ "Themes/Bootstrap/Assets/Dist/Bootstrap.min.css"|absUrl }}" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha2/dist/js/bootstrap.bundle.min.js" integrity="sha384-qKXV1j0HvMUeCBQ+QVp7JcfGl760yU08IQ+GpUo5hlbpg51QRiuqHAJz8+BrxE/N" crossorigin="anonymous"></script>
<script src="{{ "Themes/Default/Assets/Dist/TinyZoom.js"|absUrl }}" defer></script>
<style>

File diff suppressed because one or more lines are too long