Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop jQuery & Bootstrap for Alpine & Tailwind #9

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 42 additions & 34 deletions setup.php
Original file line number Diff line number Diff line change
@@ -1,36 +1,44 @@
<?php include_once 'setup/bootstrap.php';

?><!DOCTYPE html>
<html>
<html
lang="en"
x-data="window.Installer"
class="h-full"
>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?= sprintf(lang('text_title'), lang('text_installation')); ?></title>
<link type="image/png" rel="shortcut icon" href="https://d980sf4vy2c60.cloudfront.net/web/icons/favicon.png">
<link type="image/png" rel="shortcut icon" href="setup/assets/images/favicon.svg">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="setup/assets/css/app.css">
</head>
<body class="">
<main id="page" class="setup-page">
<?php include_once PARTIALPATH.'_floating_logo.php'; ?>
<form id="setup-form" accept-charset="utf-8" method="POST" role="form">
<div data-html="content"></div>
<body class="flex h-full bg-gray-100 leading-6 tracking-wide">
<div class="container mt-24">
<main id="page" class="px-3 md:w-3/4 mx-auto">
<div class="flex flex-row">
<div :class="{'hidden': hideSidebar}" class="hidden pr-4 basis-1/4">
<?php include_once PARTIALPATH.'_floating_logo.php'; ?>
<?php include_once PARTIALPATH.'_wizard.php'; ?>
</div>
<div :class="{'basis-full': hideSidebar, 'basis-3/4': !hideSidebar}">
<form @submit.prevent="submitForm" id="setup-form" accept-charset="utf-8" method="POST" role="form">
<div
class="text-gray-600 pb-7"
data-html="content"
></div>

<input type="hidden" id="current-step" value="<?= $page->currentStep ?>">
<input type="hidden" id="current-step" value="<?= $page->currentStep ?>">
<input type="hidden" name="requirement">

<div
id="page-modal"
class="modal"
tabindex="-1"
role="dialog"
data-html="modal">
<div id="flash-message" class="fixed top-9 right-6"></div>
</form>
</div>
</div>

<div id="progress-box" class="card-footer d-none" style="display: none;">
<h4 class="message"></h4>
</div>

<div id="flash-message"></div>
</form>
</main>
</main>
</div>

<?php
$partialList = [
Expand All @@ -50,24 +58,24 @@ class="modal"
];
?>

<?php foreach ([
'success' => ['background' => 'bg-emerald-600', 'text' => 'text-emerald-600'],
'warning' => ['background' => 'bg-amber-600', 'text' => 'text-amber-600'],
'danger' => ['background' => 'bg-red-600', 'text' => 'text-red-600'],
] as $type => $options) { ?>
<script type="text/template" data-partial="alert-<?php echo $type ?>">
<div class="inline-flex items-center <?php echo $options['text'] ?> bg-white leading-none rounded-full p-3 shadow-xl mb-3 w-96">
<span class="inline-flex <?php echo $options['background'] ?> text-white rounded-full h-6 px-3 justify-center items-center"></span>
<span class="inline-flex px-2">{{message}}</span>
</div>
</script>
<?php } ?>
<?php foreach ($partialList as $partial) { ?>
<script type="text/template" data-partial="<?= $partial ?>">
<?php include PARTIALPATH.$partial.'.php'; ?>
</script>
<?php } ?>

<script src="https://tastyigniter.com/assets/ui/js/global.js"></script>
<script src="setup/assets/js/app.js"></script>
<script type="text/javascript">
Installer.Steps.start.view = "[data-partial=\"start\"]"
Installer.Steps.license.view = "[data-partial=\"license\"]"
Installer.Steps.requirements.view = "[data-partial=\"requirements\"]"
Installer.Steps.database.view = "[data-partial=\"database\"]"
Installer.Steps.settings.view = "[data-partial=\"settings\"]"
Installer.Steps.install.view = "[data-partial=\"install\"]"
Installer.Steps.proceed.view = "[data-partial=\"proceed\"]"

Installer.init()
</script>
</body>
</html>
15 changes: 2 additions & 13 deletions setup/assets/css/app.css

Large diffs are not rendered by default.

Binary file removed setup/assets/fonts/FontAwesome/fa-brands-400.eot
Binary file not shown.
1,100 changes: 0 additions & 1,100 deletions setup/assets/fonts/FontAwesome/fa-brands-400.svg

This file was deleted.

Binary file removed setup/assets/fonts/FontAwesome/fa-brands-400.ttf
Binary file not shown.
Binary file removed setup/assets/fonts/FontAwesome/fa-brands-400.woff
Binary file not shown.
Binary file removed setup/assets/fonts/FontAwesome/fa-brands-400.woff2
Binary file not shown.
Binary file removed setup/assets/fonts/FontAwesome/fa-regular-400.eot
Binary file not shown.
368 changes: 0 additions & 368 deletions setup/assets/fonts/FontAwesome/fa-regular-400.svg

This file was deleted.

