atlas-study/grid-study/styles.css
2026-01-24 18:06:58 +08:00

492 lines
8.7 KiB
CSS

* {
box-sizing: border-box;
}
body {
background-image: url('src/wallpaper/big_sure.webp');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
background-attachment: fixed;
}
/* 顶栏样式 */
.top-bar {
display: grid;
grid-template-columns: 1fr auto;
align-items: center;
padding: 8px 16px;
margin:10px 16px;
/* 黏性定位 */
position: sticky;
top: 5px;
z-index: 100;
background-color: rgba(255, 255, 255, 0.8);
/* 毛玻璃效果 */
backdrop-filter: blur(10px);
/* 顶栏圆角效果 */
border-radius: 12px;
}
.top-bar__brand {
font-weight: 550;
font-size: 20px;
display: flex;
align-items: center;
gap: 16px;
}
.top-bar__logo {
width: 32px;
height: 32px;
place-items: center;
border-radius: 50%;
object-fit: cover;
}
.top-bar__actions {
display: flex;
gap: 8px;
}
.top-bar__button {
width: 40px;
height: 40px;
padding: 0;
border: none;
border-radius: 50%;
background-color: transparent;
cursor: pointer;
font-size: 14px;
transition: var(--transition);
display: flex;
align-items: center;
justify-content: center;
color: #333;
}
.top-bar__button span {
display: none;
}
.top-bar__button:hover {
background-color: rgba(0, 0, 0, 0.05);
}
.top-bar__button:active {
transform: translateY(0);
}
/* 主区域样式 */
.main-content {
gap: 24px;
max-width: 1200px; /* 最大宽度限制 */
margin: 20px auto;
padding: 0 80px 20px 80px;
}
.dashboard-grid{
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-auto-rows: minmax(150px, auto); /* 自动行高 */
grid-auto-flow: dense; /* 紧凑排列 */
gap: 24px;
}
.card{
background-color: rgba(255, 255, 255, 0.8);
backdrop-filter: blur(10px);
border-radius: 20px;
border: 1px solid rgba(255, 255, 255, 0.2);
padding: 20px;
color: #333;
display: flex;
align-items: center;
gap: 16px;
transition: var(--transition);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.card:hover {
transform: translateY(-4px);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.card__profile{
grid-column: span 1;
grid-row: span 2;
flex-direction: column;
justify-content: center;
align-items: center;
}
/* 个人卡片样式 */
.profile {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
gap: 16px;
width: 100%;
}
.profile__avatar {
width: 120px;
height: 120px;
border-radius: 50%;
object-fit: cover;
border: 4px solid rgba(255, 255, 255, 0.8);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.profile__avatar:hover {
transform: scale(1.05);
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}
.profile__content {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
}
.profile__name {
margin: 0;
font-size: 24px;
font-weight: 600;
color: #333;
letter-spacing: 0.5px;
}
.profile__signature {
margin: 0;
font-size: 14px;
color: #666;
font-style: italic;
max-width: 200px;
line-height: 1.5;
}
.card__rss{
grid-column: span 2;
grid-row: span 2;
align-items: flex-start;
}
/* RSS 区域样式 */
.rss-wrapper {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
.rss-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
padding-bottom: 12px;
border-bottom: 1px solid rgba(0,0,0,0.06);
}
.rss-header h3 {
margin: 0;
font-size: 18px;
font-weight: 600;
color: #1d1d1f;
}
.rss-status {
font-size: 12px;
color: #86868b;
background: rgba(0,0,0,0.05);
padding: 4px 10px;
border-radius: 12px;
}
.rss-list {
flex: 1;
display: flex;
flex-direction: column;
gap: 16px;
overflow-y: auto;
padding-right: 4px;
}
.rss-item {
display: flex;
flex-direction: column;
gap: 4px;
}
.rss-meta {
display: flex;
align-items: center;
gap: 8px;
font-size: 12px;
color: #86868b;
}
.rss-tag {
color: #d93535;
font-weight: 500;
}
.rss-item h4 {
margin: 0;
font-size: 15px;
font-weight: 600;
line-height: 1.4;
}
.rss-item h4 a {
color: #1d1d1f;
text-decoration: none;
transition: color 0.2s;
}
.rss-item h4 a:hover {
color: #d93535;
}
.rss-item p {
margin: 4px 0 0 0;
font-size: 13px;
color: #666;
line-height: 1.5;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.rss-footer {
margin-top: 12px;
padding-top: 12px;
border-top: 1px solid rgba(0,0,0,0.06);
text-align: center;
}
.rss-more-btn {
display: inline-block;
padding: 6px 16px;
font-size: 13px;
color: #d93535;
background-color: rgba(217, 53, 53, 0.1);
border-radius: 16px;
text-decoration: none;
font-weight: 500;
transition: all 0.2s;
}
.rss-more-btn:hover {
background-color: #d93535;
color: white;
}
.card__hitokoto{
grid-column: span 1;
grid-row: span 1;
justify-content: center;
}
/* 一言样式 */
.hitokoto-content {
width: 100%;
}
.hitokoto__text {
font-size: 18px;
line-height: 1.6;
margin: 0 0 8px 0;
text-align: center;
font-weight: 500;
}
.hitokoto__from {
font-size: 13px;
color: #888;
text-align: right;
margin: 0;
}
.card__photos{
grid-column: span 1;
grid-row: span 1;
padding: 0;
overflow: hidden;
height: 180px;
}
.card__photos img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.card__task{
grid-column: span 2;
grid-row: span 2;
align-items: flex-start;
}
/* 任务列表样式 */
.task-container {
width: 100%;
display: flex;
flex-direction: column;
}
.task-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
padding-bottom: 12px;
border-bottom: 1px solid rgba(0,0,0,0.06);
}
.task-header h3 {
margin: 0;
font-size: 18px;
font-weight: 600;
color: #1d1d1f;
}
.task-count {
font-size: 12px;
color: #86868b;
background: rgba(0,0,0,0.05);
padding: 4px 10px;
border-radius: 12px;
}
.task-list {
list-style: none;
padding: 0;
margin: 0;
display: flex;
flex-direction: column;
gap: 2px;
}
.task-item {
display: flex;
align-items: center;
gap: 12px;
padding: 6px 8px;
border-radius: 8px;
transition: background-color 0.2s ease;
}
.task-item:hover {
background-color: rgba(0,0,0,0.03);
}
.task-item input[type="checkbox"] {
appearance: none;
-webkit-appearance: none;
width: 20px;
height: 20px;
border: 2px solid #c7c7cc;
border-radius: 50%; /* 圆形复选框 */
margin: 0;
outline: none;
cursor: pointer;
position: relative;
transition: all 0.2s ease;
flex-shrink: 0;
}
.task-item input[type="checkbox"]:checked {
background-color: #0071e3;
border-color: #0071e3;
}
.task-item input[type="checkbox"]:checked::after {
content: '';
position: absolute;
top: 45%;
left: 50%;
width: 9px;
height: 5px;
border-left: 2px solid white;
border-bottom: 2px solid white;
transform: translate(-50%, -50%) rotate(-45deg);
}
.task-item input[type="checkbox"]:hover {
border-color: #0071e3;
background-color: rgba(0, 113, 227, 0.05);
}
.task-item input[type="checkbox"]:checked:hover {
background-color: #0077ed;
}
.task-content {
flex: 1;
font-size: 15px;
color: #333;
cursor: pointer;
transition: all 0.2s ease;
}
/* 完成状态 */
.task-item input:checked + .task-content {
text-decoration: line-through;
color: #86868b;
}
/* 响应式设计 */
@media (max-width: 900px) {
.dashboard-grid {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 600px) {
.main-content {
padding: 0 20px 40px 20px;
}
.dashboard-grid {
grid-template-columns: 1fr;
gap: 16px;
grid-auto-rows: auto;
}
.card {
grid-column: span 1 !important;
grid-row: auto !important;
order: 10;
}
.card__profile{
grid-column: span 1;
order: 1;
}
.profile {
flex-direction: row;
text-align: left;
align-items: center;
}
.profile__avatar {
width: 80px;
height: 80px;
}
.card__rss,.card__task{
grid-column: span 1;
}
.card__hitokoto{
order: 2;
}
.card__photos {
height: 140px;
}
}