mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 06:51:55 +00:00
Fixed more layout shifts
This commit is contained in:
@@ -93,18 +93,8 @@ async function generateCriticalCSSForViews() {
|
||||
},
|
||||
forceInclude: [
|
||||
'[data-bs-theme="dark"]',
|
||||
'[data-bs-theme="dark"] *',
|
||||
'body.dark',
|
||||
'.navbar-dark',
|
||||
'.navbar',
|
||||
'.navbar-collapse',
|
||||
'.dropdown',
|
||||
'.dropdown-toggle',
|
||||
'.dropdown-toggle::after',
|
||||
'.dropdown-item',
|
||||
'.dropdown-menu',
|
||||
'.dropdown-menu-end',
|
||||
'.dropdown-menu.show',
|
||||
'.me-2',
|
||||
'.align-items-center',
|
||||
'.d-flex',
|
||||
@@ -113,18 +103,39 @@ async function generateCriticalCSSForViews() {
|
||||
'.start-0',
|
||||
'.m-4',
|
||||
'.row', // elements
|
||||
'.row>*',
|
||||
'.g-3',
|
||||
'.col-md-3',
|
||||
'.text-center',
|
||||
'.mb-3',
|
||||
'.mb-4',
|
||||
'.mt-3',
|
||||
'.py-4',
|
||||
'.text-center',
|
||||
'h2',
|
||||
'.form-control',
|
||||
'.btn',
|
||||
'.btn-secondary',
|
||||
'.form-control-sm',
|
||||
'.modal',
|
||||
'.btn',
|
||||
'.btn-sm',
|
||||
'.btn-secondary',
|
||||
'.btn-warning',
|
||||
'.btn-danger',
|
||||
'.rounded-circle', // user icon
|
||||
'table', // table elements (users)
|
||||
'.table>thead',
|
||||
'.user-row > td',
|
||||
'thead',
|
||||
'tbody',
|
||||
'th',
|
||||
'tr',
|
||||
'td',
|
||||
'.table>:not(caption)>*>*',
|
||||
'.table-striped>tbody>tr:nth-of-type(odd)>*',
|
||||
'.gap-2',
|
||||
'.table',
|
||||
'.table-responsive',
|
||||
'.align-middle'
|
||||
]
|
||||
},
|
||||
target: {
|
||||
@@ -143,3 +154,11 @@ async function generateCriticalCSSForViews() {
|
||||
|
||||
// Run the function
|
||||
generateCriticalCSSForViews().catch(console.error);
|
||||
|
||||
|
||||
// How to run this:
|
||||
// install dependencies:
|
||||
// npm i -D critical
|
||||
// npm install puppeteer
|
||||
// run:
|
||||
// node critical.js
|
||||
Reference in New Issue
Block a user