diff --git a/README.md b/README.md index 499aa499f6..c04b17aac5 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,11 @@ bin/cake cache clear _cake_attributes_ ## Layout -The app skeleton uses [Milligram](https://milligram.io/) (v1.3) minimalist CSS -framework by default. You can, however, replace it with any other library or -custom styles. +The app skeleton uses handwritten CSS with system fonts, responsive layouts, and +automatic light/dark themes. No frontend build step or CSS framework is required. +All pages share base styles from `public/css/cake.css`. The welcome page keeps +its page-specific layout and animations in `templates/Pages/home.php`. + +The styles use modern native CSS, including cascade layers, nesting, logical +properties, and `light-dark()`, and target current Chrome, Firefox, and Safari. +You can edit the styles directly or replace them with your preferred CSS framework. diff --git a/public/css/cake.css b/public/css/cake.css index 00cfdc5ed5..2c1a852964 100644 --- a/public/css/cake.css +++ b/public/css/cake.css @@ -1,301 +1,582 @@ -/* Milligram overrides */ -:root { - /* The following are official CakePHP colors */ - --color-cakephp-red: #d33c43; - --color-cakephp-gray: #404041; - --color-cakephp-blue: #2f85ae; - --color-cakephp-lightblue: #34bdd7; +/* CakePHP application styles. No build step required. */ +@layer reset, base, components, utilities; - /* These are additional colors */ - --color-lightgray: #606c76; - --color-white: #fff; - - --color-main-bg: #f5f7fa; - --color-links: var(--color-cakephp-blue); - --color-links-active: #2a6496; - --color-headings: #363637; - - --color-message-success-bg: #e3fcec; - --color-message-success-text: #1f9d55; - --color-message-success-border: #51d88a; - - --color-message-warning-bg: #fffabc; - --color-message-warning-text: #8d7b00; - --color-message-warning-border: #d3b800; - - --color-message-error-bg: #fcebea; - --color-message-error-text: #cc1f1a; - --color-message-error-border: #ef5753; - - --color-message-info-bg: #eff8ff; - --color-message-info-text: #2779bd; - --color-message-info-border: #6cb2eb; -} - -.button, button, input[type='button'], input[type='reset'], input[type='submit'] { - background-color: var(--color-cakephp-red); - border-color: var(--color-cakephp-red); -} - -body { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-weight: 400; - background: var(--color-main-bg); -} - -.top-nav-links, -.side-nav, -h1, h2, h3, h4, h5, h6 { - font-family: "Raleway", sans-serif; -} - -h1, h2, h3, h4, h5, h6 { - font-weight: 400; - color: var(--color-headings); -} - -a { - color: var(--color-links); - transition: color 0.2s linear; -} - -a:hover, -a:focus, -a:active { - color: var(--color-links-active); - transition: color 0.2s ease-out; -} - -.side-nav a, -.top-nav-links a, -th a, -.actions a { - color: var(--color-lightgray); -} - -.side-nav a:hover, -.side-nav a:focus, -.actions a:hover, -.actions a:focus { - color: var(--color-links-active); -} - -/* Utility */ -.table-responsive { - display: block; - width: 100%; - overflow-x: auto; - -webkit-overflow-scrolling: touch; -} - -/* Main */ -.content { - padding: 2rem; - background: var(--color-white); - border-radius: 0.4rem; - /* Thanks Stripe */ - box-shadow: 0 7px 14px 0 rgba(60, 66, 87, 0.1), - 0 3px 6px 0 rgba(0, 0, 0, 0.07); -} -.content form { - margin: 0; -} -.actions a { - font-weight: bold; - padding: 0 0.4rem; -} -.actions a:first-child { - padding-left: 0; -} -th { - white-space: nowrap; -} - -/* Nav bar */ -.top-nav { - display: flex; - align-items: center; - justify-content: space-between; - max-width: 112rem; - padding: 2rem; - margin: 0 auto; -} -.top-nav-title a { - font-size: 2.4rem; - color: var(--color-cakephp-red); -} -.top-nav-title span { - color: var(--color-cakephp-gray); -} -.top-nav-links a { - margin: 0 0.5rem; -} -.top-nav-title a, -.top-nav-links a { - font-weight: bold; -} -.side-nav-item { - display: block; - padding: 0.5rem 0; -} - -/* View action */ -.view.content .text { - margin-top: 1.2rem; -} -.related { - margin-top: 2rem; -} - -/* Flash messages */ -.message { - padding: .5rem 1rem; - background: var(--color-message-info-bg); - color: var(--color-message-info-text); - border-color: var(--color-message-info-border); - border-width: 1px; - border-style: solid; - border-radius: 4px; - margin-bottom: 1rem; - cursor: pointer; -} -.message.hidden { - display: none; -} -.message.success { - background: var(--color-message-success-bg); - color: var(--color-message-success-text); - border-color: var(--color-message-success-border); -} -.message.warning { - background: var(--color-message-warning-bg); - color: var(--color-message-warning-text); - border-color: var(--color-message-warning-border); -} -.message.error { - background: var(--color-message-error-bg); - color: var(--color-message-error-text); - border-color: var(--color-message-error-border); -} - -/* Forms */ -.input { - margin-bottom: 1.5rem; -} -.input input, -.input select, -.input textarea { - margin-bottom: 0; -} -.input label:has(input[type='checkbox']), -.input label:has(input[type='radio']) { - display: flex; - align-items: center; -} -.input label:has(~ label), -.input label:has(input[type='radio']) { - margin-bottom: 0; -} -.input label > input[type='checkbox'], -.input label > input[type='radio'] { - margin-right: 1.0rem; -} -input[type='color'] { - max-width: 4rem; - padding: 0.3rem .5rem 0.3rem; -} -.error-message { - color: var(--color-message-error-text); -} - -/* Paginator */ -.paginator { - text-align: right; -} -.paginator p { - margin-bottom: 0; -} -.pagination { - display: flex; - justify-content: center; - list-style: none; - margin: 0 0 1rem 0; - padding: 0; -} -.pagination li { - display: inline-block; - margin: 0.25em; - text-align: center; -} -.pagination a { - color: var(--color-cakephp-blue); - display: inline-block; - font-size: 1.25rem; - line-height: 3rem; - min-width: 3rem; - padding: 0; - position: relative; - text-decoration: none; - transition: background .3s,color .3s; -} -.pagination li.active a, -.pagination a:hover { - text-decoration: underline; -} -.pagination .disabled a { - cursor: not-allowed; - color: var(--color-lightgray); - text-decoration: none; -} -.first a, -.prev a, -.next a, -.last a { - padding: 0 .75rem; -} -.disabled a:hover { - background: initial; - color: initial; -} -.asc:after { - content: " \2193"; -} -.desc:after { - content: " \2191"; +@layer reset { + *, + *::before, + *::after { + box-sizing: border-box; + } + body, + h1, + h2, + h3, + h4, + h5, + h6, + p { + margin: 0; + } + img, + svg { + max-inline-size: 100%; + block-size: auto; + } + button, + input, + select, + textarea { + font: inherit; + } } -/* Error in non debug mode */ -.error-container { - align-items: center; - display: flex; - flex-direction: column; - height: 100vh; - justify-content: center; +@layer base { + :root { + color-scheme: light dark; + --color-cakephp-red: #d33c43; + --color-cakephp-gray: #404041; + --color-cakephp-blue: #2f85ae; + --color-cakephp-lightblue: #34bdd7; + --color-main-bg: light-dark(#f8f9fb, #131416); + --color-surface: light-dark(#fff, #1c1e21); + --color-text: light-dark(#25272b, #f1f2f4); + --color-lightgray: light-dark(#60646c, #a6aab3); + --color-border: light-dark(#e1e3e8, #34373e); + --color-links: light-dark(#b72c34, #ff9298); + --color-links-active: light-dark(#92232a, #ffb3b7); + --color-message-success-text: light-dark(#187348, #7dd9a6); + --color-message-warning-text: light-dark(#855500, #efc16c); + --color-message-error-text: light-dark(#b72c34, #ff9298); + --color-message-info-text: light-dark(#21638c, #87c9ed); + --radius: 0.75rem; + } + body { + background: var(--color-main-bg); + color: var(--color-text); + font: + 1rem/1.6 system-ui, + -apple-system, + BlinkMacSystemFont, + "Segoe UI", + sans-serif; + -webkit-font-smoothing: antialiased; + } + h1, + h2, + h3, + h4, + h5, + h6 { + margin-block-end: 1rem; + line-height: 1.25; + font-weight: 650; + letter-spacing: -0.025em; + text-wrap: balance; + } + h1 { + font-size: clamp(2rem, 4vw, 3rem); + } + h2 { + font-size: clamp(1.75rem, 3vw, 2.25rem); + } + h3 { + font-size: 1.5rem; + } + h4 { + font-size: 1.125rem; + } + h5, + h6 { + font-size: 1rem; + } + p, + ul, + ol, + dl, + blockquote, + pre, + table, + form { + margin-block: 0 1.25rem; + } + ul, + ol { + padding-inline-start: 1.5rem; + } + a { + color: var(--color-links); + text-underline-offset: 0.2em; + &:hover { + color: var(--color-links-active); + } + } + :focus-visible { + outline: 3px solid var(--color-links); + outline-offset: 3px; + } + code, + pre { + font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; + font-size: 0.875em; + } + code { + padding: 0.15em 0.35em; + background: var(--color-main-bg); + border-radius: 0.25rem; + overflow-wrap: anywhere; + } + pre { + overflow: auto; + padding: 1rem; + background: var(--color-main-bg); + border: 1px solid var(--color-border); + border-radius: 0.5rem; + } + pre code { + padding: 0; + } + hr { + border: 0; + border-block-start: 1px solid var(--color-border); + margin-block: 2rem; + } + blockquote { + margin-inline: 0; + padding-inline-start: 1rem; + border-inline-start: 3px solid var(--color-border); + color: var(--color-lightgray); + } + table { + border-collapse: collapse; + inline-size: 100%; + text-align: start; + } + th, + td { + padding: 0.85rem 1rem; + border-block-end: 1px solid var(--color-border); + vertical-align: top; + } + th { + font-weight: 600; + } + thead th { + white-space: nowrap; + } + td { + overflow-wrap: anywhere; + } + tbody tr:hover { + background: color-mix(in srgb, var(--color-text) 3%, transparent); + } + fieldset { + border: 0; + padding: 0; + margin: 0; + min-inline-size: 0; + } + legend { + margin-block-end: 1.25rem; + font-size: 1.5rem; + font-weight: 650; + } + label { + display: block; + margin-block-end: 0.4rem; + font-weight: 600; + font-size: 0.9rem; + } + :where( + input:not( + [type="checkbox"], + [type="radio"], + [type="submit"], + [type="reset"], + [type="button"], + [type="hidden"] + ), + select, + textarea + ) { + display: block; + inline-size: 100%; + min-block-size: 2.75rem; + padding: 0.6rem 0.8rem; + color: var(--color-text); + background: var(--color-surface); + border: 1px solid var(--color-border); + border-radius: 0.4rem; + &:focus { + border-color: var(--color-links); + } + &:disabled { + background: var(--color-main-bg); + color: var(--color-lightgray); + cursor: not-allowed; + } + } + textarea { + min-block-size: 8rem; + resize: vertical; + } + select[multiple] { + min-block-size: 8rem; + } + input:is([type="checkbox"], [type="radio"]) { + accent-color: var(--color-cakephp-red); + inline-size: 1.1rem; + block-size: 1.1rem; + flex-shrink: 0; + } + input[type="color"] { + max-inline-size: 4rem; + padding: 0.25rem; + } + input[type="file"] { + padding: 0.5rem; + } + ::placeholder { + color: var(--color-lightgray); + opacity: 1; + } } -@media screen and (max-width: 640px) { - /* Fix milligram not having a responsive column system */ - .row .column[class*='column-'] { - flex: 0 0 100%; - max-width: 100% +@layer components { + .container, + .top-nav { + inline-size: min(100%, 72rem); + margin-inline: auto; + padding-inline: clamp(1.25rem, 4vw, 2.5rem); + } + .main { + padding-block: 1rem 3rem; } .top-nav { - margin: 0 auto; + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + gap: 1rem; + padding-block: 1.5rem; } - .side-nav { - margin-bottom: 1rem; + .top-nav-title a { + font-weight: 750; + font-size: 1.5rem; + letter-spacing: -0.045em; + text-decoration: none; + } + .top-nav-title span { + color: var(--color-text); + } + .top-nav-links { + display: flex; + flex-wrap: wrap; + gap: 1.25rem; + font-size: 0.875rem; } - .heading { - margin-bottom: 1rem; + .top-nav-links a { + color: var(--color-lightgray); + text-decoration: none; + &:hover { + color: var(--color-links); + } + } + .content { + padding: clamp(1.25rem, 4vw, 2.25rem); + background: var(--color-surface); + border: 1px solid var(--color-border); + border-radius: var(--radius); + box-shadow: 0 0.25rem 1rem color-mix(in srgb, #000 3%, transparent); + & form { + margin-block-end: 0; + } + & > :last-child { + margin-block-end: 0; + } + } + /* Keep the markup produced by Bake usable without a custom Bake theme. */ + .row { + display: flex; + flex-wrap: wrap; + gap: 1.5rem; + } + .column { + flex: 1 1 0; + min-inline-size: 0; + } + .column-80 { + flex: 4 1 0; + } + .column-90 { + flex: 9 1 0; + } + .column-75 { + flex: 3 1 0; + } + .column-66, + .column-67 { + flex: 2 1 0; + } + .column-50 { + flex: 1 1 calc(50% - 0.75rem); + } + .column-33, + .column-34 { + flex: 1 1 calc(33.333% - 1rem); + } + .column-25 { + flex: 1 1 calc(25% - 1.125rem); + } + .side-nav { + padding-block: 1rem; } .side-nav-item { - display: inline; - margin: 0 1.5rem 0 0; + display: block; + padding-block: 0.45rem; + text-decoration: none; + font-size: 0.9rem; + } + .related, + .view.content .text { + margin-block-start: 2rem; + } + .table-responsive { + overflow-x: auto; + max-inline-size: 100%; + & > table { + min-inline-size: 40rem; + } + } + .actions { + white-space: nowrap; + & a + a { + margin-inline-start: 0.65rem; + } + } + .button, + button, + input:is([type="submit"], [type="reset"], [type="button"]) { + display: inline-flex; + align-items: center; + justify-content: center; + gap: 0.75rem; + min-block-size: 2.75rem; + padding: 0.65rem 1.1rem; + border: 1px solid var(--color-cakephp-red); + border-radius: 0.4rem; + background: var(--color-cakephp-red); + color: #fff; + font-size: 0.9rem; + font-weight: 600; + line-height: 1.4; + text-decoration: none; + cursor: pointer; + &:hover { + background: #b72c34; + border-color: #b72c34; + color: #fff; + } + &:disabled, + &[aria-disabled="true"] { + opacity: 0.55; + cursor: not-allowed; + } + &.button-outline { + background: transparent; + color: var(--color-links); + border-color: var(--color-links); + } + &.button-clear { + background: transparent; + color: var(--color-links); + border-color: transparent; + } + &.button-secondary { + background: var(--color-surface); + color: var(--color-text); + border-color: var(--color-border); + &:hover { + border-color: var(--color-links); + } + } + } + .input { + margin-block-end: 1.25rem; + & label:has(input:is([type="checkbox"], [type="radio"])) { + display: flex; + align-items: center; + gap: 0.65rem; + font-weight: 400; + } + &.required > label::after, + &:has(> :is(input, select, textarea)[required]) > label::after { + content: " *"; + color: var(--color-message-error-text); + } + &.error :is(input, select, textarea), + & :is(input, select, textarea)[aria-invalid="true"] { + border-color: var(--color-message-error-text); + } + } + .error-message { + color: var(--color-message-error-text); + font-size: 0.875rem; + margin-block-start: 0.4rem; + } + .message { + --message-color: var(--color-message-info-text); + display: flow-root; + margin-block-end: 1rem; + padding: 0.85rem 1rem; + border: 1px solid color-mix(in srgb, var(--message-color) 35%, var(--color-border)); + border-radius: 0.5rem; + background: color-mix(in srgb, var(--message-color) 8%, var(--color-surface)); + color: var(--message-color); + &.success { + --message-color: var(--color-message-success-text); + } + &.warning { + --message-color: var(--color-message-warning-text); + } + &.error { + --message-color: var(--color-message-error-text); + } + } + .message-dismiss { + float: inline-end; + min-block-size: 1.75rem; + min-inline-size: 1.75rem; + padding: 0; + margin-inline-start: 0.75rem; + border: 0; + background: transparent; + color: inherit; + font-size: 1.25rem; + &:hover { + color: inherit; + background: color-mix(in srgb, currentColor 10%, transparent); + } + } + .paginator { + margin-block-start: 1.5rem; + color: var(--color-lightgray); + font-size: 0.875rem; + text-align: center; + & p { + margin: 0; + } + } + .pagination { + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 0.3rem; + padding: 0; + list-style: none; + & a { + display: block; + min-inline-size: 2.5rem; + padding: 0.5rem 0.7rem; + border: 1px solid var(--color-border); + border-radius: 0.35rem; + text-decoration: none; + } + & li.active a { + background: var(--color-cakephp-red); + color: #fff; + border-color: var(--color-cakephp-red); + } + & li.disabled a { + color: var(--color-lightgray); + cursor: not-allowed; + } + } + .asc::after { + content: " ↓"; + } + .desc::after { + content: " ↑"; + } + .error-container { + display: grid; + place-items: center; + min-block-size: 100svh; + padding: clamp(1.25rem, 5vw, 3rem); + } + .error-content { + inline-size: min(100%, 38rem); + text-align: center; + overflow-wrap: anywhere; + & h1, + & h2 { + font-size: clamp(1.75rem, 4vw, 2.5rem); + } + } + @media (width < 44rem) { + .row { + flex-direction: column; + } + .column { + flex-basis: auto; + inline-size: 100%; + } + .side-nav { + padding-block: 0; + } + .side-nav-item { + display: inline-block; + margin-inline-end: 1rem; + } + } +} + +@layer utilities { + .hidden { + display: none; + } + .float-right { + float: inline-end; + } + .float-left { + float: inline-start; + } + @media (width < 44rem) { + .content > .float-right { + float: none; + margin-block-end: 1rem; + } + } + .clearfix::after { + content: ""; + display: block; + clear: both; + } + .skip-link { + position: absolute; + inset-block-start: 0.5rem; + inset-inline-start: 1rem; + padding: 0.5rem 1rem; + background: var(--color-surface); + transform: translateY(-200%); + z-index: 1; + &:focus { + transform: none; + } } - .asc:after { - content: " \2192"; + @media (prefers-reduced-motion: reduce) { + *, + *::before, + *::after { + scroll-behavior: auto; + } } - .desc:after { - content: " \2190"; + @media (forced-colors: active) { + .content, + .message, + .button, + button, + .pagination a { + border-color: CanvasText; + } } } diff --git a/public/css/fonts.css b/public/css/fonts.css deleted file mode 100644 index 1ba4808f40..0000000000 --- a/public/css/fonts.css +++ /dev/null @@ -1,80 +0,0 @@ -/* cyrillic-ext */ -@font-face { - font-family: 'Raleway'; - font-style: normal; - font-weight: 400; - src: url('../font/raleway-400-cyrillic-ext.woff2') format('woff2'); - unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; -} -/* cyrillic */ -@font-face { - font-family: 'Raleway'; - font-style: normal; - font-weight: 400; - src: url('../font/raleway-400-cyrillic.woff2') format('woff2'); - unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; -} -/* vietnamese */ -@font-face { - font-family: 'Raleway'; - font-style: normal; - font-weight: 400; - src: url('../font/raleway-400-vietnamese.woff2') format('woff2'); - unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB; -} -/* latin-ext */ -@font-face { - font-family: 'Raleway'; - font-style: normal; - font-weight: 400; - src: url('../font/raleway-400-latin-ext.woff2') format('woff2'); - unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; -} -/* latin */ -@font-face { - font-family: 'Raleway'; - font-style: normal; - font-weight: 400; - src: url('../font/raleway-400-latin.woff2') format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; -} -/* cyrillic-ext */ -@font-face { - font-family: 'Raleway'; - font-style: normal; - font-weight: 700; - src: url('../font/raleway-700-cyrillic-ext.woff2') format('woff2'); - unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; -} -/* cyrillic */ -@font-face { - font-family: 'Raleway'; - font-style: normal; - font-weight: 700; - src: url('../font/raleway-700-cyrillic.woff2') format('woff2'); - unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; -} -/* vietnamese */ -@font-face { - font-family: 'Raleway'; - font-style: normal; - font-weight: 700; - src: url('../font/raleway-700-vietnamese.woff2') format('woff2'); - unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB; -} -/* latin-ext */ -@font-face { - font-family: 'Raleway'; - font-style: normal; - font-weight: 700; - src: url('../font/raleway-700-latin-ext.woff2') format('woff2'); - unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; -} -/* latin */ -@font-face { - font-family: 'Raleway'; - font-style: normal; - font-weight: 700; - src: url('../font/raleway-700-latin.woff2') format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; -} diff --git a/public/css/home.css b/public/css/home.css deleted file mode 100644 index 4648ed314d..0000000000 --- a/public/css/home.css +++ /dev/null @@ -1,75 +0,0 @@ -/* Home page styles */ -@font-face { - font-family: 'cakefont'; - src: url('../font/cakedingbats-webfont.eot'); - src: url('../font/cakedingbats-webfont.eot?#iefix') format('embedded-opentype'), - url('../font/cakedingbats-webfont.woff2') format('woff2'), - url('../font/cakedingbats-webfont.woff') format('woff'), - url('../font/cakedingbats-webfont.ttf') format('truetype'), - url('../font/cakedingbats-webfont.svg#cake_dingbatsregular') format('svg'); - font-weight: normal; - font-style: normal; -} -body { - padding: 60px 0; -} -header { - margin-bottom: 60px; -} -img { - margin-bottom: 30px; -} -h1 { - font-weight: bold; -} -ul { - list-style-type: none; - margin: 0 0 30px 0; - padding-left: 25px; -} -a { - color: #0071BC; - text-decoration: underline; -} -hr { - border-bottom: 1px solid #e7e7e7; - border-top: 0; - margin-bottom: 35px; -} - -.text-center { - text-align: center; -} -.links a { - margin-right: 10px; -} -.release-name { - color: #D33C43; - font-weight: 400; - font-style: italic; -} -.bullet:before { - font-family: 'cakefont', sans-serif; - font-size: 18px; - display: inline-block; - margin-left: -1.3em; - width: 1.2em; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - vertical-align: -1px; -} -.success:before { - color: #88c671; - content: "\0056"; -} -.problem:before { - color: #d33d44; - content: "\0057"; -} -.cake-error { - padding: 10px; - margin: 10px 0; -} -#url-rewriting-warning { - display: none; -} diff --git a/public/css/milligram.min.css b/public/css/milligram.min.css deleted file mode 100644 index 958f687da4..0000000000 --- a/public/css/milligram.min.css +++ /dev/null @@ -1,9 +0,0 @@ -/*! - * Milligram v1.4.1 - * https://milligram.io - * - * Copyright (c) 2020 CJ Patoilo - * Licensed under the MIT license - */ - -*,*:after,*:before{box-sizing:inherit}html{box-sizing:border-box;font-size:62.5%}body{color:#606c76;font-family:'Roboto', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;font-size:1.6em;font-weight:300;letter-spacing:.01em;line-height:1.6}blockquote{border-left:0.3rem solid #d1d1d1;margin-left:0;margin-right:0;padding:1rem 1.5rem}blockquote *:last-child{margin-bottom:0}.button,button,input[type='button'],input[type='reset'],input[type='submit']{background-color:#9b4dca;border:0.1rem solid #9b4dca;border-radius:.4rem;color:#fff;cursor:pointer;display:inline-block;font-size:1.1rem;font-weight:700;height:3.8rem;letter-spacing:.1rem;line-height:3.8rem;padding:0 3.0rem;text-align:center;text-decoration:none;text-transform:uppercase;white-space:nowrap}.button:focus,.button:hover,button:focus,button:hover,input[type='button']:focus,input[type='button']:hover,input[type='reset']:focus,input[type='reset']:hover,input[type='submit']:focus,input[type='submit']:hover{background-color:#606c76;border-color:#606c76;color:#fff;outline:0}.button[disabled],button[disabled],input[type='button'][disabled],input[type='reset'][disabled],input[type='submit'][disabled]{cursor:default;opacity:.5}.button[disabled]:focus,.button[disabled]:hover,button[disabled]:focus,button[disabled]:hover,input[type='button'][disabled]:focus,input[type='button'][disabled]:hover,input[type='reset'][disabled]:focus,input[type='reset'][disabled]:hover,input[type='submit'][disabled]:focus,input[type='submit'][disabled]:hover{background-color:#9b4dca;border-color:#9b4dca}.button.button-outline,button.button-outline,input[type='button'].button-outline,input[type='reset'].button-outline,input[type='submit'].button-outline{background-color:transparent;color:#9b4dca}.button.button-outline:focus,.button.button-outline:hover,button.button-outline:focus,button.button-outline:hover,input[type='button'].button-outline:focus,input[type='button'].button-outline:hover,input[type='reset'].button-outline:focus,input[type='reset'].button-outline:hover,input[type='submit'].button-outline:focus,input[type='submit'].button-outline:hover{background-color:transparent;border-color:#606c76;color:#606c76}.button.button-outline[disabled]:focus,.button.button-outline[disabled]:hover,button.button-outline[disabled]:focus,button.button-outline[disabled]:hover,input[type='button'].button-outline[disabled]:focus,input[type='button'].button-outline[disabled]:hover,input[type='reset'].button-outline[disabled]:focus,input[type='reset'].button-outline[disabled]:hover,input[type='submit'].button-outline[disabled]:focus,input[type='submit'].button-outline[disabled]:hover{border-color:inherit;color:#9b4dca}.button.button-clear,button.button-clear,input[type='button'].button-clear,input[type='reset'].button-clear,input[type='submit'].button-clear{background-color:transparent;border-color:transparent;color:#9b4dca}.button.button-clear:focus,.button.button-clear:hover,button.button-clear:focus,button.button-clear:hover,input[type='button'].button-clear:focus,input[type='button'].button-clear:hover,input[type='reset'].button-clear:focus,input[type='reset'].button-clear:hover,input[type='submit'].button-clear:focus,input[type='submit'].button-clear:hover{background-color:transparent;border-color:transparent;color:#606c76}.button.button-clear[disabled]:focus,.button.button-clear[disabled]:hover,button.button-clear[disabled]:focus,button.button-clear[disabled]:hover,input[type='button'].button-clear[disabled]:focus,input[type='button'].button-clear[disabled]:hover,input[type='reset'].button-clear[disabled]:focus,input[type='reset'].button-clear[disabled]:hover,input[type='submit'].button-clear[disabled]:focus,input[type='submit'].button-clear[disabled]:hover{color:#9b4dca}code{background:#f4f5f6;border-radius:.4rem;font-size:86%;margin:0 .2rem;padding:.2rem .5rem;white-space:nowrap}pre{background:#f4f5f6;border-left:0.3rem solid #9b4dca;overflow-y:hidden}pre>code{border-radius:0;display:block;padding:1rem 1.5rem;white-space:pre}hr{border:0;border-top:0.1rem solid #f4f5f6;margin:3.0rem 0}input[type='color'],input[type='date'],input[type='datetime'],input[type='datetime-local'],input[type='email'],input[type='month'],input[type='number'],input[type='password'],input[type='search'],input[type='tel'],input[type='text'],input[type='url'],input[type='week'],input:not([type]),textarea,select{-webkit-appearance:none;background-color:transparent;border:0.1rem solid #d1d1d1;border-radius:.4rem;box-shadow:none;box-sizing:inherit;height:3.8rem;padding:.6rem 1.0rem .7rem;width:100%}input[type='color']:focus,input[type='date']:focus,input[type='datetime']:focus,input[type='datetime-local']:focus,input[type='email']:focus,input[type='month']:focus,input[type='number']:focus,input[type='password']:focus,input[type='search']:focus,input[type='tel']:focus,input[type='text']:focus,input[type='url']:focus,input[type='week']:focus,input:not([type]):focus,textarea:focus,select:focus{border-color:#9b4dca;outline:0}select{background:url('data:image/svg+xml;utf8,') center right no-repeat;padding-right:3.0rem}select:focus{background-image:url('data:image/svg+xml;utf8,')}select[multiple]{background:none;height:auto}textarea{min-height:6.5rem}label,legend{display:block;font-size:1.6rem;font-weight:700;margin-bottom:.5rem}fieldset{border-width:0;padding:0}input[type='checkbox'],input[type='radio']{display:inline}.label-inline{display:inline-block;font-weight:normal;margin-left:.5rem}.container{margin:0 auto;max-width:112.0rem;padding:0 2.0rem;position:relative;width:100%}.row{display:flex;flex-direction:column;padding:0;width:100%}.row.row-no-padding{padding:0}.row.row-no-padding>.column{padding:0}.row.row-wrap{flex-wrap:wrap}.row.row-top{align-items:flex-start}.row.row-bottom{align-items:flex-end}.row.row-center{align-items:center}.row.row-stretch{align-items:stretch}.row.row-baseline{align-items:baseline}.row .column{display:block;flex:1 1 auto;margin-left:0;max-width:100%;width:100%}.row .column.column-offset-10{margin-left:10%}.row .column.column-offset-20{margin-left:20%}.row .column.column-offset-25{margin-left:25%}.row .column.column-offset-33,.row .column.column-offset-34{margin-left:33.3333%}.row .column.column-offset-40{margin-left:40%}.row .column.column-offset-50{margin-left:50%}.row .column.column-offset-60{margin-left:60%}.row .column.column-offset-66,.row .column.column-offset-67{margin-left:66.6666%}.row .column.column-offset-75{margin-left:75%}.row .column.column-offset-80{margin-left:80%}.row .column.column-offset-90{margin-left:90%}.row .column.column-10{flex:0 0 10%;max-width:10%}.row .column.column-20{flex:0 0 20%;max-width:20%}.row .column.column-25{flex:0 0 25%;max-width:25%}.row .column.column-33,.row .column.column-34{flex:0 0 33.3333%;max-width:33.3333%}.row .column.column-40{flex:0 0 40%;max-width:40%}.row .column.column-50{flex:0 0 50%;max-width:50%}.row .column.column-60{flex:0 0 60%;max-width:60%}.row .column.column-66,.row .column.column-67{flex:0 0 66.6666%;max-width:66.6666%}.row .column.column-75{flex:0 0 75%;max-width:75%}.row .column.column-80{flex:0 0 80%;max-width:80%}.row .column.column-90{flex:0 0 90%;max-width:90%}.row .column .column-top{align-self:flex-start}.row .column .column-bottom{align-self:flex-end}.row .column .column-center{align-self:center}@media (min-width: 40rem){.row{flex-direction:row;margin-left:-1.0rem;width:calc(100% + 2.0rem)}.row .column{margin-bottom:inherit;padding:0 1.0rem}}a{color:#9b4dca;text-decoration:none}a:focus,a:hover{color:#606c76}dl,ol,ul{list-style:none;margin-top:0;padding-left:0}dl dl,dl ol,dl ul,ol dl,ol ol,ol ul,ul dl,ul ol,ul ul{font-size:90%;margin:1.5rem 0 1.5rem 3.0rem}ol{list-style:decimal inside}ul{list-style:circle inside}.button,button,dd,dt,li{margin-bottom:1.0rem}fieldset,input,select,textarea{margin-bottom:1.5rem}blockquote,dl,figure,form,ol,p,pre,table,ul{margin-bottom:2.5rem}table{border-spacing:0;overflow-x:auto;text-align:left;width:100%}td,th{border-bottom:0.1rem solid #e1e1e1;padding:1.2rem 1.5rem}td:first-child,th:first-child{padding-left:0}td:last-child,th:last-child{padding-right:0}@media (min-width: 40rem){table{display:table;overflow-x:initial}}b,strong{font-weight:bold}p{margin-top:0}h1,h2,h3,h4,h5,h6{font-weight:300;letter-spacing:-.1rem;margin-bottom:2.0rem;margin-top:0}h1{font-size:4.6rem;line-height:1.2}h2{font-size:3.6rem;line-height:1.25}h3{font-size:2.8rem;line-height:1.3}h4{font-size:2.2rem;letter-spacing:-.08rem;line-height:1.35}h5{font-size:1.8rem;letter-spacing:-.05rem;line-height:1.5}h6{font-size:1.6rem;letter-spacing:0;line-height:1.4}img{max-width:100%}.clearfix:after{clear:both;content:' ';display:table}.float-left{float:left}.float-right{float:right} diff --git a/public/css/normalize.min.css b/public/css/normalize.min.css deleted file mode 100644 index bde07fcb52..0000000000 --- a/public/css/normalize.min.css +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Minified by jsDelivr using clean-css v4.2.1. - * Original file: /npm/normalize.css@8.0.1/normalize.css - * - * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files - */ -/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ -html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none} diff --git a/public/font/Raleway-License.txt b/public/font/Raleway-License.txt deleted file mode 100644 index 94dce24495..0000000000 --- a/public/font/Raleway-License.txt +++ /dev/null @@ -1,51 +0,0 @@ -License for 'Raleway' -SIL Open Font License -Copyright (c) 2010, Matt McInerney (matt@pixelspread.com), -Copyright (c) 2011, Pablo Impallari (www.impallari.com|impallari@gmail.com), -Copyright (c) 2011, Rodrigo Fuenzalida (www.rfuenzalida.com|hello@rfuenzalida.com), with Reserved Font Name Raleway - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL - -—————————————————————————————- -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 -—————————————————————————————- - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. - -The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. - -DEFINITIONS -“Font Software” refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. - -“Reserved Font Name” refers to any names specified as such after the copyright statement(s). - -“Original Version” refers to the collection of Font Software components as distributed by the Copyright Holder(s). - -“Modified Version” refers to any derivative made by adding to, deleting, or substituting—in part or in whole—any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. - -“Author” refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. - -5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/public/font/cakedingbats-webfont.eot b/public/font/cakedingbats-webfont.eot deleted file mode 100644 index e8605d9268..0000000000 Binary files a/public/font/cakedingbats-webfont.eot and /dev/null differ diff --git a/public/font/cakedingbats-webfont.svg b/public/font/cakedingbats-webfont.svg deleted file mode 100644 index d1e0c98f7a..0000000000 --- a/public/font/cakedingbats-webfont.svg +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/font/cakedingbats-webfont.ttf b/public/font/cakedingbats-webfont.ttf deleted file mode 100644 index 13d54454e7..0000000000 Binary files a/public/font/cakedingbats-webfont.ttf and /dev/null differ diff --git a/public/font/cakedingbats-webfont.woff b/public/font/cakedingbats-webfont.woff deleted file mode 100644 index 073baab113..0000000000 Binary files a/public/font/cakedingbats-webfont.woff and /dev/null differ diff --git a/public/font/cakedingbats-webfont.woff2 b/public/font/cakedingbats-webfont.woff2 deleted file mode 100644 index 6e71eaf53e..0000000000 Binary files a/public/font/cakedingbats-webfont.woff2 and /dev/null differ diff --git a/public/font/raleway-400-cyrillic-ext.woff2 b/public/font/raleway-400-cyrillic-ext.woff2 deleted file mode 100644 index 039269ecd6..0000000000 Binary files a/public/font/raleway-400-cyrillic-ext.woff2 and /dev/null differ diff --git a/public/font/raleway-400-cyrillic.woff2 b/public/font/raleway-400-cyrillic.woff2 deleted file mode 100644 index 48b9d896c2..0000000000 Binary files a/public/font/raleway-400-cyrillic.woff2 and /dev/null differ diff --git a/public/font/raleway-400-latin-ext.woff2 b/public/font/raleway-400-latin-ext.woff2 deleted file mode 100644 index 0eedc5bb67..0000000000 Binary files a/public/font/raleway-400-latin-ext.woff2 and /dev/null differ diff --git a/public/font/raleway-400-latin.woff2 b/public/font/raleway-400-latin.woff2 deleted file mode 100644 index d0e6f01908..0000000000 Binary files a/public/font/raleway-400-latin.woff2 and /dev/null differ diff --git a/public/font/raleway-400-vietnamese.woff2 b/public/font/raleway-400-vietnamese.woff2 deleted file mode 100644 index 405fb25048..0000000000 Binary files a/public/font/raleway-400-vietnamese.woff2 and /dev/null differ diff --git a/public/font/raleway-700-cyrillic-ext.woff2 b/public/font/raleway-700-cyrillic-ext.woff2 deleted file mode 100644 index 039269ecd6..0000000000 Binary files a/public/font/raleway-700-cyrillic-ext.woff2 and /dev/null differ diff --git a/public/font/raleway-700-cyrillic.woff2 b/public/font/raleway-700-cyrillic.woff2 deleted file mode 100644 index 48b9d896c2..0000000000 Binary files a/public/font/raleway-700-cyrillic.woff2 and /dev/null differ diff --git a/public/font/raleway-700-latin-ext.woff2 b/public/font/raleway-700-latin-ext.woff2 deleted file mode 100644 index 0eedc5bb67..0000000000 Binary files a/public/font/raleway-700-latin-ext.woff2 and /dev/null differ diff --git a/public/font/raleway-700-latin.woff2 b/public/font/raleway-700-latin.woff2 deleted file mode 100644 index d0e6f01908..0000000000 Binary files a/public/font/raleway-700-latin.woff2 and /dev/null differ diff --git a/public/font/raleway-700-vietnamese.woff2 b/public/font/raleway-700-vietnamese.woff2 deleted file mode 100644 index 405fb25048..0000000000 Binary files a/public/font/raleway-700-vietnamese.woff2 and /dev/null differ diff --git a/templates/Pages/home.php b/templates/Pages/home.php index 3eb308333d..042ab36d15 100644 --- a/templates/Pages/home.php +++ b/templates/Pages/home.php @@ -22,227 +22,621 @@ $this->disableAutoLayout(); -$checkConnection = function (string $name) { - $error = null; - $connected = false; +if (!Configure::read('debug')) { + throw new NotFoundException( + 'Please replace templates/Pages/home.php with your own version or re-enable debug mode.', + ); +} + +$check = static function (string $label, string $status, string $detail, ?string $error = null): array { + return compact('label', 'status', 'detail', 'error'); +}; +$checkConnection = static function (string $name): array { try { ConnectionManager::get($name)->getDriver()->connect(); - // No exception means success - $connected = true; - } catch (Exception $connectionError) { - $error = $connectionError->getMessage(); - if (method_exists($connectionError, 'getAttributes')) { - $attributes = $connectionError->getAttributes(); - if (isset($attributes['message'])) { - $error .= '
' . $attributes['message']; - } - } - if ($name === 'debug_kit') { - $error = 'Try adding your current top level domain to the - DebugKit.safeTld - config and reload.'; - if (!in_array('sqlite', \PDO::getAvailableDrivers())) { - $error .= '
You need to install the PHP extension pdo_sqlite so DebugKit can work properly.'; + + return ['connected' => true, 'error' => null]; + } catch (Throwable $exception) { + $error = $exception->getMessage(); + if (method_exists($exception, 'getAttributes')) { + $attributes = $exception->getAttributes(); + if (isset($attributes['message']) && is_string($attributes['message'])) { + $error .= "\n" . $attributes['message']; } } - } - return compact('connected', 'error'); + return ['connected' => false, 'error' => $error]; + } }; +$cacheCheck = static function (string $name, string $label) use ($check): array { + $settings = Cache::getConfig($name); -if (!Configure::read('debug')) : - throw new NotFoundException( - 'Please replace templates/Pages/home.php with your own version or re-enable debug mode.' + return $check( + $label, + $settings ? 'success' : 'error', + $settings ? $settings['className'] . ' engine configured.' : 'Configure this cache in config/app.php.', ); -endif; +}; + +$environment = [ + $check('PHP', version_compare(PHP_VERSION, '8.5.0', '>=') ? 'success' : 'error', + PHP_VERSION . ' detected. PHP 8.5.0 or higher required.'), +]; +foreach (['mbstring', 'openssl', 'intl'] as $extension) { + $loaded = extension_loaded($extension); + $environment[] = $check($extension, $loaded ? 'success' : 'error', + $loaded ? 'Extension loaded.' : 'Install and enable this PHP extension.'); +} +$environment[] = $check('Development assertions', ini_get('zend.assertions') === '1' ? 'success' : 'warning', + ini_get('zend.assertions') === '1' ? 'zend.assertions is enabled.' : 'Set zend.assertions to 1 in your php.ini.'); +$filesystem = []; +foreach (['tmp' => TMP, 'logs' => LOGS] as $directory => $path) { + $writable = is_writable($path); + $filesystem[] = $check($directory . ' directory', $writable ? 'success' : 'error', + $writable ? 'Writable.' : 'Give your web server write access to this directory.'); +} +$filesystem[] = $cacheCheck('_cake_translations_', 'Translations cache'); + +$connection = $checkConnection('default'); +$database = [ + $check('Default connection', $connection['connected'] ? 'success' : 'error', + $connection['connected'] ? 'Connected to your database.' : 'Check Datasources in config/app_local.php.', + $connection['error']), + $cacheCheck('_cake_model_', 'Schema cache'), +]; + +$debugKitLoaded = Plugin::isLoaded('DebugKit'); +$debugKit = [$check('Plugin', $debugKitLoaded ? 'success' : 'warning', + $debugKitLoaded ? 'Loaded for development.' : 'Optional. Enable DebugKit in config/plugins.php.')]; +if ($debugKitLoaded) { + $connection = $checkConnection('debug_kit'); + $debugKit[] = $check('DebugKit connection', $connection['connected'] ? 'success' : 'error', + $connection['connected'] ? 'Connected to its database.' : 'Check the DebugKit database configuration.', + $connection['error']); + if (!$connection['connected'] && !in_array('sqlite', PDO::getAvailableDrivers(), true)) { + $debugKit[] = $check('SQLite driver', 'warning', 'Install pdo_sqlite to use the default DebugKit database.'); + } +} + +$sections = [ + 'environment' => ['title' => 'Environment', 'description' => 'Your PHP runtime and extensions.', 'checks' => $environment], + 'filesystem' => ['title' => 'Filesystem', 'description' => 'Writable directories and translation caching.', 'checks' => $filesystem], + 'database' => ['title' => 'Database', 'description' => 'Your application connection and schema cache.', 'checks' => $database], + 'debugkit' => ['title' => 'DebugKit', 'description' => 'A closer look at your application while you build.', 'checks' => $debugKit], +]; +$statusLabels = ['success' => 'Passed', 'warning' => 'Review', 'error' => 'Failed']; +$resourceGroups = [ + 'Community' => [ + ['Forum', 'https://discourse.cakephp.org/'], + ['Slack', 'https://slack-invite.cakephp.org/'], + ['Discord', 'https://discord.com/invite/k4trEMPebj'], + ['Report an issue', 'https://github.com/cakephp/cakephp/issues'], + ], + 'Ecosystem' => [ + ['Plugins', 'https://plugins.cakephp.org/'], + ['Source code', 'https://github.com/cakephp/'], + ['Awesome CakePHP', 'https://github.com/FriendsOfCake/awesome-cakephp'], + ['Cake Software Foundation', 'https://cakefoundation.org/'], + ], +]; ?> - + Html->charset() ?> - - CakePHP: the rapid development PHP framework: - <?= $this->fetch('title') ?> - + + <?= $this->fetch('title') ?: 'Welcome to CakePHP ' . h(Configure::version()) ?> Html->meta('icon') ?> - - Html->css(['normalize.min', 'milligram.min', 'fonts', 'cake', 'home']) ?> - + Html->css('cake') ?> + fetch('meta') ?> fetch('css') ?> fetch('script') ?> - -
-
- - CakePHP - -

