hexo-theme-keep/source/css/layout/article-content.styl

225 lines
3.8 KiB
Stylus
Raw Normal View History

2020-10-27 18:11:10 +08:00
$avatarWidth = 46px;
2020-11-19 12:17:04 +08:00
$arrow-icon-width = 16px;
$post-nav-max-width = 220px;
2020-12-01 16:51:38 +08:00
$article-title-font-size = 1.6rem;
2020-10-27 18:11:10 +08:00
2020-04-01 12:09:06 +08:00
.article-content-container {
2021-01-21 18:23:22 +08:00
keep-container(false, 0, 0, 30px, 30px);
+keep-mobile() {
padding: 1.2rem 0.2rem;
box-shadow: none;
}
.article-title {
2020-10-27 18:11:10 +08:00
color: var(--second-text-color);
font-weight: 600;
2020-12-01 16:51:38 +08:00
font-size: $article-title-font-size;
2020-11-20 12:02:22 +08:00
+keep-tablet() {
2020-12-01 16:51:38 +08:00
font-size: $article-title-font-size * 0.9;
2020-10-27 18:11:10 +08:00
}
2020-11-20 12:02:22 +08:00
+keep-mobile() {
2020-12-01 16:51:38 +08:00
font-size: $article-title-font-size * 0.8;
2020-10-27 18:11:10 +08:00
}
}
2020-06-04 22:11:27 +08:00
2020-11-13 14:43:22 +08:00
2020-10-27 18:11:10 +08:00
.article-header {
position: relative;
padding-left: $avatarWidth;
width: 100%;
height: $avatarWidth;
box-sizing: border-box;
.avatar {
position: absolute;
top: 0
left: 0;
width: $avatarWidth;
height: $avatarWidth;
padding: 1px;
box-sizing: border-box;
border: 1px solid var(--border-color);
border-radius: 50%;
img {
border-radius: 50%;
width: 100%;
height: 100%;
background: var(--avatar-background-color);
2020-06-04 22:11:27 +08:00
}
}
2020-10-27 18:11:10 +08:00
.info {
padding: 2px 0;
margin-left: 10px;
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: space-between;
width: 100%;
height: 100%;
.author {
font-weight: 600;
2020-12-01 16:51:38 +08:00
font-size: 1.18rem;
2020-10-27 18:11:10 +08:00
display: flex;
align-items: center;
.name {
color: var(--default-text-color);
}
.author-label {
2020-10-27 18:11:10 +08:00
margin-left: 10px;
2020-12-01 16:51:38 +08:00
font-size: 0.8rem;
2020-10-27 18:11:10 +08:00
font-weight: 500;
padding: 0 5px;
2020-10-27 18:11:10 +08:00
border-radius: 5px;
color: #fff;
background: var(--selection-color);
2020-10-27 18:11:10 +08:00
}
2020-10-27 18:11:10 +08:00
}
}
2020-03-15 15:45:38 +08:00
}
2020-11-13 14:43:22 +08:00
.article-header, .article-header-meta-info {
2020-10-28 22:25:26 +08:00
margin-top: 16px;
2020-11-20 12:02:22 +08:00
+keep-tablet() {
2021-01-21 17:31:25 +08:00
transform: scale(0.9);
2020-10-28 22:25:26 +08:00
transform-origin: left top;
}
}
2020-11-13 14:43:22 +08:00
.article-content {
2021-01-07 15:15:39 +08:00
margin-top: $component-spacing-value;
padding-bottom: 10px;
2021-01-04 19:01:53 +08:00
word-wrap: break-word;
2021-01-21 17:31:25 +08:00
border-bottom: 1px solid var(--border-color);
color: var(--default-text-color);
}
.post-tags-box {
display: none;
margin-top: 1.6rem;
justify-content: center;
font-size: 1.1rem;
+keep-tablet() {
display: flex;
}
2021-11-22 21:25:07 +08:00
+keep-mobile() {
margin-top: 1.2rem;
font-size: 1rem;
}
.tag-item {
margin: 0 0.25rem;
}
}
.post-copyright-info {
2021-01-07 15:15:39 +08:00
margin-top: $component-spacing-value;
width: 100%;
2021-11-22 21:25:07 +08:00
+keep-tablet() {
margin-top: $component-spacing-value * 0.8;
}
}
.article-nav {
height: 40px;
2021-01-07 15:15:39 +08:00
margin-top: $component-spacing-value;
2020-11-19 11:58:54 +08:00
.article-prev, .article-next {
max-width: $post-nav-max-width;
height: 100%;
box-sizing: border-box;
2021-01-22 18:20:13 +08:00
keep-container(true, 1.03, 1.03, 10px, 0);
2020-11-19 11:58:54 +08:00
a {
position: relative;
display: block;
width: 100%;
height: 100%;
box-sizing: border-box;
&.prev {
padding-left: $arrow-icon-width;
}
&.next {
padding-right: $arrow-icon-width;
}
.arrow-icon {
position: absolute;
top: 0;
height: 100%;
width: $arrow-icon-width;
&.left {
left: 0;
}
&.right {
right: 0;
}
}
.title {
width: 100%;
height: 100%;
}
}
}
.article-prev {
float: left;
}
.article-next {
float: right;
}
.post-nav-item {
display: none;
2020-11-20 12:02:22 +08:00
+keep-tablet() {
display: inline-block;
}
}
2020-11-19 11:58:54 +08:00
.post-nav-title-item {
2020-11-19 11:58:54 +08:00
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
2020-11-20 12:02:22 +08:00
+keep-tablet() {
display: none;
}
}
}
2020-04-28 23:20:17 +08:00
}