From 7c730b4e0d99927cf92a4cb65c976c7468be5d22 Mon Sep 17 00:00:00 2001 From: Giovane Cardoso Date: Sun, 27 Mar 2022 17:31:59 -0300 Subject: [PATCH] style(editor): reactivity inserts and headers --- .../default/EditorEntityDefaultInput.vue | 2 +- .../generate/EditorGenerateContainer.vue | 2 +- .../editor/header/EditorHeaderBar.vue | 2 +- .../header/items/EditorBaseHeaderAside.vue | 38 ------------------- .../header/items/EditorBaseHeaderOnline.vue | 28 -------------- .../editor/main/EditorBaseHeader.vue | 16 ++++---- .../creative/drafts/EditorPagesDrafts.vue | 18 ++++----- .../creative/drafts/EditorPagesDraftsItem.vue | 2 +- .../src/components/editor/utils/Logo.vue | 5 +-- .../better-write-app/src/pages/Editor.vue | 4 +- packages/better-write-app/windi.config.ts | 2 +- .../css/themes/betterwrite-harmonic.css | 8 ++-- 12 files changed, 28 insertions(+), 99 deletions(-) delete mode 100644 packages/better-write-app/src/components/editor/header/items/EditorBaseHeaderAside.vue delete mode 100644 packages/better-write-app/src/components/editor/header/items/EditorBaseHeaderOnline.vue diff --git a/packages/better-write-app/src/components/editor/entity/default/EditorEntityDefaultInput.vue b/packages/better-write-app/src/components/editor/entity/default/EditorEntityDefaultInput.vue index b63ec0789..e8c00bc37 100644 --- a/packages/better-write-app/src/components/editor/entity/default/EditorEntityDefaultInput.vue +++ b/packages/better-write-app/src/components/editor/entity/default/EditorEntityDefaultInput.vue @@ -31,7 +31,7 @@ " :style="{ minHeight: '24px', - whiteSpace: 'break-spaces', + whiteSpace: 'pre-line', paddingBottom: last ? '5rem' : '', textIndent: props.entity.type === 'paragraph' ? '2rem' : 0, }" diff --git a/packages/better-write-app/src/components/editor/generate/EditorGenerateContainer.vue b/packages/better-write-app/src/components/editor/generate/EditorGenerateContainer.vue index e27b0fb7c..84ecf5f43 100644 --- a/packages/better-write-app/src/components/editor/generate/EditorGenerateContainer.vue +++ b/packages/better-write-app/src/components/editor/generate/EditorGenerateContainer.vue @@ -66,7 +66,7 @@ const props = defineProps<{ title: string close: () => void - reverse: () => void + reverse?: () => void }>() const container = ref(null) diff --git a/packages/better-write-app/src/components/editor/header/EditorHeaderBar.vue b/packages/better-write-app/src/components/editor/header/EditorHeaderBar.vue index f34e20e96..af4232a20 100644 --- a/packages/better-write-app/src/components/editor/header/EditorHeaderBar.vue +++ b/packages/better-write-app/src/components/editor/header/EditorHeaderBar.vue @@ -10,7 +10,7 @@ duration: 150, }, }" - class="absolute shadow-xl rounded top-9 flex flex-col w-48 md:w-52 lg:w-72 z-40 bg-theme-editor-header-list-background" + class="absolute shadow-xl rounded top-11 md:top-9 flex flex-col w-48 md:w-52 lg:w-72 z-40 bg-theme-editor-header-list-background" > diff --git a/packages/better-write-app/src/components/editor/header/items/EditorBaseHeaderAside.vue b/packages/better-write-app/src/components/editor/header/items/EditorBaseHeaderAside.vue deleted file mode 100644 index 46cf5b734..000000000 --- a/packages/better-write-app/src/components/editor/header/items/EditorBaseHeaderAside.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - diff --git a/packages/better-write-app/src/components/editor/header/items/EditorBaseHeaderOnline.vue b/packages/better-write-app/src/components/editor/header/items/EditorBaseHeaderOnline.vue deleted file mode 100644 index 7cca15708..000000000 --- a/packages/better-write-app/src/components/editor/header/items/EditorBaseHeaderOnline.vue +++ /dev/null @@ -1,28 +0,0 @@ - - - diff --git a/packages/better-write-app/src/components/editor/main/EditorBaseHeader.vue b/packages/better-write-app/src/components/editor/main/EditorBaseHeader.vue index a365f442d..ef84a7341 100644 --- a/packages/better-write-app/src/components/editor/main/EditorBaseHeader.vue +++ b/packages/better-write-app/src/components/editor/main/EditorBaseHeader.vue @@ -4,18 +4,18 @@ :initial="{ opacity: 0 }" :enter="{ opacity: 1 }" :delay="100" - class="flex h-12 justify-between items-center w-full bg-theme-editor-background hover:bg-theme-editor-background-hover active:bg-theme-editor-background-active z-30 shadow-lg" + class="flex h-12 justify-between items-center w-full z-30 shadow-lg bg-theme-editor-background hover:bg-theme-editor-background-hover active:bg-theme-editor-background-active" > -
+
- - - - - +
+ + + + +
-
diff --git a/packages/better-write-app/src/components/editor/project/creative/drafts/EditorPagesDrafts.vue b/packages/better-write-app/src/components/editor/project/creative/drafts/EditorPagesDrafts.vue index 9ff045f2f..8adacb54a 100644 --- a/packages/better-write-app/src/components/editor/project/creative/drafts/EditorPagesDrafts.vue +++ b/packages/better-write-app/src/components/editor/project/creative/drafts/EditorPagesDrafts.vue @@ -15,23 +15,21 @@ class="flex flex-col md:flex-row h-auto md:h-editor w-full mt-10 bg-theme-editor-creative-drafts-container-background shadow-xl" >
-
{{ t('editor.drafts.chapters') }} -
-
+