- Welcome to CakePHP (🍰) -

-
-
-
-
-
-
-
-
- Please be aware that this page will not be shown if you turn off debug mode unless you replace templates/Pages/home.php with your own version. -
-
- -
- + + + +
+
+
+
+ CakePHP +

Welcome to CakePHP 6

+

A fresh start for your next idea. Everything you need to build a powerful application, with conventions that keep you moving.

+
-
-
-

Environment

-
    - =')) : ?> -
  • Your version of PHP is 8.5.0 or higher (detected ).
  • - -
  • Your version of PHP is too low. You need PHP 8.5.0 or higher to use CakePHP (detected ).
  • - - - -
  • Your version of PHP has the mbstring extension loaded.
  • - -
  • Your version of PHP does NOT have the mbstring extension loaded.
  • - - - -
  • Your version of PHP has the openssl extension loaded.
  • - -
  • Your version of PHP does NOT have the openssl extension loaded.
  • - - - -
  • Your version of PHP has the intl extension loaded.
  • - -
  • Your version of PHP does NOT have the intl extension loaded.
  • - - - -
  • You should set zend.assertions to 1 in your php.ini for your development environment.
  • - -
-
-
-

Filesystem

-
    - -
  • Your tmp directory is writable.
  • - -
  • Your tmp directory is NOT writable.
  • - - - -
  • Your logs directory is writable.
  • - -
  • Your logs directory is NOT writable.
  • - - - - -
  • The engine is being used for translations caching. To change the config edit config/app.php
  • - -
  • Your translations cache is NOT working. Please check the settings in config/app.php
  • - -
