refresh admin interface layouts
Redesign authentication and website manager views with responsive layouts, clearer navigation, and accessibility improvements. Refresh page, menu, file, system information, settings, overview, welcome, page settings, and block thumbnail screens. Add the shared Admin stylesheet and Plugi theme, update the build configuration, and regenerate the admin CSS.
This commit is contained in:
+24
-7
@@ -163,9 +163,12 @@ async function buildWebsiteManagerJs() {
|
||||
);
|
||||
}
|
||||
|
||||
function runTailwindCli({ watch = false } = {}) {
|
||||
const input = path.resolve(__dirname, 'src/Modules/WebsiteManager/resources/assets/css/style.css');
|
||||
const output = path.join(DIST_DIR, 'WebsiteManager.css');
|
||||
function runTailwindCli({
|
||||
watch = false,
|
||||
input = path.resolve(__dirname, 'src/Modules/WebsiteManager/resources/assets/css/style.css'),
|
||||
output = path.join(DIST_DIR, 'WebsiteManager.css'),
|
||||
label = 'WebsiteManager.css',
|
||||
} = {}) {
|
||||
const tailwindBin = path.resolve(__dirname, 'node_modules/.bin/tailwindcss');
|
||||
|
||||
const args = ['-i', input, '-o', output];
|
||||
@@ -194,10 +197,10 @@ function runTailwindCli({ watch = false } = {}) {
|
||||
if (code === 0) {
|
||||
const duration = (performance.now() - start).toFixed(1);
|
||||
const size = (fs.statSync(output).size / 1024).toFixed(1);
|
||||
console.log(` \x1b[32m✓\x1b[0m CSS dist/WebsiteManager.css (${size} kB, ${duration}ms)`);
|
||||
console.log(` \x1b[32m✓\x1b[0m CSS dist/${label} (${size} kB, ${duration}ms)`);
|
||||
resolve();
|
||||
} else {
|
||||
console.error(`\x1b[31mError compiling Tailwind CSS:\x1b[0m\n${stderr}`);
|
||||
console.error(`\x1b[31mError compiling ${label}:\x1b[0m\n${stderr}`);
|
||||
reject(new Error(`Tailwind CLI exited with code ${code}`));
|
||||
}
|
||||
});
|
||||
@@ -215,6 +218,12 @@ async function buildAll() {
|
||||
await Promise.all([
|
||||
buildWebsiteManagerJs(),
|
||||
runTailwindCli({ watch: false }),
|
||||
runTailwindCli({
|
||||
watch: false,
|
||||
input: path.resolve(__dirname, 'src/Modules/WebsiteManager/resources/assets/css/admin.css'),
|
||||
output: path.join(DIST_DIR, 'Admin.css'),
|
||||
label: 'Admin.css',
|
||||
}),
|
||||
buildGrapesHead(),
|
||||
buildGrapesBody(),
|
||||
buildPageInjectionJs(),
|
||||
@@ -226,7 +235,15 @@ async function buildAll() {
|
||||
}
|
||||
|
||||
function startWatch() {
|
||||
const tailwindProcess = runTailwindCli({ watch: true });
|
||||
const tailwindProcesses = [
|
||||
runTailwindCli({ watch: true }),
|
||||
runTailwindCli({
|
||||
watch: true,
|
||||
input: path.resolve(__dirname, 'src/Modules/WebsiteManager/resources/assets/css/admin.css'),
|
||||
output: path.join(DIST_DIR, 'Admin.css'),
|
||||
label: 'Admin.css',
|
||||
}),
|
||||
];
|
||||
|
||||
const srcDir = path.resolve(__dirname, 'src');
|
||||
console.log(`\x1b[36mWatching for changes in ${srcDir}...\x1b[0m\n`);
|
||||
@@ -284,7 +301,7 @@ function startWatch() {
|
||||
|
||||
const cleanup = () => {
|
||||
console.log('\nStopping watchers...');
|
||||
if (tailwindProcess) tailwindProcess.kill();
|
||||
tailwindProcesses.forEach((tailwindProcess) => tailwindProcess?.kill());
|
||||
watcher.close();
|
||||
process.exit(0);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user