239 lines
5.4 KiB
HTML
239 lines
5.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>(IME)Settings</title>
|
|
<style>
|
|
:root {
|
|
--accent-color: #8E8CD8;
|
|
--bg-color: rgba(32, 32, 32, 0.65);
|
|
--sidebar-bg: rgba(25, 25, 25, 0.7);
|
|
--sidebar-hover: rgba(255, 255, 255, 0.09);
|
|
--item-active-hover: rgba(255, 255, 255, 0.06);
|
|
--text-color: #f3f3f3;
|
|
--border-color: rgba(255, 255, 255, 0.08);
|
|
--card-bg: rgba(38, 38, 38, 0.8);
|
|
--titlebar-height: 32px;
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
font-family: "Segoe UI Variable", "Segoe UI", "Noto Sans SC", sans-serif;
|
|
user-select: none;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100vh;
|
|
width: 100vw;
|
|
color: var(--text-color);
|
|
/* background: var(--bg-color); */
|
|
background: #202020;
|
|
/* backdrop-filter: blur(20px) saturate(160%); */
|
|
-webkit-backdrop-filter: blur(20px) saturate(160%);
|
|
/* overflow: hidden; */
|
|
}
|
|
|
|
/* 主体区域 */
|
|
.main {
|
|
display: flex;
|
|
flex: 1;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.sidebar {
|
|
width: 240px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
background: var(--sidebar-bg);
|
|
border-right: 1px solid var(--border-color);
|
|
padding: 12px 0;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.sidebar-header {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 0 24px 12px 24px;
|
|
gap: 10px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.sidebar-header img {
|
|
width: 28px;
|
|
height: 28px;
|
|
border-radius: 6px;
|
|
}
|
|
|
|
.sidebar-header span {
|
|
font-weight: 600;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.sidebar .item {
|
|
padding: 10px 24px;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
position: relative;
|
|
transition: background 0.2s, color 0.2s;
|
|
border-radius: 8px;
|
|
margin: 2px 8px;
|
|
color: #ccc;
|
|
}
|
|
|
|
.sidebar .item:hover {
|
|
background: var(--sidebar-hover);
|
|
}
|
|
|
|
.sidebar .item.active {
|
|
background: var(--item-active-hover);
|
|
}
|
|
|
|
.sidebar .item.active::before {
|
|
content: "";
|
|
position: absolute;
|
|
left: 8px;
|
|
width: 3px;
|
|
height: 40%;
|
|
border-radius: 3px;
|
|
background: var(--accent-color);
|
|
}
|
|
|
|
.content {
|
|
flex: 1;
|
|
padding: 32px 48px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.section {
|
|
background: var(--card-bg);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 12px;
|
|
padding: 20px 24px;
|
|
margin-bottom: 24px;
|
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
|
|
backdrop-filter: blur(10px);
|
|
}
|
|
|
|
.section h2 {
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
margin-bottom: 12px;
|
|
color: #ccc;
|
|
}
|
|
|
|
select {
|
|
padding: 6px 10px;
|
|
border-radius: 8px;
|
|
border: 1px solid var(--border-color);
|
|
background-color: rgba(45, 45, 45, 0.8);
|
|
color: #f3f3f3;
|
|
font-size: 14px;
|
|
transition: border 0.2s, background 0.2s;
|
|
}
|
|
|
|
select:focus {
|
|
outline: none;
|
|
border: 1px solid var(--accent-color);
|
|
background-color: rgba(50, 50, 50, 0.9);
|
|
}
|
|
|
|
input[type="range"] {
|
|
width: 100%;
|
|
accent-color: var(--accent-color);
|
|
}
|
|
|
|
.candidate-preview {
|
|
display: flex;
|
|
gap: 6px;
|
|
background: rgba(50, 50, 50, 0.8);
|
|
padding: 10px;
|
|
border-radius: 8px;
|
|
border: 1px solid var(--border-color);
|
|
}
|
|
|
|
.candidate-preview span {
|
|
padding: 6px 12px;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
transition: background 0.2s, color 0.2s;
|
|
color: #ddd;
|
|
}
|
|
|
|
.candidate-preview span:hover {
|
|
background: rgba(255, 255, 255, 0.1);
|
|
color: #fff;
|
|
}
|
|
|
|
.candidate-preview span.active {
|
|
background: var(--accent-color);
|
|
color: white;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="main">
|
|
<div class="sidebar">
|
|
<div class="sidebar-header">
|
|
<img src="https://imesettings/assets/MetasequoiaIME.ico" alt="">
|
|
<span>水杉输入法</span>
|
|
</div>
|
|
<div class="item active">通用</div>
|
|
<div class="item">外观</div>
|
|
<div class="item">输入</div>
|
|
<div class="item">快捷键</div>
|
|
<div class="item">词库管理</div>
|
|
<div class="item">皮肤</div>
|
|
<div class="item">帮助</div>
|
|
<div class="item">关于</div>
|
|
<div class="item">反馈</div>
|
|
</div>
|
|
|
|
<div class="content">
|
|
<div class="section">
|
|
<h2>默认主题模式</h2>
|
|
<select>
|
|
<option value="dark" selected>深色</option>
|
|
<option value="light">浅色</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="section">
|
|
<h2>候选词预览</h2>
|
|
<div class="candidate-preview">
|
|
<span>水</span>
|
|
<span>杉</span>
|
|
<span class="active">输入法</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
function onMinimize() {
|
|
if (window.chrome?.webview) {
|
|
window.chrome.webview.postMessage({ action: "minimize" });
|
|
}
|
|
}
|
|
|
|
function onMaximize() {
|
|
if (window.chrome?.webview) {
|
|
window.chrome.webview.postMessage({ action: "maximize" });
|
|
}
|
|
}
|
|
|
|
function onClose() {
|
|
if (window.chrome?.webview) {
|
|
window.chrome.webview.postMessage({ action: "close" });
|
|
}
|
|
}
|
|
</script>
|
|
</body>
|
|
|
|
</html> |