-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(doc-layout): migrate to new mdjs-layout from @divriots/dockit-core
- Loading branch information
Showing
39 changed files
with
3,099 additions
and
2,128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import '@divriots/dockit-core/mdjs-layout/define'; | ||
import { breakpoints, styles } from '@divriots/dockit-core/mdjs-layout'; | ||
import { html, unsafeHTML } from '~/core'; | ||
import './color-toggler'; | ||
import logoSvg from './logo.svg?raw'; | ||
|
||
export const docLayoutTemplate = (content, context) => html` | ||
<style> | ||
${unsafeHTML(styles)} .logo { | ||
color: #f59e0b; | ||
} | ||
.topbar { | ||
width: 100%; | ||
display: flex; | ||
align-items: center; | ||
justify-content: right; | ||
} | ||
@media screen and (min-width: ${breakpoints.lg}) { | ||
.topbar { | ||
justify-content: unset; | ||
} | ||
} | ||
.preview-story .story_padded { | ||
background-color: var(--simba-bg-color); | ||
color: var(--simba-text-color); | ||
} | ||
html.dark .preview-story .story_padded { | ||
background-color: var(--simba-bg-color-dark); | ||
color: var(--simba-text-color-dark); | ||
} | ||
</style> | ||
<mdjs-layout | ||
.context="${context}" | ||
@color-scheme-change="${(event) => { | ||
if (event.detail.colorScheme === 'dark') { | ||
document.documentElement.classList.add('dark'); | ||
document.documentElement.setAttribute('theme', 'dark'); | ||
} else { | ||
document.documentElement.classList.remove('dark'); | ||
document.documentElement.setAttribute('theme', 'light'); | ||
} | ||
}}" | ||
> | ||
<div class="logo" slot="logo" aria-label="starter-simba"> | ||
${unsafeHTML(logoSvg)} | ||
</div> | ||
<div class="topbar" slot="topbar"> | ||
Themes: | ||
<color-toggler></color-toggler> | ||
</div> | ||
<div class="prose dark:prose-dark">${unsafeHTML(content)}</div> | ||
</mdjs-layout> | ||
`; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.