Pushing the Tailwind theme
This commit is contained in:
parent
d3798cceca
commit
718ff4f9e8
10 changed files with 2870 additions and 2 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1 +1,3 @@
|
|||
/src/Vendor/
|
||||
node_modules
|
||||
src/Cache/*
|
1423
package-lock.json
generated
Normal file
1423
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
21
package.json
Normal file
21
package.json
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "antcms",
|
||||
"version": "1.0.0",
|
||||
"description": "A simple CMS built with PHP and Markdown",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/BelleNottelling/AntCMS.git"
|
||||
},
|
||||
"author": "BelleNottelling",
|
||||
"bugs": {
|
||||
"url": "https://github.com/BelleNottelling/AntCMS/issues"
|
||||
},
|
||||
"homepage": "https://github.com/BelleNottelling/AntCMS#readme",
|
||||
"devDependencies": {
|
||||
"@tailwindcss/typography": "^0.5.8",
|
||||
"tailwindcss": "^3.2.4"
|
||||
}
|
||||
}
|
|
@ -2,6 +2,6 @@ RewriteEngine On
|
|||
|
||||
# If the requested file is an asset, serve it directly
|
||||
RewriteCond %{REQUEST_FILENAME} -f
|
||||
RewriteRule ^Theme/[^/]+/Assets/.+$ - [L]
|
||||
RewriteRule ^Themes/[^/]+/Assets/.+$ - [L]
|
||||
|
||||
RewriteRule ^(.+)$ index.php [L,QSA]
|
||||
RewriteRule ^(.+)$ index.php [L,QSA]
|
|
@ -44,6 +44,7 @@ class AntPages
|
|||
{
|
||||
$currentConfig = AntConfig::currentConfig();
|
||||
$baseURL = $currentConfig['baseURL'];
|
||||
|
||||
$navHTML = '';
|
||||
foreach (AntPages::getPages() as $page) {
|
||||
if(!$page['showInNav']){
|
||||
|
|
1351
src/Themes/Tailwind/Assets/Dist/tailwind.css
Normal file
1351
src/Themes/Tailwind/Assets/Dist/tailwind.css
Normal file
File diff suppressed because it is too large
Load diff
3
src/Themes/Tailwind/Assets/tailwind.css
Normal file
3
src/Themes/Tailwind/Assets/tailwind.css
Normal file
|
@ -0,0 +1,3 @@
|
|||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
54
src/Themes/Tailwind/default_layout.html
Normal file
54
src/Themes/Tailwind/default_layout.html
Normal file
|
@ -0,0 +1,54 @@
|
|||
<!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="/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">AntCMS</a>
|
||||
<!--AntCMS-Debug-->
|
||||
</div>
|
||||
</footer>
|
||||
<script src="https://unpkg.com/flowbite@1.6.0/dist/flowbite.min.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
3
src/Themes/Tailwind/nav_layout.html
Normal file
3
src/Themes/Tailwind/nav_layout.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<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>
|
10
tailwind.config.js
Normal file
10
tailwind.config.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
content: ["./src/Theme/Default/Templates/*.{html,js}", "./src/AntCMS/*.php"], // Including the PHP files because some of the components are generated from PHP files
|
||||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
plugins: [
|
||||
require('@tailwindcss/typography'),
|
||||
],
|
||||
}
|
Loading…
Reference in a new issue