From 05ba1d0fd458e92f63a2d979117e11ff7270267e Mon Sep 17 00:00:00 2001 From: syuilo <Syuilotan@yahoo.co.jp> Date: Thu, 15 Apr 2021 20:55:54 +0900 Subject: [PATCH] fix style --- src/client/components/notifications.vue | 5 ++--- src/client/pages/page.vue | 6 ++---- src/client/pages/timeline.vue | 5 ++--- src/client/style.scss | 10 ++++++---- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/client/components/notifications.vue b/src/client/components/notifications.vue index baafa86f4d..0891108d8b 100644 --- a/src/client/components/notifications.vue +++ b/src/client/components/notifications.vue @@ -1,7 +1,6 @@ <template> -<div class="mfcuwfyp _noGap_"> - <div class="_magnet"></div> - <XList class="notifications" :items="items" v-slot="{ item: notification }"> +<div class="mfcuwfyp _noGap_ _magnetParent"> + <XList class="notifications _magnetChild" :items="items" v-slot="{ item: notification }"> <XNote v-if="['reply', 'quote', 'mention'].includes(notification.type)" :note="notification.note" @update:note="noteUpdated(notification.note, $event)" :key="notification.id"/> <XNotification v-else :notification="notification" :with-time="true" :full="true" class="_panel notification" :key="notification.id"/> </XList> diff --git a/src/client/pages/page.vue b/src/client/pages/page.vue index 57bbeba6b2..6ff09e2b68 100644 --- a/src/client/pages/page.vue +++ b/src/client/pages/page.vue @@ -1,8 +1,6 @@ <template> -<div class="xcukqgmh _root" v-if="page" :key="page.id" v-size="{ max: [450] }"> - <div class="_magnet"></div> - - <div class="_block main"> +<div class="xcukqgmh _root _magnetParent" v-if="page" :key="page.id" v-size="{ max: [450] }"> + <div class="_block _magnetChild main"> <!-- <div class="header"> <h1>{{ page.title }}</h1> diff --git a/src/client/pages/timeline.vue b/src/client/pages/timeline.vue index 1d92dbba81..0e0116465c 100644 --- a/src/client/pages/timeline.vue +++ b/src/client/pages/timeline.vue @@ -1,11 +1,10 @@ <template> -<div class="cmuxhskf _root" v-hotkey.global="keymap"> +<div class="cmuxhskf _root _magnetParent" v-hotkey.global="keymap"> <div class="new" v-if="queue > 0"><button class="_buttonPrimary" @click="top()">{{ $ts.newNoteRecived }}</button></div> - <div class="_magnet"></div> <XTutorial v-if="$store.reactiveState.tutorial.value != -1" class="tutorial _block"/> <XPostForm v-if="$store.reactiveState.showFixedPostForm.value" class="post-form _block" fixed/> - <div class="tabs _block"> + <div class="tabs _block _magnetChild"> <div class="left"> <button class="_button tab" @click="() => { src = 'home'; saveSrc(); }" :class="{ active: src === 'home' }" v-tooltip="$ts._timelines.home"><Fa :icon="faHome"/></button> <button class="_button tab" @click="() => { src = 'local'; saveSrc(); }" :class="{ active: src === 'local' }" v-tooltip="$ts._timelines.local" v-if="isLocalTimelineAvailable"><Fa :icon="faComments"/></button> diff --git a/src/client/style.scss b/src/client/style.scss index e9c28f1827..63433109ff 100644 --- a/src/client/style.scss +++ b/src/client/style.scss @@ -366,10 +366,6 @@ hr { border-radius: var(--radius); } - ._magnet { - margin-bottom: calc(var(--margin) * -1); - } - @media (max-width: 500px) { ._root { --root-margin: 0; @@ -377,6 +373,12 @@ hr { } } +._magnetParent { + ._magnetChild:not(* + ._magnetChild) { + margin-top: 0; + } +} + ._narrow_ ._card { > ._title { padding: 16px;