presently 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/bin/presently +13 -0
- data/lib/presently/application.rb +104 -0
- data/lib/presently/clock.rb +77 -0
- data/lib/presently/display_view.rb +73 -0
- data/lib/presently/environment/application.rb +62 -0
- data/lib/presently/page.rb +38 -0
- data/lib/presently/page.xrb +31 -0
- data/lib/presently/presentation.rb +72 -0
- data/lib/presently/presentation_controller.rb +181 -0
- data/lib/presently/presenter_view.rb +264 -0
- data/lib/presently/slide.rb +148 -0
- data/lib/presently/slide_view.rb +92 -0
- data/lib/presently/state.rb +66 -0
- data/lib/presently/version.rb +9 -0
- data/lib/presently.rb +9 -0
- data/license.md +21 -0
- data/public/_components/@socketry/syntax/Syntax/CodeElement.js +337 -0
- data/public/_components/@socketry/syntax/Syntax/Errors.js +52 -0
- data/public/_components/@socketry/syntax/Syntax/Language/apache.js +49 -0
- data/public/_components/@socketry/syntax/Syntax/Language/applescript.js +157 -0
- data/public/_components/@socketry/syntax/Syntax/Language/assembly.js +42 -0
- data/public/_components/@socketry/syntax/Syntax/Language/bash-script.js +108 -0
- data/public/_components/@socketry/syntax/Syntax/Language/bash.js +32 -0
- data/public/_components/@socketry/syntax/Syntax/Language/basic.js +232 -0
- data/public/_components/@socketry/syntax/Syntax/Language/c++.js +1 -0
- data/public/_components/@socketry/syntax/Syntax/Language/c.js +1 -0
- data/public/_components/@socketry/syntax/Syntax/Language/clang.js +201 -0
- data/public/_components/@socketry/syntax/Syntax/Language/cpp.js +1 -0
- data/public/_components/@socketry/syntax/Syntax/Language/csharp.js +166 -0
- data/public/_components/@socketry/syntax/Syntax/Language/css.js +244 -0
- data/public/_components/@socketry/syntax/Syntax/Language/diff.js +24 -0
- data/public/_components/@socketry/syntax/Syntax/Language/go.js +135 -0
- data/public/_components/@socketry/syntax/Syntax/Language/haskell.js +110 -0
- data/public/_components/@socketry/syntax/Syntax/Language/html.js +69 -0
- data/public/_components/@socketry/syntax/Syntax/Language/io.js +68 -0
- data/public/_components/@socketry/syntax/Syntax/Language/java.js +134 -0
- data/public/_components/@socketry/syntax/Syntax/Language/javascript.js +89 -0
- data/public/_components/@socketry/syntax/Syntax/Language/json.js +36 -0
- data/public/_components/@socketry/syntax/Syntax/Language/lisp.js +38 -0
- data/public/_components/@socketry/syntax/Syntax/Language/lua.js +87 -0
- data/public/_components/@socketry/syntax/Syntax/Language/markdown.js +112 -0
- data/public/_components/@socketry/syntax/Syntax/Language/nginx.js +37 -0
- data/public/_components/@socketry/syntax/Syntax/Language/objective-c.js +1 -0
- data/public/_components/@socketry/syntax/Syntax/Language/ocaml.js +225 -0
- data/public/_components/@socketry/syntax/Syntax/Language/pascal.js +166 -0
- data/public/_components/@socketry/syntax/Syntax/Language/patch.js +2 -0
- data/public/_components/@socketry/syntax/Syntax/Language/perl5.js +317 -0
- data/public/_components/@socketry/syntax/Syntax/Language/php-script.js +112 -0
- data/public/_components/@socketry/syntax/Syntax/Language/php.js +18 -0
- data/public/_components/@socketry/syntax/Syntax/Language/plain.js +20 -0
- data/public/_components/@socketry/syntax/Syntax/Language/protobuf.js +77 -0
- data/public/_components/@socketry/syntax/Syntax/Language/python.js +208 -0
- data/public/_components/@socketry/syntax/Syntax/Language/ruby.js +124 -0
- data/public/_components/@socketry/syntax/Syntax/Language/scala.js +81 -0
- data/public/_components/@socketry/syntax/Syntax/Language/smalltalk.js +30 -0
- data/public/_components/@socketry/syntax/Syntax/Language/sql.js +865 -0
- data/public/_components/@socketry/syntax/Syntax/Language/super-collider.js +70 -0
- data/public/_components/@socketry/syntax/Syntax/Language/swift.js +176 -0
- data/public/_components/@socketry/syntax/Syntax/Language/xml.js +76 -0
- data/public/_components/@socketry/syntax/Syntax/Language/xrb.js +33 -0
- data/public/_components/@socketry/syntax/Syntax/Language/yaml.js +29 -0
- data/public/_components/@socketry/syntax/Syntax/Language.js +276 -0
- data/public/_components/@socketry/syntax/Syntax/Loader.js +78 -0
- data/public/_components/@socketry/syntax/Syntax/Match.js +546 -0
- data/public/_components/@socketry/syntax/Syntax/Rule.js +306 -0
- data/public/_components/@socketry/syntax/Syntax.js +356 -0
- data/public/_components/@socketry/syntax/bin/syntax-ast.js +42 -0
- data/public/_components/@socketry/syntax/examples/_template.html +53 -0
- data/public/_components/@socketry/syntax/examples/apache.html +72 -0
- data/public/_components/@socketry/syntax/examples/applescript.html +72 -0
- data/public/_components/@socketry/syntax/examples/assembly.html +74 -0
- data/public/_components/@socketry/syntax/examples/bash.html +90 -0
- data/public/_components/@socketry/syntax/examples/basic.html +87 -0
- data/public/_components/@socketry/syntax/examples/c.html +141 -0
- data/public/_components/@socketry/syntax/examples/clang.html +202 -0
- data/public/_components/@socketry/syntax/examples/csharp.html +110 -0
- data/public/_components/@socketry/syntax/examples/css-colors.html +179 -0
- data/public/_components/@socketry/syntax/examples/custom-theme.html +155 -0
- data/public/_components/@socketry/syntax/examples/diff.html +142 -0
- data/public/_components/@socketry/syntax/examples/examples.css +216 -0
- data/public/_components/@socketry/syntax/examples/go.html +413 -0
- data/public/_components/@socketry/syntax/examples/haskell.html +373 -0
- data/public/_components/@socketry/syntax/examples/html.html +316 -0
- data/public/_components/@socketry/syntax/examples/index.html +97 -0
- data/public/_components/@socketry/syntax/examples/io.html +552 -0
- data/public/_components/@socketry/syntax/examples/java.html +786 -0
- data/public/_components/@socketry/syntax/examples/javascript.html +199 -0
- data/public/_components/@socketry/syntax/examples/json.html +150 -0
- data/public/_components/@socketry/syntax/examples/lisp.html +476 -0
- data/public/_components/@socketry/syntax/examples/lua.html +737 -0
- data/public/_components/@socketry/syntax/examples/markdown.html +121 -0
- data/public/_components/@socketry/syntax/examples/mixed.html +306 -0
- data/public/_components/@socketry/syntax/examples/nginx.html +554 -0
- data/public/_components/@socketry/syntax/examples/ocaml.html +596 -0
- data/public/_components/@socketry/syntax/examples/pascal.html +762 -0
- data/public/_components/@socketry/syntax/examples/perl5.html +488 -0
- data/public/_components/@socketry/syntax/examples/php-script.html +142 -0
- data/public/_components/@socketry/syntax/examples/php.html +95 -0
- data/public/_components/@socketry/syntax/examples/plain.html +222 -0
- data/public/_components/@socketry/syntax/examples/protobuf.html +405 -0
- data/public/_components/@socketry/syntax/examples/python.html +82 -0
- data/public/_components/@socketry/syntax/examples/readme.md +79 -0
- data/public/_components/@socketry/syntax/examples/ruby.html +58 -0
- data/public/_components/@socketry/syntax/examples/scala.html +41 -0
- data/public/_components/@socketry/syntax/examples/smalltalk.html +436 -0
- data/public/_components/@socketry/syntax/examples/sql.html +373 -0
- data/public/_components/@socketry/syntax/examples/super-collider.html +55 -0
- data/public/_components/@socketry/syntax/examples/swift.html +176 -0
- data/public/_components/@socketry/syntax/examples/wrap-demo.html +103 -0
- data/public/_components/@socketry/syntax/examples/xml.html +112 -0
- data/public/_components/@socketry/syntax/examples/xrb.html +37 -0
- data/public/_components/@socketry/syntax/examples/yaml.html +72 -0
- data/public/_components/@socketry/syntax/license.md +21 -0
- data/public/_components/@socketry/syntax/package-lock.json +834 -0
- data/public/_components/@socketry/syntax/package.json +43 -0
- data/public/_components/@socketry/syntax/readme.md +162 -0
- data/public/_components/@socketry/syntax/test/Syntax/CodeElement.js +306 -0
- data/public/_components/@socketry/syntax/test/Syntax/ErrorHandling.js +85 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/apache.js +153 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/applescript.js +198 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/assembly.js +209 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/bash-script.js +225 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/bash.js +162 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/basic.js +265 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/clang.js +390 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/csharp.js +436 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/css.js +431 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/diff.js +206 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/go.js +386 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/haskell.js +454 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/html.js +111 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/io.js +229 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/java.js +362 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/javascript.js +101 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/json.js +101 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/lisp.js +224 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/lua.js +307 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/markdown.js +163 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/nginx.js +267 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/ocaml.js +299 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/pascal.js +311 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/perl5.js +333 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/php-script.js +197 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/php.js +92 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/plain.js +327 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/protobuf.js +294 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/python.js +213 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/ruby.js +70 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/scala.js +75 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/smalltalk.js +223 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/sql.js +281 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/super-collider.js +66 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/swift.js +71 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/xml.js +170 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/xrb.js +57 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language/yaml.js +123 -0
- data/public/_components/@socketry/syntax/test/Syntax/Language.js +62 -0
- data/public/_components/@socketry/syntax/test/Syntax/Match.js +40 -0
- data/public/_components/@socketry/syntax/test/Syntax/Rule.js +251 -0
- data/public/_components/@socketry/syntax/test/Syntax.js +38 -0
- data/public/_components/@socketry/syntax/test/helpers/ast-matcher.js +90 -0
- data/public/_components/@socketry/syntax/themes/base/apache.css +1 -0
- data/public/_components/@socketry/syntax/themes/base/applescript.css +1 -0
- data/public/_components/@socketry/syntax/themes/base/assembly.css +1 -0
- data/public/_components/@socketry/syntax/themes/base/bash.css +1 -0
- data/public/_components/@socketry/syntax/themes/base/basic.css +1 -0
- data/public/_components/@socketry/syntax/themes/base/c.css +1 -0
- data/public/_components/@socketry/syntax/themes/base/clang.css +0 -0
- data/public/_components/@socketry/syntax/themes/base/csharp.css +1 -0
- data/public/_components/@socketry/syntax/themes/base/css.css +22 -0
- data/public/_components/@socketry/syntax/themes/base/diff.css +48 -0
- data/public/_components/@socketry/syntax/themes/base/go.css +1 -0
- data/public/_components/@socketry/syntax/themes/base/haskell.css +1 -0
- data/public/_components/@socketry/syntax/themes/base/html.css +1 -0
- data/public/_components/@socketry/syntax/themes/base/io.css +1 -0
- data/public/_components/@socketry/syntax/themes/base/java.css +1 -0
- data/public/_components/@socketry/syntax/themes/base/javascript.css +1 -0
- data/public/_components/@socketry/syntax/themes/base/json.css +41 -0
- data/public/_components/@socketry/syntax/themes/base/lisp.css +1 -0
- data/public/_components/@socketry/syntax/themes/base/lua.css +1 -0
- data/public/_components/@socketry/syntax/themes/base/markdown.css +16 -0
- data/public/_components/@socketry/syntax/themes/base/nginx.css +1 -0
- data/public/_components/@socketry/syntax/themes/base/ocaml.css +1 -0
- data/public/_components/@socketry/syntax/themes/base/pascal.css +1 -0
- data/public/_components/@socketry/syntax/themes/base/perl5.css +1 -0
- data/public/_components/@socketry/syntax/themes/base/php-script.css +1 -0
- data/public/_components/@socketry/syntax/themes/base/php.css +1 -0
- data/public/_components/@socketry/syntax/themes/base/plain.css +1 -0
- data/public/_components/@socketry/syntax/themes/base/protobuf.css +1 -0
- data/public/_components/@socketry/syntax/themes/base/python.css +1 -0
- data/public/_components/@socketry/syntax/themes/base/ruby.css +23 -0
- data/public/_components/@socketry/syntax/themes/base/scala.css +3 -0
- data/public/_components/@socketry/syntax/themes/base/smalltalk.css +1 -0
- data/public/_components/@socketry/syntax/themes/base/sql.css +1 -0
- data/public/_components/@socketry/syntax/themes/base/super-collider.css +33 -0
- data/public/_components/@socketry/syntax/themes/base/swift.css +1 -0
- data/public/_components/@socketry/syntax/themes/base/syntax.css +63 -0
- data/public/_components/@socketry/syntax/themes/base/xml.css +1 -0
- data/public/_components/@socketry/syntax/themes/base/xrb.css +29 -0
- data/public/_components/@socketry/syntax/themes/base/yaml.css +1 -0
- data/public/_components/@socketry/syntax/themes/theming.md +233 -0
- data/public/_components/@socketry/syntax/update-examples.js +135 -0
- data/public/_static/index.css +593 -0
- data/public/application.js +147 -0
- data/readme.md +69 -0
- data/releases.md +3 -0
- data/templates/code.xrb +12 -0
- data/templates/default.xrb +5 -0
- data/templates/image.xrb +8 -0
- data/templates/section.xrb +5 -0
- data/templates/title.xrb +8 -0
- data/templates/translation.xrb +8 -0
- data/templates/two_column.xrb +8 -0
- metadata +280 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { readFileSync, writeFileSync, readdirSync } from 'fs';
|
|
4
|
+
import { join } from 'path';
|
|
5
|
+
|
|
6
|
+
const examplesDir = './examples';
|
|
7
|
+
const excludeFiles = new Set([
|
|
8
|
+
'_template.html',
|
|
9
|
+
'index.html',
|
|
10
|
+
'javascript.html',
|
|
11
|
+
'markdown.html',
|
|
12
|
+
'python.html',
|
|
13
|
+
'ruby.html',
|
|
14
|
+
'html.html',
|
|
15
|
+
'css-colors.html',
|
|
16
|
+
'java.html',
|
|
17
|
+
'custom-theme.html',
|
|
18
|
+
'README.md'
|
|
19
|
+
]);
|
|
20
|
+
|
|
21
|
+
// Language name mappings
|
|
22
|
+
const languageNames = {
|
|
23
|
+
'apache': 'Apache',
|
|
24
|
+
'applescript': 'AppleScript',
|
|
25
|
+
'assembly': 'Assembly',
|
|
26
|
+
'bash': 'Bash',
|
|
27
|
+
'basic': 'BASIC/VB',
|
|
28
|
+
'c': 'C/C++',
|
|
29
|
+
'clang': 'C/C++',
|
|
30
|
+
'csharp': 'C#',
|
|
31
|
+
'diff': 'Diff/Patch',
|
|
32
|
+
'go': 'Go',
|
|
33
|
+
'haskell': 'Haskell',
|
|
34
|
+
'io': 'Io',
|
|
35
|
+
'json': 'JSON',
|
|
36
|
+
'lisp': 'Lisp',
|
|
37
|
+
'lua': 'Lua',
|
|
38
|
+
'mixed': 'Mixed Languages',
|
|
39
|
+
'nginx': 'Nginx',
|
|
40
|
+
'ocaml': 'OCaml',
|
|
41
|
+
'pascal': 'Pascal',
|
|
42
|
+
'perl5': 'Perl 5',
|
|
43
|
+
'php': 'PHP',
|
|
44
|
+
'php-script': 'PHP Script',
|
|
45
|
+
'plain': 'Plain Text',
|
|
46
|
+
'protobuf': 'Protocol Buffers',
|
|
47
|
+
'scala': 'Scala',
|
|
48
|
+
'smalltalk': 'Smalltalk',
|
|
49
|
+
'sql': 'SQL',
|
|
50
|
+
'super-collider': 'SuperCollider',
|
|
51
|
+
'swift': 'Swift',
|
|
52
|
+
'wrap-demo': 'Wrap Demo',
|
|
53
|
+
'xrb': 'XRB',
|
|
54
|
+
'xml': 'XML',
|
|
55
|
+
'yaml': 'YAML'
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
// Process each file
|
|
59
|
+
const files = readdirSync(examplesDir).filter(f =>
|
|
60
|
+
f.endsWith('.html') && !excludeFiles.has(f)
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
console.log(`Processing ${files.length} files...`);
|
|
64
|
+
|
|
65
|
+
files.forEach(file => {
|
|
66
|
+
const filePath = join(examplesDir, file);
|
|
67
|
+
let content = readFileSync(filePath, 'utf8');
|
|
68
|
+
|
|
69
|
+
const baseName = file.replace('.html', '');
|
|
70
|
+
const langName = languageNames[baseName] || baseName;
|
|
71
|
+
|
|
72
|
+
// Check if already updated
|
|
73
|
+
if (content.includes('examples.css')) {
|
|
74
|
+
console.log(`✓ ${file} already updated`);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
console.log(`Updating ${file}...`);
|
|
79
|
+
|
|
80
|
+
// Replace <head> with inline styles
|
|
81
|
+
content = content.replace(
|
|
82
|
+
/<head>[\s\S]*?<\/head>/,
|
|
83
|
+
`<head>
|
|
84
|
+
<meta charset="UTF-8">
|
|
85
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
86
|
+
<title>${langName} Examples - @socketry/syntax</title>
|
|
87
|
+
<link rel="stylesheet" href="examples.css">
|
|
88
|
+
</head>`
|
|
89
|
+
);
|
|
90
|
+
|
|
91
|
+
// Add header if not present
|
|
92
|
+
if (!content.includes('<header>')) {
|
|
93
|
+
content = content.replace(
|
|
94
|
+
/<body[^>]*>\s*/,
|
|
95
|
+
`<body>
|
|
96
|
+
<header>
|
|
97
|
+
<h1>${langName} Examples</h1>
|
|
98
|
+
<p class="subtitle">${langName} syntax highlighting</p>
|
|
99
|
+
</header>
|
|
100
|
+
|
|
101
|
+
<nav>
|
|
102
|
+
<a href="index.html">Back to Examples</a>
|
|
103
|
+
</nav>
|
|
104
|
+
|
|
105
|
+
`
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Wrap examples in div.example if needed
|
|
110
|
+
if (!content.includes('class="example"')) {
|
|
111
|
+
// Simple wrapping for code blocks
|
|
112
|
+
content = content.replace(
|
|
113
|
+
/<h2>(.*?)<\/h2>\s*(<syntax-code|<pre>)/g,
|
|
114
|
+
`<div class="example">
|
|
115
|
+
<h2>$1</h2>
|
|
116
|
+
<p class="description">Example:</p>
|
|
117
|
+
|
|
118
|
+
$2`
|
|
119
|
+
);
|
|
120
|
+
content = content.replace(
|
|
121
|
+
/(<\/syntax-code>|<\/pre>)\s*(?=<h2>|<script>)/g,
|
|
122
|
+
'$1\n\t</div>\n\n\t'
|
|
123
|
+
);
|
|
124
|
+
// Close last example before script
|
|
125
|
+
content = content.replace(
|
|
126
|
+
/(<\/syntax-code>|<\/pre>)\s*<script/,
|
|
127
|
+
'$1\n\t</div>\n\t\n\t<script'
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
writeFileSync(filePath, content, 'utf8');
|
|
132
|
+
console.log(`✓ Updated ${file}`);
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
console.log('\nDone!');
|
|
@@ -0,0 +1,593 @@
|
|
|
1
|
+
/* Reset & Base */
|
|
2
|
+
*, *::before, *::after {
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
:root {
|
|
7
|
+
--slide-bg: #1a1a2e;
|
|
8
|
+
--slide-text: #eee;
|
|
9
|
+
--accent: #e94560;
|
|
10
|
+
--accent-light: #ff6b81;
|
|
11
|
+
--surface: #16213e;
|
|
12
|
+
--surface-light: #0f3460;
|
|
13
|
+
--on-time: #2ed573;
|
|
14
|
+
--behind: #ff4757;
|
|
15
|
+
--ahead: #ffa502;
|
|
16
|
+
--font-sans: "Inter", "Helvetica Neue", Arial, sans-serif;
|
|
17
|
+
--font-mono: "JetBrains Mono", "Fira Code", monospace;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
html, body {
|
|
21
|
+
margin: 0;
|
|
22
|
+
padding: 0;
|
|
23
|
+
font-family: var(--font-sans);
|
|
24
|
+
background: #0a0a1a;
|
|
25
|
+
color: var(--slide-text);
|
|
26
|
+
height: 100%;
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* ========================
|
|
31
|
+
SLIDE STYLES (shared)
|
|
32
|
+
======================== */
|
|
33
|
+
|
|
34
|
+
.slide {
|
|
35
|
+
width: 100%;
|
|
36
|
+
height: 100%;
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
justify-content: center;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.slide-inner {
|
|
43
|
+
width: 100%;
|
|
44
|
+
height: 100%;
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
align-items: center;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
padding: 4rem;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Default template */
|
|
53
|
+
.default-template .slide-body {
|
|
54
|
+
font-size: 1.8rem;
|
|
55
|
+
line-height: 1.6;
|
|
56
|
+
max-width: 80%;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.default-template .slide-body ul,
|
|
60
|
+
.default-template .slide-body ol {
|
|
61
|
+
text-align: left;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.default-template .slide-body li {
|
|
65
|
+
margin-bottom: 0.5em;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Title template */
|
|
69
|
+
.title-template {
|
|
70
|
+
text-align: center;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.title-template .slide-title {
|
|
74
|
+
font-size: 3.5rem;
|
|
75
|
+
font-weight: 700;
|
|
76
|
+
margin-bottom: 1rem;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.title-template .slide-title p {
|
|
80
|
+
margin: 0;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.title-template .slide-subtitle {
|
|
84
|
+
font-size: 1.8rem;
|
|
85
|
+
opacity: 0.7;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.title-template .slide-subtitle p {
|
|
89
|
+
margin: 0;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Section template */
|
|
93
|
+
.section-template {
|
|
94
|
+
background: linear-gradient(135deg, var(--accent), var(--surface-light));
|
|
95
|
+
text-align: center;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.section-template .slide-heading {
|
|
99
|
+
font-size: 3rem;
|
|
100
|
+
font-weight: 700;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.section-template .slide-heading p {
|
|
104
|
+
margin: 0;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* Two column template */
|
|
108
|
+
.two-column-template {
|
|
109
|
+
flex-direction: row;
|
|
110
|
+
gap: 3rem;
|
|
111
|
+
padding: 3rem 4rem;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.two-column-template .column {
|
|
115
|
+
flex: 1;
|
|
116
|
+
font-size: 1.4rem;
|
|
117
|
+
line-height: 1.6;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.two-column-template .column ul {
|
|
121
|
+
padding-left: 1.5em;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.two-column-template .column li {
|
|
125
|
+
margin-bottom: 0.4em;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* Image template */
|
|
129
|
+
.image-template .slide-caption {
|
|
130
|
+
font-size: 1.6rem;
|
|
131
|
+
margin-bottom: 2rem;
|
|
132
|
+
text-align: center;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.image-template .slide-image {
|
|
136
|
+
max-width: 80%;
|
|
137
|
+
text-align: center;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.image-template .slide-image img {
|
|
141
|
+
max-width: 100%;
|
|
142
|
+
max-height: 60vh;
|
|
143
|
+
border-radius: 8px;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/* Hide raw code blocks until syntax-js upgrades them */
|
|
147
|
+
pre > code[class*="language-"] {
|
|
148
|
+
opacity: 0;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
pre > syntax-code {
|
|
152
|
+
opacity: 1;
|
|
153
|
+
transition: opacity 0.15s ease-in;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/* Translation template */
|
|
157
|
+
.translation-template {
|
|
158
|
+
text-align: center;
|
|
159
|
+
gap: 2rem;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.translation-template .slide-title {
|
|
163
|
+
font-size: 3rem;
|
|
164
|
+
font-weight: 700;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.translation-template .slide-title p {
|
|
168
|
+
margin: 0;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.translation-template .slide-translation {
|
|
172
|
+
font-size: 2rem;
|
|
173
|
+
opacity: 0.7;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.translation-template .slide-translation p {
|
|
177
|
+
margin: 0;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/* Code template */
|
|
181
|
+
.code-template {
|
|
182
|
+
padding: 2rem 3rem;
|
|
183
|
+
align-items: stretch;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.code-template .code-title {
|
|
187
|
+
font-size: 1.6rem;
|
|
188
|
+
font-weight: 600;
|
|
189
|
+
margin-bottom: 1rem;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.code-template .code-title p {
|
|
193
|
+
margin: 0;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.code-viewport {
|
|
197
|
+
position: relative;
|
|
198
|
+
flex: 1;
|
|
199
|
+
overflow: hidden;
|
|
200
|
+
border-radius: 8px;
|
|
201
|
+
background: rgba(0, 0, 0, 0.3);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.code-scroll {
|
|
205
|
+
transition: transform 0.6s ease-in-out;
|
|
206
|
+
padding: 1rem;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.code-scroll pre {
|
|
210
|
+
margin: 0;
|
|
211
|
+
background: none;
|
|
212
|
+
padding: 0;
|
|
213
|
+
line-height: 1.6;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.code-scroll code {
|
|
217
|
+
background: none;
|
|
218
|
+
padding: 0;
|
|
219
|
+
font-size: 1.1rem;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/* Dim overlays */
|
|
223
|
+
.code-dim {
|
|
224
|
+
position: absolute;
|
|
225
|
+
left: 0;
|
|
226
|
+
right: 0;
|
|
227
|
+
pointer-events: none;
|
|
228
|
+
transition: all 0.6s ease-in-out;
|
|
229
|
+
z-index: 1;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.code-dim-top {
|
|
233
|
+
top: 0;
|
|
234
|
+
height: 0;
|
|
235
|
+
background: rgba(0, 0, 0, 0.7);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.code-dim-bottom {
|
|
239
|
+
bottom: 0;
|
|
240
|
+
height: 0;
|
|
241
|
+
background: rgba(0, 0, 0, 0.7);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/* ========================
|
|
245
|
+
DISPLAY VIEW (audience)
|
|
246
|
+
======================== */
|
|
247
|
+
|
|
248
|
+
.display {
|
|
249
|
+
width: 100vw;
|
|
250
|
+
height: 100vh;
|
|
251
|
+
background: var(--slide-bg);
|
|
252
|
+
position: relative;
|
|
253
|
+
outline: none;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.display .slide-container {
|
|
257
|
+
width: 100%;
|
|
258
|
+
height: 100%;
|
|
259
|
+
position: relative;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.display .slide-counter {
|
|
263
|
+
position: absolute;
|
|
264
|
+
bottom: 1rem;
|
|
265
|
+
right: 1.5rem;
|
|
266
|
+
font-size: 0.9rem;
|
|
267
|
+
opacity: 0.4;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/* ========================
|
|
271
|
+
VIEW TRANSITIONS
|
|
272
|
+
======================== */
|
|
273
|
+
|
|
274
|
+
/* Give the live-view element the transition name — there's only ever one */
|
|
275
|
+
live-view:has(.display) {
|
|
276
|
+
view-transition-name: slide-container;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/* Default: no animation for the container (instant swap) */
|
|
280
|
+
::view-transition-old(slide-container),
|
|
281
|
+
::view-transition-new(slide-container) {
|
|
282
|
+
animation: none;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/* Fade */
|
|
286
|
+
html[data-transition="fade"]::view-transition-old(slide-container) {
|
|
287
|
+
animation: vt-fade-out 0.4s ease-in-out;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
html[data-transition="fade"]::view-transition-new(slide-container) {
|
|
291
|
+
animation: vt-fade-in 0.4s ease-in-out;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/* Slide left */
|
|
295
|
+
html[data-transition="slide-left"]::view-transition-old(slide-container) {
|
|
296
|
+
animation: vt-slide-out-left 0.4s ease-in-out;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
html[data-transition="slide-left"]::view-transition-new(slide-container) {
|
|
300
|
+
animation: vt-slide-in-right 0.4s ease-in-out;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/* Slide right */
|
|
304
|
+
html[data-transition="slide-right"]::view-transition-old(slide-container) {
|
|
305
|
+
animation: vt-slide-out-right 0.4s ease-in-out;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
html[data-transition="slide-right"]::view-transition-new(slide-container) {
|
|
309
|
+
animation: vt-slide-in-left 0.4s ease-in-out;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/* Magic move — the browser interpolates position/size for matched
|
|
313
|
+
view-transition-name elements. No cross-fade on the container
|
|
314
|
+
to avoid background dimming. */
|
|
315
|
+
html[data-transition="magic-move"]::view-transition-old(slide-container) {
|
|
316
|
+
animation: none;
|
|
317
|
+
opacity: 0;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
html[data-transition="magic-move"]::view-transition-new(slide-container) {
|
|
321
|
+
animation: none;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
@keyframes vt-fade-out {
|
|
325
|
+
from { opacity: 1; }
|
|
326
|
+
to { opacity: 0; }
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
@keyframes vt-fade-in {
|
|
330
|
+
from { opacity: 0; }
|
|
331
|
+
to { opacity: 1; }
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
@keyframes vt-slide-out-left {
|
|
335
|
+
from { transform: translateX(0); opacity: 1; }
|
|
336
|
+
to { transform: translateX(-100%); opacity: 0; }
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
@keyframes vt-slide-in-right {
|
|
340
|
+
from { transform: translateX(100%); opacity: 0; }
|
|
341
|
+
to { transform: translateX(0); opacity: 1; }
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
@keyframes vt-slide-out-right {
|
|
345
|
+
from { transform: translateX(0); opacity: 1; }
|
|
346
|
+
to { transform: translateX(100%); opacity: 0; }
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
@keyframes vt-slide-in-left {
|
|
350
|
+
from { transform: translateX(-100%); opacity: 0; }
|
|
351
|
+
to { transform: translateX(0); opacity: 1; }
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/* ========================
|
|
355
|
+
PRESENTER VIEW
|
|
356
|
+
======================== */
|
|
357
|
+
|
|
358
|
+
.presenter {
|
|
359
|
+
width: 100vw;
|
|
360
|
+
height: 100vh;
|
|
361
|
+
display: grid;
|
|
362
|
+
grid-template-rows: auto 1fr auto auto;
|
|
363
|
+
background: #0d0d1a;
|
|
364
|
+
gap: 0.5rem;
|
|
365
|
+
padding: 0.5rem;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/* Controls */
|
|
369
|
+
.controls {
|
|
370
|
+
display: flex;
|
|
371
|
+
align-items: center;
|
|
372
|
+
gap: 1rem;
|
|
373
|
+
padding: 0.5rem 1rem;
|
|
374
|
+
background: var(--surface);
|
|
375
|
+
border-radius: 8px;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.controls button {
|
|
379
|
+
background: var(--surface-light);
|
|
380
|
+
color: var(--slide-text);
|
|
381
|
+
border: 1px solid rgba(255,255,255,0.1);
|
|
382
|
+
padding: 0.5rem 1rem;
|
|
383
|
+
border-radius: 6px;
|
|
384
|
+
cursor: pointer;
|
|
385
|
+
font-size: 0.9rem;
|
|
386
|
+
font-family: var(--font-sans);
|
|
387
|
+
transition: background 0.2s;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.controls button:hover {
|
|
391
|
+
background: var(--accent);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.controls .jump-to {
|
|
395
|
+
background: var(--surface-light);
|
|
396
|
+
color: var(--slide-text);
|
|
397
|
+
border: 1px solid rgba(255,255,255,0.1);
|
|
398
|
+
padding: 0.5rem 0.75rem;
|
|
399
|
+
border-radius: 6px;
|
|
400
|
+
font-size: 0.9rem;
|
|
401
|
+
font-family: var(--font-sans);
|
|
402
|
+
cursor: pointer;
|
|
403
|
+
min-width: 8rem;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
.controls .jump-to:hover {
|
|
407
|
+
background: var(--accent);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
.controls button.reload {
|
|
411
|
+
margin-left: auto;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.controls .slide-info {
|
|
415
|
+
font-size: 1rem;
|
|
416
|
+
opacity: 0.8;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/* Slide previews */
|
|
420
|
+
.previews {
|
|
421
|
+
display: grid;
|
|
422
|
+
grid-template-columns: 1fr 1fr;
|
|
423
|
+
gap: 0.5rem;
|
|
424
|
+
min-height: 0;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.preview {
|
|
428
|
+
display: flex;
|
|
429
|
+
flex-direction: column;
|
|
430
|
+
min-height: 0;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
.preview h3 {
|
|
434
|
+
margin: 0 0 0.3rem 0;
|
|
435
|
+
font-size: 0.85rem;
|
|
436
|
+
text-transform: uppercase;
|
|
437
|
+
letter-spacing: 0.05em;
|
|
438
|
+
opacity: 0.6;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
.preview-frame {
|
|
442
|
+
flex: 1;
|
|
443
|
+
background: var(--slide-bg);
|
|
444
|
+
border-radius: 8px;
|
|
445
|
+
overflow: hidden;
|
|
446
|
+
position: relative;
|
|
447
|
+
min-height: 0;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.preview-frame .slide {
|
|
451
|
+
zoom: 0.75;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
.preview-frame .no-slide {
|
|
455
|
+
display: flex;
|
|
456
|
+
align-items: center;
|
|
457
|
+
justify-content: center;
|
|
458
|
+
height: 100%;
|
|
459
|
+
opacity: 0.4;
|
|
460
|
+
font-size: 1.2rem;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.current-preview .preview-frame {
|
|
464
|
+
border: 2px solid var(--accent);
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
/* Timing */
|
|
468
|
+
.timing {
|
|
469
|
+
background: linear-gradient(
|
|
470
|
+
to right,
|
|
471
|
+
rgba(233, 69, 96, 0.25) var(--slide-progress, 0%),
|
|
472
|
+
var(--surface) var(--slide-progress, 0%)
|
|
473
|
+
);
|
|
474
|
+
border-radius: 8px;
|
|
475
|
+
padding: 0.5rem 1rem;
|
|
476
|
+
transition: background 1s linear;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.timing-info {
|
|
480
|
+
display: flex;
|
|
481
|
+
gap: 2rem;
|
|
482
|
+
align-items: center;
|
|
483
|
+
font-size: 1rem;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
.timing-info.on-time .pacing-indicator {
|
|
487
|
+
color: var(--on-time);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.timing-info.behind .pacing-indicator {
|
|
491
|
+
color: var(--behind);
|
|
492
|
+
font-weight: 700;
|
|
493
|
+
animation: pulse 1s infinite;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
.timing-info.ahead .pacing-indicator {
|
|
497
|
+
color: var(--ahead);
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
@keyframes pulse {
|
|
501
|
+
0%, 100% { opacity: 1; }
|
|
502
|
+
50% { opacity: 0.5; }
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
.timing-info .pause-button {
|
|
506
|
+
background: var(--surface-light);
|
|
507
|
+
color: var(--slide-text);
|
|
508
|
+
border: 1px solid rgba(255,255,255,0.1);
|
|
509
|
+
padding: 0.3rem 0.75rem;
|
|
510
|
+
border-radius: 6px;
|
|
511
|
+
cursor: pointer;
|
|
512
|
+
font-size: 0.9rem;
|
|
513
|
+
font-family: var(--font-sans);
|
|
514
|
+
transition: background 0.2s;
|
|
515
|
+
line-height: 1;
|
|
516
|
+
min-width: 6rem;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
.timing-info .pause-button:hover {
|
|
520
|
+
background: var(--accent);
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.timing-info .elapsed {
|
|
524
|
+
font-variant-numeric: tabular-nums;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
.timing-info .remaining {
|
|
528
|
+
font-variant-numeric: tabular-nums;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
.timing-info .slide-duration {
|
|
532
|
+
opacity: 0.6;
|
|
533
|
+
margin-left: auto;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
/* Notes */
|
|
537
|
+
.notes {
|
|
538
|
+
background: var(--surface);
|
|
539
|
+
border-radius: 8px;
|
|
540
|
+
padding: 0.75rem 1rem;
|
|
541
|
+
max-height: 30vh;
|
|
542
|
+
overflow-y: auto;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
.notes h3 {
|
|
546
|
+
margin: 0 0 0.3rem 0;
|
|
547
|
+
font-size: 0.85rem;
|
|
548
|
+
text-transform: uppercase;
|
|
549
|
+
letter-spacing: 0.05em;
|
|
550
|
+
opacity: 0.6;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
.notes-content {
|
|
554
|
+
font-size: 1.1rem;
|
|
555
|
+
line-height: 1.5;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.notes-content p {
|
|
559
|
+
margin: 0.3em 0;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
.notes .no-notes {
|
|
563
|
+
opacity: 0.4;
|
|
564
|
+
font-style: italic;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
/* ========================
|
|
568
|
+
GLOBAL TYPOGRAPHY
|
|
569
|
+
======================== */
|
|
570
|
+
|
|
571
|
+
strong, b {
|
|
572
|
+
color: var(--accent-light);
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
code {
|
|
576
|
+
font-family: var(--font-mono);
|
|
577
|
+
background: rgba(255,255,255,0.1);
|
|
578
|
+
padding: 0.15em 0.4em;
|
|
579
|
+
border-radius: 4px;
|
|
580
|
+
font-size: 0.9em;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
pre {
|
|
584
|
+
background: rgba(0,0,0,0.3);
|
|
585
|
+
padding: 1rem;
|
|
586
|
+
border-radius: 8px;
|
|
587
|
+
overflow-x: auto;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
pre code {
|
|
591
|
+
background: none;
|
|
592
|
+
padding: 0;
|
|
593
|
+
}
|