:root { --background-color: #ffffff; --secondary-background-color: #f0f0f0; --text-color: #474747; --primary-text-color: #474747; --secondary-text-color: #6c757d; --muted-text-color: #999; --highlight-text-color: #dc3545; --link-color: blue; --success-color: #28a745; --warning-color: #ffc107; --danger-color: #dc3545; --info-color: #17a2b8; } @media (prefers-color-scheme: dark) { :root { --background-color: #343a40; --secondary-background-color: #495057; --text-color: #f8f9fa; --primary-text-color: #f8f9fa; --secondary-text-color: #adb5bd; --muted-text-color: #6c757d; --highlight-text-color: #ff6b6b; --link-color: #66d9ef; --success-color: #4caf50; --warning-color: #ffd700; --danger-color: #ff6b6b; --info-color: #1abc9c; } } body { margin: 0; font-size: 16px; box-sizing: border-box; background: var(--secondary-background-color); color: var(--primary-text-color); } p, h1, h2, h3, h4, h5, h6, blockquote, ul, ol, li, pre, code { margin: 0; padding: 0; } a { text-decoration: none; color: var(--link-color); } ::-webkit-scrollbar { display: none; } /* 文本格式 文章页 */ .post-item p, .post-item img, .post-item ol, .post-item ul, .post-item figure, .post-item pre, .post-item table { margin: 10px 0; } .post-item h1, .post-item h2, .post-item h3, .post-item h4, .post-item h5, .post-item h6 { margin: 20px 0; } .post-item h1, .post-item h2 { /*18px*/ font-size: 20px; } .post-item h3 { /*18px*/ font-size: 18px; } .post-item h4, .post-item h5, .post-item h6 { /*16px*/ font-size: 16px; } .container { display: flex; justify-content: center; align-items: center; flex-direction: row; max-width: 980px; margin-left: auto; margin-right: auto; padding: 20px; gap: 20px; } .aside { width: 200px; align-self: flex-start; height: max-content; background: var(--background-color); padding: 20px; border-radius: 12px; transition: all .3s; position: sticky; top: 20px; } .aside .avatar-box { display: flex; flex-direction: column; align-items: center; margin-bottom: 20px; background: var(--secondary-background-color); padding: 20px; line-height: 25px; border-radius: 12px; transition: all .3s; } .aside .avatar-box .avatar { width: 100px; height: 100px; border-radius: 50%; margin-bottom: 10px; background: var(--background-color); transition: all .3s; } .aside .avatar-box .info { display: flex; flex-direction: column; align-items: center; transition: all .3s; } .aside .avatar-box .blogger { font-size: 18px; font-weight: bold; transition: all .3s; } .aside .avatar-box .desc { font-size: 14px; opacity: 0.7; text-align: center; transition: all .3s; } .main { width: 0; flex: 1; transition: all .3s; } .post-item { margin-bottom: 20px; padding: 30px; background: var(--background-color); line-height: 30px; border-radius: 12px; } .post-item .title { margin: 0; font-size: 20px; font-weight: bold; margin-bottom: 10px; } .post-item .meta { font-size: 14px; opacity: .7; margin: 10px 0; } .post-item .meta span:nth-child(2)::before { content: "·"; margin: 0 5px; } /* archive */ .post-item .archive-item { display: flex; justify-content: space-between; align-items: center; margin: 10px 0; } .post-item .archive-item a { color: inherit; } .post-item .archive-item .time { opacity: .7; } /* tagcloud */ .post-item .tag-cloud a { color: inherit; border: 1px solid; border-radius: 50px; padding: 0 16px; display: inline-block; margin: 3px 0; margin-right: 6px; } .footer { padding: 20px; margin: 20px 0; background: var(--background-color); border-radius: 12px; } @media screen and (max-width: 800px) { .container { flex-direction: column; align-items: center; padding: 0; } .aside { box-sizing: border-box; width: 100%; display: flex; flex-direction: row; gap: 10px; position: sticky; top: 0; left: 0; z-index: 100; border-radius: 0; } .aside .avatar-box { flex-direction: row; gap: 10px; margin: 0; padding: 5px; } .aside .avatar-box .avatar { width: 50px; height: 50px; margin: 0; } .aside .avatar-box .info { align-items: flex-start; } .aside .avatar-box .desc { max-width: 100px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .aside .nav { flex-direction: row; gap: 5px; overflow-y: hidden; overflow-x: auto; white-space: nowrap; } .aside .nav a { line-height: 50px; } .main { width: 100%; } .post-item { border-radius: 0; } .footer { border-radius: 0; } }