: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; } .container { display: flex; justify-content: center; align-items: flex-start; 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; } /* 鼠标进入后旋转180度,类开后恢复 */ .avatar:hover { transform: rotate(720deg); } .main { width: 0; flex: 1; transition: all .3s; } .footer { padding: 20px; margin: 20px 0; background: var(--background-color); border-radius: 12px; } .footer a { color: inherit; text-decoration: 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; } .post-item { margin-bottom: 20px; padding: 30px; background: var(--background-color); line-height: 30px; border-radius: 12px; } .post-item .title { font-size: 20px; font-weight: bold; margin: 0 0 10px; } .post-item .meta { font-size: 14px; opacity: 0.7; margin: 10px 0; } .post-item .meta span:nth-child(2)::before { content: '·'; margin: 0 5px; } .post-item .meta span:nth-child(3)::before { content: '·'; margin: 0 5px; } @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; } } .p-input { border: none; font-size: 20px; margin-top: 20px; margin-bottom: 10px; padding-bottom: 8px; background: linear-gradient(to right, var(--text-color), var(--text-color)) no-repeat left bottom; background-size: 10% 2px; color: var(--text-color); transition: all 0.3s; font-weight: bold; } .p-input::placeholder { color: var(--muted-text-color); letter-spacing: 0; } .p-input:focus { outline: none; background-size: 100% 2px !important; text-shadow: var(--secondary-text-color) 0 0 v-bind(titleShadowRadius); } .p-input:hover { background-size: 50% 2px; text-shadow: var(--secondary-text-color) 0 0 v-bind(titleShadowRadius); } .p-input[type="password"] { letter-spacing: 5px; font-size: 20px; } .p-input-danger { background: linear-gradient(to right, var(--danger-color), var(--danger-color)) no-repeat left bottom; background-size: 10% 2px; } .p-input-danger::placeholder { color: var(--danger-color); letter-spacing: 0; } .p-button { padding: 8px 12px; cursor: pointer; background: linear-gradient(to right, var(--text-color), var(--text-color)) no-repeat left bottom; color: var(--text-color); background-size: 100% 2px; font-weight: bold; transition: all .3s; } .p-button:hover { background-size: 100% 100%; color: var(--background-color); } .p-button-success { padding: 8px 12px; cursor: pointer; background: linear-gradient(to right, var(--success-color), var(--success-color)) no-repeat left bottom; color: var(--success-color); background-size: 100% 2px; font-weight: bold; transition: all .3s; } .p-button-success:hover { background-size: 100% 100%; color: var(--text-color); } .p-button-disabled { padding: 8px 12px; background-size: 100% 2px; font-weight: bold; transition: all .3s; cursor: not-allowed; color: var(--muted-text-color); background: linear-gradient(to right, var(--muted-text-color), var(--muted-text-color)) no-repeat left bottom; background-size: 100% 2px; }