add theme-one

This commit is contained in:
Paul Spenke
2023-06-29 08:44:13 +08:00
parent c9b72248c3
commit a2054c9625
31 changed files with 5484 additions and 1 deletions
+23
View File
@@ -0,0 +1,23 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
+1
View File
@@ -0,0 +1 @@
# Default Theme for Plugi
+22
View File
@@ -0,0 +1,22 @@
<?php
return [
'title' => 'Column',
'category' => 'Layout',
'hidden' => true,
'icon' => 'fa fa-hand-peace-o',
'settings' => [
'text' => [
'label'=> 'Text',
'type' => 'text',
'placeholder' =>'auto',
'value' => 'Micheal Gough'
],
'texti' => [
'label'=> 'Text',
'type' => 'text',
'placeholder' =>'auto',
'value' => 'Micheal Gough'
],
]
];
+3
View File
@@ -0,0 +1,3 @@
<div class="col p-8 border rounded" phpb-blocks-container>
[block slug="paragraph"]
</div>
+15
View File
@@ -0,0 +1,15 @@
<?php
return [
'title' => 'CTA',
'category' => 'General',
'icon' => 'fa fa-hand-peace-o',
'settings' => [
'person' => [
'label'=> 'Height',
'type' => 'text',
'placeholder' =>'auto',
'value' => 'Micheal Gough'
]
]
];
+9
View File
@@ -0,0 +1,9 @@
<section class="bg-gray-50 dark:bg-gray-800">
<div class="max-w-screen-xl px-4 py-8 mx-auto lg:py-16 lg:px-6">
<div class="max-w-screen-sm mx-auto text-center">
<h2 class="mb-4 text-3xl font-extrabold leading-tight tracking-tight text-gray-900 dark:text-white">Start your free trial today</h2>
<p class="mb-6 font-light text-gray-500 dark:text-gray-400 md:text-lg">Try Landwind Platform for 30 days. No credit card required.</p>
<a href="#" class="text-white bg-purple-700 hover:bg-purple-800 focus:ring-4 focus:ring-purple-300 font-medium rounded-lg text-sm px-5 py-2.5 mr-2 mb-2 dark:bg-purple-600 dark:hover:bg-purple-700 focus:outline-none dark:focus:ring-purple-800">Free trial for 30 days</a>
</div>
</div>
</section>
@@ -0,0 +1,15 @@
<?php
return [
'title' => 'Hello World',
'category' => 'General',
'icon' => 'fa fa-hand-peace-o',
'settings' => [
'height' => [
'label'=> 'Height',
'type' => 'text',
'placeholder' =>'auto',
'value' => 50
]
]
];
@@ -0,0 +1 @@
<h1>Hello World!</h1>
+7
View File
@@ -0,0 +1,7 @@
<?php
return [
'title' => 'image',
'category' => 'General',
'icon' => 'fa fa-hand-peace-o'
];
+1
View File
@@ -0,0 +1 @@
<img src="" alt="" data-blubb="foo">
@@ -0,0 +1,7 @@
<?php
return [
'title' => 'Paragraph',
'category' => 'Layout',
'icon' => 'fa fa-hand-peace-o',
];
@@ -0,0 +1,3 @@
<p class="">
Paragraph
</p>
+15
View File
@@ -0,0 +1,15 @@
<?php
return [
'title' => 'Quote',
'category' => 'General',
'icon' => 'fa fa-hand-peace-o',
'settings' => [
'person' => [
'label'=> 'Height',
'type' => 'text',
'placeholder' =>'auto',
'value' => 'Micheal Gough'
]
]
];
+19
View File
@@ -0,0 +1,19 @@
<section class="bg-gray-50 dark:bg-gray-800">
<div class="max-w-screen-xl px-4 py-8 mx-auto text-center lg:py-24 lg:px-6">
<figure class="max-w-screen-md mx-auto">
<svg class="h-12 mx-auto mb-3 text-gray-400 dark:text-gray-600" viewBox="0 0 24 27" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14.017 18L14.017 10.609C14.017 4.905 17.748 1.039 23 0L23.995 2.151C21.563 3.068 20 5.789 20 8H24V18H14.017ZM0 18V10.609C0 4.905 3.748 1.038 9 0L9.996 2.151C7.563 3.068 6 5.789 6 8H9.983L9.983 18L0 18Z" fill="currentColor"></path>
</svg>
<blockquote>
<p class="text-xl font-medium text-gray-900 md:text-2xl dark:text-white">"Landwind is just awesome. It contains tons of predesigned components and pages starting from login screen to complex dashboard. Perfect choice for your next SaaS application."</p>
</blockquote>
<figcaption class="flex items-center justify-center mt-6 space-x-3">
<img class="w-6 h-6 rounded-full" src="https://flowbite.s3.amazonaws.com/blocks/marketing-ui/avatars/michael-gouch.png" alt="profile picture">
<div class="flex items-center divide-x-2 divide-gray-500 dark:divide-gray-700">
<div class="pr-3 font-medium text-gray-900 dark:text-white"><?php echo $block->setting('person'); ?></div>
<div class="pl-3 text-sm font-light text-gray-500 dark:text-gray-400">CEO at Google</div>
</div>
</figcaption>
</figure>
</div>
</section>
+14
View File
@@ -0,0 +1,14 @@
<?php
return [
'title' => 'Row',
'category' => 'Layout',
'icon' => 'fa fa-hand-peace-o',
'settings' => [
"column_count" => [
"type" => "number",
"label" => "Number of columns",
"value" => "3"
],
]
];
+10
View File
@@ -0,0 +1,10 @@
<div class="row p-3 flex flex-nowrap gap-3">
<?php
$columnCount = intval($block->setting('column_count'));
for ($i = 0; $i < $columnCount; $i++):
?>
[block slug="col" id="col<?= $i ?>"]
<?php
endfor;
?>
</div>
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,5 @@
<?php
return [
'title' => 'Master Layout',
];
+105
View File
@@ -0,0 +1,105 @@
<?php
use Plugi\Repositories\MenuRepository;
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title><?= phpb_e($page->getTranslation('meta_title')) ?></title>
<meta name="description" content="<?= phpb_e($page->getTranslation('meta_description')) ?>">
<link href="<?= phpb_theme_asset('dist/style.css') ?>" rel="stylesheet">
</head>
<body>
<header>
<nav class="bg-white border-gray-200 px-4 lg:px-6 py-2.5 dark:bg-gray-800">
<div class="flex flex-wrap justify-between items-center mx-auto max-w-screen-xl">
<a href="/" class="flex items-center">
<img src="https://flowbite.com/docs/images/logo.svg" class="mr-3 h-6 sm:h-9" alt="Flowbite Logo" />
<span class="self-center text-xl font-semibold whitespace-nowrap dark:text-white">Flowbite</span>
</a>
<div class="flex items-center lg:order-2">
<a href="#" class="text-gray-800 dark:text-white hover:bg-gray-50 focus:ring-4 focus:ring-gray-300 font-medium rounded-lg text-sm px-4 lg:px-5 py-2 lg:py-2.5 mr-2 dark:hover:bg-gray-700 focus:outline-none dark:focus:ring-gray-800">Log in</a>
<a href="#" class="text-white bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:ring-primary-300 font-medium rounded-lg text-sm px-4 lg:px-5 py-2 lg:py-2.5 mr-2 dark:bg-primary-600 dark:hover:bg-primary-700 focus:outline-none dark:focus:ring-primary-800">Get started</a>
<button data-collapse-toggle="mobile-menu-2" type="button" class="inline-flex items-center p-2 ml-1 text-sm text-gray-500 rounded-lg lg: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="mobile-menu-2" aria-expanded="false">
<span class="sr-only">Open main menu</span>
<svg class="w-6 h-6" 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>
<svg class="hidden w-6 h-6" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg>
</button>
</div>
<div class="hidden justify-between items-center w-full lg:flex lg:w-auto lg:order-1" id="mobile-menu-2">
<ul class="flex flex-col mt-4 font-medium lg:flex-row lg:space-x-8 lg:mt-0">
<?php
foreach ((new MenuRepository)->getHydratedMenu('Main')['pages'] as $page): ?>
<li>
<a href="<?= phpb_e($page['route']) ?>" class="block py-2 pr-4 pl-3 text-gray-700 border-b border-gray-100 hover:bg-gray-50 lg:hover:bg-transparent lg:border-0 lg:hover:text-primary-700 lg:p-0 dark:text-gray-400 lg:dark:hover:text-white dark:hover:bg-gray-700 dark:hover:text-white lg:dark:hover:bg-transparent dark:border-gray-700">
<?= phpb_e($page['title']) ?>
</a>
</li>
<?php
endforeach;
?>
</ul>
</div>
</div>
</nav>
</header>
<main class="#main-content">
<?= $body ?>
</main>
<footer class="p-4 bg-white md:p-8 lg:p-10 dark:bg-gray-800">
<div class="mx-auto max-w-screen-xl text-center">
<a href="#" class="flex justify-center items-center text-2xl font-semibold text-gray-900 dark:text-white">
<svg class="mr-2 h-8" viewBox="0 0 33 33" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M25.2696 13.126C25.1955 13.6364 24.8589 14.3299 24.4728 14.9328C23.9856 15.6936 23.2125 16.2264 22.3276 16.4114L18.43 17.2265C17.8035 17.3575 17.2355 17.6853 16.8089 18.1621L14.2533 21.0188C13.773 21.5556 13.4373 21.4276 13.4373 20.7075C13.4315 20.7342 12.1689 23.9903 15.5149 25.9202C16.8005 26.6618 18.6511 26.3953 19.9367 25.6538L26.7486 21.7247C29.2961 20.2553 31.0948 17.7695 31.6926 14.892C31.7163 14.7781 31.7345 14.6639 31.7542 14.5498L25.2696 13.126Z" fill="url(#paint0_linear_11430_22515)"/><path d="M23.5028 9.20133C24.7884 9.94288 25.3137 11.0469 25.3137 12.53C25.3137 12.7313 25.2979 12.9302 25.2694 13.1261L28.0141 14.3051L31.754 14.5499C32.2329 11.7784 31.2944 8.92561 29.612 6.65804C28.3459 4.9516 26.7167 3.47073 24.7581 2.34097C23.167 1.42325 21.5136 0.818599 19.8525 0.486816L17.9861 2.90382L17.3965 5.67918L23.5028 9.20133Z" fill="url(#paint1_linear_11430_22515)"/><path d="M1.5336 11.2352C1.5329 11.2373 1.53483 11.238 1.53556 11.2358C1.67958 10.8038 1.86018 10.3219 2.08564 9.80704C3.26334 7.11765 5.53286 5.32397 8.32492 4.40943C11.117 3.49491 14.1655 3.81547 16.7101 5.28323L17.3965 5.67913L19.8525 0.486761C12.041 -1.07341 4.05728 3.51588 1.54353 11.2051C1.54233 11.2087 1.53796 11.2216 1.5336 11.2352Z" fill="url(#paint2_linear_11430_22515)"/><path d="M19.6699 25.6538C18.3843 26.3953 16.8003 26.3953 15.5147 25.6538C15.3402 25.5531 15.1757 25.4399 15.0201 25.3174L12.7591 26.8719L10.8103 30.0209C12.9733 31.821 15.7821 32.3997 18.589 32.0779C20.7013 31.8357 22.7995 31.1665 24.7582 30.0368C26.3492 29.1191 27.7 27.9909 28.8182 26.7195L27.6563 23.8962L25.7762 22.1316L19.6699 25.6538Z" fill="url(#paint3_linear_11430_22515)"/><path d="M15.0201 25.3175C14.0296 24.5373 13.4371 23.3406 13.4371 22.0588V21.931V11.2558C13.4371 10.6521 13.615 10.5494 14.1384 10.8513C13.3323 10.3864 11.4703 8.79036 9.17118 10.1165C7.88557 10.858 6.8269 12.4949 6.8269 13.978V21.8362C6.8269 24.775 8.34906 27.8406 10.5445 29.7966C10.6313 29.874 10.7212 29.9469 10.8103 30.0211L15.0201 25.3175Z" fill="url(#paint4_linear_11430_22515)"/><path d="M28.6604 5.49565C28.6589 5.49395 28.6573 5.49532 28.6589 5.49703C28.9613 5.83763 29.2888 6.23485 29.6223 6.68734C31.3648 9.05099 32.0158 12.0447 31.4126 14.9176C30.8093 17.7906 29.0071 20.2679 26.4625 21.7357L25.7761 22.1316L28.8181 26.7195C34.0764 20.741 34.09 11.5388 28.6815 5.51929C28.6789 5.51641 28.67 5.50622 28.6604 5.49565Z" fill="url(#paint5_linear_11430_22515)"/><path d="M7.09355 13.978C7.09354 12.4949 7.88551 11.1244 9.17113 10.3829C9.34564 10.2822 9.52601 10.1965 9.71002 10.1231L9.49304 7.38962L7.96861 4.26221C5.32671 5.23364 3.1897 7.24125 2.06528 9.83067C1.2191 11.7793 0.75001 13.9294 0.75 16.1888C0.75 18.0243 1.05255 19.7571 1.59553 21.3603L4.62391 21.7666L7.09355 21.0223V13.978Z" fill="url(#paint6_linear_11430_22515)"/><path d="M9.71016 10.1231C10.8817 9.65623 12.2153 9.74199 13.3264 10.3829L13.4372 10.4468L22.3326 15.5777C22.9566 15.9376 22.8999 16.2918 22.1946 16.4392L22.7078 16.332C23.383 16.1908 23.9999 15.8457 24.4717 15.3428C25.2828 14.4782 25.5806 13.4351 25.5806 12.5299C25.5806 11.0468 24.7886 9.67634 23.503 8.93479L16.6911 5.00568C14.1436 3.53627 11.0895 3.22294 8.29622 4.14442C8.18572 4.18087 8.07756 4.2222 7.96875 4.26221L9.71016 10.1231Z" fill="url(#paint7_linear_11430_22515)"/><path d="M20.0721 31.8357C20.0744 31.8352 20.0739 31.8332 20.0717 31.8337C19.6252 31.925 19.1172 32.0097 18.5581 32.0721C15.638 32.3978 12.7174 31.4643 10.5286 29.5059C8.33986 27.5474 7.09347 24.7495 7.09348 21.814L7.09347 21.0222L1.59546 21.3602C4.1488 28.8989 12.1189 33.5118 20.0411 31.8421C20.0449 31.8413 20.0582 31.8387 20.0721 31.8357Z" fill="url(#paint8_linear_11430_22515)"/>
<defs>
<linearGradient id="paint0_linear_11430_22515" x1="20.8102" y1="23.9532" x2="23.9577" y2="12.9901" gradientUnits="userSpaceOnUse"><stop stop-color="#1724C9"/><stop offset="1" stop-color="#1C64F2"/></linearGradient>
<linearGradient id="paint1_linear_11430_22515" x1="28.0593" y1="10.5837" x2="19.7797" y2="2.33321" gradientUnits="userSpaceOnUse"><stop stop-color="#1C64F2"/><stop offset="1" stop-color="#0092FF"/></linearGradient>
<linearGradient id="paint2_linear_11430_22515" x1="16.9145" y1="5.2045" x2="4.42432" y2="5.99375" gradientUnits="userSpaceOnUse"><stop stop-color="#0092FF"/><stop offset="1" stop-color="#45B2FF"/></linearGradient>
<linearGradient id="paint3_linear_11430_22515" x1="16.0698" y1="28.846" x2="27.2866" y2="25.8192" gradientUnits="userSpaceOnUse"><stop stop-color="#1C64F2"/><stop offset="1" stop-color="#0092FF"/></linearGradient>
<linearGradient id="paint4_linear_11430_22515" x1="8.01881" y1="15.8661" x2="15.9825" y2="24.1181" gradientUnits="userSpaceOnUse"><stop stop-color="#1724C9"/><stop offset="1" stop-color="#1C64F2"/></linearGradient>
<linearGradient id="paint5_linear_11430_22515" x1="26.2004" y1="21.8189" x2="31.7569" y2="10.6178" gradientUnits="userSpaceOnUse"><stop stop-color="#0092FF"/><stop offset="1" stop-color="#45B2FF"/></linearGradient>
<linearGradient id="paint6_linear_11430_22515" x1="6.11387" y1="9.31427" x2="3.14054" y2="20.4898" gradientUnits="userSpaceOnUse"><stop stop-color="#1C64F2"/><stop offset="1" stop-color="#0092FF"/></linearGradient>
<linearGradient id="paint7_linear_11430_22515" x1="21.2932" y1="8.78271" x2="10.4278" y2="11.488" gradientUnits="userSpaceOnUse"><stop stop-color="#1724C9"/><stop offset="1" stop-color="#1C64F2"/></linearGradient>
<linearGradient id="paint8_linear_11430_22515" x1="7.15667" y1="21.5399" x2="14.0824" y2="31.9579" gradientUnits="userSpaceOnUse"><stop stop-color="#0092FF"/><stop offset="1" stop-color="#45B2FF"/></linearGradient>
</defs>
</svg>
Flowbite
</a>
<p class="my-6 text-gray-500 dark:text-gray-400">Open-source library of over 400+ web components and interactive elements built for better web.</p>
<ul class="flex flex-wrap justify-center items-center mb-6 text-gray-900 dark:text-white">
<?php
foreach ((new MenuRepository)->getHydratedMenu('Footer')['pages'] as $page): ?>
<li>
<a href="<?= phpb_e($page['route']) ?>" class="mr-4 hover:underline md:mr-6 "><?= phpb_e($page['title']) ?></a>
</li>
<?php
endforeach;
?>
</ul>
<span class="text-sm text-gray-500 sm:text-center dark:text-gray-400">© 2021-<?= phpb_e(date("Y"))?> <a href="/" class="hover:underline">Flowbite™</a>. All Rights Reserved.</span>
</div>
</footer>
<script src="<?= phpb_theme_asset('dist/phpb-demo-template.js') ?>"></script>
<!-- Run Plugi script.js files -->
<script type="text/javascript">
document.querySelectorAll("script").forEach(function(scriptTag) {
scriptTag.dispatchEvent(new Event('run-script'));
});
</script>
</body>
</html>
+3016
View File
File diff suppressed because it is too large Load Diff
+30
View File
@@ -0,0 +1,30 @@
{
"name": "phpb-demo-template",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "npm-watch build",
"build": "tsc && vite build"
},
"watch": {
"build": {
"patterns": [
"src",
"blocks",
"layouts"
],
"extensions": "ts,html,php",
"quiet": false
}
},
"devDependencies": {
"autoprefixer": "^10.4.14",
"flowbite": "^1.6.5",
"npm-watch": "^0.11.0",
"postcss": "^8.4.24",
"tailwindcss": "^3.3.2",
"typescript": "^5.0.2",
"vite": "^4.3.9"
}
}
+6
View File
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
}
}
+9
View File
@@ -0,0 +1,9 @@
import './style.css'
// import typescriptLogo from './typescript.svg'
import 'flowbite';
// @ts-ignore
const toggleNavbar = (collapseID: string) => {
document.getElementById(collapseID)?.classList.toggle("hidden");
document.getElementById(collapseID)?.classList.toggle("block");
}
+3
View File
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
+1
View File
@@ -0,0 +1 @@
/// <reference types="vite/client" />
+32
View File
@@ -0,0 +1,32 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./src/**/*.{html,ts,php}",
"./blocks/**/*.{html,ts,php}",
"./layouts/**/*.{html,ts,php}",
"./node_modules/flowbite/**/*.js",
],
theme: {
extend: {
colors: {
'primary': {
'50': '#f6faf3',
'100': '#e9f5e3',
'200': '#d3eac8',
'300': '#afd89d',
'400': '#82bd69',
'500': '#61a146',
'600': '#4c8435',
'700': '#3d692c',
'800': '#345427',
'900': '#2b4522',
'950': '#13250e',
},
}
},
},
plugins: [
require('flowbite/plugin'),
],
}
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"module": "ESNext",
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},
"include": ["src"]
}
+14
View File
@@ -0,0 +1,14 @@
// vite.config.js
import { resolve } from 'path'
import { defineConfig } from 'vite'
export default defineConfig({
build: {
lib: {
// Could also be a dictionary or array of multiple entry points
entry: resolve(__dirname, 'src/main.ts'),
name: 'phpb-demo-template',
fileName: 'phpb-demo-template',
},
},
})