Skip to content

Commit 9a20fb5

Browse files
docs: #202 style home page cta
1 parent ba2721d commit 9a20fb5

6 files changed

Lines changed: 52 additions & 9 deletions

File tree

docs/assets/copy-button.svg

Lines changed: 2 additions & 2 deletions
Loading

docs/components/banner-cta/banner-cta.module.css

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.container {
2-
margin: var(--size-4) 0;
3-
padding: var(--size-4);
2+
width: 100%;
3+
margin: var(--size-1) 0;
4+
padding: var(--size-2);
45
background-color: #e7e8ea;
56
border-radius: var(--radius-4);
67
color: var(--color-primary);
@@ -18,6 +19,35 @@
1819
box-shadow: var(--shadow-2);
1920
margin: var(--size-px-2) 0;
2021
text-align: center;
21-
padding: var(--size-1);
22+
padding: var(--size-2);
2223
display: block;
24+
25+
& pre {
26+
font-size: var(--font-size-1);
27+
}
28+
29+
& wcc-ctc-button {
30+
display: none;
31+
}
32+
}
33+
34+
@media (min-width: 768px) {
35+
.container {
36+
width: 80%;
37+
margin: 0 auto;
38+
padding: var(--size-4);
39+
}
40+
}
41+
42+
@media (min-width: 430px) {
43+
& pre {
44+
display: inline;
45+
vertical-align: text-top;
46+
}
47+
48+
.snippet {
49+
& wcc-ctc-button {
50+
display: inline;
51+
}
52+
}
2353
}

docs/components/ctc-button/ctc-button.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@
33
border: none;
44
cursor: copy;
55
border-radius: var(--radius-3);
6-
background-color: var(--color-green-pale);
6+
background-color: var(--color-accent);
7+
8+
& svg {
9+
outline: var(--color-white);
10+
}
711
}

docs/pages/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
collection: nav
33
order: 1
44
imports:
5+
- ../styles/home.css
56
- ../components/banner-splash/banner-splash.tsx type="module" data-gwd-opt="static"
67
- ../components/banner-cta/banner-cta.tsx type="module" data-gwd-opt="static"
8+
- ../components/ctc-button/ctc-button.tsx type="module"
79
---
810

911
<wcc-banner-splash></wcc-banner-splash>

docs/styles/home.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.page-outlet {
2+
margin: 0 auto;
3+
padding: 0;
4+
}

patches/@greenwood+cli+0.34.0-alpha.1.patch

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/node_modules/@greenwood/cli/src/lib/layout-utils.js b/node_modules/@greenwood/cli/src/lib/layout-utils.js
2-
index 8dd051d..ba3566c 100644
2+
index 8dd051d..784a1ee 100644
33
--- a/node_modules/@greenwood/cli/src/lib/layout-utils.js
44
+++ b/node_modules/@greenwood/cli/src/lib/layout-utils.js
55
@@ -81,6 +81,7 @@ async function mergeContentIntoLayout(
@@ -21,15 +21,18 @@ index 8dd051d..ba3566c 100644
2121
if (isCssFile) {
2222
return true;
2323
}
24-
@@ -184,7 +189,7 @@ async function mergeContentIntoLayout(
24+
@@ -184,9 +189,9 @@ async function mergeContentIntoLayout(
2525
...(
2626
await asyncFilter(customImports, async (resource) => {
2727
const [src] = resource.split(" ");
2828
- const isSupportedScript = ["js", "ts"].includes(src.split(" ")[0].split(".").pop());
2929
+ isSupportedScript.includes(src.split(" ")[0].split(".").pop());
3030

31-
if (isSupportedScript) {
31+
- if (isSupportedScript) {
32+
+ if(isSupportedScript.includes(src.split(" ")[0].split(".").pop())) {
3233
return true;
34+
}
35+
3336
diff --git a/node_modules/@greenwood/cli/src/plugins/copy/plugin-copy-favicon.js b/node_modules/@greenwood/cli/src/plugins/copy/plugin-copy-favicon.js
3437
index 024232f..53f60a2 100644
3538
--- a/node_modules/@greenwood/cli/src/plugins/copy/plugin-copy-favicon.js

0 commit comments

Comments
 (0)