清除Presentation组件调试日志和注释

This commit is contained in:
jingrow 2025-09-03 17:05:07 +08:00
parent 8810bd753c
commit 17c56bc8b5
3 changed files with 298 additions and 112 deletions

View File

@ -5,28 +5,20 @@ import Reveal from 'reveal.js';
import 'reveal.js/dist/reveal.css'; import 'reveal.js/dist/reveal.css';
import { marked } from 'marked'; import { marked } from 'marked';
//
const loadTheme = async (themeName) => { const loadTheme = async (themeName) => {
if (!themeName) return; if (!themeName) return;
try { try {
// 1.
await import(`./themes/${themeName}.css`); await import(`./themes/${themeName}.css`);
console.log(`加载自定义主题: ${themeName}`);
} catch (error) { } catch (error) {
try { try {
// 2. Reveal.js
await import(`reveal.js/dist/theme/${themeName}.css`); await import(`reveal.js/dist/theme/${themeName}.css`);
console.log(`加载内置主题: ${themeName}`);
} catch (error2) { } catch (error2) {
// 3. 使
console.warn(`主题 ${themeName} 未找到,使用默认主题`);
await import('reveal.js/dist/theme/black.css'); await import('reveal.js/dist/theme/black.css');
} }
} }
}; };
// Reveal.js
const REVEAL_CONFIG = { const REVEAL_CONFIG = {
hash: true, hash: true,
transition: 'slide', transition: 'slide',
@ -65,7 +57,6 @@ const REVEAL_CONFIG = {
plugins: [] plugins: []
}; };
// marked
marked.setOptions({ marked.setOptions({
breaks: true, breaks: true,
gfm: true, gfm: true,
@ -79,32 +70,26 @@ export default function Presentation({ data }) {
const [mounted, setMounted] = useState(false); const [mounted, setMounted] = useState(false);
const [error, setError] = useState(null); const [error, setError] = useState(null);
//
useEffect(() => { useEffect(() => {
setMounted(true); setMounted(true);
}, []); }, []);
// Markdown
const parseMarkdownToSlides = useCallback((data) => { const parseMarkdownToSlides = useCallback((data) => {
if (!data) { if (!data) {
return `<section><h1>演示文稿</h1><p>暂无内容</p></section>`; return `<section><h1>演示文稿</h1><p>暂无内容</p></section>`;
} }
try { try {
// content 使 markdown
if (data.content) { if (data.content) {
return parseContentSlides(data); return parseContentSlides(data);
} }
// content
return `<section><h1>${data.title || '演示文稿'}</h1><p>暂无内容</p></section>`; return `<section><h1>${data.title || '演示文稿'}</h1><p>暂无内容</p></section>`;
} catch (err) { } catch (err) {
console.error('解析幻灯片内容失败:', err);
return `<section><h1>解析错误</h1><p>内容解析失败,请检查数据格式</p></section>`; return `<section><h1>解析错误</h1><p>内容解析失败,请检查数据格式</p></section>`;
} }
}, []); }, []);
// content
const parseContentSlides = (data) => { const parseContentSlides = (data) => {
const slideSeparators = /^---$/gm; const slideSeparators = /^---$/gm;
const sections = data.content.split(slideSeparators); const sections = data.content.split(slideSeparators);
@ -113,7 +98,6 @@ export default function Presentation({ data }) {
const trimmedSection = section.trim(); const trimmedSection = section.trim();
if (!trimmedSection) return ''; if (!trimmedSection) return '';
//
const backgroundMatch = trimmedSection.match(/<!-- \.slide: data-background="([^"]+)"[^>]* -->/); const backgroundMatch = trimmedSection.match(/<!-- \.slide: data-background="([^"]+)"[^>]* -->/);
let backgroundAttr = ''; let backgroundAttr = '';
let contentWithoutBackground = trimmedSection; let contentWithoutBackground = trimmedSection;
@ -125,7 +109,6 @@ export default function Presentation({ data }) {
const htmlContent = marked(contentWithoutBackground); const htmlContent = marked(contentWithoutBackground);
//
if (index === 0 && !htmlContent.includes('<h1>') && data.title) { if (index === 0 && !htmlContent.includes('<h1>') && data.title) {
return `<section${backgroundAttr}><h1>${data.title}</h1>${htmlContent}</section>`; return `<section${backgroundAttr}><h1>${data.title}</h1>${htmlContent}</section>`;
} }
@ -134,25 +117,20 @@ export default function Presentation({ data }) {
}).join(''); }).join('');
}; };
// Reveal.js
const initializeReveal = useCallback(async () => { const initializeReveal = useCallback(async () => {
if (!deckRef.current || !data) return; if (!deckRef.current || !data) return;
try { try {
//
if (revealRef.current) { if (revealRef.current) {
revealRef.current.destroy(); revealRef.current.destroy();
} }
//
const themeName = data.theme || 'default'; const themeName = data.theme || 'default';
await loadTheme(themeName); await loadTheme(themeName);
//
revealRef.current = new Reveal(deckRef.current, REVEAL_CONFIG); revealRef.current = new Reveal(deckRef.current, REVEAL_CONFIG);
revealRef.current.initialize(); revealRef.current.initialize();
// slides
const slides = parseMarkdownToSlides(data); const slides = parseMarkdownToSlides(data);
const slidesContainer = deckRef.current.querySelector('.slides'); const slidesContainer = deckRef.current.querySelector('.slides');
if (slidesContainer) { if (slidesContainer) {
@ -165,7 +143,6 @@ export default function Presentation({ data }) {
} }
}, [data, parseMarkdownToSlides]); }, [data, parseMarkdownToSlides]);
//
useEffect(() => { useEffect(() => {
if (mounted && data) { if (mounted && data) {
initializeReveal(); initializeReveal();
@ -178,7 +155,6 @@ export default function Presentation({ data }) {
}; };
}, [mounted, data, initializeReveal]); }, [mounted, data, initializeReveal]);
//
if (error) { if (error) {
return ( return (
<div className="min-h-screen bg-black flex items-center justify-center"> <div className="min-h-screen bg-black flex items-center justify-center">
@ -196,11 +172,10 @@ export default function Presentation({ data }) {
); );
} }
//
if (!mounted) { if (!mounted) {
return ( return (
<div className="min-h-screen bg-black flex items-center justify-center"> <div className="min-h-screen bg-black flex items-center justify-center">
<div className="text-white text-xl">正在加载PPT...</div> <div className="text-white text-xl">正在加载内容...</div>
</div> </div>
); );
} }

View File

@ -1,12 +1,12 @@
/* Jingrow 自定义主题 */ /* Jingrow 自定义主题 */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&family=Manrope:wght@400;500;600;700&display=swap');
.jingrow-icon { .jingrow-icon {
display: inline-block; display: inline-block;
width: 1.5em; width: 1.5em;
height: 1.5em; height: 1.5em;
vertical-align: middle; vertical-align: middle;
margin-right: 0.5em; margin-right: 0.2em;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' version='1.1' viewBox='0.00 0.00 128.00 128.00'%3E%3Cg stroke-width='2.00' fill='none' stroke-linecap='butt'%3E%3Cpath stroke='%238fe3b1' vector-effect='non-scaling-stroke' d='M 64.04 34.07 Q 64.93 34.07 65.55 34.69 Q 74.55 43.60 82.91 51.96 C 87.46 56.52 91.92 55.95 98.45 55.81 A 2.52 2.52 0.0 0 0 100.92 53.29 L 100.92 49.89 A 2.56 2.55 -1.5 0 0 98.23 47.34 C 95.84 47.46 91.15 47.62 89.22 45.67 Q 81.61 37.99 68.36 24.99 Q 66.43 23.09 64.04 23.09 Q 61.66 23.09 59.72 24.99 Q 46.47 37.98 38.85 45.66 C 36.92 47.61 32.23 47.45 29.84 47.32 A 2.56 2.55 1.5 0 0 27.15 49.87 L 27.15 53.27 A 2.52 2.52 0.0 0 0 29.62 55.79 C 36.15 55.94 40.61 56.51 45.16 51.95 Q 53.53 43.60 62.53 34.69 Q 63.15 34.07 64.04 34.07'%3E%3C/path%3E%3Cpath stroke='%238fe3b1' vector-effect='non-scaling-stroke' d='M 64.04 101.46 C 66.42 101.46 68.47 101.10 68.47 98.24 Q 68.49 75.28 68.49 72.56 A 0.61 0.61 0.0 0 1 69.10 71.95 L 89.64 71.95 A 2.50 2.50 0.0 0 0 92.14 69.45 L 92.14 65.73 A 2.28 2.28 0.0 0 0 89.86 63.45 L 69.10 63.45 A 0.61 0.61 0.0 0 1 68.49 62.84 L 68.49 50.37 A 3.05 3.03 2.1 0 0 65.67 47.34 Q 65.14 47.31 64.03 47.31 Q 62.93 47.31 62.40 47.34 A 3.05 3.03 -2.1 0 0 59.58 50.37 L 59.58 62.84 A 0.61 0.61 0.0 0 1 58.97 63.45 L 38.21 63.45 A 2.28 2.28 0.0 0 0 35.93 65.73 L 35.93 69.45 A 2.50 2.50 0.0 0 0 38.43 71.95 L 58.97 71.95 A 0.61 0.61 0.0 0 1 59.58 72.56 Q 59.58 75.28 59.60 98.24 C 59.60 101.10 61.65 101.46 64.04 101.46'%3E%3C/path%3E%3C/g%3E%3Cpath fill='%231fc76f' d='M 115.34 95.08 A 19.82 19.82 0.0 0 1 95.52 114.90 L 32.48 114.90 A 19.82 19.82 0.0 0 1 12.66 95.08 L 12.66 32.88 A 19.82 19.82 0.0 0 1 32.48 13.06 L 95.52 13.06 A 19.82 19.82 0.0 0 1 115.34 32.88 L 115.34 95.08 Z M 64.04 34.07 Q 64.93 34.07 65.55 34.69 Q 74.55 43.60 82.91 51.96 C 87.46 56.52 91.92 55.95 98.45 55.81 A 2.52 2.52 0.0 0 0 100.92 53.29 L 100.92 49.89 A 2.56 2.55 -1.5 0 0 98.23 47.34 C 95.84 47.46 91.15 47.62 89.22 45.67 Q 81.61 37.99 68.36 24.99 Q 66.43 23.09 64.04 23.09 Q 61.66 23.09 59.72 24.99 Q 46.47 37.98 38.85 45.66 C 36.92 47.61 32.23 47.45 29.84 47.32 A 2.56 2.55 1.5 0 0 27.15 49.87 L 27.15 53.27 A 2.52 2.52 0.0 0 0 29.62 55.79 C 36.15 55.94 40.61 56.51 45.16 51.95 Q 53.53 43.60 62.53 34.69 Q 63.15 34.07 64.04 34.07 Z M 64.04 101.46 C 66.42 101.46 68.47 101.10 68.47 98.24 Q 68.49 75.28 68.49 72.56 A 0.61 0.61 0.0 0 1 69.10 71.95 L 89.64 71.95 A 2.50 2.50 0.0 0 0 92.14 69.45 L 92.14 65.73 A 2.28 2.28 0.0 0 0 89.86 63.45 L 69.10 63.45 A 0.61 0.61 0.0 0 1 68.49 62.84 L 68.49 50.37 A 3.05 3.03 2.1 0 0 65.67 47.34 Q 65.14 47.31 64.03 47.31 Q 62.93 47.31 62.40 47.34 A 3.05 3.03 -2.1 0 0 59.58 50.37 L 59.58 62.84 A 0.61 0.61 0.0 0 1 58.97 63.45 L 38.21 63.45 A 2.28 2.28 0.0 0 0 35.93 65.73 L 35.93 69.45 A 2.50 2.50 0.0 0 0 38.43 71.95 L 58.97 71.95 A 0.61 0.61 0.0 0 1 59.58 72.56 Q 59.58 75.28 59.60 98.24 C 59.60 101.10 61.65 101.46 64.04 101.46 Z'%3E%3C/path%3E%3Cpath fill='%23fffef2' d='M 64.04 23.09 Q 66.43 23.09 68.36 24.99 Q 81.61 37.99 89.22 45.67 C 91.15 47.62 95.84 47.46 98.23 47.34 A 2.56 2.55 -1.5 0 1 100.92 49.89 L 100.92 53.29 A 2.52 2.52 0.0 0 1 98.45 55.81 C 91.92 55.95 87.46 56.52 82.91 51.96 Q 74.55 43.60 65.55 34.69 Q 64.93 34.07 64.04 34.07 Q 63.15 34.07 62.53 34.69 Q 53.53 43.60 45.16 51.95 C 40.61 56.51 36.15 55.94 29.62 55.79 A 2.52 2.52 0.0 0 1 27.15 53.27 L 27.15 49.87 A 2.56 2.55 1.5 0 1 29.84 47.32 C 32.23 47.45 36.92 47.61 38.85 45.66 Q 46.47 37.98 59.72 24.99 Q 61.66 23.09 64.04 23.09 Z'%3E%3C/path%3E%3Cpath fill='%23fffef2' d='M 64.03 47.31 Q 65.14 47.31 65.67 47.34 A 3.05 3.03 2.1 0 1 68.49 50.37 L 68.49 62.84 A 0.61 0.61 0.0 0 0 69.10 63.45 L 89.86 63.45 A 2.28 2.28 0.0 0 1 92.14 65.73 L 92.14 69.45 A 2.50 2.50 0.0 0 1 89.64 71.95 L 69.10 71.95 A 0.61 0.61 0.0 0 0 68.49 72.56 Q 68.49 75.28 68.47 98.24 C 68.47 101.10 66.42 101.46 64.04 101.46 C 61.65 101.46 59.60 101.10 59.60 98.24 Q 59.58 75.28 59.58 72.56 A 0.61 0.61 0.0 0 0 58.97 71.95 L 38.43 71.95 A 2.50 2.50 0.0 0 1 35.93 69.45 L 35.93 65.73 A 2.28 2.28 0.0 0 1 38.21 63.45 L 58.97 63.45 A 0.61 0.61 0.0 0 0 59.58 62.84 L 59.58 50.37 A 3.05 3.03 -2.1 0 1 62.40 47.34 Q 62.93 47.31 64.03 47.31 Z'%3E%3C/path%3E%3C/svg%3E"); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' version='1.1' viewBox='0.00 0.00 128.00 128.00'%3E%3Cg stroke-width='2.00' fill='none' stroke-linecap='butt'%3E%3Cpath stroke='%238fe3b1' vector-effect='non-scaling-stroke' d='M 64.04 34.07 Q 64.93 34.07 65.55 34.69 Q 74.55 43.60 82.91 51.96 C 87.46 56.52 91.92 55.95 98.45 55.81 A 2.52 2.52 0.0 0 0 100.92 53.29 L 100.92 49.89 A 2.56 2.55 -1.5 0 0 98.23 47.34 C 95.84 47.46 91.15 47.62 89.22 45.67 Q 81.61 37.99 68.36 24.99 Q 66.43 23.09 64.04 23.09 Q 61.66 23.09 59.72 24.99 Q 46.47 37.98 38.85 45.66 C 36.92 47.61 32.23 47.45 29.84 47.32 A 2.56 2.55 1.5 0 0 27.15 49.87 L 27.15 53.27 A 2.52 2.52 0.0 0 0 29.62 55.79 C 36.15 55.94 40.61 56.51 45.16 51.95 Q 53.53 43.60 62.53 34.69 Q 63.15 34.07 64.04 34.07'%3E%3C/path%3E%3Cpath stroke='%238fe3b1' vector-effect='non-scaling-stroke' d='M 64.04 101.46 C 66.42 101.46 68.47 101.10 68.47 98.24 Q 68.49 75.28 68.49 72.56 A 0.61 0.61 0.0 0 1 69.10 71.95 L 89.64 71.95 A 2.50 2.50 0.0 0 0 92.14 69.45 L 92.14 65.73 A 2.28 2.28 0.0 0 0 89.86 63.45 L 69.10 63.45 A 0.61 0.61 0.0 0 1 68.49 62.84 L 68.49 50.37 A 3.05 3.03 2.1 0 0 65.67 47.34 Q 65.14 47.31 64.03 47.31 Q 62.93 47.31 62.40 47.34 A 3.05 3.03 -2.1 0 0 59.58 50.37 L 59.58 62.84 A 0.61 0.61 0.0 0 1 58.97 63.45 L 38.21 63.45 A 2.28 2.28 0.0 0 0 35.93 65.73 L 35.93 69.45 A 2.50 2.50 0.0 0 0 38.43 71.95 L 58.97 71.95 A 0.61 0.61 0.0 0 1 59.58 72.56 Q 59.58 75.28 59.60 98.24 C 59.60 101.10 61.65 101.46 64.04 101.46'%3E%3C/path%3E%3C/g%3E%3Cpath fill='%231fc76f' d='M 115.34 95.08 A 19.82 19.82 0.0 0 1 95.52 114.90 L 32.48 114.90 A 19.82 19.82 0.0 0 1 12.66 95.08 L 12.66 32.88 A 19.82 19.82 0.0 0 1 32.48 13.06 L 95.52 13.06 A 19.82 19.82 0.0 0 1 115.34 32.88 L 115.34 95.08 Z M 64.04 34.07 Q 64.93 34.07 65.55 34.69 Q 74.55 43.60 82.91 51.96 C 87.46 56.52 91.92 55.95 98.45 55.81 A 2.52 2.52 0.0 0 0 100.92 53.29 L 100.92 49.89 A 2.56 2.55 -1.5 0 0 98.23 47.34 C 95.84 47.46 91.15 47.62 89.22 45.67 Q 81.61 37.99 68.36 24.99 Q 66.43 23.09 64.04 23.09 Q 61.66 23.09 59.72 24.99 Q 46.47 37.98 38.85 45.66 C 36.92 47.61 32.23 47.45 29.84 47.32 A 2.56 2.55 1.5 0 0 27.15 49.87 L 27.15 53.27 A 2.52 2.52 0.0 0 0 29.62 55.79 C 36.15 55.94 40.61 56.51 45.16 51.95 Q 53.53 43.60 62.53 34.69 Q 63.15 34.07 64.04 34.07 Z M 64.04 101.46 C 66.42 101.46 68.47 101.10 68.47 98.24 Q 68.49 75.28 68.49 72.56 A 0.61 0.61 0.0 0 1 69.10 71.95 L 89.64 71.95 A 2.50 2.50 0.0 0 0 92.14 69.45 L 92.14 65.73 A 2.28 2.28 0.0 0 0 89.86 63.45 L 69.10 63.45 A 0.61 0.61 0.0 0 1 68.49 62.84 L 68.49 50.37 A 3.05 3.03 2.1 0 0 65.67 47.34 Q 65.14 47.31 64.03 47.31 Q 62.93 47.31 62.40 47.34 A 3.05 3.03 -2.1 0 0 59.58 50.37 L 59.58 62.84 A 0.61 0.61 0.0 0 1 58.97 63.45 L 38.21 63.45 A 2.28 2.28 0.0 0 0 35.93 65.73 L 35.93 69.45 A 2.50 2.50 0.0 0 0 38.43 71.95 L 58.97 71.95 A 0.61 0.61 0.0 0 1 59.58 72.56 Q 59.58 75.28 59.60 98.24 C 59.60 101.10 61.65 101.46 64.04 101.46 Z'%3E%3C/path%3E%3Cpath fill='%23fffef2' d='M 64.04 23.09 Q 66.43 23.09 68.36 24.99 Q 81.61 37.99 89.22 45.67 C 91.15 47.62 95.84 47.46 98.23 47.34 A 2.56 2.55 -1.5 0 1 100.92 49.89 L 100.92 53.29 A 2.52 2.52 0.0 0 1 98.45 55.81 C 91.92 55.95 87.46 56.52 82.91 51.96 Q 74.55 43.60 65.55 34.69 Q 64.93 34.07 64.04 34.07 Q 63.15 34.07 62.53 34.69 Q 53.53 43.60 45.16 51.95 C 40.61 56.51 36.15 55.94 29.62 55.79 A 2.52 2.52 0.0 0 1 27.15 53.27 L 27.15 49.87 A 2.56 2.55 1.5 0 1 29.84 47.32 C 32.23 47.45 36.92 47.61 38.85 45.66 Q 46.47 37.98 59.72 24.99 Q 61.66 23.09 64.04 23.09 Z'%3E%3C/path%3E%3Cpath fill='%23fffef2' d='M 64.03 47.31 Q 65.14 47.31 65.67 47.34 A 3.05 3.03 2.1 0 1 68.49 50.37 L 68.49 62.84 A 0.61 0.61 0.0 0 0 69.10 63.45 L 89.86 63.45 A 2.28 2.28 0.0 0 1 92.14 65.73 L 92.14 69.45 A 2.50 2.50 0.0 0 1 89.64 71.95 L 69.10 71.95 A 0.61 0.61 0.0 0 0 68.49 72.56 Q 68.49 75.28 68.47 98.24 C 68.47 101.10 66.42 101.46 64.04 101.46 C 61.65 101.46 59.60 101.10 59.60 98.24 Q 59.58 75.28 59.58 72.56 A 0.61 0.61 0.0 0 0 58.97 71.95 L 38.43 71.95 A 2.50 2.50 0.0 0 1 35.93 69.45 L 35.93 65.73 A 2.28 2.28 0.0 0 1 38.21 63.45 L 58.97 63.45 A 0.61 0.61 0.0 0 0 59.58 62.84 L 59.58 50.37 A 3.05 3.03 -2.1 0 1 62.40 47.34 Q 62.93 47.31 64.03 47.31 Z'%3E%3C/path%3E%3C/svg%3E");
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: contain; background-size: contain;
@ -17,67 +17,247 @@
height: 2em; height: 2em;
} }
.reveal {
font-family: 'Manrope', sans-serif; section.has-dark-background, section.has-dark-background h1, section.has-dark-background h2, section.has-dark-background h3, section.has-dark-background h4, section.has-dark-background h5, section.has-dark-background h6 {
font-size: 24px; color: #fff;
color: #ffffff;
} }
/*********************************************
* GLOBAL STYLES
*********************************************/
:root {
--r-background-color: #fff;
--r-main-font: "Noto Sans SC", Manrope, Helvetica, sans-serif;
--r-main-font-size: 42px;
--r-main-color: #222;
--r-block-margin: 20px;
--r-heading-margin: 0 0 20px 0;
--r-heading-font: "Noto Sans SC", Manrope, Helvetica, sans-serif;
--r-heading-color: #222;
--r-heading-line-height: 1.2;
--r-heading-letter-spacing: normal;
--r-heading-text-transform: none;
--r-heading-text-shadow: none;
--r-heading-font-weight: 700;
--r-heading1-text-shadow: none;
--r-heading1-size: 2.5em;
--r-heading2-size: 1.6em;
--r-heading3-size: 1.3em;
--r-heading4-size: 1em;
--r-code-font: monospace;
--r-link-color: #2a76dd;
--r-link-color-dark: rgb(30.7720647773, 99.5566801619, 192.7779352227);
--r-link-color-hover: rgb(73.95, 138.55, 226.1);
--r-selection-background-color: rgb(95.25, 152.25, 229.5);
--r-selection-color: #fff;
--r-overlay-element-bg-color: 0, 0, 0;
--r-overlay-element-fg-color: 240, 240, 240;
}
.reveal-viewport {
background: #fff;
background-color: var(--r-background-color);
}
.reveal {
font-family: var(--r-main-font);
font-size: var(--r-main-font-size);
font-weight: normal;
color: var(--r-main-color);
}
.reveal ::selection {
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal ::-moz-selection {
color: var(--r-selection-color);
background: var(--r-selection-background-color);
text-shadow: none;
}
.reveal .slides section,
.reveal .slides section > section {
line-height: 1.3;
font-weight: inherit;
}
/*********************************************
* HEADERS
*********************************************/
.reveal h1, .reveal h1,
.reveal h2, .reveal h2,
.reveal h3, .reveal h3,
.reveal h4, .reveal h4,
.reveal h5, .reveal h5,
.reveal h6 { .reveal h6 {
font-family: 'Manrope', sans-serif; margin: var(--r-heading-margin);
font-weight: 600; color: var(--r-heading-color);
color: #1fc76f; font-family: var(--r-heading-font);
text-transform: none; font-weight: var(--r-heading-font-weight);
text-shadow: none; line-height: var(--r-heading-line-height);
margin: 0 0 20px 0; letter-spacing: var(--r-heading-letter-spacing);
text-transform: var(--r-heading-text-transform);
text-shadow: var(--r-heading-text-shadow);
word-wrap: break-word;
} }
.reveal h1 { .reveal h1 {
font-size: 3.5em; font-size: var(--r-heading1-size);
color: #1fc76f; }
.reveal h1 {
display: flex;
align-items: center;
justify-content: center;
} }
.reveal h2 { .reveal h2 {
font-size: 2.5em; font-size: var(--r-heading2-size);
color: #8fe3b1;
} }
.reveal h3 { .reveal h3 {
font-size: 1.8em; font-size: var(--r-heading3-size);
color: #8fe3b1;
} }
.reveal h4 {
font-size: var(--r-heading4-size);
}
.reveal h1 {
text-shadow: var(--r-heading1-text-shadow);
}
/*********************************************
* OTHER
*********************************************/
.reveal p { .reveal p {
margin: 20px 0; margin: var(--r-block-margin) 0;
line-height: 1.6; line-height: 1.3;
}
/* Remove trailing margins after titles */
.reveal h1:last-child,
.reveal h2:last-child,
.reveal h3:last-child,
.reveal h4:last-child,
.reveal h5:last-child,
.reveal h6:last-child {
margin-bottom: 0;
}
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
max-width: 95%;
max-height: 95%;
}
.reveal strong,
.reveal b {
font-weight: bold;
}
.reveal em {
font-style: italic;
}
.reveal ol,
.reveal dl,
.reveal ul {
display: inline-block;
text-align: left;
margin: 0 0 0 1em;
} }
.reveal ul,
.reveal ol { .reveal ol {
display: block; list-style-type: decimal;
margin: 20px 0;
padding-left: 40px;
} }
.reveal li { .reveal ul {
margin: 10px 0; list-style-type: disc;
line-height: 1.6; }
.reveal ul ul {
list-style-type: square;
}
.reveal ul ul ul {
list-style-type: circle;
}
.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
display: block;
margin-left: 40px;
}
.reveal dt {
font-weight: bold;
}
.reveal dd {
margin-left: 40px;
} }
.reveal blockquote { .reveal blockquote {
display: block; display: block;
position: relative; position: relative;
width: 70%; width: 70%;
margin: 20px auto; margin: var(--r-block-margin) auto;
padding: 5px 20px; padding: 5px;
font-style: italic; font-style: italic;
background: rgba(31, 199, 111, 0.1); background: rgba(255, 255, 255, 0.05);
border-left: 4px solid #1fc76f; box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
}
.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
display: inline-block;
}
.reveal q {
font-style: italic;
}
.reveal pre {
display: block;
position: relative;
width: 90%;
margin: var(--r-block-margin) auto;
text-align: left;
font-size: 0.55em;
font-family: var(--r-code-font);
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
}
.reveal code {
font-family: var(--r-code-font);
text-transform: none;
tab-size: 2;
}
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal;
}
.reveal .code-wrapper {
white-space: normal;
}
.reveal .code-wrapper code {
white-space: pre;
} }
.reveal table { .reveal table {
@ -88,80 +268,112 @@
.reveal table th { .reveal table th {
font-weight: bold; font-weight: bold;
color: #1fc76f;
} }
.reveal table th, .reveal table th,
.reveal table td { .reveal table td {
text-align: left; text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em; padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid #666; border-bottom: 1px solid;
}
.reveal table th[align=center],
.reveal table td[align=center] {
text-align: center;
}
.reveal table th[align=right],
.reveal table td[align=right] {
text-align: right;
}
.reveal table tbody tr:last-child th,
.reveal table tbody tr:last-child td {
border-bottom: none;
}
.reveal sup {
vertical-align: super;
font-size: smaller;
}
.reveal sub {
vertical-align: sub;
font-size: smaller;
}
.reveal small {
display: inline-block;
font-size: 0.6em;
line-height: 1.2em;
vertical-align: top;
}
.reveal small * {
vertical-align: top;
} }
.reveal img { .reveal img {
margin: 15px 0px; margin: var(--r-block-margin) 0;
background: rgba(255, 255, 255, 0.12);
border: 4px solid #1fc76f;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
} }
/*********************************************
* LINKS
*********************************************/
.reveal a { .reveal a {
color: #8fe3b1; color: var(--r-link-color);
text-decoration: none; text-decoration: none;
transition: color 0.15s ease; transition: color 0.15s ease;
} }
.reveal a:hover { .reveal a:hover {
color: #1fc76f; color: var(--r-link-color-hover);
text-shadow: none; text-shadow: none;
border: none; border: none;
} }
.reveal pre { .reveal .roll span:after {
display: block;
position: relative;
width: 90%;
margin: 15px auto;
text-align: left;
font-size: 0.55em;
font-family: 'Courier New', monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3);
}
.reveal code {
font-family: 'Courier New', monospace;
text-transform: none;
color: #1fc76f;
background: rgba(31, 199, 111, 0.1);
padding: 2px 4px;
border-radius: 3px;
}
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal;
background: #2d2d2d;
color: #f8f8f2;
}
.reveal .slides section {
text-align: center;
}
.reveal .slides section[data-background] {
color: #fff; color: #fff;
background: var(--r-link-color-dark);
} }
.reveal .slides section[data-background] h1, /*********************************************
.reveal .slides section[data-background] h2, * Frame helper
.reveal .slides section[data-background] h3, *********************************************/
.reveal .slides section[data-background] h4, .reveal .r-frame {
.reveal .slides section[data-background] h5, border: 4px solid var(--r-main-color);
.reveal .slides section[data-background] h6 { box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
color: #fff; }
.reveal a .r-frame {
transition: all 0.15s linear;
}
.reveal a:hover .r-frame {
border-color: var(--r-link-color);
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
}
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls {
color: var(--r-link-color);
}
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
background: rgba(0, 0, 0, 0.2);
color: var(--r-link-color);
}
/*********************************************
* PRINT BACKGROUND
*********************************************/
@media print {
.backgrounds {
background-color: var(--r-background-color);
}
} }

View File

@ -4,10 +4,9 @@ backgroundTransition: slide
transition: slide transition: slide
--- ---
# <span class="jingrow-icon"></span> Jingrow<br>一站式通用企业数字化平台 # <span class="jingrow-icon"></span> Jingrow
## 一站式通用企业数字化平台
### 下一代智能工作平台 ### 下一代智能工作平台
*让企业数字化变得简单而强大* *让企业数字化变得简单而强大*
--- ---