atlas-study/grid-study/index.html

125 lines
6.2 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Grid布局主页</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header class="top-bar">
<div class="top-bar__brand">
<img src="src/avatar_48.png" alt="Logo" class="top-bar__logo">
<span>Coldin04 的工作台</span>
</div>
<div class="top-bar__actions">
<button class="top-bar__button" onclick="window.location.href='https://cold04.com'">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path>
<polyline points="9 22 9 12 15 12 15 22"></polyline>
</svg>
</button>
<button class="top-bar__button" onclick="alert('你已退出登录(个鬼)')">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path>
<polyline points="16 17 21 12 16 7"></polyline>
<line x1="21" y1="12" x2="9" y2="12"></line>
</svg>
</button>
</div>
</header>
<div class="main-content">
<main class="dashboard-grid">
<section class="card card__profile">
<div class="profile">
<img src="src/avatar_240.webp" alt="头像" class="profile__avatar">
<div class="profile__content">
<h2 class="profile__name">Coldin04</h2>
<p class="profile__signature">Stay hungry, stay foolish.</p>
</div>
</div>
</section>
<section class="card card__rss">
<div class="rss-wrapper">
<div class="rss-header">
<h3>少数派 Prime</h3>
<span class="rss-status">sspai.com</span>
</div>
<div class="rss-list">
<article class="rss-item">
<div class="rss-meta">
<span class="rss-tag">SamWanng</span>
<time>Jan 23</time>
</div>
<h4><a href="https://sspai.com/post/105578" target="_blank">一日一技 | 老 Mac 系统恢复指北</a></h4>
<p>不能用 Wi-Fi 和 U 盘恢复系统的 Mac你还能试试这个重装方法。</p>
</article>
<article class="rss-item">
<div class="rss-meta">
<span class="rss-tag">少数派编辑部</span>
<time>Jan 23</time>
</div>
<h4><a href="https://sspai.com/post/105695" target="_blank">派早报realme 真我发布新品、Xbox 应用登陆 Arm PC 等</a></h4>
<p>索尼发布 LinkBuds Clip 开放式耳机、Adobe 将支持把 PDF 转换成播客等。</p>
</article>
</article>
</div>
<div class="rss-footer">
<a href="https://sspai.com" target="_blank" class="rss-more-btn">查看更多内容 →</a>
</div>
</div>
</section>
<section class="card card__task">
<div class="task-container">
<div class="task-header">
<h3>待办事项</h3>
<span class="task-count">4 items</span>
</div>
<ul class="task-list">
<li class="task-item">
<input type="checkbox" id="task1" checked>
<label for="task1" class="task-content">完成 Grid 布局学习</label>
</li>
<li class="task-item">
<input type="checkbox" id="task2">
<label for="task2" class="task-content">记得启动原神</label>
</li>
<li class="task-item">
<input type="checkbox" id="task3">
<label for="task3" class="task-content">其实这些只是测试文本</label>
</li>
<li class="task-item">
<input type="checkbox" id="task4">
<label for="task4" class="task-content">Home可以点</label>
</li>
</ul>
</div>
</section>
<section class="card card__hitokoto">
<div class="hitokoto-content">
<a href="#" id="hitokoto_text" class="hitokoto__text" target="_blank" style="text-decoration: none; color: inherit; display: block;">:D 获取中...</a>
<p id="hitokoto_from" class="hitokoto__from"></p>
</div>
</section>
<section class="card card__photos" style="border: none;">
<img src="src/wallpaper/desert.webp" alt="Photo" loading="lazy">
</section>
</main>
</div>
<script>
fetch('https://v1.hitokoto.cn')
.then(response => response.json())
.then(data => {
const hitokoto = document.querySelector('#hitokoto_text')
const from = document.querySelector('#hitokoto_from')
hitokoto.href = `https://hitokoto.cn/?uuid=${data.uuid}`
hitokoto.innerText = data.hitokoto
if (from) from.innerText = `—— ${data.from}`
})
.catch(console.error)
</script>
</body>
</html>