first commit
This commit is contained in:
@@ -0,0 +1,192 @@
|
||||
# Resume — 可编辑简历构建器
|
||||
|
||||
纯静态 Web 页面,浏览器直接打开即可使用。所有内容可在页面上直接编辑,打印即出 PDF。
|
||||
|
||||
## 快速开始
|
||||
|
||||
```bash
|
||||
# 浏览器打开
|
||||
open index.html
|
||||
|
||||
# 或直接双击 index.html
|
||||
```
|
||||
|
||||
无需任何构建工具、包管理器或服务器。
|
||||
|
||||
## 功能
|
||||
|
||||
| 功能 | 说明 |
|
||||
|---|---|
|
||||
| ✏️ **所见即所得编辑** | 所有文字 contenteditable,点击直接修改 |
|
||||
| ➕ **动态增删条目** | 工作经历、项目经历、技能标签、侧边栏栏目均可自由增删 |
|
||||
| 🎨 **24 套颜色主题** | 经典蓝、暗夜黑、墨绿、酒红… ◀ ▶ 左右切换 |
|
||||
| 📐 **12 套设计版式** | 经典双栏、时间轴、卡片式、极简单栏… |
|
||||
| 🖨️ **打印导出 PDF** | Ctrl+P → 另存为 PDF,自动隐藏编辑 UI,多页自然分页 |
|
||||
| 📤 **XML 导入导出** | 完整数据 + 主题 + 版式全部序列化,可备份/恢复/分享 |
|
||||
| 💾 **自动保存** | localStorage 自动持久化,关闭浏览器不丢数据 |
|
||||
|
||||
## 文件结构
|
||||
|
||||
```
|
||||
resume/
|
||||
├── index.html ← 页面结构(纯 HTML,所有区段带 contenteditable)
|
||||
├── style.css ← 样式表(基础样式 + 12 套设计主题 + 打印样式)
|
||||
├── app.js ← 全部交互逻辑(IIFE 模块,挂载到 window.Resume)
|
||||
└── README.md ← 本文件
|
||||
```
|
||||
|
||||
### 各文件职责
|
||||
|
||||
| 文件 | 行数 | 职责 |
|
||||
|---|---|---|
|
||||
| `index.html` | ~150 | DOM 结构,通过 `onclick="Resume.xxx()"` 绑定事件 |
|
||||
| `style.css` | ~690 | CSS 变量默认值、屏幕/打印双布局、12 套 `.page.theme-xxx` |
|
||||
| `app.js` | ~560 | 数据采集/还原、主题切换、XML 序列化、自动保存、DOM 操作 |
|
||||
|
||||
## 架构说明
|
||||
|
||||
### 数据流
|
||||
|
||||
```
|
||||
用户编辑 DOM
|
||||
│
|
||||
▼
|
||||
input/focusout/keyup 事件
|
||||
│
|
||||
▼
|
||||
save() ── 400ms debounce ──► snapshot() 采集 DOM
|
||||
│ │
|
||||
│ ▼
|
||||
│ JSON.stringify
|
||||
│ │
|
||||
│ ▼
|
||||
│ localStorage
|
||||
│
|
||||
└── beforeunload ──► 强制保存
|
||||
```
|
||||
|
||||
### snapshot / restore 闭环
|
||||
|
||||
```
|
||||
snapshot()
|
||||
DOM ──────────────► 数据对象
|
||||
▲ │
|
||||
│ ▼
|
||||
│ JSON / XML
|
||||
│ │
|
||||
│ ▼
|
||||
└──── restore() ◄── 存储
|
||||
```
|
||||
|
||||
- **snapshot()** — 遍历 DOM 树,提取所有 contenteditable 元素内容,组装纯数据对象
|
||||
- **restore()** — 清空动态容器,用工厂函数重建 DOM,填入数据
|
||||
- 两者格式完全对称,确保闭环无丢失
|
||||
|
||||
### 主题系统
|
||||
|
||||
颜色主题和设计主题是**正交的**(24 × 12 = 288 种组合):
|
||||
|
||||
```
|
||||
颜色主题(24 种) 设计主题(12 种)
|
||||
┌─────────────────┐ ┌─────────────────┐
|
||||
│ CSS 变量注入 │ │ CSS class 切换 │
|
||||
│ :root 上设置 │ │ .page 上加 class │
|
||||
│ --ink, --accent │ │ .theme-timeline │
|
||||
│ --border, --bg │ │ .theme-cards │
|
||||
│ … │ │ … │
|
||||
└─────────────────┘ └─────────────────┘
|
||||
│ │
|
||||
└──────────┬───────────────────┘
|
||||
▼
|
||||
最终视觉效果
|
||||
```
|
||||
|
||||
### XML 格式
|
||||
|
||||
导出/导入使用统一 XML 结构,根元素携带主题属性:
|
||||
|
||||
```xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<resume theme="经典蓝" design="经典双栏">
|
||||
<name>张三</name>
|
||||
<title>嵌入式软件工程师</title>
|
||||
<contact>
|
||||
<item label="邮箱">zhangsan@example.com</item>
|
||||
<item label="手机">13800000000</item>
|
||||
<item label="城市">广州</item>
|
||||
<item label="链接">github.com/zhangsan</item>
|
||||
</contact>
|
||||
<skills>
|
||||
<skill>C/C++</skill>
|
||||
<skill>STM32</skill>
|
||||
</skills>
|
||||
<education>
|
||||
<school>某某大学</school>
|
||||
<major>电子信息工程 · 本科</major>
|
||||
<date>2016 – 2020</date>
|
||||
</education>
|
||||
<sidebarSections>
|
||||
<section>
|
||||
<title>证书</title>
|
||||
<content>嵌入式系统设计师</content>
|
||||
</section>
|
||||
</sidebarSections>
|
||||
<summary>概述文本…</summary>
|
||||
<experiences>
|
||||
<experience>
|
||||
<title>公司名称</title>
|
||||
<date>2022 – 至今</date>
|
||||
<subtitle>职位</subtitle>
|
||||
<bullets>
|
||||
<bullet>工作内容要点 1</bullet>
|
||||
<bullet>工作内容要点 2</bullet>
|
||||
</bullets>
|
||||
</experience>
|
||||
</experiences>
|
||||
<projects>…</projects>
|
||||
<extras>…</extras>
|
||||
</resume>
|
||||
```
|
||||
|
||||
## 设计主题一览
|
||||
|
||||
| # | 名称 | CSS class | 效果 |
|
||||
|---|---|---|---|
|
||||
| 1 | 经典双栏 | `theme-classic` | 左 180px + 右主内容(默认) |
|
||||
| 2 | 极简单栏 | `theme-minimal` | 全宽单栏,侧栏压缩到顶部横排 |
|
||||
| 3 | 右侧栏 | `theme-rightbar` | 侧栏在右,主内容在左 |
|
||||
| 4 | 顶栏式 | `theme-topbar` | 个人信息横排顶部,下方全宽 |
|
||||
| 5 | 左色条 | `theme-accentbar` | 侧栏左侧 accent 色 4px 粗竖线 |
|
||||
| 6 | 宽侧栏 | `theme-wideside` | 侧栏加宽至 240px |
|
||||
| 7 | 紧凑 | `theme-compact` | 缩小间距字号,高信息密度 |
|
||||
| 8 | 卡片式 | `theme-cards` | 主内容区 section 用卡片包裹 |
|
||||
| 9 | 时间轴 | `theme-timeline` | 日期提取到左侧圆点标记 |
|
||||
| 10 | 双色块 | `theme-duotone` | 侧栏带浅色背景色块 |
|
||||
| 11 | 线条风 | `theme-lines` | section 间 accent 色粗线分割 |
|
||||
| 12 | 无框 | `theme-frameless` | 去掉所有边框和背景装饰 |
|
||||
|
||||
## 打印说明
|
||||
|
||||
- **快捷键**:`Ctrl+P`(Windows/Linux)或 `Cmd+P`(Mac)
|
||||
- **导出 PDF**:打印对话框中选择"另存为 PDF"
|
||||
- 打印时自动隐藏工具栏、添加按钮、删除按钮
|
||||
- 第二页起 sidebar 不重复出现,主内容全宽
|
||||
- 设计主题在打印时不生效(统一紧凑单栏布局)
|
||||
- 颜色主题的 accent 色在打印中保留
|
||||
|
||||
## 浏览器兼容
|
||||
|
||||
- Chrome / Edge 90+
|
||||
- Firefox 90+
|
||||
- Safari 15+
|
||||
- 任何支持 CSS Grid + CSS 自定义属性的现代浏览器
|
||||
|
||||
## 技术栈
|
||||
|
||||
- 纯 HTML5 + CSS3 + Vanilla JavaScript (ES6+)
|
||||
- CSS Grid 双栏布局
|
||||
- CSS 自定义属性(变量)主题系统
|
||||
- DOMParser XML 序列化/反序列化
|
||||
- localStorage 持久化
|
||||
- Blob + URL.createObjectURL 文件下载
|
||||
- FileReader 文件读取
|
||||
+1055
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,161 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
=============================================================================
|
||||
Resume — 可编辑简历构建器
|
||||
=============================================================================
|
||||
纯静态页面,浏览器直接打开即可使用。
|
||||
依赖:style.css(样式) + app.js(逻辑)
|
||||
所有文字 contenteditable,所见即所得。
|
||||
工具栏:打印PDF | 导出XML | 导入XML | 配色◀▶ | 版式◀▶ | 重置
|
||||
=============================================================================
|
||||
-->
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>个人简历</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Toolbar -->
|
||||
<div class="toolbar no-print">
|
||||
<button class="btn btn-print" onclick="window.print()">🖨️ 打印 / 导出 PDF</button>
|
||||
<button class="btn btn-xml" onclick="Resume.exportXML()">📤 导出 XML</button>
|
||||
<button class="btn btn-xml" onclick="document.getElementById('importFile').click()">📥 导入 XML</button>
|
||||
<span class="theme-switcher no-print" title="颜色主题">
|
||||
<button class="btn btn-theme" onclick="Resume.prevTheme()">◀</button>
|
||||
<span class="theme-label" id="themeLabel">经典蓝</span>
|
||||
<button class="btn btn-theme" onclick="Resume.nextTheme()">▶</button>
|
||||
</span>
|
||||
<span class="theme-switcher no-print" title="设计版式">
|
||||
<button class="btn btn-theme" onclick="Resume.prevDesign()">◀</button>
|
||||
<span class="theme-label" id="designLabel">经典双栏</span>
|
||||
<button class="btn btn-theme" onclick="Resume.nextDesign()">▶</button>
|
||||
</span>
|
||||
<button class="btn btn-reset" onclick="Resume.reset()">↺ 重置</button>
|
||||
<input type="file" id="importFile" accept=".xml" style="display:none" onchange="Resume.importXML(this)">
|
||||
</div>
|
||||
<div class="edit-hint no-print">💡 点击文字直接编辑 · 点击 [+ 添加] 增条目 · 悬停条目右侧删 · 改完 Ctrl+P 出 PDF</div>
|
||||
|
||||
<!-- Page -->
|
||||
<div class="page">
|
||||
|
||||
<div class="resume-grid">
|
||||
|
||||
<!-- ============================================================
|
||||
Sidebar — 左侧个人信息栏
|
||||
内容:姓名/头衔、联系方式、技能标签、教育背景、自定义栏目
|
||||
============================================================ -->
|
||||
<aside class="sidebar">
|
||||
|
||||
<!-- Name -->
|
||||
<section class="name-section">
|
||||
<h1>
|
||||
<span contenteditable="true" data-placeholder="你的姓名"></span>
|
||||
<span class="sub" contenteditable="true" data-placeholder="职位 / 方向"></span>
|
||||
</h1>
|
||||
</section>
|
||||
|
||||
<!-- Contact -->
|
||||
<section>
|
||||
<h2>联系方式</h2>
|
||||
<div class="info-item">
|
||||
<span class="info-label">📧</span>
|
||||
<span contenteditable="true" data-placeholder="邮箱"></span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">📱</span>
|
||||
<span contenteditable="true" data-placeholder="手机号"></span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">📍</span>
|
||||
<span contenteditable="true" data-placeholder="城市"></span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">🔗</span>
|
||||
<span contenteditable="true" data-placeholder="GitHub / 博客 / 主页"></span>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Skills -->
|
||||
<section>
|
||||
<h2>技术栈</h2>
|
||||
<div class="skill-tags" id="skillTags">
|
||||
<!-- dynamic -->
|
||||
</div>
|
||||
<div class="add-btn-group no-print">
|
||||
<button class="add-btn" onclick="Resume.addSkill()">+ 添加技能</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Education -->
|
||||
<section>
|
||||
<h2>教育背景</h2>
|
||||
<div class="editable-block">
|
||||
<h3 contenteditable="true" data-placeholder="学校名称"></h3>
|
||||
<div class="section-sub" contenteditable="true" data-placeholder="专业 · 学历"></div>
|
||||
<div class="date" contenteditable="true" data-placeholder="起止时间"></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Custom sidebar sections (dynamic) -->
|
||||
<div id="sidebarCustom">
|
||||
<!-- dynamic -->
|
||||
</div>
|
||||
<div class="add-btn-group no-print">
|
||||
<button class="add-btn" onclick="Resume.addSidebarSection()">+ 添加栏目</button>
|
||||
</div>
|
||||
|
||||
</aside>
|
||||
|
||||
<!-- ====== Main Content ====== -->
|
||||
<main class="main">
|
||||
|
||||
<!-- Summary -->
|
||||
<section>
|
||||
<h2>个人概述</h2>
|
||||
<p class="summary-text" contenteditable="true" data-placeholder="用一段话概括你的核心竞争力和职业方向…"></p>
|
||||
</section>
|
||||
|
||||
<!-- Experience -->
|
||||
<section>
|
||||
<h2>工作经历</h2>
|
||||
<div id="experienceList">
|
||||
<!-- dynamic -->
|
||||
</div>
|
||||
<div class="add-btn-group no-print">
|
||||
<button class="add-btn" onclick="Resume.addExperience()">+ 添加工作经历</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Projects -->
|
||||
<section>
|
||||
<h2>项目经历</h2>
|
||||
<div id="projectList">
|
||||
<!-- dynamic -->
|
||||
</div>
|
||||
<div class="add-btn-group no-print">
|
||||
<button class="add-btn" onclick="Resume.addProject()">+ 添加项目经历</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Additional -->
|
||||
<section>
|
||||
<h2>其他</h2>
|
||||
<div id="extraList">
|
||||
<!-- dynamic -->
|
||||
</div>
|
||||
<div class="add-btn-group no-print">
|
||||
<button class="add-btn" onclick="Resume.addExtra()">+ 添加条目</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,692 @@
|
||||
/**
|
||||
* =============================================================================
|
||||
* Resume — 样式表
|
||||
* =============================================================================
|
||||
*
|
||||
* 文件结构:
|
||||
* 1. Reset & CSS 变量 (默认值)
|
||||
* 2. @media print — 打印样式(隐藏UI、多页分页、sidebar转顶部)
|
||||
* 3. @media screen — 屏幕端基础布局
|
||||
* 4. Editable — contenteditable 交互样式
|
||||
* 5. Grid Layout — 双栏布局
|
||||
* 6. Typography — 标题、段落、字体
|
||||
* 7. Sidebar — 侧边栏(联系方式、技能、教育)
|
||||
* 8. Sidebar Custom Sections — 动态自定义栏目
|
||||
* 9. Main Content — 主内容区
|
||||
* 10. Section Cards — 经历/项目卡片
|
||||
* 11. Bullet Lists — 要点列表
|
||||
* 12. Add Buttons — 添加按钮
|
||||
* 13. Toolbar — 顶部工具栏
|
||||
* 14. DESIGN THEMES — 12 套版式布局(.page.theme-xxx)
|
||||
* 15. Responsive — 移动端适配
|
||||
*
|
||||
* 颜色不在本文件中硬编码;全部通过 CSS 变量控制,由 app.js 动态注入。
|
||||
* 设计主题通过 .page 上的 CSS class 切换(如 .page.theme-timeline)。
|
||||
* =============================================================================
|
||||
*/
|
||||
|
||||
/* ===== Reset & Variables ===== */
|
||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
||||
:root {
|
||||
--ink: #1a1a1a;
|
||||
--ink-muted: #555;
|
||||
--accent: #1e5fa8;
|
||||
--accent-light: #e8f0fa;
|
||||
--border: #ddd;
|
||||
--bg: #fff;
|
||||
--surface: #f8f9fa;
|
||||
--radius: 6px;
|
||||
--font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
|
||||
--font-mono: "JetBrains Mono", "Cascadia Code", "Fira Code", "SF Mono", "Monaco", monospace;
|
||||
}
|
||||
|
||||
/* ===== Print ===== */
|
||||
@media print {
|
||||
@page { size: A4; margin: 0; }
|
||||
body {
|
||||
background: #fff;
|
||||
-webkit-print-color-adjust: exact;
|
||||
print-color-adjust: exact;
|
||||
}
|
||||
.page {
|
||||
box-shadow: none;
|
||||
margin: 0 auto;
|
||||
padding: 36px 44px;
|
||||
max-width: 210mm;
|
||||
/* No min-height — natural multi-page flow */
|
||||
}
|
||||
.section-card { break-inside: avoid; page-break-inside: avoid; }
|
||||
h2 { break-after: avoid; page-break-after: avoid; }
|
||||
/* Keep heading with the first card that follows */
|
||||
section > h2 + * { break-before: avoid; }
|
||||
.no-print { display: none !important; }
|
||||
[contenteditable]:focus { outline: none; }
|
||||
[contenteditable]:empty::before { display: none; }
|
||||
|
||||
/* Collapse sidebar into compact header on page 1; page 2+ is full-width main */
|
||||
.resume-grid {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 0;
|
||||
}
|
||||
.sidebar {
|
||||
position: static;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px 20px;
|
||||
align-items: flex-start;
|
||||
padding-bottom: 14px;
|
||||
margin-bottom: 20px;
|
||||
border-bottom: 2px solid var(--accent);
|
||||
}
|
||||
.sidebar .name-section {
|
||||
flex-basis: 100%;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.sidebar .name-section h1 { font-size: 22px; display: flex; gap: 12px; align-items: baseline; }
|
||||
.sidebar .name-section h1 .sub { margin-top: 0; }
|
||||
.sidebar section {
|
||||
margin-bottom: 0;
|
||||
min-width: 120px;
|
||||
}
|
||||
.sidebar h2 {
|
||||
border-bottom: none;
|
||||
margin-bottom: 2px;
|
||||
padding-bottom: 0;
|
||||
font-size: 11px;
|
||||
}
|
||||
.sidebar .info-item { margin-bottom: 1px; }
|
||||
.skill-tags { gap: 3px; }
|
||||
.skill-tag { font-size: 10px; padding: 1px 5px; }
|
||||
.editable-block h3 { font-size: 12px; }
|
||||
.sidebar .section-sub { font-size: 11px; }
|
||||
.sidebar .date { font-size: 11px; }
|
||||
|
||||
/* Sidebar custom sections in print */
|
||||
.sidebar-custom-section { min-width: 100px; }
|
||||
.sidebar-custom-section h2 { font-size: 11px; margin-bottom: 2px; }
|
||||
.sidebar-custom-section .sidebar-custom-content { font-size: 11px; }
|
||||
|
||||
/* Main content full width */
|
||||
.main { width: 100%; }
|
||||
}
|
||||
|
||||
/* ===== Screen ===== */
|
||||
@media screen {
|
||||
body {
|
||||
background: var(--body-bg, #e8ecf1);
|
||||
font-family: var(--font-sans);
|
||||
color: var(--ink);
|
||||
line-height: 1.6;
|
||||
padding: 20px;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.page {
|
||||
background: var(--bg);
|
||||
width: 210mm;
|
||||
min-height: 297mm;
|
||||
padding: 36px 44px;
|
||||
box-shadow: 0 2px 20px rgba(0,0,0,.12);
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
/* ===== Editable ===== */
|
||||
[contenteditable] {
|
||||
outline: none;
|
||||
border-radius: 3px;
|
||||
transition: background .15s;
|
||||
cursor: text;
|
||||
}
|
||||
[contenteditable]:hover {
|
||||
background: rgba(30,95,168,.04);
|
||||
}
|
||||
[contenteditable]:focus {
|
||||
background: rgba(30,95,168,.08);
|
||||
box-shadow: 0 0 0 1.5px var(--accent);
|
||||
border-radius: 3px;
|
||||
}
|
||||
[contenteditable]:empty::before {
|
||||
content: attr(data-placeholder);
|
||||
color: #bbb;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* ===== Layout ===== */
|
||||
.resume-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 200px 1fr;
|
||||
gap: 32px;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
position: sticky;
|
||||
top: 36px;
|
||||
}
|
||||
|
||||
/* ===== Typography ===== */
|
||||
h1 {
|
||||
font-size: 26px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 1px;
|
||||
line-height: 1.2;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
h1 .sub {
|
||||
display: block;
|
||||
font-size: 13px;
|
||||
font-weight: 400;
|
||||
color: var(--ink-muted);
|
||||
margin-top: 4px;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
h2 {
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 2px;
|
||||
color: var(--accent);
|
||||
margin-bottom: 10px;
|
||||
padding-bottom: 5px;
|
||||
border-bottom: 2px solid var(--accent);
|
||||
}
|
||||
h3 {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
h3 .meta {
|
||||
font-weight: 400;
|
||||
color: var(--ink-muted);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* ===== Sidebar ===== */
|
||||
.sidebar section {
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
.sidebar h2 {
|
||||
border-bottom-color: var(--border);
|
||||
color: var(--ink);
|
||||
font-size: 12px;
|
||||
}
|
||||
.name-section {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
.info-item {
|
||||
font-size: 12px;
|
||||
margin-bottom: 5px;
|
||||
display: flex;
|
||||
gap: 5px;
|
||||
}
|
||||
.info-label {
|
||||
color: var(--ink-muted);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.skill-tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 5px;
|
||||
}
|
||||
.skill-tag {
|
||||
font-size: 11px;
|
||||
background: var(--accent-light);
|
||||
color: var(--accent);
|
||||
padding: 2px 8px;
|
||||
border-radius: 3px;
|
||||
font-weight: 500;
|
||||
position: relative;
|
||||
cursor: text;
|
||||
}
|
||||
.skill-tag .tag-delete {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: -6px;
|
||||
right: -6px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background: #e74c3c;
|
||||
color: #fff;
|
||||
border-radius: 50%;
|
||||
font-size: 10px;
|
||||
line-height: 16px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
}
|
||||
.skill-tag:hover .tag-delete {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* ===== Sidebar custom sections ===== */
|
||||
.sidebar-custom-section {
|
||||
margin-bottom: 16px;
|
||||
position: relative;
|
||||
padding: 8px;
|
||||
border: 1px dashed transparent;
|
||||
border-radius: var(--radius);
|
||||
transition: border-color .15s;
|
||||
}
|
||||
.sidebar-custom-section:hover {
|
||||
border-color: var(--border);
|
||||
}
|
||||
.sidebar-custom-section .sidebar-custom-title {
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1.5px;
|
||||
color: var(--ink);
|
||||
margin-bottom: 4px;
|
||||
padding-bottom: 4px;
|
||||
border-bottom: 1.5px solid var(--border);
|
||||
min-width: 2em;
|
||||
}
|
||||
.sidebar-custom-section .sidebar-custom-content {
|
||||
font-size: 12px;
|
||||
color: var(--ink-muted);
|
||||
line-height: 1.5;
|
||||
min-height: 1em;
|
||||
}
|
||||
.sidebar-custom-section .card-delete {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: -4px;
|
||||
right: -4px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background: #e74c3c;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
font-size: 10px;
|
||||
line-height: 18px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
opacity: .7;
|
||||
}
|
||||
.sidebar-custom-section:hover .card-delete {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* ===== Main ===== */
|
||||
.main section {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
/* Section card (experience, project) */
|
||||
.section-card {
|
||||
position: relative;
|
||||
margin-bottom: 14px;
|
||||
padding-bottom: 14px;
|
||||
border-bottom: 1px dashed var(--border);
|
||||
}
|
||||
.section-card:last-child {
|
||||
border-bottom: none;
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.section-card .card-delete {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
background: #e74c3c;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
font-size: 12px;
|
||||
line-height: 22px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
opacity: .7;
|
||||
transition: opacity .15s;
|
||||
}
|
||||
.section-card:hover .card-delete {
|
||||
display: block;
|
||||
}
|
||||
.section-card .card-delete:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.section-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: baseline;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
.section-header .date {
|
||||
font-size: 12px;
|
||||
color: var(--ink-muted);
|
||||
white-space: nowrap;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.section-sub {
|
||||
font-size: 13px;
|
||||
color: var(--ink-muted);
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
/* Bullet list */
|
||||
ul.bullets {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
ul.bullets li {
|
||||
font-size: 13px;
|
||||
margin-bottom: 3px;
|
||||
padding-left: 14px;
|
||||
position: relative;
|
||||
}
|
||||
ul.bullets li::before {
|
||||
content: "—";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
color: var(--accent);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 13px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.date {
|
||||
font-size: 12px;
|
||||
color: var(--ink-muted);
|
||||
}
|
||||
|
||||
/* ===== Add Button ===== */
|
||||
.add-btn-group {
|
||||
margin-top: 8px;
|
||||
}
|
||||
.add-btn {
|
||||
font-size: 12px;
|
||||
padding: 4px 12px;
|
||||
border: 1px dashed var(--accent);
|
||||
background: transparent;
|
||||
color: var(--accent);
|
||||
border-radius: var(--radius);
|
||||
cursor: pointer;
|
||||
font-family: var(--font-sans);
|
||||
transition: all .15s;
|
||||
}
|
||||
.add-btn:hover {
|
||||
background: var(--accent-light);
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
/* ===== Toolbar ===== */
|
||||
.toolbar {
|
||||
position: fixed;
|
||||
top: 14px;
|
||||
right: 14px;
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
z-index: 100;
|
||||
}
|
||||
.btn {
|
||||
font-size: 12px;
|
||||
padding: 7px 14px;
|
||||
border: none;
|
||||
border-radius: var(--radius);
|
||||
cursor: pointer;
|
||||
font-weight: 600;
|
||||
transition: all .15s;
|
||||
font-family: var(--font-sans);
|
||||
}
|
||||
.btn-print {
|
||||
background: var(--accent);
|
||||
color: #fff;
|
||||
}
|
||||
.btn-print:hover { background: #164a85; }
|
||||
.btn-xml {
|
||||
background: #fff;
|
||||
color: var(--accent);
|
||||
border: 1px solid var(--accent);
|
||||
}
|
||||
.btn-xml:hover { background: var(--accent-light); }
|
||||
.theme-switcher {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
}
|
||||
.btn-theme {
|
||||
background: transparent;
|
||||
color: var(--ink-muted);
|
||||
border: 1px solid var(--border);
|
||||
padding: 5px 8px;
|
||||
font-size: 11px;
|
||||
min-width: auto;
|
||||
}
|
||||
.btn-theme:hover { background: var(--surface); color: var(--ink); }
|
||||
.theme-label {
|
||||
font-size: 11px;
|
||||
color: var(--accent);
|
||||
font-weight: 600;
|
||||
min-width: 48px;
|
||||
text-align: center;
|
||||
user-select: none;
|
||||
}
|
||||
.btn-reset {
|
||||
background: #fff;
|
||||
color: var(--ink-muted);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
.btn-reset:hover { background: var(--surface); }
|
||||
.edit-hint {
|
||||
position: fixed;
|
||||
bottom: 14px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
font-size: 12px;
|
||||
background: rgba(0,0,0,.7);
|
||||
color: #fff;
|
||||
padding: 5px 16px;
|
||||
border-radius: 20px;
|
||||
z-index: 100;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* ===== Editable block ===== */
|
||||
.editable-block {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* ===== Summary ===== */
|
||||
.summary-text {
|
||||
min-height: 1.6em;
|
||||
}
|
||||
|
||||
/* ===== Bullet list item controls ===== */
|
||||
.bullet-li {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 4px;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
.bullet-li .li-delete {
|
||||
display: none;
|
||||
flex-shrink: 0;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background: #e74c3c;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
font-size: 10px;
|
||||
line-height: 16px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
opacity: .7;
|
||||
margin-top: 2px;
|
||||
}
|
||||
.bullet-li:hover .li-delete {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* ===== Responsive ===== */
|
||||
@media screen and (max-width: 800px) {
|
||||
.page { width: 100%; padding: 20px 16px; }
|
||||
.resume-grid { grid-template-columns: 1fr; gap: 20px; }
|
||||
.sidebar { position: static; }
|
||||
.toolbar { top: 6px; right: 6px; }
|
||||
.btn { padding: 5px 10px; font-size: 11px; }
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
DESIGN THEMES — 12 layout presets
|
||||
Applied via .page.theme-xxx
|
||||
============================================================ */
|
||||
|
||||
/* 1. Classic — default, no overrides needed */
|
||||
|
||||
/* 2. Minimal — single column, sidebar as compact top header */
|
||||
.page.theme-minimal .resume-grid {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 24px;
|
||||
}
|
||||
.page.theme-minimal .sidebar {
|
||||
position: static;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px 24px;
|
||||
align-items: flex-start;
|
||||
padding-bottom: 12px;
|
||||
margin-bottom: 18px;
|
||||
border-bottom: 2px solid var(--border);
|
||||
}
|
||||
.page.theme-minimal .sidebar .name-section { flex-basis: 100%; margin-bottom: 2px; }
|
||||
.page.theme-minimal .sidebar .name-section h1 { font-size: 24px; }
|
||||
.page.theme-minimal .sidebar section { margin-bottom: 0; min-width: 100px; }
|
||||
.page.theme-minimal .sidebar h2 {
|
||||
border-bottom: none; margin-bottom: 2px; padding-bottom: 0; font-size: 11px;
|
||||
}
|
||||
|
||||
/* 3. Right bar — sidebar on the right */
|
||||
.page.theme-rightbar .resume-grid {
|
||||
grid-template-columns: 1fr 180px;
|
||||
}
|
||||
.page.theme-rightbar .sidebar { order: 2; }
|
||||
|
||||
/* 4. Top bar — sidebar as full-width header, single column body */
|
||||
.page.theme-topbar .resume-grid {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 0;
|
||||
}
|
||||
.page.theme-topbar .sidebar {
|
||||
position: static;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px 28px;
|
||||
align-items: flex-start;
|
||||
padding-bottom: 14px;
|
||||
margin-bottom: 22px;
|
||||
border-bottom: 2px solid var(--accent);
|
||||
}
|
||||
.page.theme-topbar .sidebar .name-section { flex-basis: 100%; margin-bottom: 4px; }
|
||||
.page.theme-topbar .sidebar .name-section h1 { font-size: 24px; }
|
||||
.page.theme-topbar .sidebar section { margin-bottom: 0; min-width: 100px; }
|
||||
.page.theme-topbar .sidebar h2 {
|
||||
border-bottom: none; margin-bottom: 2px; padding-bottom: 0; font-size: 11px;
|
||||
}
|
||||
|
||||
/* 5. Accent bar — thick accent left border on sidebar */
|
||||
.page.theme-accentbar .sidebar {
|
||||
border-left: 4px solid var(--accent);
|
||||
padding-left: 14px;
|
||||
}
|
||||
|
||||
/* 6. Wide side — 240px sidebar */
|
||||
.page.theme-wideside .resume-grid {
|
||||
grid-template-columns: 240px 1fr;
|
||||
}
|
||||
|
||||
/* 7. Compact — tighter spacing everywhere */
|
||||
.page.theme-compact .resume-grid { gap: 20px; }
|
||||
.page.theme-compact .sidebar section { margin-bottom: 14px; }
|
||||
.page.theme-compact .main section { margin-bottom: 16px; }
|
||||
.page.theme-compact .section-card { margin-bottom: 8px; padding-bottom: 8px; }
|
||||
.page.theme-compact h1 { font-size: 22px; }
|
||||
.page.theme-compact h2 { font-size: 12px; margin-bottom: 6px; padding-bottom: 3px; }
|
||||
.page.theme-compact h3 { font-size: 12px; }
|
||||
.page.theme-compact ul.bullets li { font-size: 11px; margin-bottom: 1px; }
|
||||
.page.theme-compact p { font-size: 11px; }
|
||||
.page.theme-compact .page { padding: 28px 32px; }
|
||||
|
||||
/* 8. Cards — sections wrapped in card containers */
|
||||
.page.theme-cards .main section {
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
padding: 16px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.page.theme-cards .main section h2 {
|
||||
margin-top: -4px;
|
||||
}
|
||||
|
||||
/* 9. Timeline — left-positioned date markers on experiences/projects */
|
||||
.page.theme-timeline .section-card {
|
||||
padding-left: 80px;
|
||||
position: relative;
|
||||
}
|
||||
.page.theme-timeline .section-card .date {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
font-size: 11px;
|
||||
color: var(--accent);
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.page.theme-timeline .section-card::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 68px;
|
||||
top: 4px;
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
background: var(--accent);
|
||||
border-radius: 50%;
|
||||
}
|
||||
.page.theme-timeline .section-header .date { display: none; }
|
||||
|
||||
/* 10. Duotone — sidebar has a subtle background colour */
|
||||
.page.theme-duotone .sidebar {
|
||||
background: var(--surface);
|
||||
margin: -16px;
|
||||
padding: 16px;
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
.page.theme-duotone .resume-grid { gap: 28px; }
|
||||
|
||||
/* 11. Lines — bold horizontal rules between sections, no card borders */
|
||||
.page.theme-lines .main section {
|
||||
padding-bottom: 18px;
|
||||
margin-bottom: 18px;
|
||||
border-bottom: 2px solid var(--accent);
|
||||
}
|
||||
.page.theme-lines .main section:last-child { border-bottom: none; }
|
||||
.page.theme-lines .section-card {
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
.page.theme-lines .section-card:last-child { border-bottom: none; }
|
||||
.page.theme-lines .sidebar section {
|
||||
padding-bottom: 14px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
.page.theme-lines .sidebar section:last-child { border-bottom: none; }
|
||||
|
||||
/* 12. Frameless — no borders, no backgrounds, pure whitespace */
|
||||
.page.theme-frameless .sidebar h2 { border-bottom: none; padding-bottom: 0; }
|
||||
.page.theme-frameless .main section h2 { border-bottom: none; padding-bottom: 0; }
|
||||
.page.theme-frameless .section-card { border-bottom: none; padding-bottom: 10px; margin-bottom: 10px; }
|
||||
.page.theme-frameless .sidebar-custom-section { border: none; }
|
||||
.page.theme-frameless .sidebar-custom-section .sidebar-custom-title { border-bottom: none; }
|
||||
.page.theme-frameless .add-btn { border-style: solid; opacity: .5; }
|
||||
Reference in New Issue
Block a user