From ff86770e8b96efc43ed0fc9da97d565458ecd00d Mon Sep 17 00:00:00 2001 From: Y-k-Y Date: Fri, 13 May 2022 01:16:19 +0900 Subject: [PATCH] feat: update document editor styles (#180) --- src/backend/views/pages/form.twig | 31 ++++++------- src/frontend/styles/components/writing.pcss | 48 +++++++++++++-------- 2 files changed, 47 insertions(+), 32 deletions(-) diff --git a/src/backend/views/pages/form.twig b/src/backend/views/pages/form.twig index 2e3bc13..142664e 100644 --- a/src/backend/views/pages/form.twig +++ b/src/backend/views/pages/form.twig @@ -13,14 +13,14 @@ }
- - - New Page at the +
{% set currentPageId = 0 %} {% if page is not empty %} {% set currentPageId = page._id %} {% endif %} - {% for _page in pagesAvailable %} {% if _page._id != currentPageId %} @@ -34,24 +34,25 @@ {% endif %} {% endfor %} - - +
{% if parentsChildrenOrdered is not empty %} - - Put Above - {% for _page in parentsChildrenOrdered %} {% endfor %} - + {% endif %} -
- - {% if page is not empty %} -

- {% endif %} + {% if page is not empty %} +
+ + +
+ {% endif %} +
diff --git a/src/frontend/styles/components/writing.pcss b/src/frontend/styles/components/writing.pcss index 0a4686a..cb13dd5 100644 --- a/src/frontend/styles/components/writing.pcss +++ b/src/frontend/styles/components/writing.pcss @@ -1,5 +1,4 @@ .writing-header { - display: flex; position: sticky; top: 0; padding: 15px 0; @@ -17,16 +16,41 @@ &__left { margin: auto 0; + display: flex; color: var(--color-text-second); + gap: 10px; - & span { - margin-right: 10px; + @media(--mobile) { + flex-flow: column; } - } - select { - max-width: 100px; - vertical-align: bottom; + & > * { + flex: 1 1 33.3%; + } + + label { + display: block; + margin-bottom: 6px; + } + + select, input { + position: relative; + padding: 10px 16px; + width: 100%; + border: none; + border-radius: 8px; + background-color: #F3F6F8; + box-sizing: border-box; + appearance: none; + } + + select { + padding-right: 36px; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right 16px center; + background-size: 16px 12px; + } } } @@ -37,16 +61,6 @@ } } -.uri-input { - box-sizing: border-box; - width: 100%; - padding: 10px 12px; - border-radius: 3px; - border: 1px solid rgba(201, 201, 204, 0.48); - box-shadow: inset 0 1px 2px 0 rgba(35, 44, 72, 0.06); - outline: none; -} - .writing-editor { font-size: 15px; line-height: 1.6;