diff --git a/assets/styles/components/_blog.scss b/assets/styles/components/_blog.scss new file mode 100644 index 0000000..4f72c70 --- /dev/null +++ b/assets/styles/components/_blog.scss @@ -0,0 +1,225 @@ +.blog { + width: 100%; + min-height: 100vh; + background-color: rgb(241, 241, 241); + + a { + color: #258fb8; + } + + &__header { + text-align: center; + padding: 2rem; + + a { + color: #000; + } + } + + &__content { + display: flex; + gap: 1.5rem; + max-width: 1280px; + margin: 0 auto; + + @media all and (max-width: 768px) { + flex-direction: column; + gap: 0; + } + } + + &__main-col { + @media all and (min-width: 768px) { + width: 70%; + } + + @media all and (min-width: 1080px) { + width: 90%; + } + + img { + max-width: 100%; + height: auto; + display: block; + margin: auto; + } + } + + &-post { + margin: 50px 0; + + &__title { + padding: 20px 20px 0 20px; + + h1 { + font-size: 2rem; + } + + a { + color: #000; + } + } + + &__content { + color: #555; + padding: 0 20px; + + code { + background: #eee; + text-shadow: 0 1px #fff; + padding: 0 0.3em; + } + + .codeblock { + background: #2d2d2d; + padding: 15px 20px; + margin: 0 -20px; + border-style: solid; + border-color: #ddd; + border-width: 1px 0; + overflow: auto; + color: #ccc; + line-height: 22px; + width: calc(100% + 40px); + + pre { + margin: 0; + } + + code { + background: transparent; + text-shadow: none; + padding: 0; + } + } + + h1, + h2, + h3, + h4, + h5 { + line-height: 1.1em; + margin: 1.1em 0; + font-weight: bold; + } + + p, + table { + margin: 1.6em 0; + } + + h1 { + font-size: 2em; + } + + h2 { + font-size: 1.5em; + } + + h3 { + font-size: 1.3em; + } + + h4 { + font-size: 1.2em; + } + + h5 { + font-size: 1.1em; + } + + ul, + ol, + dl { + margin: 0 20px; + line-height: 1.6em; + padding: 0; + margin-top: 1.6em; + margin-bottom: 1.6em; + } + } + + &__inner { + overflow: hidden; + background-color: #fff; + } + + &__meta { + margin-bottom: 1em; + margin-left: 5px; + font-size: 14px; + + a { + letter-spacing: 2px; + color: #999; + line-height: 1em; + text-shadow: 0 1px #fff; + font-weight: bold; + } + } + + &__footer { + font-size: 0.85em; + line-height: 1.6em; + border-top: 1px solid #ddd; + padding-top: 1.6em; + margin: 0 20px 20px; + } + + &__tags { + display: flex; + gap: 1rem; + + .blog-post__tag { + color: #999; + } + } + } + + &__sidebar { + &-block { + margin: 50px 0; + } + + &-title { + font-size: 0.85em; + text-decoration: none; + text-transform: uppercase; + letter-spacing: 2px; + color: #999; + margin-bottom: 1em; + margin-left: 5px; + line-height: 1em; + text-shadow: 0 1px #fff; + font-weight: bold; + } + + &-content { + color: #777; + text-shadow: 0 1px #fff; + background: #ddd; + box-shadow: 0 -1px 4px #ccc inset; + border: 1px solid #ccc; + padding: 15px; + border-radius: 3px; + line-height: 1.6em; + word-wrap: break-word; + font-size: 0.9em; + } + + a { + color: #258fb8; + } + + ul { + list-style-type: none; + padding: 0; + margin: 0; + } + + .tag-cloud a { + margin-right: 5px; + display: inline-block; + } + } +} diff --git a/assets/styles/components/_section.scss b/assets/styles/components/_section.scss index f5aa162..244a7e3 100644 --- a/assets/styles/components/_section.scss +++ b/assets/styles/components/_section.scss @@ -1,4 +1,4 @@ -section { +.section { display: flex; flex-direction: column; color: #eee; diff --git a/assets/styles/components/index.scss b/assets/styles/components/index.scss index 32c137d..27fd814 100644 --- a/assets/styles/components/index.scss +++ b/assets/styles/components/index.scss @@ -2,3 +2,4 @@ @use 'section'; @use 'icon-link-list'; @use 'featured-project'; +@use 'blog'; diff --git a/assets/styles/index.scss b/assets/styles/index.scss index f00b942..c2218ed 100644 --- a/assets/styles/index.scss +++ b/assets/styles/index.scss @@ -1,4 +1,5 @@ @use '@/assets/iconfont/css/lunasquee-site.css'; +@use 'highlight.js/scss/dark.scss'; @use 'components/index'; @use 'helpers'; diff --git a/components/blog-post.vue b/components/blog-post.vue new file mode 100644 index 0000000..029d205 --- /dev/null +++ b/components/blog-post.vue @@ -0,0 +1,38 @@ + + + diff --git a/components/blog-sidebar.vue b/components/blog-sidebar.vue new file mode 100644 index 0000000..5c52d3c --- /dev/null +++ b/components/blog-sidebar.vue @@ -0,0 +1,12 @@ + + + diff --git a/components/section.vue b/components/section.vue index 9b0c51f..e6a95e6 100644 --- a/components/section.vue +++ b/components/section.vue @@ -1,5 +1,5 @@