Skip to content

Commit 523062d

Browse files
authored
Merge pull request #37 from Semantic-Org/learn
Learn
2 parents d878459 + 605588d commit 523062d

File tree

121 files changed

+3859
-1065
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+3859
-1065
lines changed

docs/package-lock.json

Lines changed: 5 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"playground-elements": "^0.18.1",
2626
"pretty": "^2.0.0",
2727
"pretty-json-custom-element": "^1.1.13",
28+
"semver": "^7.6.3",
2829
"shiki": "^1.11.1"
2930
}
3031
}

docs/src/components/CodePlayground/CodePlayground.css

Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
.playground {
2-
3-
display: flex;
4-
flex: 1 1 auto;
5-
flex-direction: column;
1+
:host {
62

73
--playground-header-background: linear-gradient(rgba(255, 255, 255, 0.02), rgb(15 17 22 / 50%));
84
--playground-header-border: 1px solid rgba(221, 221, 221, 0.05);
95
--playground-header-color: rgba(255, 255, 255, 0.4);
106
--playground-header-box-shadow: 0px -2px 5px -3px rgba(0, 0, 0, 0.4) inset;
117

12-
--playground-code-background: #080C10;
8+
--playground-tab-bar-background: #ffffff;
9+
10+
--inline-code-height: 350px;
11+
--playground-bar-height: 32px;
1312

1413
--code-purple: #D2A8FF;
1514
--code-grey: #656565;
1615
--code-default: #c9d1d9;
1716
--code-blue: var(--primary-text-color);
1817

18+
--playground-code-background: #080C10;
1919
--playground-code-comment-color: #444444;
2020
--playground-code-linenumber-color: #25272B;
2121
--playground-code-font-size: 14px;
@@ -39,11 +39,13 @@
3939
--playground-code-attribute-color: var(--code-blue);
4040
--playground-code-callee-color: var(--code-purple);
4141

42-
--playground-tab-bar-background: #ffffff;
43-
--playground-bar-height: 32px;
42+
}
4443

44+
.playground {
4545

46-
--inline-code-height: 350px;
46+
display: flex;
47+
flex: 1 1 auto;
48+
flex-direction: column;
4749

4850
::-webkit-scrollbar {
4951
-webkit-appearance: none;
@@ -218,6 +220,27 @@
218220

219221
}
220222

223+
header {
224+
display: block;
225+
box-shadow: none;
226+
min-height: 0px;
227+
border-bottom: var(--subtle-border);
228+
padding: 8px 16px 8px;
229+
height: auto;
230+
color: var(--standard-50);
231+
font-size: var(--small);
232+
background: var(--playground-header-background);
233+
border-bottom: var(--playground-header-border);
234+
box-shadow: var(--playground-header-box-shadow);
235+
236+
a {
237+
color: var(--link-color);
238+
}
239+
a:hover {
240+
color: var(--link-hover-color);
241+
}
242+
}
243+
221244
.tabs {
222245

223246
.menu {
@@ -231,7 +254,6 @@
231254
padding: 0.5rem 1rem;
232255
}
233256

234-
header,
235257
&:not(.inline) .menu {
236258
min-height: 27px;
237259
background: var(--playground-header-background);
@@ -240,23 +262,6 @@
240262
transition: background-color 0.1s ease, color 0.1s ease-in-out;
241263
}
242264

243-
header {
244-
display: block;
245-
box-shadow: none;
246-
border-bottom: var(--subtle-border);
247-
padding: 8px 16px 0px;
248-
height: auto;
249-
color: var(--standard-50);
250-
font-size: var(--small);
251-
252-
a {
253-
color: var(--link-color);
254-
}
255-
a:hover {
256-
color: var(--link-hover-color);
257-
}
258-
}
259-
260265
.menu ui-menu {
261266
margin: 0rem;
262267
font-size: 13px;

docs/src/components/CodePlayground/CodePlayground.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<div class="playground {classMap getClassMap}" part="playground">
2-
{#if example.title}
2+
{#if title}
33
<div class="masthead" part="masthead">
44
{#if canShowButtons}
55
<ui-button right-floated transparent small compact inverted class="tabs">
6-
{#if shouldUseTabs}
6+
{#if is layout 'tabs'}
77
Use Panels
88
{else}
99
Use Tabs
@@ -14,8 +14,8 @@
1414
Fork
1515
</ui-button>
1616
{/if}
17-
<h3 class="title" part="title">{example.title}</h3>
18-
<p part="description">{example.description}</p>
17+
<h3 class="title" part="title">{title}</h3>
18+
<p part="description">{description}</p>
1919
</div>
2020
{/if}
2121
{#if exists files}
@@ -25,7 +25,7 @@ <h3 class="title" part="title">{example.title}</h3>
2525
{/each}
2626
</playground-project>
2727
{/if}
28-
{#if either shouldUseTabs inline}
28+
{#if is layout 'tabs'}
2929
<ui-panels
3030
class={classMap getTabPanelsClass}
3131
direction="{getTabDirection}"

0 commit comments

Comments
 (0)