From 6424e10be5a89f175a74c71c55660412a169b8b8 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Tue, 23 Jun 2026 18:04:37 +0200 Subject: Update deployed state to what's currently running --- public/javascripts/public.js | 9 +- public/stylesheets/admin.css | 202 ++++++++++++++++++------ public/stylesheets/ccc.css | 363 +++++++++++++++++++++++++++++++------------ 3 files changed, 429 insertions(+), 145 deletions(-) (limited to 'public') diff --git a/public/javascripts/public.js b/public/javascripts/public.js index 0919360..10f04e8 100644 --- a/public/javascripts/public.js +++ b/public/javascripts/public.js @@ -18,6 +18,13 @@ $(document).ready(function(){ $("div#headline_image a img").bind("click", function(){ $(".shadowbox_image:first").trigger("click"); }); + + document.getElementById("light-mode").addEventListener("change", () => { + if (document.getElementById("light-mode").checked) + localStorage.setItem("override-prefers-color-scheme", 1); + else + localStorage.removeItem("override-prefers-color-scheme"); + }); }); @@ -38,4 +45,4 @@ var image_handler = { path = path_name.replace(/\/(de|en)*\/*/, ""); gallery_path = ""; } -}; \ No newline at end of file +}; diff --git a/public/stylesheets/admin.css b/public/stylesheets/admin.css index c7ebb52..7031f77 100644 --- a/public/stylesheets/admin.css +++ b/public/stylesheets/admin.css @@ -2,7 +2,7 @@ body { font-family: Helvetica, Arial, sans-serif; - font-size: 12px; + font-size: 1rem; margin: 0px; } @@ -19,15 +19,25 @@ th { text-transform: lowercase; } +#metadata, #content { margin-left: 5px; } +@media(min-width:1016px) { +#wrapper { + margin: 0 125px; +} +} +@media(max-width:1015px) { #wrapper { - margin-left: 125px; - width: 899px; + margin: 0; + width: 100%; + box-sizing: border-box; +} } + #flash { height: 12px; line-height: 20px; @@ -110,16 +120,24 @@ input[type=submit], margin-bottom: 2rem; } -#admin_wizard a { +#page_submit a, +.admin_wizard_button a { + color: white !important; +} + +#page_submit, +.admin_wizard_button { + display: inline-block; font-size: 1rem; font-weight: bold; padding: 0.5rem; + margin-bottom: 0.5rem; background-color: green; - color: white; } -#admin_wizard a:hover { - background-color: lime; +#page_submit:hover, +.admin_wizard_button:hover { + background-color: lime !important; } #sub_navigation a { @@ -144,21 +162,27 @@ input[type=submit], /* Nodes */ table.node_table { - width: 899px; border-collapse: collapse; } table.node_table tr { - height: 65px; + min-height: 2rem; border-bottom: 1px solid #000000; } +table.node_table th.node_id, +table.node_table th.revision, table.node_table th.title { - width: 450px; + min-width: 4rem; +} + +table.node_table th.editor, +table.node_table th.title { + min-width: 12rem; } table.node_table tr.header { - height: 20px; + height: 2rem; text-align: left; } @@ -167,6 +191,7 @@ table.node_table td { padding-bottom: 0px; padding-right: 25px; padding-left: 0px; + min-width: 2rem; } table.node_table .node_id { @@ -232,31 +257,19 @@ table#revisions tr { /* Page Editor */ input[type=text], textarea { - font-size: 12px; + font-size: 1rem; font-family: Helvetica; border: 1px solid #989898; } select { - font-size: 12px; + font-size: 1rem; border: 1px solid #989898; } -input[type=text]#page_title { - width: 690px; - font-size: 14px; - padding-top: 6px; - padding-bottom: 4px; - padding-left: 5px; - padding-right: 5px; - font-weight: bold; -} - -input[type=text]#tag_list { - padding: 5px; -} - -input[type=text]#node_slug { +input[type=text]#tag_list, +input[type=text]#node_staged_slug, +input#move_to_search_term { padding: 5px; } @@ -285,6 +298,24 @@ div#login_form input[type=text], div#login_form input[type=password] { width: 150px; } + +@media(min-width:1016px) { +input#tag_list, +input#node_staged_slug, +input#move_to_search_term { + width: 690px; +} + +input[type=text]#page_title { + width: 690px; + font-size: 1rem; + padding-top: 6px; + padding-bottom: 4px; + padding-left: 5px; + padding-right: 5px; + font-weight: bold; +} + textarea#page_abstract { width: 690px; height: 150px; @@ -300,6 +331,56 @@ textarea#page_abstract { margin-left: -125px; } +} + +/* Mobile */ +@media(max-width:1015px) { +input#tag_list, +input#node_staged_slug, +input#move_to_search_term { + box-sizing: border-box; + width: 100%; +} + +#page_editor #content, +#page_editor #metadata { + padding-right: 5px; +} + +#page_editor textarea#page_body { + box-sizing: border-box; + width: 800px; + height: 50rem; +} + +#page_editor textarea#page_abstract { + box-sizing: border-box; + height: 8rem; + width: 100%; +} + +input[type=text]#page_title { + box-sizing: border-box; + width: 100%; + font-size: 2rem; + padding-top: 6px; + padding-bottom: 4px; + padding-left: 5px; + font-weight: bold; +} + +input[type=text], textarea { + font-size: 1.5rem; +} +select { + font-size: 1.5rem; +} + +#metadata ul#image_box { + width: 100% !important; +} +} + #new_node { margin-left: -118px; } @@ -316,14 +397,38 @@ td { padding-right: 10px; } -td.description { - width: 100px; +@media(min-width:1016px) { +div.node_description { + float: left; + width: 110px; + min-height: 2rem; text-align: right; text-transform: lowercase; - letter-spacing: 1px; vertical-align: top; } +div.node_content { + margin-left: 120px; + min-height: 2rem; + display: block; + margin-bottom: 1rem; +} +} +@media(max-width:1015px) { +div.node_description { + min-height: 2rem; + width: 30em; + text-transform: lowercase; + vertical-align: top; +} + +div.node_content { + min-height: 2rem; + margin-bottom: 1rem; +} + +} + div#page_editor { margin-top: 0px; margin-left: 10px; @@ -401,6 +506,10 @@ table#content th.content { #menu_item_list { border-collapse: collapse; + padding: 5px 5px 5px 5px; + border: solid 5px lightgrey; + background-color: lightgrey; + border-radius: 5px; } #menu_item_list tr:hover { @@ -413,16 +522,24 @@ table#content th.content { #menu_item_list td.menu_sort_handle div { background-color: #989898; - height: 10px; - width: 10px; + height: 26px; + width: 26px; +} + +#menu_item_list td.menu_sort_handle div:before { + content: "⇳"; + font-size: 20px; + font-weight: bold; + text-align: center; + vertical-align: center; } #menu_item_list td.menu_sort_handle div:hover { - cursor: move; + cursor: grab; } #menu_item_list td.menu_item_title { - width: 100px; + width: 200px; } .ui-state-highlight td{ @@ -430,12 +547,11 @@ table#content th.content { } #metadata ul#image_box { + box-sizing: border-box; margin: 0; - padding-left: 0; + padding: 10px 5px 10px 5px; height: 100px; - width: 690px; - padding-top: 10px; - padding-bottom: 10px; + width: 702px; border: 1px solid #989898; } @@ -455,14 +571,6 @@ div#image_browser ul li { list-style-type: none; } -input#move_to_search_term, input#node_staged_slug { - width: 690px; -} - -#tag_list { - width: 680px; -} - table.user_list td.user_login { padding-right: 30px; } diff --git a/public/stylesheets/ccc.css b/public/stylesheets/ccc.css index c782b1f..c4530fa 100644 --- a/public/stylesheets/ccc.css +++ b/public/stylesheets/ccc.css @@ -1,34 +1,52 @@ +html { + height: 100%; + line-height: 1.6rem; +} + body { margin: 0; padding: 0; text-align: center; font-family: Verdana, Helvetica, Arial, sans-serif; background-color: Canvas; + color: color-mix(in srgb, CanvasText, #808080 25%); hyphens: auto; - color: color-mix(in srgb, CanvasText, #808080 30%); color-scheme: light dark; -} -body:has(#light-mode:checked) { - color-scheme: light; + min-height: 100%; + height: 100%; } @media (prefers-color-scheme: light) { -#light-mode-li, #light-mode, label[for=light-mode] { - display: none; -} + body:has(#light-mode:checked) { + color-scheme: dark; + } + #light-mode + label[for=light-mode]:before { content: '🌙'; } + #light-mode:checked + label[for=light-mode]:before { content: '☀️'; } + + /* The header images were set in the before times. Let them shine in dark + mode, too */ + body:has(#light-mode:checked) #header img, + body:has(#light-mode:checked) div#left_column::before + { + filter: invert(50%); + } } @media (prefers-color-scheme: dark) { -body:not(:has(#light-mode:checked)) #header img, -body:not(:has(#light-mode:checked)) div#left_column::before -{ - filter: invert(50%); -} -} + body:has(#light-mode:checked) { + color-scheme: light; + } + #light-mode + label[for=light-mode]:before { content: '☀️'; } + #light-mode:checked + label[for=light-mode]:before { content: '🌙'; } -p { - line-height: 1.5em; + /* The header images were set in the before times. Let them shine in dark + mode, too */ + body:not(:has(#light-mode:checked)) #header img, + body:not(:has(#light-mode:checked)) div#left_column::before + { + filter: invert(50%); + } } img { @@ -45,6 +63,10 @@ div#header img { width: 909px; margin: 0 auto 0 auto; text-align: left; + min-height: 100%; + } + .break-mobile { + display: block; } } @@ -64,7 +86,8 @@ a { } a:visited { - color: #5b8ca7; + color: #D1791A; + text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2); } a:hover { @@ -76,20 +99,25 @@ a:hover { h2 { font-size: 1.5rem; font-family: Helvetica, Arial, sans-serif; + line-height: 1.75rem; } div#center_column h2 a { - color: color-mix(in srgb, CanvasText, #808080 80%); + color: CanvasText; text-decoration: none; } div#center_column h2 a:hover { - color: color-mix(in srgb, CanvasText, #808080 10%); + color: color-mix(in srgb, CanvasText, #808080 50%); } div#center_column h2.headline { margin-top: 10px; +} + +div#center_column .article_partial h2.headline { padding-top: 30px; + margin-bottom: 0.3rem; border-top: 2px solid #cccccc; } @@ -105,11 +133,10 @@ h3 { h4 { font-size: 1.0rem; - text-decoration: bold; + text-decoration: none; } #left_column { - font-size: .8em; line-height: 1.5em; } @@ -123,20 +150,19 @@ div.main_navigation ul { text-align: left; } -div.main_navigation li { - list-style-type: none; - display: inline-block; - line-height: 1.75em; -} -div.main_navigation li::after { - content: '-'; - color: #aeadad; - margin-left: .3em; -} +@media(max-width:1016px) { + div.main_navigation li:not(:first-child):before { + content: '•'; + margin-left: .3rem; + margin-right: .6rem; + } -div.main_navigation li:last-child::after { - content: none; + div.main_navigation li { + list-style-type: none; + display: inline-block; + line-height: .75rem; + } } @media(min-width:1016px) { @@ -146,21 +172,21 @@ div.main_navigation li:last-child::after { } div.main_navigation li { - display: block; + list-style-type: none; line-height: 1.45em; } - - div.main_navigation li::after { - content: none; - } } div.main_navigation a { text-decoration: none; } -div.main_navigation a.inactive:hover { - color: #F8921E; +div.main_navigation a.inactive:hover, div#left_column span.inactive:hover { + color: color-mix(in srgb, CanvasText, #808080 50%); +} + +div.main_navigation a.active:before { + content: "▸"; } div.main_navigation a.active { @@ -168,8 +194,8 @@ div.main_navigation a.active { text-decoration: none; } -div.main_navigation a.inactive { - color: #aeadad; +div.main_navigation a.inactive, div.main_navigation span.inactive, div#left_column span.inactive { + color: color-mix(in srgb, CanvasText, #808080 25%); } /*------------------calendar-featured-tags-------------------*/ @@ -185,10 +211,9 @@ div#frontpage_calendar { } } -div#frontpage_calendar h2, div#tags h2, div#featured_articles h2 { - color: #aeadad; - border-top: 2px solid #aeadad; - border-bottom: 2px solid #aeadad; +div#frontpage_calendar h2, div#tags h2, div#featured_articles h2, div.main_navigation h2 { + border-top: 2px solid; + border-bottom: 2px solid; font-size: 1.1em; padding-top: 2px; padding-bottom: 2px; @@ -204,9 +229,22 @@ div#frontpage_calendar h2 { margin-top: 0; } +@media(max-width:1016px) { + div#tags li { + list-style-type: none; + display: inline-block; + } + + div#tags li:not(:first-child):before { + content: '•'; + margin-left: .3em; + margin-right: .6em; + } +} + @media(min-width:1016px) { div#frontpage_calendar h2, div#tags h2, div#featured_articles h2 { - font-size: 16px; + font-size: 1rem; } div#frontpage_calendar h2 { @@ -214,20 +252,15 @@ div#frontpage_calendar h2 { border-top: 2px solid #aeadad; padding: 2px 0; } + } div#frontpage_calendar ul, div#tags ul, div#featured_articles ul { padding: 0px; - font-size: 0.8em; + font-size: 1rem; line-height: 1.5em; } -@media(min-width:1016px) { - div#tags ul { - font-size: 0.8rem; - } -} - div#featured_articles #ds_icon img { padding-top: 10px; } @@ -246,22 +279,39 @@ div#frontpage_calendar li, div#tags li, div#featured_articles li { div#frontpage_calendar li a, div#tags li a, div#featured_articles li a { text-decoration: none; - color: #535353; + color: color-mix(in srgb, CanvasText, #808080 25%); } div#frontpage_calendar li a:hover, div#tags li a:hover, div#featured_articles li a:hover { text-decoration: none; - color: #ff9600; + color: color-mix(in srgb, CanvasText, #808080 50%); +} + +/* We don't want the only colourful thing on the site to be pointing + * somewhere else */ +div#featured_articles img { + filter: grayscale(1); +} + +dt { + font-weight: bold; + margin-bottom: 1em; +} + +dd { + margin-bottom: 1em; } /*--------------------------------------------------------------*/ div.author_and_date { font-style: italic; - padding-left: 2em; font-family: Georgia; + color: color-mix(in srgb, CanvasText, #808080); + padding-top: .2rem; + padding-bottom: .8rem; } @media(min-width:1016px) { @@ -281,10 +331,10 @@ div.author_and_date { div#left_column { position: absolute; left: 0px; - width: 115px; + width: 135px; min-height: 100px; text-align: right; - padding-right: 70px; + padding-right: 50px; } div#left_column > a { @@ -292,19 +342,85 @@ div.author_and_date { } } +.menu-checkbox { + display: none; +} + +.burger-menu { + display: none; + cursor: pointer; +} + +#burger-div { + position: absolute; + right: 54px; +} + +/* Mobile styles */ +@media (max-width: 1016px) { + .burger-menu { + position: absolute; + display: flex; + flex-direction: column; + transition: transform 0.3s ease, opacity 0.3s ease; + } + + .burger-menu span { + display: inline-flex; + width: 26px; + height: 4px; + background: color-mix(in srgb, CanvasText, #808080 25%); + border-radius: 2px; + margin: 3px 0; + transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out, transform 0.5s ease-in-out; + } + + #left_column .main_navigation { + width: 100%; + position: relative; + } + + #toolbox ~ #left_column .main_navigation ul { + transition: max-height 0.2s ease-in-out, transform 0.4s ease-in-out, opacity 0.4s ease; + overflow: hidden; + text-align: center; + } + + #toolbox ~ #left_column .main_navigation:first-of-type ul { + transform: translateY(-200px); + max-height: 0; + opacity: 0; + z-index: -10; + } + + /* Show menu when checkbox is checked */ + #toolbox:has(.menu-checkbox:checked) ~ #left_column .main_navigation ul { + max-height: 400px; + opacity: 1; + transform: translateY(0); + } + + .menu-checkbox:checked + .burger-menu span:nth-child(1) { transform: translateY(10px) rotate(45deg); } + .menu-checkbox:checked + .burger-menu span:nth-child(2) { opacity: 0; } + .menu-checkbox:checked + .burger-menu span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); } +} div#center_column { - padding-left: 15px; - padding-right: 15px; padding-bottom: 40px; } +@media(max-width: 1016px) { +div#center_column { + padding: 0 15px 40px 15px; +} +} + @media(min-width: 1016px) { div#center_column { position: absolute; background-color: Canvas; left: 200px; - width: 460px; + width: 490px; } } @@ -312,8 +428,8 @@ div#center_column { div#right_column { position: absolute; background-color: Canvas; - padding-left: 70px; - left: 675px; + padding-left: 55px; + left: 690px; width: 155px; height: 100px; } @@ -332,51 +448,48 @@ div.article_partial { div.article_partial p.excerpt { - color: color-mix(in srgb, CanvasText, #808080 50%); + color: CanvasText; } /* Search bar */ -#search form table { - display: inline-table; -} - @media(min-width:1016px) { - #search form table { - display: table; - } - div#search { position: absolute; top: 145px; left: 676px; - height: 20px; + height: 25px; vertical-align: top; } } -div#search input[type=button] { - display: block; - height: 20px; +@media(max-width:1016px) { + div#search { + position: absolute; + left: 25px; + height: 25px; + } } +div#search input { + color: CanvasText !important; +} +div#search input[type=search], div#search input[type=text] { display: block; - padding: 0px; + padding: 2px; margin: 0px; - height: 20px; + height: 25px; width: 132px; line-height: 20px; - border: solid Canvas 1px; + border: solid #808080 1px; + background-color: Canvas; border-radius: 5px; - background-image: url(/images/search_field.png); - background-repeat:no-repeat; margin-right: 5px; text-indent: 0.5rem; - background-position: top; - color: #000; } /* Header */ +#header img, #header > a { display: block; line-height: 0; @@ -384,37 +497,35 @@ div#search input[type=text] { /* Main section */ .article, .article_partial { - font-size: .9rem; text-align: left; } -/* -@media(min-width:1016px) { - .article, .article_partial { - font-size: 11px; - } -} -*/ - h1, h2, h3 { word-wrap: anywhere; hyphens:auto; } .pagination { - margin-bottom: .5em; + margin-bottom: .5rem; } li { - line-height: 1.5em; - margin-block-start: 1em; - margin-block-end: 1em; + line-height: 1.5rem; + margin-block-start: 1rem; + margin-block-end: 1rem; +} + +#tags ul li { + margin-block-start: 0.5rem; + margin-block-end: 0.5rem; } /* Footer */ #footer { border-bottom: 2px solid #aeadad; border-top: 2px solid #aeadad; + bottom: 0; + color: CanvasText; } #footer > br { @@ -422,5 +533,63 @@ li { } #footer p { - margin: .5em auto; + margin: .5rem auto; +} + +#footer a { + margin-left: 1rem; + margin-right: 1rem; + color: CanvasText; +} + +@media(max-width:1016px) { +#toolbox { + display: relative; + height: 30px; +} +} + +/* Light and dark mode button magic */ +@media(max-width:1016px) { + div#light-mode-div { + position: absolute; + left: 170px; + } +} + +@media(min-width:1016px) { + div#light-mode-div { + position: absolute; + top: 145px; + left: 816px; + } } +input#light-mode[type="checkbox"] { + display: none; +} + +label[for=light-mode] { + font-size: 25px; + user-select: none; + cursor: pointer; + filter: grayscale(1) contrast(10%); +} + +.hide-me { + display: none; +} + +/* Temporary glowing style for easterhegg 22 */ +#eh22_icon img { + animation: animate 3s linear infinite; +} + +@keyframes animate { + from { + filter: sepia(100%) hue-rotate(0deg); + } + to { + filter: sepia(100%) hue-rotate(360deg); + } +} + -- cgit v1.3