diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-22 15:28:37 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-22 15:28:37 +0200 |
| commit | 028b0ce90e16d488dba291007b9092a6a700ca3a (patch) | |
| tree | 93bd81220d820181756b236de40e39b00fe0f40b /public | |
| parent | 6893270420c13cf1a0af158cf3d4cc71cd7e2005 (diff) | |
Split nodes#edit into a four-quadrant layout on desktop
Diffstat (limited to 'public')
| -rw-r--r-- | public/javascripts/admin_interface.js | 8 | ||||
| -rw-r--r-- | public/stylesheets/admin.css | 47 |
2 files changed, 43 insertions, 12 deletions
diff --git a/public/javascripts/admin_interface.js b/public/javascripts/admin_interface.js index f6d915f..64da5a8 100644 --- a/public/javascripts/admin_interface.js +++ b/public/javascripts/admin_interface.js | |||
| @@ -73,6 +73,14 @@ $(document).ready(function () { | |||
| 73 | cccms.preview.initialize(); | 73 | cccms.preview.initialize(); |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | var metadata_details = document.getElementById('metadata_details'); | ||
| 77 | if (metadata_details) { | ||
| 78 | var desktop_mq = window.matchMedia('(min-width: 1016px)'); | ||
| 79 | var sync_metadata = function() { metadata_details.open = desktop_mq.matches; }; | ||
| 80 | sync_metadata(); | ||
| 81 | desktop_mq.addEventListener('change', sync_metadata); | ||
| 82 | } | ||
| 83 | |||
| 76 | jQuery.ajaxSetup({ | 84 | jQuery.ajaxSetup({ |
| 77 | 'beforeSend': function(xhr) {xhr.setRequestHeader("Accept", "text/javascript");} | 85 | 'beforeSend': function(xhr) {xhr.setRequestHeader("Accept", "text/javascript");} |
| 78 | }); | 86 | }); |
diff --git a/public/stylesheets/admin.css b/public/stylesheets/admin.css index 7b06c7d..5c0a8c0 100644 --- a/public/stylesheets/admin.css +++ b/public/stylesheets/admin.css | |||
| @@ -97,7 +97,8 @@ input[type=radio] { | |||
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | #metadata, | 99 | #metadata, |
| 100 | #content { | 100 | #content, |
| 101 | #main_fields { | ||
| 101 | margin-left: 5px; | 102 | margin-left: 5px; |
| 102 | } | 103 | } |
| 103 | 104 | ||
| @@ -892,6 +893,26 @@ form.button_to button[type="submit"] { | |||
| 892 | Page editor / metadata forms | 893 | Page editor / metadata forms |
| 893 | ============================================================ */ | 894 | ============================================================ */ |
| 894 | 895 | ||
| 896 | @media(min-width:1016px) { | ||
| 897 | #edit_grid { | ||
| 898 | display: grid; | ||
| 899 | grid-template-columns: 1fr 1fr; | ||
| 900 | grid-template-areas: | ||
| 901 | "main meta" | ||
| 902 | "body body"; | ||
| 903 | column-gap: 2rem; | ||
| 904 | align-items: start; | ||
| 905 | margin-left: -125px; | ||
| 906 | } | ||
| 907 | #main_fields { grid-area: main; } | ||
| 908 | #metadata_details { grid-area: meta; } | ||
| 909 | #page_editor #content { grid-area: body; } | ||
| 910 | |||
| 911 | /* Details is force-opened by JS on desktop; hide the summary only | ||
| 912 | once open, so a JS failure still leaves a working toggle. */ | ||
| 913 | #metadata_details[open] > summary { display: none; } | ||
| 914 | } | ||
| 915 | |||
| 895 | #new_node { | 916 | #new_node { |
| 896 | margin-left: -118px; | 917 | margin-left: -118px; |
| 897 | } | 918 | } |
| @@ -947,18 +968,16 @@ div#page_editor { | |||
| 947 | } | 968 | } |
| 948 | 969 | ||
| 949 | @media(min-width:1016px) { | 970 | @media(min-width:1016px) { |
| 950 | input#tag_list, | ||
| 951 | input#menu_search_term, | 971 | input#menu_search_term, |
| 952 | input#menu_item_node_id, | 972 | input#menu_item_node_id, |
| 953 | input#menu_item_path, | 973 | input#menu_item_path, |
| 954 | input#menu_item_title, | 974 | input#menu_item_title { |
| 955 | input#node_staged_slug, | ||
| 956 | input#move_to_search_term { | ||
| 957 | width: 690px; | 975 | width: 690px; |
| 958 | } | 976 | } |
| 959 | 977 | ||
| 960 | input[type=text]#page_title { | 978 | input[type=text]#page_title { |
| 961 | width: 690px; | 979 | width: 100%; |
| 980 | box-sizing: border-box; | ||
| 962 | font-size: 1rem; | 981 | font-size: 1rem; |
| 963 | padding-top: 6px; | 982 | padding-top: 6px; |
| 964 | padding-bottom: 4px; | 983 | padding-bottom: 4px; |
| @@ -968,24 +987,27 @@ div#page_editor { | |||
| 968 | } | 987 | } |
| 969 | 988 | ||
| 970 | textarea#page_abstract { | 989 | textarea#page_abstract { |
| 971 | width: 690px; | 990 | width: 100%; |
| 972 | height: 150px; | 991 | box-sizing: border-box; |
| 992 | height: 250px; | ||
| 973 | padding: 5px; | 993 | padding: 5px; |
| 974 | } | 994 | } |
| 975 | 995 | ||
| 976 | #page_editor textarea#page_body { | 996 | #page_editor textarea#page_body { |
| 977 | width: 700px; | 997 | width: 100%; |
| 998 | box-sizing: border-box; | ||
| 978 | height: 600px; | 999 | height: 600px; |
| 979 | } | 1000 | } |
| 980 | 1001 | ||
| 981 | #page_editor #metadata, #page_editor #content, #admin_overview { | 1002 | #admin_overview { |
| 982 | margin-left: -125px; | 1003 | margin-left: -125px; |
| 983 | } | 1004 | } |
| 984 | 1005 | ||
| 985 | #page_editor input[type=text], | 1006 | #page_editor input[type=text], |
| 986 | #page_editor input[type=password], | 1007 | #page_editor input[type=password], |
| 987 | #page_editor textarea { | 1008 | #page_editor textarea { |
| 988 | width: 690px; | 1009 | width: 100%; |
| 1010 | box-sizing: border-box; | ||
| 989 | } | 1011 | } |
| 990 | } | 1012 | } |
| 991 | 1013 | ||
| @@ -998,7 +1020,8 @@ div#page_editor { | |||
| 998 | } | 1020 | } |
| 999 | 1021 | ||
| 1000 | #page_editor #content, | 1022 | #page_editor #content, |
| 1001 | #page_editor #metadata { | 1023 | #page_editor #metadata, |
| 1024 | #page_editor #main_fields { | ||
| 1002 | padding-right: 5px; | 1025 | padding-right: 5px; |
| 1003 | } | 1026 | } |
| 1004 | 1027 | ||
