Make tailwind the default and generate the CSS

Closes #1 + makes the smaller and faster theme the default
This commit is contained in:
Belle Aerni 2023-01-07 14:06:47 -08:00
parent 3ee0161c11
commit d1fd6521f9
10 changed files with 89 additions and 85 deletions

View file

@ -18,6 +18,10 @@ jobs:
- run: |
sudo apt-get install zip -y
zip -r AntCMS.zip .
- 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
working-directory: ./src
- uses: ncipollo/release-action@v1
with:

View file

@ -0,0 +1,55 @@
<!doctype html>
<html lang="en" data-bs-theme="dark">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="<!--AntCMS-Description-->">
<meta name="author" content="<!--AntCMS-Author-->">
<meta name="keywords" content="<!--AntCMS-Keywords-->">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"
integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN"
crossorigin="anonymous"></script>
<title><!--AntCMS-Title--></title>
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-expand-lg">
<div class="container-fluid">
<a class="navbar-brand" href="<!--AntCMS-SiteLink-->"><!--AntCMS-SiteTitle--></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<!--AntCMS-Navigation-->
</ul>
</div>
</div>
</nav>
<!-- Content -->
<div class="container">
<div class="row">
<div class="col-md-1"></div>
<div class="col-md-10"><!--AntCMS-Body--></div>
<div class="col-md-1"></div>
</div>
</div>
<footer class="text-center text-lg-start">
<div class="text-center p-3" style="background-color: rgba(0, 0, 0, 0.2);">
Powered by
<a href="https://github.com/BelleNottelling/AntCMS/">AntCMS</a>
<!--AntCMS-Debug-->
</div>
</footer>
</body>
</html>

View file

@ -0,0 +1,3 @@
<li class="nav-item active">
<a class="nav-link" href="<!--AntCMS-PageLink-->"><!--AntCMS-PageTitle--></a>
</li>

View file

@ -1,5 +1,5 @@
<!doctype html>
<html lang="en" data-bs-theme="dark">
<html lang="en">
<head>
<meta charset="utf-8">
@ -8,26 +8,24 @@
<meta name="author" content="<!--AntCMS-Author-->">
<meta name="keywords" content="<!--AntCMS-Keywords-->">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"
integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN"
crossorigin="anonymous"></script>
<link href="<!--AntCMS-SiteLink-->/Themes/Tailwind/Assets/Dist/tailwind.css" rel="stylesheet">
<title><!--AntCMS-Title--></title>
</head>
<body>
<body class="bg-gray-50 dark:bg-zinc-800 text-gray-500 dark:text-gray-400">
<!-- Navigation -->
<nav class="navbar navbar-expand-lg">
<div class="container-fluid">
<a class="navbar-brand" href="<!--AntCMS-SiteLink-->"><!--AntCMS-SiteTitle--></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
<nav class="p-3 border-gray-200 bg-gray-100 dark:bg-zinc-900 dark:border-gray-700">
<div class="container flex flex-wrap items-center justify-between mx-auto">
<a href="<!--AntCMS-SiteLink-->" class="flex items-center">
<span class="self-center text-xl font-semibold whitespace-nowrap dark:text-white"><!--AntCMS-SiteTitle--></span>
</a>
<button data-collapse-toggle="navbar-solid-bg" type="button" class="inline-flex items-center p-2 ml-3 text-sm text-gray-500 rounded-lg md:hidden hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600" aria-controls="navbar-solid-bg" aria-expanded="false">
<span class="sr-only">Open main menu</span>
<svg class="w-6 h-6" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z" clip-rule="evenodd"></path></svg>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<div class="hidden w-full md:block md:w-auto" id="navbar-solid-bg">
<ul class="flex flex-col mt-4 rounded-lg bg-gray-50 md:flex-row md:space-x-8 md:mt-0 md:text-sm md:font-medium md:border-0 md:bg-transparent dark:bg-zinc-800 md:dark:bg-transparent dark:border-gray-700">
<!--AntCMS-Navigation-->
</ul>
</div>
@ -35,21 +33,22 @@
</nav>
<!-- Content -->
<div class="container">
<div class="row">
<div class="col-md-1"></div>
<div class="col-md-10"><!--AntCMS-Body--></div>
<div class="col-md-1"></div>
<div class="container mx-auto px-4 my-4">
<div class="flex flex-wrap -mx-4">
<div class="w-1/12 px-4"></div>
<div class="w-10/12 px-4 prose dark:prose-invert"><!--AntCMS-Body--></div>
<div class="w-1/12 px-4"></div>
</div>
</div>
<footer class="text-center text-lg-start">
<div class="text-center p-3" style="background-color: rgba(0, 0, 0, 0.2);">
<div class="text-center p-3 bg-gray-100 dark:bg-zinc-900">
Powered by
<a href="https://github.com/BelleNottelling/AntCMS/">AntCMS</a>
<a href="https://github.com/BelleNottelling/AntCMS/" class="text-blue-500 dark:text-blue-400 hover:text-blue-400 dark:hover:text-blue-500">AntCMS</a>
<!--AntCMS-Debug-->
</div>
</footer>
<script src="https://unpkg.com/flowbite@1.6.0/dist/flowbite.min.js"></script>
</body>
</html>

