From 49fb3065c7b62b3ac531b3b623e44719aa79b67b Mon Sep 17 00:00:00 2001 From: Tony Yang Date: Thu, 1 Apr 2021 01:51:38 +0800 Subject: [PATCH] [Component] Block Title --- src/assets/images/title-block.svg | 3 +++ src/assets/scss/blocktitle.scss | 37 +++++++++++++++++++++++++++++++ src/components/BlockTitle.vue | 17 ++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 src/assets/images/title-block.svg create mode 100644 src/assets/scss/blocktitle.scss create mode 100644 src/components/BlockTitle.vue diff --git a/src/assets/images/title-block.svg b/src/assets/images/title-block.svg new file mode 100644 index 0000000..8c77521 --- /dev/null +++ b/src/assets/images/title-block.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/scss/blocktitle.scss b/src/assets/scss/blocktitle.scss new file mode 100644 index 0000000..b19823f --- /dev/null +++ b/src/assets/scss/blocktitle.scss @@ -0,0 +1,37 @@ +$fontFamily: "Noto Serif CJK TC -Black"; + +div.block.title { + display: flex; + justify-content: center; + + font-size: 26px; + font-family: $fontFamily; + font-weight: bold; + + line-height: 1.44; + + margin: 36px 0; + + span.text { + display: contents; + + &::before, &::after { + display: inline-block; + content: ''; + width: 1.44em; + height: 1.44em; + margin: auto; + vertical-align: middle; + background-image: url('../assets/images/title-block.svg'); + background-size: contain; + } + + &::before { + margin-right: 18px; + } + + &::after { + margin-left: 18px; + } + } +} \ No newline at end of file diff --git a/src/components/BlockTitle.vue b/src/components/BlockTitle.vue new file mode 100644 index 0000000..e81a78b --- /dev/null +++ b/src/components/BlockTitle.vue @@ -0,0 +1,17 @@ + + + + \ No newline at end of file