/* @theme university-blue */ /* * 学校定制主题 —— 以经典学术蓝为基调 * 适用于:学术报告、论文答辩、课程讲义 * 灵感来源:favourhong/Awesome-Marp、zhaoluting/marp-themes * * 使用方法: * 1. 将此文件放入 Obsidian vault 的 MarpTheme/ 目录 * 2. 重启 Obsidian * 3. 在幻灯片 front-matter 中写 theme: university-blue */ @import 'default'; /* ========== 颜色变量 ========== */ :root { --color-primary: #003366; /* 主色:深学术蓝 */ --color-secondary: #1a6fb5; /* 辅助色:中蓝 */ --color-accent: #c8102e; /* 强调色:学术红 */ --color-bg: #ffffff; /* 背景色 */ --color-text: #2c2c2c; /* 正文色 */ --color-light: #f0f4f8; /* 浅色背景 */ --color-border: #d0dbe8; /* 边框色 */ --color-muted: #6b7b8d; /* 次要文字 */ --font-title: 'Georgia', 'Noto Serif SC', '宋体', serif; --font-body: 'Segoe UI', 'Noto Sans SC', '微软雅黑', sans-serif; --font-code: 'Cascadia Code', 'Fira Code', 'Consolas', monospace; } /* ========== 全局 ========== */ section { font-family: var(--font-body); font-size: 26px; color: var(--color-text); background-color: var(--color-bg); line-height: 1.6; padding: 40px 60px; } /* ========== 标题 ========== */ h1 { font-family: var(--font-title); font-size: 48px; color: var(--color-primary); border-bottom: 3px solid var(--color-secondary); padding-bottom: 15px; margin-bottom: 30px; } h2 { font-family: var(--font-title); font-size: 36px; color: var(--color-primary); margin-top: 10px; } h3 { font-family: var(--font-title); font-size: 30px; color: var(--color-secondary); } h4, h5, h6 { font-family: var(--font-title); color: var(--color-secondary); } /* ========== 列表 ========== */ ul, ol { padding-left: 30px; line-height: 1.8; } ul li::marker { color: var(--color-secondary); } ol li::marker { color: var(--color-secondary); font-weight: bold; } /* ========== 引用 ========== */ blockquote { border-left: 5px solid var(--color-secondary); background-color: var(--color-light); padding: 15px 25px; margin: 20px 0; border-radius: 0 8px 8px 0; font-size: 0.9em; } blockquote p { margin: 0; } /* ========== 代码 ========== */ code { font-family: var(--font-code); background-color: #e8eef4; color: var(--color-primary); padding: 2px 6px; border-radius: 3px; font-size: 0.85em; } pre { background-color: #1e293b; color: #e2e8f0; border-radius: 8px; padding: 25px; font-size: 0.78em; line-height: 1.5; border-left: 4px solid var(--color-secondary); } pre code { background: none; color: inherit; padding: 0; font-size: 1em; } /* ========== 表格 ========== */ table { border-collapse: collapse; margin: 20px auto; font-size: 0.85em; } th { background-color: var(--color-primary); color: white; padding: 12px 20px; text-align: center; font-weight: bold; } td { padding: 10px 20px; border-bottom: 1px solid var(--color-border); } table tr:nth-child(even) { background-color: var(--color-light); } /* ========== 图片 ========== */ img { max-width: 90%; border-radius: 6px; margin: 10px auto; display: block; } /* ========== 链接 ========== */ a { color: var(--color-secondary); text-decoration: none; border-bottom: 1px dashed var(--color-secondary); } a:hover { color: var(--color-accent); } /* ========== 强调 ========== */ strong { color: var(--color-primary); font-weight: 700; } /* ========== 页码 ========== */ section::after { font-size: 14px; color: var(--color-muted); content: attr(data-marpit-pagination) ' / ' attr(data-marpit-pagination-total); } /* ======================================== 特殊页面 class 指令 ======================================== */ /* ---------- 封面页 ---------- */ section.cover { background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%); color: white; text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; } section.cover h1 { color: white; border: none; font-size: 52px; padding-bottom: 0; margin-bottom: 15px; } section.cover h2 { color: rgba(255, 255, 255, 0.9); font-size: 28px; font-weight: normal; } section.cover h3 { color: rgba(255, 255, 255, 0.8); font-size: 22px; font-weight: normal; } section.cover::after { content: none; } section.cover footer { color: rgba(255, 255, 255, 0.7); } /* ---------- 过渡页 ---------- */ section.trans { background-color: var(--color-light); text-align: center; display: flex; justify-content: center; align-items: center; } section.trans h2 { color: var(--color-primary); font-size: 42px; margin: 0; } /* ---------- 深色页 ---------- */ section.dark { background-color: var(--color-primary); color: white; } section.dark h1, section.dark h2, section.dark h3 { color: white; border-color: rgba(255,255,255,0.3); } section.dark strong { color: #7db8e8; } section.dark code { background-color: rgba(255,255,255,0.15); color: #a8d4f0; } section.dark blockquote { background-color: rgba(255,255,255,0.1); border-left-color: #7db8e8; color: rgba(255,255,255,0.9); } /* ---------- 两栏布局 ---------- */ section.cols-2 { overflow: visible; display: grid; gap: 1.5rem; grid-template-columns: 50% 50%; grid-template-rows: auto 1fr; grid-template-areas: "heading heading" "left right"; } section.cols-2 > h2, section.cols-2 > h3 { grid-area: heading; } section.cols-2 .ldiv { grid-area: left; } section.cols-2 .rdiv { grid-area: right; } /* ---------- 强调页(居中大标题) ---------- */ section.lead { text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; } section.lead h1 { font-size: 56px; border: none; } section.lead h2 { font-size: 40px; } /* ---------- 结束页 ---------- */ section.ending { background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%); color: white; text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; } section.ending h1 { color: white; border: none; font-size: 60px; } section.ending h2 { color: rgba(255, 255, 255, 0.85); font-weight: normal; font-size: 26px; } section.ending::after { content: none; }