-

- {{ element.entities[0]?.raw || element.title }} -

-
+ {{ element.entities[0]?.raw || element.title }} +

- {{ props.page.title }} + {{ props.page.entities[0]?.raw }}
Better Write Logo { - if (s.auth.user()) return - local.onSaveProject().then(() => { props.back ? router.back() : router.push('/') }) diff --git a/packages/better-write-app/src/pages/Editor.vue b/packages/better-write-app/src/pages/Editor.vue index eaf9ed8fd..e254d7127 100644 --- a/packages/better-write-app/src/pages/Editor.vue +++ b/packages/better-write-app/src/pages/Editor.vue @@ -3,9 +3,9 @@ class="flex flex-col w-full bg-theme-editor-full-background hover:bg-theme-editor-full-background-hover active:bg-theme-editor-full-background-active" > -
+
-
+
diff --git a/packages/better-write-app/windi.config.ts b/packages/better-write-app/windi.config.ts index 6329b4649..72975721c 100644 --- a/packages/better-write-app/windi.config.ts +++ b/packages/better-write-app/windi.config.ts @@ -24,7 +24,7 @@ export default defineConfig({ 'wb-configuration-reserve': 'flex flex-row-reverse md:flex-row gap-5 font-bold text-base text-theme-text-2 justify-between items-center w-full px-2 py-2', 'wb-configuration-input-text': 'bg-theme-editor-material-background px-2 shadow-lg w-full md:w-60', 'wb-indent': 'indent-8', - 'wb-header-button': 'wb-text mx-0.5 md:mx-3' + 'wb-header-button': 'wb-text mx-0.5 md:mx-2' }, theme: { fontFamily: { diff --git a/packages/better-write-plugin-theme/css/themes/betterwrite-harmonic.css b/packages/better-write-plugin-theme/css/themes/betterwrite-harmonic.css index a4f32107c..b2927c0a6 100644 --- a/packages/better-write-plugin-theme/css/themes/betterwrite-harmonic.css +++ b/packages/better-write-plugin-theme/css/themes/betterwrite-harmonic.css @@ -4,7 +4,7 @@ --theme-black: #000000; --theme-white: #ffffff; --theme-background-1: #b6ceeb; - --theme-background-2: rgba(222, 237, 255, 0.3); + --theme-background-2: rgba(222, 237, 255, 0.5); --theme-background-3: #deedff; --theme-background-4: #b6ceeb; --theme-background-opacity-1: rgba(0, 0, 0, 0.15); @@ -14,9 +14,9 @@ --theme-border-absolute-1: #ffffff; --theme-border-absolute-2: #111827; --theme-border-commands-1: #000000; - --theme-aside-background: rgba(222, 237, 255, 0.3); - --theme-aside-background-hover: rgba(222, 237, 255, 0.5); - --theme-aside-background-active: rgba(222, 237, 255, 0.3); + --theme-aside-background: #b6ceeb; + --theme-aside-background-hover: #b6ceeb; + --theme-aside-background-active: #b6ceeb; --theme-aside-logo-background: none; --theme-aside-logo-text: #6a819e; --theme-aside-graph-lines: #6a819e;