Skip to content

Commit ee74646

Browse files
committed
Hookup demos
1 parent 17db160 commit ee74646

31 files changed

+15801
-7
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@
77
[submodule "_layouts/patterns"]
88
path = _layouts/patterns
99
url = https://github.com/patternslib/patterns-layouts.git
10+
[submodule "code"]
11+
path = code
12+
url = https://github.com/Patternslib/Patterns.git

_layouts/demo.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ <h1>
3232

3333
<div id="demo"
3434
class="pattern-demo">
35-
<a href="/pat-demos/src/pat/{{ page.id | remove: '/'}}/index.html"
35+
<a href="/code/src/pat/{{ page.title | slugify }}/index.html"
3636
class="pat-inject"
3737
data-pat-inject="target: #demo; trigger: autoload">Load demo</a>
3838
</div>
3939

4040
<div class="pat-rich">
41-
<a href="/pat-demos/src/pat/{{page.id }}/documentation.md#documentation"
41+
<a href="/code/src/pat/{{ page.title | slugify }}/documentation.md#documentation"
4242
class="pat-inject"
4343
data-pat-inject="data-type: markdown; source: ##Documentation; target: self::element; trigger: autoload">Documentation</a>
4444
</div>
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

_sass/components/_main.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
background-color: $colour-demos;
4242

4343
.pat-rich a:not(.pat-button) {
44-
color: white;
44+
// color: white;
4545
}
4646
}
4747

_sass/components/_rich.scss

+122-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
2-
1+
$table-cell-padding-top: 10px !default;
2+
$table-cell-padding-right: 15px !default;
3+
$table-cell-padding-bottom: 10px !default;
4+
$table-cell-padding-left: 15px !default;
5+
$table-line-height: 1.5 !default;
36
$bullet-space-rich: 40px !default;
47

58
.pat-rich {
@@ -10,6 +13,123 @@ $bullet-space-rich: 40px !default;
1013
margin-bottom: 1.2em;
1114
}
1215

16+
table {
17+
border-bottom: 2px solid #fff;
18+
padding: 5px 10px 5px 10px;
19+
border-collapse: collapse;
20+
vertical-align: top;
21+
width: 100%;
22+
table-layout: fixed;
23+
24+
caption {
25+
padding-left: 0;
26+
margin: 1em 0;
27+
color: black;
28+
line-height: 1.5;
29+
text-align: left;
30+
font-weight: bold;
31+
}
32+
33+
tbody {
34+
td:not(.separation-cell),
35+
th:not(.separation-cell) {
36+
@include screen-size(medium-large) {
37+
vertical-align: top;
38+
}
39+
40+
.table-body-title {
41+
display: block;
42+
padding-top: 1.5em;
43+
// color: $colour-orange;
44+
font-weight: bold;
45+
font-size: 1.125em;
46+
line-height: 1.4444;
47+
}
48+
}
49+
50+
tr.header-row {
51+
th,
52+
td {
53+
&:after {
54+
display: none;
55+
}
56+
57+
background: transparent;
58+
59+
.table-body-title {
60+
padding-top: 1.5em;
61+
62+
a {
63+
text-overflow: ellipsis;
64+
overflow: hidden;
65+
}
66+
}
67+
}
68+
}
69+
70+
tr.header-row:first-child {
71+
.header-cell {
72+
.table-body-title {
73+
padding-top: 0.5em;
74+
}
75+
}
76+
}
77+
78+
.separation-cell {
79+
vertical-align: bottom;
80+
padding-top: 1.5em;
81+
}
82+
83+
tr.header-row + .separation-row {
84+
.separation-cell {
85+
padding-top: 0;
86+
}
87+
}
88+
}
89+
}
90+
91+
thead {
92+
th {
93+
vertical-align: bottom;
94+
text-align: center;
95+
// color: $colour-moss-green;
96+
hyphens: none;
97+
}
98+
}
99+
100+
tr {
101+
width: 100%;
102+
103+
td,
104+
th {
105+
padding-top: $table-cell-padding-top;
106+
padding-right: $table-cell-padding-right;
107+
padding-bottom: $table-cell-padding-bottom;
108+
padding-left: $table-cell-padding-left;
109+
border-collapse: collapse;
110+
vertical-align: top;
111+
border-right: 2px solid #fff;
112+
border-bottom: 2px solid #fff;
113+
background-color: #f3f3f3;
114+
115+
@include screen-size(small) {
116+
-moz-hyphens: auto;
117+
-webkit-hyphens: auto;
118+
hyphens: auto;
119+
120+
padding: 5px 10px 5px 10px;
121+
}
122+
}
123+
124+
td {
125+
&.no-width {
126+
width: auto;
127+
min-width: auto;
128+
max-width: none;
129+
}
130+
}
131+
}
132+
13133
blockquote {
14134
padding-left: 1em;
15135
margin: 2.6em 0;

bundle-config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ define([
5555
"pat-sticky",
5656
"pat-subform",
5757
"pat-switch",
58-
// "pat-syntax-highlight",
58+
"pat-syntax-highlight",
5959
// "pat-tabs",
6060
"pat-toggle",
6161
"pat-tooltip",

code

Submodule code added at 62f5901

0 commit comments

Comments
 (0)