Skip to content

Commit 8c10959

Browse files
committed
Editors: Tightened up new design, adjusted for MD editor
1 parent 45c7409 commit 8c10959

File tree

5 files changed

+61
-50
lines changed

5 files changed

+61
-50
lines changed

resources/sass/_forms.scss

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,9 @@ html.markdown-editor-display.dark-mode {
148148
width: 100%;
149149
font-size: 11px;
150150
line-height: 1.6;
151-
border-bottom: 1px solid #DDD;
152-
background-color: #EEE;
153-
@include lightDark(background-color, #eee, #111);
154-
@include lightDark(border-color, #ddd, #000);
151+
border-bottom: 1px solid #CCC;
152+
//background-color: var(--color-primary-light);
153+
@include lightDark(border-color, #CCC, #000);
155154
flex: none;
156155
@include whenDark {
157156
button {
@@ -398,27 +397,6 @@ input[type=color] {
398397
height: auto;
399398
}
400399

401-
.title-input.page-title {
402-
font-size: 0.8em;
403-
@include lightDark(background-color, #fff, #333);
404-
.input {
405-
border: 0;
406-
margin-bottom: -1px;
407-
}
408-
input[type="text"] {
409-
max-width: 840px;
410-
margin: 0 auto;
411-
border: none;
412-
height: auto;
413-
}
414-
}
415-
416-
.page-title input {
417-
display: block;
418-
width: 100%;
419-
font-size: 1.4em;
420-
}
421-
422400
.description-input textarea {
423401
display: block;
424402
width: 100%;
@@ -428,11 +406,6 @@ input[type=color] {
428406
height: auto;
429407
}
430408

431-
div[editor-type="markdown"] .title-input.page-title input[type="text"] {
432-
max-width: 100%;
433-
border-radius: 0;
434-
}
435-
436409
.search-box {
437410
max-width: 100%;
438411
position: relative;

resources/sass/_pages.scss

Lines changed: 50 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,57 @@
2121

2222
.page-editor-page-area {
2323
width: 100%;
24-
max-width: 1140px;
2524
border-radius: 8px;
2625
box-shadow: $bs-card;
27-
overflow: hidden;
26+
background-color: #FFF;
2827
}
2928

3029
.page-edit-toolbar {
3130
width: 100%;
32-
max-width: 1140px;
3331
margin: 0 auto;
3432
display: grid;
3533
grid-template-columns: minmax(max-content, 2fr) 1.5fr minmax(max-content, 2fr);
3634
align-items: center;
3735
}
3836

37+
.page-editor-wysiwyg .page-edit-toolbar,
38+
.page-editor-wysiwyg .page-editor-page-area {
39+
max-width: 1140px;
40+
}
41+
42+
.page-editor-markdown .floating-toolbox {
43+
position: relative;
44+
}
45+
46+
.title-input.page-title {
47+
font-size: 0.8em;
48+
.input {
49+
border: 0;
50+
margin-bottom: -1px;
51+
}
52+
input[type="text"] {
53+
max-width: 840px;
54+
margin: 0 auto;
55+
border: none;
56+
height: auto;
57+
display: block;
58+
width: 100%;
59+
font-size: 20px;
60+
border-radius: 4px;
61+
}
62+
input[type="text"]:focus {
63+
position: relative;
64+
outline-offset: -1px;
65+
outline: 1px dashed var(--color-primary);
66+
box-shadow: $bs-card;
67+
z-index: 50;
68+
}
69+
}
70+
71+
.page-editor-markdown .title-input.page-title input[type="text"] {
72+
max-width: 100%;
73+
}
74+
3975
body.tox-fullscreen .page-editor .edit-area,
4076
body.markdown-fullscreen .page-editor .edit-area {
4177
z-index: 12;
@@ -176,12 +212,12 @@ body.tox-fullscreen, body.markdown-fullscreen {
176212
max-height: 100%;
177213
border-radius: 8px;
178214
box-shadow: $bs-card;
179-
position: fixed;
180-
right: $-s;
181215
margin-bottom: auto;
216+
margin-left: $-l;
217+
position: absolute;
182218
&.open {
183-
right: 0;
184219
position: relative;
220+
right: 0;
185221
max-width: 480px;
186222
margin-bottom: 0;
187223
}
@@ -195,7 +231,7 @@ body.tox-fullscreen, body.markdown-fullscreen {
195231
transition: background-color ease-in-out 180ms;
196232
}
197233
&.open .toolbox-toggle {
198-
background-color: rgba(255, 0, 0, 0.29);
234+
background-color: rgba(255, 0, 0, 0.20);
199235
}
200236
&.open .toolbox-toggle svg {
201237
transform: rotate(180deg);
@@ -211,28 +247,27 @@ body.tox-fullscreen, body.markdown-fullscreen {
211247
margin-right: -1px;
212248
}
213249
.tabs-inner {
214-
//box-shadow: $bs-large;
215250
@include lightDark(background-color, #FFFFFF, #222);
216-
//border-radius: 8px;
217-
overflow: hidden;
218251
}
219252
.tabs svg {
220253
padding: 0;
221254
margin: 0;
222255
}
223256
.tabs-inner > button {
224-
//border-block-end: 1px solid #CCC;
225-
//@include lightDark(border-color, #CCC, #000);
226257
@include lightDark(color, rgba(0, 0, 0, 0.7), rgba(255, 255, 255, 0.5));
227258
display: block;
228259
cursor: pointer;
229260
padding: 10px $-xs;
230-
font-size: 16px;
261+
font-size: 18px;
231262
line-height: 1.6;
232263
}
233-
&.open .tabs-inner > button.active {
264+
.tabs-inner > button:hover, &.open .tabs-inner > button.active {
234265
background-color: var(--color-primary-light);
235-
color: var(--color-primary)
266+
color: var(--color-primary);
267+
}
268+
&.open .tabs-inner > button.active {
269+
border-inline-end: 1px solid var(--color-primary);
270+
margin-inline-end: -1px;
236271
}
237272
h4 {
238273
font-size: 24px;

resources/sass/_tinymce.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// Editor wrapper edits
1313
.tox.tox-tinymce {
1414
border-inline: 0;
15+
border-bottom: 0;
1516
}
1617

1718
// In editor body overrides

resources/views/pages/parts/form.blade.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div component="page-editor" class="page-editor flex-fill flex"
1+
<div component="page-editor" class="page-editor page-editor-{{ $editor }} flex-fill flex"
22
option:page-editor:drafts-enabled="{{ $draftsEnabled ? 'true' : 'false' }}"
33
@if(config('services.drawio'))
44
drawio-url="{{ is_string(config('services.drawio')) ? config('services.drawio') : 'https://embed.diagrams.net/?embed=1&proto=json&spin=1&configure=1' }}"
@@ -20,7 +20,7 @@
2020
{{--Header Toolbar--}}
2121
@include('pages.parts.editor-toolbar', ['model' => $model, 'editor' => $editor, 'isDraft' => $isDraft, 'draftsEnabled' => $draftsEnabled])
2222

23-
<div class="flex flex-fill mx-s mb-xs gap-m justify-center">
23+
<div class="flex flex-fill mx-s mb-s justify-center">
2424
<div class="page-editor-page-area flex-container-column flex flex-fill">
2525
{{--Title input--}}
2626
<div class="title-input page-title clearfix">
@@ -48,7 +48,9 @@
4848
</div>
4949
</div>
5050

51-
@include('pages.parts.editor-toolbox')
51+
<div class="relative flex-fill">
52+
@include('pages.parts.editor-toolbox')
53+
</div>
5254
</div>
5355

5456
{{--Mobile Save Button--}}

resources/views/pages/parts/markdown-editor.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class="flex-fill flex code-fill">
77

88
<div class="markdown-editor-wrap active flex-container-column">
99
<div class="editor-toolbar flex-container-row items-stretch justify-space-between">
10-
<div class="editor-toolbar-label text-mono px-m py-xs flex-container-row items-center flex">
10+
<div class="editor-toolbar-label text-mono bold px-m py-xs flex-container-row items-center flex">
1111
<span>{{ trans('entities.pages_md_editor') }}</span>
1212
</div>
1313
<div component="dropdown" class="buttons flex-container-row items-stretch">
@@ -44,7 +44,7 @@ class="flex-fill flex code-fill">
4444
<div refs="markdown-editor@divider" class="markdown-panel-divider flex-fill"></div>
4545
<div class="flex-container-column flex flex-fill">
4646
<div class="editor-toolbar">
47-
<div class="editor-toolbar-label text-mono px-m py-xs">{{ trans('entities.pages_md_preview') }}</div>
47+
<div class="editor-toolbar-label text-mono bold px-m py-xs">{{ trans('entities.pages_md_preview') }}</div>
4848
</div>
4949
<iframe src="about:blank"
5050
refs="markdown-editor@display"

0 commit comments

Comments
 (0)