View file

@ -1,3 +1,3 @@
<li class="nav-item active">
<a class="nav-link" href="<!--AntCMS-PageLink-->"><!--AntCMS-PageTitle--></a>
</li>
<li>
<a href="<!--AntCMS-PageLink-->" class="block py-2 pl-3 pr-4 text-gray-700 rounded hover:bg-gray-100 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 dark:text-gray-400 md:dark:hover:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent"><!--AntCMS-PageTitle--></a>
</li>

View file

@ -1,54 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="<!--AntCMS-Description-->">
<meta name="author" content="<!--AntCMS-Author-->">
<meta name="keywords" content="<!--AntCMS-Keywords-->">
<link href="<!--AntCMS-SiteLink-->/Themes/Tailwind/Assets/Dist/tailwind.css" rel="stylesheet">
<title><!--AntCMS-Title--></title>
</head>
<body class="bg-gray-50 dark:bg-zinc-800 text-gray-500 dark:text-gray-400">
<!-- Navigation -->
<nav class="p-3 border-gray-200 bg-gray-100 dark:bg-zinc-900 dark:border-gray-700">
<div class="container flex flex-wrap items-center justify-between mx-auto">
<a href="<!--AntCMS-SiteLink-->" class="flex items-center">
<span class="self-center text-xl font-semibold whitespace-nowrap dark:text-white"><!--AntCMS-SiteTitle--></span>
</a>
<button data-collapse-toggle="navbar-solid-bg" type="button" class="inline-flex items-center p-2 ml-3 text-sm text-gray-500 rounded-lg md:hidden hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600" aria-controls="navbar-solid-bg" aria-expanded="false">
<span class="sr-only">Open main menu</span>
<svg class="w-6 h-6" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z" clip-rule="evenodd"></path></svg>
</button>
<div class="hidden w-full md:block md:w-auto" id="navbar-solid-bg">
<ul class="flex flex-col mt-4 rounded-lg bg-gray-50 md:flex-row md:space-x-8 md:mt-0 md:text-sm md:font-medium md:border-0 md:bg-transparent dark:bg-zinc-800 md:dark:bg-transparent dark:border-gray-700">
<!--AntCMS-Navigation-->
</ul>
</div>
</div>
</nav>
<!-- Content -->
<div class="container mx-auto px-4 my-4">
<div class="flex flex-wrap -mx-4">
<div class="w-1/12 px-4"></div>
<div class="w-10/12 px-4 prose dark:prose-invert"><!--AntCMS-Body--></div>
<div class="w-1/12 px-4"></div>
</div>
</div>
<footer class="text-center text-lg-start">
<div class="text-center p-3 bg-gray-100 dark:bg-zinc-900">
Powered by
<a href="https://github.com/BelleNottelling/AntCMS/" class="text-blue-500 dark:text-blue-400 hover:text-blue-400 dark:hover:text-blue-500">AntCMS</a>
<!--AntCMS-Debug-->
</div>
</footer>
<script src="https://unpkg.com/flowbite@1.6.0/dist/flowbite.min.js"></script>
</body>
</html>

View file

@ -1,3 +0,0 @@
<li>
<a href="<!--AntCMS-PageLink-->" class="block py-2 pl-3 pr-4 text-gray-700 rounded hover:bg-gray-100 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 dark:text-gray-400 md:dark:hover:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent"><!--AntCMS-PageTitle--></a>
</li>

View file

@ -1,10 +1,10 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./src/Themes/Tailwind/Templates/*.{html,js}"],
content: ["./src/Themes/Default/Templates/*.{html,js}"],
theme: {
extend: {},
},
plugins: [
require('@tailwindcss/typography'),
],
}
}