-
+ -
-
-
-

Database

- -
    - -
  • CakePHP is able to connect to the database.
  • - -
  • CakePHP is NOT able to connect to the database.
  • - - - - -
  • The engine is being used for database schema caching. To change the config edit config/app.php
  • - -
  • Your database schema cache is NOT working. Please check the settings in config/app.php
  • - +
+
+
+

Your development setup

+

A few checks before you get started.

+
+
+ $section) : ?> +
+

+

+
    + +
  • + + + + + +

    + +
    + Connection details +
    +
    + +
  • +
-
-
-

DebugKit

-
    - -
  • DebugKit is loaded.
  • - - -
  • DebugKit can connect to the database.
  • - -
  • There are configuration problems present which need to be fixed:
  • - - -
  • DebugKit is not loaded.
  • + +

    Toolbar not showing? Check DebugKit configuration, including DebugKit.safeTld.

    -
-
+
+
-
-
- + + + +
+ + diff --git a/templates/element/flash/default.php b/templates/element/flash/default.php index 061c700920..f6f9b77d2b 100644 --- a/templates/element/flash/default.php +++ b/templates/element/flash/default.php @@ -12,4 +12,7 @@ $message = h($message); } ?> -
+
+ + +
diff --git a/templates/element/flash/error.php b/templates/element/flash/error.php index 2ebf2357c0..90e7424dd6 100644 --- a/templates/element/flash/error.php +++ b/templates/element/flash/error.php @@ -8,4 +8,7 @@ $message = h($message); } ?> -
+ diff --git a/templates/element/flash/info.php b/templates/element/flash/info.php index e25b730c4f..602019b8fb 100644 --- a/templates/element/flash/info.php +++ b/templates/element/flash/info.php @@ -8,4 +8,7 @@ $message = h($message); } ?> -
+
+ + +
diff --git a/templates/element/flash/success.php b/templates/element/flash/success.php index 73eaac48d3..53840253a2 100644 --- a/templates/element/flash/success.php +++ b/templates/element/flash/success.php @@ -8,4 +8,7 @@ $message = h($message); } ?> -
+
+ + +
diff --git a/templates/element/flash/warning.php b/templates/element/flash/warning.php index 605537c7e2..e1d1fa075a 100644 --- a/templates/element/flash/warning.php +++ b/templates/element/flash/warning.php @@ -8,4 +8,7 @@ $message = h($message); } ?> -
+
+ + +
diff --git a/templates/layout/default.php b/templates/layout/default.php index 3a3e3d9ff5..fc4a3b14e9 100644 --- a/templates/layout/default.php +++ b/templates/layout/default.php @@ -17,24 +17,26 @@ $cakeDescription = 'CakePHP: the rapid development php framework'; ?> - + Html->charset() ?> + <?= $cakeDescription ?>: <?= $this->fetch('title') ?> Html->meta('icon') ?> - Html->css(['normalize.min', 'milligram.min', 'fonts', 'cake']) ?> + Html->css('cake') ?> fetch('meta') ?> fetch('css') ?> fetch('script') ?> -