From 06567a4d058ef00232a717ea8a266988305bea07 Mon Sep 17 00:00:00 2001 From: mei23 Date: Thu, 3 Jan 2019 21:22:15 +0900 Subject: [PATCH] Compact url-preview --- .../common/views/components/url-preview.vue | 54 +++++++++++++++++-- .../app/desktop/views/components/note.vue | 7 ++- .../app/desktop/views/components/notes.vue | 2 +- .../desktop/views/pages/deck/deck.notes.vue | 1 + .../app/mobile/views/components/note.vue | 7 ++- .../app/mobile/views/components/notes.vue | 2 +- 6 files changed, 65 insertions(+), 8 deletions(-) diff --git a/src/client/app/common/views/components/url-preview.vue b/src/client/app/common/views/components/url-preview.vue index 038541ba05..f7a30d640c 100644 --- a/src/client/app/common/views/components/url-preview.vue +++ b/src/client/app/common/views/components/url-preview.vue @@ -8,16 +8,16 @@
- +
-

{{ title }}

+

{{ title }}

-

{{ description.length > 85 ? description.slice(0, 85) + '…' : description }}

+

{{ description.length > 85 ? description.slice(0, 85) + '…' : description }}

-

{{ sitename }}

+

{{ sitename }}

@@ -120,6 +120,12 @@ export default Vue.extend({ default: false }, + compact: { + type: Boolean, + required: false, + default: false + }, + mini: { type: Boolean, required: false, @@ -302,6 +308,23 @@ export default Vue.extend({ width 12px height 12px + &.compact + > .thumbnail + position: absolute + width 56px + height 100% + + > article + left 56px + width calc(100% - 56px) + padding 4px + + > header + margin-bottom 2px + + > footer + margin-top 2px + &.mini font-size 10px @@ -325,4 +348,27 @@ export default Vue.extend({ width 12px height 12px + &.compact + > .thumbnail + position: absolute + width 56px + height 100% + + > article + left 56px + width calc(100% - 56px) + padding 4px + + > header + margin-bottom 2px + + > footer + margin-top 2px + + &.compact + > article + > header, p, footer + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; diff --git a/src/client/app/desktop/views/components/note.vue b/src/client/app/desktop/views/components/note.vue index a52eaac7e9..e5f233a552 100644 --- a/src/client/app/desktop/views/components/note.vue +++ b/src/client/app/desktop/views/components/note.vue @@ -36,7 +36,7 @@ 位置情報
- +