Binary file removed setup/assets/fonts/FontAwesome/fa-regular-400.ttf
Binary file not shown.
Binary file removed setup/assets/fonts/FontAwesome/fa-regular-400.woff
Binary file not shown.
Binary file removed setup/assets/fonts/FontAwesome/fa-regular-400.woff2
Binary file not shown.
Binary file removed setup/assets/fonts/FontAwesome/fa-solid-900.eot
Binary file not shown.
1,892 changes: 0 additions & 1,892 deletions setup/assets/fonts/FontAwesome/fa-solid-900.svg

This file was deleted.

Binary file removed setup/assets/fonts/FontAwesome/fa-solid-900.ttf
Binary file not shown.
Binary file removed setup/assets/fonts/FontAwesome/fa-solid-900.woff
Binary file not shown.
Binary file removed setup/assets/fonts/FontAwesome/fa-solid-900.woff2
Binary file not shown.
Binary file removed setup/assets/images/favicon.ico
Binary file not shown.
18 changes: 18 additions & 0 deletions setup/assets/images/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion setup/assets/js/app.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions setup/assets/js/app.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/*!
* mustache.js - Logic-less {{mustache}} templates with JavaScript
* http://github.com/janl/mustache.js
*/
21 changes: 2 additions & 19 deletions setup/assets/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,4 @@
{
"/css/app.css": "/css/app.css",
"/fonts/FontAwesome/fa-brands-400.eot": "/fonts/FontAwesome/fa-brands-400.eot",
"/fonts/FontAwesome/fa-brands-400.svg": "/fonts/FontAwesome/fa-brands-400.svg",
"/fonts/FontAwesome/fa-brands-400.ttf": "/fonts/FontAwesome/fa-brands-400.ttf",
"/fonts/FontAwesome/fa-brands-400.woff": "/fonts/FontAwesome/fa-brands-400.woff",
"/fonts/FontAwesome/fa-brands-400.woff2": "/fonts/FontAwesome/fa-brands-400.woff2",
"/fonts/FontAwesome/fa-regular-400.eot": "/fonts/FontAwesome/fa-regular-400.eot",
"/fonts/FontAwesome/fa-regular-400.svg": "/fonts/FontAwesome/fa-regular-400.svg",
"/fonts/FontAwesome/fa-regular-400.ttf": "/fonts/FontAwesome/fa-regular-400.ttf",
"/fonts/FontAwesome/fa-regular-400.woff": "/fonts/FontAwesome/fa-regular-400.woff",
"/fonts/FontAwesome/fa-regular-400.woff2": "/fonts/FontAwesome/fa-regular-400.woff2",
"/fonts/FontAwesome/fa-solid-900.eot": "/fonts/FontAwesome/fa-solid-900.eot",
"/fonts/FontAwesome/fa-solid-900.svg": "/fonts/FontAwesome/fa-solid-900.svg",
"/fonts/FontAwesome/fa-solid-900.ttf": "/fonts/FontAwesome/fa-solid-900.ttf",
"/fonts/FontAwesome/fa-solid-900.woff": "/fonts/FontAwesome/fa-solid-900.woff",
"/fonts/FontAwesome/fa-solid-900.woff2": "/fonts/FontAwesome/fa-solid-900.woff2",
"/src/js/bootstrap.min.js.map": "/src/js/bootstrap.min.js.map",
"/src/scss/vendor/animate.scss": "/src/scss/vendor/animate.scss",
"/js/app.js": "/js/app.js"
"/js/app.js": "/js/app.js",
"/css/app.css": "/css/app.css"
}
25 changes: 16 additions & 9 deletions setup/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,27 @@
"name": "tastyigniter-setup",
"private": true,
"scripts": {
"dev": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run dev -- --watch",
"prod": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js"
"dev": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "mix --production"
},
"dependencies": {
"@fortawesome/fontawesome-free-webfonts": "^1.0.6",
"@popperjs/core": "^2.9.1",
"animate.css": "^3.6.1",
"bootstrap": "^5.0.0-beta3",
"alpinejs": "^3.9.1",
"animate.css": "^3.7.2",
"mustache": "^4.2.0",
"sweetalert2": "^11.4.4",
"tailwindcss": "^3.0.23"
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.0",
"autoprefixer": "^10.4.2",
"cross-env": "^5.0.1",
"jquery": "^3.4.0",
"laravel-mix": "^6.0.13",
"node-sass": "^4.14.1",
"postcss": "^8.3.2",
"postcss": "^8.4.8",
"postcss-import": "^14.0.2",
"sass": "^1.32.8",
"sass-loader": "^10.1.1"
}
Expand Down
2 changes: 2 additions & 0 deletions setup/assets/src/css/app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import 'base.css';
@import 'sweetalert2/dist/sweetalert2.css';
3 changes: 3 additions & 0 deletions setup/assets/src/css/base.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
17 changes: 17 additions & 0 deletions setup/assets/src/js/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Alpine from 'alpinejs'
import Swal from 'sweetalert2/dist/sweetalert2.js'

window.Alpine = Alpine

window.render = (callback) => {
if (document.readyState != "loading") callback();
else document.addEventListener("DOMContentLoaded", callback);
}

window.Swal = Swal

window.Mustache = require('mustache');

require('./installer.js');

Alpine.start()
1 change: 0 additions & 1 deletion setup/assets/src/js/bootstrap.min.js.map

This file was deleted.

Loading