diff --git a/app/FileAndDir.php b/app/FileAndDir.php index cd24b09..f2acc51 100644 --- a/app/FileAndDir.php +++ b/app/FileAndDir.php @@ -6,6 +6,7 @@ use League\CommonMark\Environment\Environment; use League\CommonMark\Extension\Autolink\AutolinkExtension; use League\CommonMark\Extension\CommonMark\CommonMarkCoreExtension; use League\CommonMark\Extension\TaskList\TaskListExtension; +use League\CommonMark\Extension\Table\TableExtension; use League\CommonMark\MarkdownConverter; use Utils\Utils; @@ -396,6 +397,7 @@ class FileAndDir { $environment->addExtension(new CommonMarkCoreExtension()); $environment->addExtension(new TaskListExtension()); $environment->addExtension(new AutolinkExtension()); + $environment->addExtension(new TableExtension()); $converter = new MarkdownConverter($environment); return $converter->convert($content)->getContent(); } else { @@ -452,6 +454,7 @@ class FileAndDir { $environment->addExtension(new CommonMarkCoreExtension()); $environment->addExtension(new TaskListExtension()); $environment->addExtension(new AutolinkExtension()); + $environment->addExtension(new TableExtension()); $converter = new MarkdownConverter($environment); if (!empty($exifData)) { diff --git a/public/templates/default/default.css b/public/templates/default/default.css index 75d92bb..7369213 100644 --- a/public/templates/default/default.css +++ b/public/templates/default/default.css @@ -1,7 +1,100 @@ -* { +/* RESET CSS BY Piccalil.li */ +/* https://piccalil.li/blog/a-more-modern-css-reset/ */ +/* License https://creativecommons.org/licenses/by/3.0/ */ + + +/* Box sizing rules */ +*, +*::before, +*::after { box-sizing: border-box; } +/* Prevent font size inflation */ +html { + -moz-text-size-adjust: none; + -webkit-text-size-adjust: none; + text-size-adjust: none; +} + +/* Remove default margin in favour of better control in authored CSS */ +body, +h1, +h2, +h3, +h4, +p, +figure, +blockquote, +dl, +dd { + margin-block-end: 0; +} + +/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */ +ul[role='list'], +ol[role='list'] { + list-style: none; +} + +/* Set core body defaults */ +body { + min-height: 100vh; + line-height: 1.5; +} + +/* Set shorter line heights on headings and interactive elements */ +h1, +h2, +h3, +h4, +h4, +h5, +h6, +button, +input, +label { + line-height: 1.1; +} + +/* Balance text wrapping on headings */ +h1, +h2, +h3, +h4, +h5, +h6 { + text-wrap: balance; + margin: calc(var(--default-space)*2) 0; +} + +/* Make images easier to work with */ +/*img, +picture { + max-width: 100%; + display: block; +}*/ + +/* Inherit fonts for inputs and buttons */ +input, +button, +textarea, +select { + font-family: inherit; + font-size: inherit; +} + +/* Make sure textareas without a rows attribute are not tiny */ +textarea:not([rows]) { + min-height: 10em; +} + +/* Anything that has been anchored to should have extra scroll margin */ +:target { + scroll-margin-block: 5ex; +} + + html { scroll-behavior: smooth; } @@ -105,6 +198,11 @@ a:not(.card-content):hover { text-decoration-thickness: var(--default-space); } +p, +.gslide-description p { + margin: calc(var(--default-space) /1.5) 0; +} + #logo-border-color { fill: var(--primary) !important; stroke: none !important; @@ -121,16 +219,6 @@ a:not(.card-content):hover { stroke: #000 !important; } -aside { - color: var(--light-text-color); - background-color: var(--light-background-color); - padding: calc(var(--default-space) * 2); - border: 1px solid var(--background-color-darken); - border-radius: calc(var(--default-space) * 1.2); - margin: 0 0 calc(var(--default-space) *5) 0; - box-shadow: var(--box-shadow-light); -} - main, .message { max-width: 100%; @@ -152,28 +240,8 @@ img { border: none; } -body>nav { - text-align: center; -} - -aside { - padding-bottom: 0.3em; -} - -aside a { - color: var(--primary); - text-decoration: none; -} - -aside * { - margin: .2em 0; -} - +article, section { - display: flex; - flex-wrap: wrap; - justify-content: space-around; - gap: var(--default-space); color: var(--light-text-color); background-color: var(--light-background-color); padding: calc(var(--default-space) * 2); @@ -183,7 +251,14 @@ section { box-shadow: var(--box-shadow-light); } -article { +section { + display: flex; + flex-wrap: wrap; + justify-content: space-around; + gap: var(--default-space); +} + +figure { background-color: var(--light-background-color); display: grid; grid-template-columns: repeat(1, 1fr); @@ -194,15 +269,15 @@ article { width: min-content; } -article a { +figure a { display: flex; } -.card-footer { +figcaption { color: var(--header-text-color); margin: 0; overflow: hidden; - padding: .3em .6em; + padding: 0; text-align: center; text-overflow: ellipsis; white-space: nowrap; diff --git a/public/templates/default/default.php b/public/templates/default/default.php index 389cf06..66671a3 100644 --- a/public/templates/default/default.php +++ b/public/templates/default/default.php @@ -81,38 +81,40 @@ use App\FileAndDir; + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ +
-
- - - - - - - - -
- -
- -
-
-
+
-
-

+
-
+