From 5d7c2c3b50a5eb3be0b027b53c853b2b8f5b0d04 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Tue, 27 Feb 2024 00:27:14 +0000 Subject: [PATCH] style: make wysiwyg editor full-height --- OliverBooth/Pages/Admin/EditBlogPost.cshtml | 54 +++++++++++---------- src/scss/admin.scss | 31 ++++++++++-- 2 files changed, 55 insertions(+), 30 deletions(-) diff --git a/OliverBooth/Pages/Admin/EditBlogPost.cshtml b/OliverBooth/Pages/Admin/EditBlogPost.cshtml index 68cb70c..bd3b836 100644 --- a/OliverBooth/Pages/Admin/EditBlogPost.cshtml +++ b/OliverBooth/Pages/Admin/EditBlogPost.cshtml @@ -12,30 +12,32 @@ -
- - Preview +
+
+ + Preview +
+ + + + + + + + + + +
Post ID
Title
+ +
+
+ + +
+
+
+ @Html.Raw(Markdown.ToHtml(post.Body, MarkdownPipeline)) +
+
+
- - - - - - - - - - -
Post ID
Title
- -
-
- - -
-
-
- @Html.Raw(Markdown.ToHtml(post.Body, MarkdownPipeline)) -
-
-
\ No newline at end of file diff --git a/src/scss/admin.scss b/src/scss/admin.scss index 87c700a..9ff9a16 100644 --- a/src/scss/admin.scss +++ b/src/scss/admin.scss @@ -70,12 +70,12 @@ textarea { } #highlighting, #content { - margin: 10px; padding: 10px; border: 0; - width: calc(100% - 32px); - height: 500px; + width: 100%; + height: 100%; position: relative; + margin: 0; } #highlighting, #content, #highlighting * { @@ -85,7 +85,6 @@ textarea { } #highlighting { - margin-top: -511px; z-index: 0; background: #1E1E1E; } @@ -99,8 +98,32 @@ textarea { overflow-wrap: normal; overflow-x: scroll; white-space: pre; + + &:focus { + outline: none; + } } #highlighting-content, #highlighting-content code { white-space: pre !important; } + +#content, .highlighting-container .code-toolbar { + grid-column: 1; + grid-row: 1; +} + +.highlighting-container { + display: grid; + max-width: 50%; + max-height: calc(100vh - 35px); + overflow: scroll; +} + +.highlighting-container .code-toolbar { + height: 100%; + + .toolbar { + display: none; + } +}