- Implement safe markdown processing with marked and DOMPurify - Add markdown-slide layout template with dedicated markdown slots - Support auto-detection of markdown content in text slots - Include comprehensive markdown styling (lists, headers, code, quotes, tables) - Maintain security with HTML sanitization and safe element filtering - Add markdown documentation to theme creation guidelines 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
464 lines
8.9 KiB
CSS
464 lines
8.9 KiB
CSS
/*
|
|
* Theme: Default
|
|
* Name: Default Theme
|
|
* Description: Clean and simple theme suitable for any presentation
|
|
* Author: Michael Mainguy (mike.mainguy@gmail.com)
|
|
* Version: 0.1.0
|
|
*/
|
|
:root {
|
|
--theme-primary: #9563eb;
|
|
--theme-secondary: #94748b;
|
|
--theme-accent: #eea5e9;
|
|
--theme-background: #001112;
|
|
--theme-text: #ffffff;
|
|
--theme-text-secondary: #94a4ab;
|
|
|
|
--theme-font-heading: 'Inter', system-ui, sans-serif;
|
|
--theme-font-body: 'Inter', system-ui, sans-serif;
|
|
--theme-font-code: 'Consolas', monospace;
|
|
|
|
--slide-padding: 5%;
|
|
--content-max-width: 90%;
|
|
}
|
|
|
|
/* Base slide styling - works with global .slide-container classes */
|
|
.slide-container .slide-content,
|
|
.slide {
|
|
width: 100%;
|
|
height: 100%;
|
|
background: var(--theme-background);
|
|
color: var(--theme-primary);
|
|
font-family: var(--theme-font-body);
|
|
padding: var(--slide-padding);
|
|
box-sizing: border-box;
|
|
display: flex;
|
|
flex-direction: column;
|
|
position: relative;
|
|
overflow: hidden;
|
|
/* Ensure content is properly centered within container */
|
|
text-align: center;
|
|
}
|
|
|
|
/* Master slide elements */
|
|
.master-slide {
|
|
position: absolute;
|
|
z-index: 1;
|
|
}
|
|
|
|
.master-slide.footer {
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
padding: 1rem;
|
|
text-align: center;
|
|
font-size: 0.875rem;
|
|
opacity: 0.6;
|
|
}
|
|
|
|
/* Slot styles */
|
|
.slot {
|
|
position: relative;
|
|
border: 2px dashed transparent;
|
|
min-height: 2rem;
|
|
transition: border-color 0.2s ease;
|
|
width: 100%;
|
|
max-width: var(--content-max-width);
|
|
margin: 0 auto;
|
|
/* Ensure slot content inherits proper centering */
|
|
text-align: inherit;
|
|
}
|
|
|
|
.slot[data-slot="image"] {
|
|
width: 100%;
|
|
}
|
|
.slot[data-slot="image"] img {
|
|
width: 100%;
|
|
}
|
|
.slot.editing {
|
|
border-color: var(--theme-accent);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.slot.empty {
|
|
border-color: var(--theme-secondary);
|
|
opacity: 0.5;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.slot.empty::before {
|
|
content: attr(data-placeholder);
|
|
color: var(--theme-text-secondary);
|
|
font-style: italic;
|
|
}
|
|
|
|
.content-slot {
|
|
color: var(--theme-text-secondary);
|
|
background-color: var(--theme-background);
|
|
}
|
|
.slot[data-type="text"] {
|
|
line-height: 1.6;
|
|
/* Text content can be left-aligned for readability */
|
|
text-align: left;
|
|
}
|
|
.slot[data-type="image"] {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: #fffffd;
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.slot[data-type="image"] img {
|
|
max-width: 100px;
|
|
max-height: 100px;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.slot[data-slot="title"] {
|
|
font-size: clamp(5rem, 8vw, 4rem);
|
|
margin-bottom: 2rem;
|
|
width: 80%;
|
|
text-align: center;
|
|
}
|
|
|
|
.slot[data-slot="subtitle"] {
|
|
font-size: clamp(1rem, 4vw, 2rem);
|
|
color: var(--theme-text-secondary);
|
|
width: 100%;
|
|
max-width: 80%;
|
|
text-align: center;
|
|
}
|
|
|
|
.content-blocks-container {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 2rem;
|
|
flex: 1;
|
|
align-items: stretch;
|
|
width: 100%;
|
|
}
|
|
.slot[data-slot="content"],
|
|
.slot[data-slot="content1"],
|
|
.slot[data-slot="content2"] {
|
|
font-size: clamp(0.9rem, 2.2vw, 1.1rem);
|
|
text-align: left;
|
|
width: 100%;
|
|
line-height: 1.6;
|
|
padding: 2rem;
|
|
color: var(--theme-text-secondary);
|
|
}
|
|
|
|
|
|
/* Aspect ratio specific adjustments */
|
|
.slide-container.aspect-16-9 .slide-content,
|
|
.slide-container.aspect-16-9 .slide {
|
|
--slide-padding: 4%;
|
|
--content-max-width: 85%;
|
|
}
|
|
|
|
.slide-container.aspect-4-3 .slide-content,
|
|
.slide-container.aspect-4-3 .slide {
|
|
--slide-padding: 6%;
|
|
--content-max-width: 80%;
|
|
}
|
|
|
|
.slide-container.aspect-16-10 .slide-content,
|
|
.slide-container.aspect-16-10 .slide {
|
|
--slide-padding: 5%;
|
|
--content-max-width: 85%;
|
|
}
|
|
|
|
/* Responsive adjustments */
|
|
@media (max-width: 768px) {
|
|
:root {
|
|
--slide-padding: 3%;
|
|
--content-max-width: 95%;
|
|
}
|
|
|
|
|
|
/* Two content blocks responsive adjustments */
|
|
.content-blocks-container {
|
|
grid-template-columns: 1fr;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.layout-2-content-blocks .slot[data-slot="content1"],
|
|
.layout-2-content-blocks .slot[data-slot="content2"] {
|
|
font-size: clamp(0.8rem, 2vw, 1rem);
|
|
padding: 0.75rem;
|
|
}
|
|
}
|
|
.fade-in {
|
|
opacity: 1;
|
|
animation-name: fadeInOpacity;
|
|
animation-iteration-count: 1;
|
|
animation-timing-function: ease-in;
|
|
animation-duration: 1s;
|
|
}
|
|
|
|
.fade-in-slow {
|
|
opacity: 0;
|
|
animation-name: fadeInOpacity;
|
|
animation-iteration-count: 1;
|
|
animation-timing-function: ease-in;
|
|
animation-duration: 2s;
|
|
animation-delay: 1s;
|
|
animation-fill-mode: forwards;
|
|
}
|
|
|
|
|
|
@keyframes fadeInOpacity {
|
|
0% {
|
|
opacity: 0;
|
|
}
|
|
100% {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
/* Enhanced code blocks with syntax highlighting */
|
|
.slide-code {
|
|
background: #1e1e1e !important;
|
|
border: 1px solid var(--theme-secondary);
|
|
border-radius: 8px;
|
|
padding: 1.5rem;
|
|
margin: 1.5em 0;
|
|
overflow-x: auto;
|
|
font-family: var(--theme-font-code);
|
|
font-size: clamp(0.75rem, 1.5vw, 0.9rem);
|
|
line-height: 1.4;
|
|
position: relative;
|
|
}
|
|
|
|
.slide-code code {
|
|
background: none !important;
|
|
padding: 0 !important;
|
|
color: #e6e6e6;
|
|
font-family: inherit;
|
|
}
|
|
|
|
/* Prism.js syntax highlighting theme for slides */
|
|
.token.comment,
|
|
.token.prolog,
|
|
.token.doctype,
|
|
.token.cdata {
|
|
color: #6a9955;
|
|
font-style: italic;
|
|
}
|
|
|
|
.token.punctuation {
|
|
color: #d4d4d4;
|
|
}
|
|
|
|
.token.property,
|
|
.token.tag,
|
|
.token.boolean,
|
|
.token.number,
|
|
.token.constant,
|
|
.token.symbol,
|
|
.token.deleted {
|
|
color: #b5cea8;
|
|
}
|
|
|
|
.token.selector,
|
|
.token.attr-name,
|
|
.token.string,
|
|
.token.char,
|
|
.token.builtin,
|
|
.token.inserted {
|
|
color: #ce9178;
|
|
}
|
|
|
|
.token.operator,
|
|
.token.entity,
|
|
.token.url,
|
|
.language-css .token.string,
|
|
.style .token.string {
|
|
color: #d4d4d4;
|
|
}
|
|
|
|
.token.atrule,
|
|
.token.attr-value,
|
|
.token.keyword {
|
|
color: #569cd6;
|
|
}
|
|
|
|
.token.function,
|
|
.token.class-name {
|
|
color: #dcdcaa;
|
|
}
|
|
|
|
.token.regex,
|
|
.token.important,
|
|
.token.variable {
|
|
color: #d16969;
|
|
}
|
|
|
|
.token.important,
|
|
.token.bold {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.token.italic {
|
|
font-style: italic;
|
|
}
|
|
|
|
/* Language labels for code blocks */
|
|
.slide-code::before {
|
|
content: attr(class);
|
|
position: absolute;
|
|
top: 0.5rem;
|
|
right: 1rem;
|
|
font-size: 0.75rem;
|
|
color: var(--theme-text-secondary);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.slide-code.language-javascript::before { content: 'JavaScript'; }
|
|
.slide-code.language-typescript::before { content: 'TypeScript'; }
|
|
.slide-code.language-python::before { content: 'Python'; }
|
|
.slide-code.language-bash::before { content: 'Bash'; }
|
|
.slide-code.language-json::before { content: 'JSON'; }
|
|
.slide-code.language-css::before { content: 'CSS'; }
|
|
.slide-code.language-markup::before { content: 'HTML'; }
|
|
.slide-code.language-html::before { content: 'HTML'; }
|
|
.slide-code.language-sql::before { content: 'SQL'; }
|
|
.slide-code.language-yaml::before { content: 'YAML'; }
|
|
|
|
/* Mermaid diagram styling */
|
|
.mermaid-container {
|
|
margin: 2rem 0;
|
|
padding: 1rem;
|
|
background: rgba(255, 255, 255, 0.05);
|
|
border-radius: 8px;
|
|
border: 1px solid var(--theme-secondary);
|
|
text-align: center;
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.mermaid-diagram {
|
|
max-width: 100%;
|
|
height: auto;
|
|
}
|
|
|
|
.mermaid-diagram svg {
|
|
max-width: 100%;
|
|
height: auto;
|
|
background: transparent;
|
|
}
|
|
|
|
.mermaid-error {
|
|
color: #ff6b6b;
|
|
background: rgba(255, 107, 107, 0.1);
|
|
padding: 1rem;
|
|
border-radius: 4px;
|
|
border: 1px solid #ff6b6b;
|
|
font-family: var(--theme-font-code);
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
/* Enhanced slide callouts */
|
|
.slide-callout {
|
|
background: rgba(149, 116, 235, 0.15);
|
|
border-left: 4px solid var(--theme-primary);
|
|
padding: 1rem 1.5rem;
|
|
margin: 1.5em 0;
|
|
border-radius: 0 8px 8px 0;
|
|
font-style: italic;
|
|
color: var(--theme-text);
|
|
position: relative;
|
|
}
|
|
|
|
.slide-callout::before {
|
|
content: '💡';
|
|
position: absolute;
|
|
left: -12px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
background: var(--theme-background);
|
|
padding: 0.25rem;
|
|
border-radius: 50%;
|
|
font-style: normal;
|
|
}
|
|
|
|
/* Enhanced slide lists */
|
|
.slide-list {
|
|
margin: 1.5em 0;
|
|
padding-left: 2rem;
|
|
}
|
|
|
|
.slide-list li {
|
|
margin: 0.75em 0;
|
|
color: var(--theme-text);
|
|
line-height: 1.6;
|
|
position: relative;
|
|
}
|
|
|
|
.slide-list li::marker {
|
|
color: var(--theme-accent);
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* Enhanced slide tables */
|
|
.slide-table-wrapper {
|
|
margin: 2rem 0;
|
|
overflow-x: auto;
|
|
border-radius: 8px;
|
|
border: 1px solid var(--theme-secondary);
|
|
}
|
|
|
|
.slide-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
background: rgba(255, 255, 255, 0.02);
|
|
}
|
|
|
|
.slide-table th,
|
|
.slide-table td {
|
|
padding: 0.75rem 1rem;
|
|
text-align: left;
|
|
border-bottom: 1px solid var(--theme-secondary);
|
|
}
|
|
|
|
.slide-table th {
|
|
background: rgba(149, 116, 235, 0.2);
|
|
font-weight: 600;
|
|
color: var(--theme-primary);
|
|
border-bottom: 2px solid var(--theme-primary);
|
|
}
|
|
|
|
.slide-table tr:nth-child(even) {
|
|
background: rgba(255, 255, 255, 0.03);
|
|
}
|
|
|
|
.slide-table tr:hover {
|
|
background: rgba(149, 116, 235, 0.1);
|
|
}
|
|
|
|
/* Responsive adjustments for enhanced features */
|
|
@media (max-width: 768px) {
|
|
.slide-code {
|
|
padding: 1rem;
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
.slide-code::before {
|
|
font-size: 0.7rem;
|
|
}
|
|
|
|
.mermaid-container {
|
|
padding: 0.5rem;
|
|
margin: 1rem 0;
|
|
}
|
|
|
|
.slide-callout {
|
|
padding: 0.75rem 1rem;
|
|
margin: 1rem 0;
|
|
}
|
|
}
|
|
|