diff --git a/components/article.php b/components/article.php index eed454c..a959f62 100644 --- a/components/article.php +++ b/components/article.php @@ -1,19 +1,22 @@ - -
+

+ +
-
+ - - diff --git a/components/article/terms.php b/components/article/terms.php index 022078d..f997392 100644 --- a/components/article/terms.php +++ b/components/article/terms.php @@ -2,18 +2,18 @@ if (has_category('chapters')) { $romans = get_the_terms($post->ID, 'roman'); foreach( $romans as $roman ) { - echo " " . $roman->name . ""; + echo " " . $roman->name . ""; } } else { $categories = get_the_category(); foreach( $categories as $category ) { - echo " " . $category->cat_name . ""; + echo " " . $category->cat_name . ""; } } $tags = get_the_tags(); if ($tags) { foreach( $tags as $tag ) { - echo " " . $tag->name . " "; + echo " " . $tag->name . " "; } } ?> diff --git a/scss/_global.scss b/scss/_global.scss index 76c43b7..d9ae49f 100644 --- a/scss/_global.scss +++ b/scss/_global.scss @@ -3,4 +3,5 @@ **/ @import 'custom/global'; -@import 'custom/previews'; \ No newline at end of file +@import 'custom/previews'; +@import 'custom/article'; \ No newline at end of file diff --git a/scss/custom/_article.scss b/scss/custom/_article.scss new file mode 100644 index 0000000..553e2bc --- /dev/null +++ b/scss/custom/_article.scss @@ -0,0 +1,37 @@ +.article { + img { + max-width:100%; + height:auto; + margin:auto; + } + + .thumbnail img { + width:100%; + aspect-ratio: 16 / 9; + border-radius: $card-radius; + object-fit: cover; + } +} + +.article-meta { + .author-area { + display: flex; + align-items: center; + margin-bottom: $lineheight / 2; + + img { + border-radius: 9999px; + width: $lineheight * 3; + height: auto; + margin: 0; + margin-right: $lineheight / 2; + } + } + + .article-category { + .badge { + display: inline-block; + margin-bottom: $lineheight / 4; + } + } +} \ No newline at end of file diff --git a/style.css b/style.css index e12ac23..de9a977 100644 --- a/style.css +++ b/style.css @@ -2775,3 +2775,29 @@ footer { font-size: 0.8rem; line-height: 1.25rem; color: rgba(33, 37, 41, 0.8); } + +.article img { + max-width: 100%; + height: auto; + margin: auto; } + +.article .thumbnail img { + width: 100%; + aspect-ratio: 16 / 9; + border-radius: 8px; + object-fit: cover; } + +.article-meta .author-area { + display: flex; + align-items: center; + margin-bottom: 0.8rem; } + .article-meta .author-area img { + border-radius: 9999px; + width: 4.8rem; + height: auto; + margin: 0; + margin-right: 0.8rem; } + +.article-meta .article-category .badge { + display: inline-block; + margin-bottom: 0.4rem; }