diff --git a/src/components/code-block/code-block.scss b/src/components/code-block/code-block.scss index cdb773c..34d975b 100644 --- a/src/components/code-block/code-block.scss +++ b/src/components/code-block/code-block.scss @@ -1,4 +1,5 @@ -@import 'highlight.js/scss/atom-one-dark'; +@import 'highlight.js/styles/github-dark-dimmed.css' screen and (prefers-color-scheme: dark); +@import 'highlight.js/styles/github.css' screen and (prefers-color-scheme: light); [part="container"] { overflow-x: auto; diff --git a/src/layout/content/showcase/showcase-component.js b/src/layout/content/showcase/showcase-component.js index b04fdde..f4faf09 100644 --- a/src/layout/content/showcase/showcase-component.js +++ b/src/layout/content/showcase/showcase-component.js @@ -2,13 +2,15 @@ import { html, LitElement, unsafeCSS } from 'lit'; import '../../../components/code-block/code-block'; import { theme } from '../../../theme/theme'; import showcaseComponentCss from './showcase-component.scss?inline'; +import { when } from 'lit/directives/when.js'; export class ShowcaseComponent extends LitElement { static styles = [theme, unsafeCSS(showcaseComponentCss)]; static properties = { hasCodeExample: { type: Boolean, state: true }, - exampleLanguage: { type: String } + exampleLanguage: { type: String }, + href: { type: String } }; connectedCallback() { @@ -29,7 +31,20 @@ export class ShowcaseComponent extends LitElement {
`; } diff --git a/src/layout/content/showcase/showcase-component.scss b/src/layout/content/showcase/showcase-component.scss index 7260778..57db4fe 100644 --- a/src/layout/content/showcase/showcase-component.scss +++ b/src/layout/content/showcase/showcase-component.scss @@ -11,6 +11,31 @@ border-left: 3px solid var(--color-5); } +[part="implementation"] { + margin-bottom: var(--size-4); + background-color: var(--color-10); + border: 2px solid var(--color-5); + border-radius: var(--radius-1); + box-shadow: var(--inner-shadow-4); +} + +[part="implementation-code"] { + padding-inline: var(--size-3); +} + +[part="implementation-footer"] { + display: flex; + align-items: center; + justify-content: end; + border-top: 1px solid var(--color-6); + padding-inline: var(--size-2); +} + +[part="implementation-link"] { + padding: var(--size-2); + font-size: var(--font-size-0); +} + .hidden { display: none; } diff --git a/src/layout/content/showcase/showcase-page.js b/src/layout/content/showcase/showcase-page.js index 6ea4432..1776b0b 100644 --- a/src/layout/content/showcase/showcase-page.js +++ b/src/layout/content/showcase/showcase-page.js @@ -25,7 +25,7 @@ export class ShowCasePage extends LitElement { return html`In this showcase, we'll demonstrate how to load a video source and @@ -46,7 +46,7 @@ export class ShowCasePage extends LitElement { #renderMultiplePlayers() { return html`
This example demonstrates how to incorporate multiple video players diff --git a/src/layout/content/showcase/showcase-page.scss b/src/layout/content/showcase/showcase-page.scss index 29b5a36..66bb896 100644 --- a/src/layout/content/showcase/showcase-page.scss +++ b/src/layout/content/showcase/showcase-page.scss @@ -12,6 +12,7 @@ a { text-decoration: none; background-color: var(--color-9); border: 1px solid var(--color-10); + border-radius: var(--radius-2); transition: background-color 0.4s, border-color 0.4s; padding-inline: var(--size-3);