@sharadox/sharadox-web-library 0.46.0 → 0.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/distribution/component/about/feed/index.d.ts +3 -1
- package/distribution/component/about/feed/index.d.ts.map +1 -1
- package/distribution/component/about/feed/index.js +6 -2
- package/distribution/component/about/feed/index.js.map +1 -1
- package/distribution/component/about/feed/index.module.css +1 -1
- package/distribution/component/about/feed/index.module.scss +27 -0
- package/distribution/component/button/index.d.ts +1 -1
- package/distribution/component/button/index.d.ts.map +1 -1
- package/distribution/component/button/index.js +5 -4
- package/distribution/component/button/index.js.map +1 -1
- package/distribution/component/contact/form/index.d.ts.map +1 -1
- package/distribution/component/contact/form/index.js +2 -1
- package/distribution/component/contact/form/index.js.map +1 -1
- package/distribution/component/contact/index.d.ts.map +1 -1
- package/distribution/component/contact/index.js +2 -1
- package/distribution/component/contact/index.js.map +1 -1
- package/distribution/component/footer/index.d.ts.map +1 -1
- package/distribution/component/footer/index.js +2 -1
- package/distribution/component/footer/index.js.map +1 -1
- package/distribution/component/footer/index.module.css +1 -1
- package/distribution/component/footer/index.module.scss +2 -1
- package/distribution/component/portfolio/screens/index.d.ts +3 -1
- package/distribution/component/portfolio/screens/index.d.ts.map +1 -1
- package/distribution/component/portfolio/screens/index.js +7 -2
- package/distribution/component/portfolio/screens/index.js.map +1 -1
- package/distribution/component/portfolio/screens/index.module.css +1 -1
- package/distribution/component/portfolio/screens/index.module.scss +56 -17
- package/distribution/component/project-page/chapter/index.d.ts +3 -3
- package/distribution/component/project-page/chapter/index.d.ts.map +1 -1
- package/distribution/component/project-page/chapter/index.js +5 -4
- package/distribution/component/project-page/chapter/index.js.map +1 -1
- package/distribution/component/project-page/chapter/index.module.css +1 -1
- package/distribution/component/project-page/chapter/index.module.scss +46 -5
- package/distribution/component/project-page/chapter/type.d.ts +3 -0
- package/distribution/component/project-page/chapter/type.d.ts.map +1 -1
- package/distribution/component/project-page/index.d.ts +3 -2
- package/distribution/component/project-page/index.d.ts.map +1 -1
- package/distribution/component/project-page/index.js +4 -3
- package/distribution/component/project-page/index.js.map +1 -1
- package/distribution/component/project-page/index.module.css +1 -1
- package/distribution/component/project-page/index.module.scss +22 -1
- package/distribution/component/social-image/index.d.ts +2 -1
- package/distribution/component/social-image/index.d.ts.map +1 -1
- package/distribution/component/social-image/index.js +9 -6
- package/distribution/component/social-image/index.js.map +1 -1
- package/distribution/content/portfolio/index.d.ts +99 -31
- package/distribution/content/portfolio/index.d.ts.map +1 -1
- package/distribution/content/portfolio/index.js +111 -26
- package/distribution/content/portfolio/index.js.map +1 -1
- package/llms.txt +2 -0
- package/package.json +5 -5
|
@@ -1,23 +1,41 @@
|
|
|
1
1
|
@use "style/token" as *;
|
|
2
2
|
@use "style/object" as *;
|
|
3
3
|
|
|
4
|
-
/*
|
|
4
|
+
/*
|
|
5
|
+
* The scene sits in the middle of the stage, at its own height (the window's height comes from the screenshot), and
|
|
6
|
+
* turns towards the pointer: --parallax-x/-y (-1 to 1) and --parallax-hover (0 to 1) come from useParallax, eased in
|
|
7
|
+
* JavaScript, so nothing here needs a transition. Without a fine pointer they stay unset and the scene rests.
|
|
8
|
+
*/
|
|
9
|
+
$x: var(--parallax-x, 0);
|
|
10
|
+
$y: var(--parallax-y, 0);
|
|
11
|
+
$hover: var(--parallax-hover, 0);
|
|
12
|
+
|
|
5
13
|
.stage {
|
|
6
14
|
position: relative;
|
|
7
15
|
display: grid;
|
|
16
|
+
align-content: center;
|
|
8
17
|
justify-content: stretch;
|
|
9
18
|
padding: clamp(28px, 5vw, 64px) clamp(28px, 7vw, 96px) clamp(48px, 7vw, 88px) clamp(20px, 4vw, 48px);
|
|
10
19
|
perspective: 1600px;
|
|
11
20
|
}
|
|
21
|
+
/* The light behind the scene: it drifts against the pointer and brightens while the scene is held. */
|
|
12
22
|
.glow {
|
|
13
23
|
position: absolute;
|
|
14
24
|
inset: 10% 6% 0;
|
|
15
25
|
background: radial-gradient(closest-side, tint($glow), transparent);
|
|
16
26
|
filter: blur(40px);
|
|
17
|
-
opacity: 0.
|
|
27
|
+
opacity: calc(0.5 + 0.3 * #{$hover});
|
|
28
|
+
transform: translate(calc(#{$x} * -36px), calc(#{$y} * -24px));
|
|
18
29
|
pointer-events: none;
|
|
19
30
|
}
|
|
20
|
-
|
|
31
|
+
.scene {
|
|
32
|
+
position: relative;
|
|
33
|
+
display: grid;
|
|
34
|
+
justify-content: stretch;
|
|
35
|
+
transform-style: preserve-3d;
|
|
36
|
+
transform: rotateX(calc(#{$y} * -6deg)) rotateY(calc(#{$x} * 9deg));
|
|
37
|
+
}
|
|
38
|
+
/* A window or a phone: a raised face, its page inside, and a soft glare that slides across it with the pointer. */
|
|
21
39
|
.browser,
|
|
22
40
|
.phone {
|
|
23
41
|
position: relative;
|
|
@@ -26,22 +44,33 @@
|
|
|
26
44
|
box-shadow:
|
|
27
45
|
0 40px 80px -40px tint($glow),
|
|
28
46
|
0 1px 0 tint($faint) inset;
|
|
29
|
-
|
|
47
|
+
&::after {
|
|
48
|
+
content: "";
|
|
49
|
+
position: absolute;
|
|
50
|
+
inset: 0;
|
|
51
|
+
z-index: 2;
|
|
52
|
+
background: linear-gradient(
|
|
53
|
+
115deg,
|
|
54
|
+
transparent 30%,
|
|
55
|
+
rgb(255 255 255 / 9%) 46%,
|
|
56
|
+
rgb(255 255 255 / 3%) 54%,
|
|
57
|
+
transparent 70%
|
|
58
|
+
);
|
|
59
|
+
background-size: 250% 100%;
|
|
60
|
+
background-position: calc(50% - #{$x} * 40%) 0;
|
|
61
|
+
opacity: $hover;
|
|
62
|
+
pointer-events: none;
|
|
63
|
+
}
|
|
30
64
|
}
|
|
65
|
+
/* At rest it is turned a little away; it turns to face the visitor as the pointer arrives. */
|
|
31
66
|
.browser {
|
|
32
67
|
display: grid;
|
|
33
|
-
grid-template-rows: auto
|
|
68
|
+
grid-template-rows: auto auto;
|
|
69
|
+
align-self: center;
|
|
34
70
|
justify-content: stretch;
|
|
35
71
|
border-radius: 14px;
|
|
36
|
-
transform: rotateY(8deg) rotateX(2deg);
|
|
37
72
|
transform-origin: left center;
|
|
38
|
-
|
|
39
|
-
aspect-ratio: 16 / 10;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
.stage:hover .browser,
|
|
43
|
-
.stage:hover .phone {
|
|
44
|
-
transform: none;
|
|
73
|
+
transform: rotateY(calc(8deg * (1 - #{$hover}))) rotateX(calc(2deg * (1 - #{$hover})));
|
|
45
74
|
}
|
|
46
75
|
.bar {
|
|
47
76
|
display: grid;
|
|
@@ -73,14 +102,16 @@
|
|
|
73
102
|
font-size: 11px;
|
|
74
103
|
color: var(--foreground-2);
|
|
75
104
|
}
|
|
105
|
+
/* The phone stands in front of the window's lower right corner, nearer, so it moves more. */
|
|
76
106
|
.phone {
|
|
77
107
|
position: absolute;
|
|
78
|
-
right: clamp(
|
|
79
|
-
bottom: clamp(
|
|
80
|
-
width: clamp(
|
|
108
|
+
right: clamp(-28px, -2vw, -8px);
|
|
109
|
+
bottom: clamp(-40px, -3vw, -16px);
|
|
110
|
+
width: clamp(96px, 24%, 190px);
|
|
81
111
|
padding: 5px;
|
|
82
112
|
border-radius: 26px;
|
|
83
|
-
transform:
|
|
113
|
+
transform: translate3d(calc(#{$x} * 16px), calc(#{$y} * 10px), 70px)
|
|
114
|
+
rotateY(calc(-10deg * (1 - #{$hover}) + #{$x} * 4deg));
|
|
84
115
|
.viewport {
|
|
85
116
|
aspect-ratio: 9 / 19.5;
|
|
86
117
|
border-radius: 21px;
|
|
@@ -99,3 +130,11 @@
|
|
|
99
130
|
object-fit: cover;
|
|
100
131
|
object-position: top;
|
|
101
132
|
}
|
|
133
|
+
@media (prefers-reduced-motion: reduce) {
|
|
134
|
+
.scene,
|
|
135
|
+
.browser,
|
|
136
|
+
.phone,
|
|
137
|
+
.glow {
|
|
138
|
+
transform: none;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ChapterProperties } from "@sharadox/sharadox-web-library/component/project-page/chapter/type";
|
|
2
2
|
/**
|
|
3
|
-
* One part of a project
|
|
4
|
-
* running across the frame, a live dot and the site's address over it.
|
|
3
|
+
* One part of a project we're proud of: its number and name, what it is, and a few details of how it works, then the
|
|
4
|
+
* website's own component in a window running across the frame, a live dot and the site's address over it.
|
|
5
5
|
*/
|
|
6
|
-
export declare function Chapter({ number, title, text, live, children }: ChapterProperties): import("react").JSX.Element;
|
|
6
|
+
export declare function Chapter({ number, title, text, points, detailsLabel, live, children }: ChapterProperties): import("react").JSX.Element;
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../source/component/project-page/chapter/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../source/component/project-page/chapter/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oEAAoE,CAAC;AAE5G;;;GAGG;AACH,wBAAgB,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,iBAAiB,+BAqCvG"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Reveal } from "@sharadox/animation-web-library/reveal";
|
|
3
|
+
import { Icon } from "@sharadox/icon-web-library/icon";
|
|
3
4
|
import { Section } from "@sharadox/sharadox-web-library/component/section";
|
|
4
5
|
import styles from "./index.module.css";
|
|
5
6
|
/**
|
|
6
|
-
* One part of a project
|
|
7
|
-
* running across the frame, a live dot and the site's address over it.
|
|
7
|
+
* One part of a project we're proud of: its number and name, what it is, and a few details of how it works, then the
|
|
8
|
+
* website's own component in a window running across the frame, a live dot and the site's address over it.
|
|
8
9
|
*/
|
|
9
|
-
export function Chapter({ number, title, text, live, children }) {
|
|
10
|
-
return (_jsxs(Section, { padded: false, children: [_jsxs(Reveal, { className: styles.copy, children: [_jsx("span", { className: `monospace ${styles.number}`, children: String(number).padStart(2, "0") }), _jsx("h2", { children: title }), _jsx("p", { children: text })] }), _jsxs("div", { className: styles.window, children: [_jsxs("div", { className: `monospace ${styles.bar}`, children: [_jsxs("span", { className: styles.dots, "aria-hidden": true, children: [_jsx("i", {}), _jsx("i", {}), _jsx("i", {})] }), _jsxs("span", { className: styles.live, children: [_jsx("i", { "aria-hidden": true }), live] })] }), _jsx("div", { className: styles.stage, children: children })] })] }));
|
|
10
|
+
export function Chapter({ number, title, text, points, detailsLabel, live, children }) {
|
|
11
|
+
return (_jsxs(Section, { padded: false, children: [_jsxs(Reveal, { className: styles.copy, children: [_jsx("span", { className: `monospace ${styles.number}`, children: String(number).padStart(2, "0") }), _jsx("h2", { children: title }), _jsxs("div", { className: styles.about, children: [_jsx("p", { children: text }), _jsxs("div", { className: styles.details, children: [_jsx("span", { className: "monospace", children: detailsLabel }), _jsx("ul", { children: points.map((point) => (_jsxs("li", { children: [_jsx(Icon, { name: "check", strokeWidth: 1.6 }), point] }, point))) })] })] })] }), _jsxs("div", { className: styles.window, children: [_jsxs("div", { className: `monospace ${styles.bar}`, children: [_jsxs("span", { className: styles.dots, "aria-hidden": true, children: [_jsx("i", {}), _jsx("i", {}), _jsx("i", {})] }), _jsxs("span", { className: styles.live, children: [_jsx("i", { "aria-hidden": true }), live] })] }), _jsx("div", { className: styles.stage, children: children })] })] }));
|
|
11
12
|
}
|
|
12
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../source/component/project-page/chapter/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wCAAwC,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,k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AAE,MAAM,CAAC,MAAM,aAC3B,eAAK,SAAS,EAAE,aAAa,MAAM,CAAC,GAAG,EAAE,aACvC,gBAAM,SAAS,EAAE,MAAM,CAAC,IAAI,kCAC1B,aAAK,EACL,aAAK,EACL,aAAK,IACA,EACP,gBAAM,SAAS,EAAE,MAAM,CAAC,IAAI,aAC1B,kCAAiB,EAChB,IAAI,IACA,IACH,EACN,cAAK,SAAS,EAAE,MAAM,CAAC,KAAK,YAAG,QAAQ,GAAO,IAC1C,IACE,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.copy{display:grid;grid-template-columns:auto minmax(0, 1fr) minmax(0, 1.
|
|
1
|
+
.copy{display:grid;grid-template-columns:auto minmax(0, 1fr) minmax(0, 1.25fr);align-items:baseline;gap:12px 24px;padding:clamp(40px,6vw,80px) var(--padding) clamp(28px,4vw,44px);text-align:left}.copy h2{font-size:clamp(1.8rem,3.4vw,2.8rem);line-height:1.05;text-wrap:balance}@media(max-width: 900px){.copy{grid-template-columns:auto minmax(0, 1fr)}.copy .about{grid-column:1/-1}}.about{display:grid;justify-content:stretch;gap:22px}.about p{color:var(--foreground-2);line-height:1.65;text-wrap:pretty}.details{display:grid;justify-content:stretch;gap:12px;padding-top:18px;border-top:1px dashed var(--line-2)}.details>span{font-size:11.5px;letter-spacing:.04em;text-transform:uppercase;color:var(--foreground-3)}.details ul{display:grid;gap:10px;margin:0;padding:0;list-style:none}.details li{display:grid;grid-template-columns:auto minmax(0, 1fr);align-items:baseline;gap:10px;font-size:15px;line-height:1.55;color:var(--foreground-2);text-wrap:pretty}.details li svg{position:relative;top:2px;color:var(--foreground)}.number{font-size:12px;color:var(--foreground-3)}.window{border-top:1px dashed var(--line-2)}.bar{display:flex;align-items:center;justify-content:space-between;padding:10px var(--padding);border-bottom:1px solid var(--line-2);background:color-mix(in srgb, var(--foreground) 9%, var(--background));font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:var(--foreground-3)}.dots{display:flex;gap:6px}.dots i{width:9px;height:9px;border-radius:50%;background:color-mix(in srgb, var(--foreground) 20%, transparent)}.live{display:flex;align-items:center;gap:8px}.live i{width:7px;height:7px;border-radius:50%;background:var(--foreground);box-shadow:0 0 0 3px color-mix(in srgb, var(--foreground) 20%, transparent);animation:chapter-live 2s ease-in-out infinite}@media(prefers-reduced-motion: reduce){.live i{animation:none}}@keyframes chapter-live{50%{opacity:.45}}.stage{position:relative;min-width:0}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
@use "style/token" as *;
|
|
2
2
|
@use "style/object" as *;
|
|
3
3
|
|
|
4
|
-
/* The number and name on the left
|
|
4
|
+
/* The number and name on the left; what it is and how it works on the right; stacked on phones. */
|
|
5
5
|
.copy {
|
|
6
6
|
display: grid;
|
|
7
|
-
grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.
|
|
7
|
+
grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.25fr);
|
|
8
8
|
align-items: baseline;
|
|
9
9
|
gap: 12px 24px;
|
|
10
10
|
padding: clamp(40px, 6vw, 80px) var(--padding) clamp(28px, 4vw, 44px);
|
|
@@ -14,15 +14,56 @@
|
|
|
14
14
|
line-height: 1.05;
|
|
15
15
|
text-wrap: balance;
|
|
16
16
|
}
|
|
17
|
+
@include below(900px) {
|
|
18
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
19
|
+
.about {
|
|
20
|
+
grid-column: 1 / -1;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
.about {
|
|
25
|
+
display: grid;
|
|
26
|
+
justify-content: stretch;
|
|
27
|
+
gap: 22px;
|
|
17
28
|
p {
|
|
18
29
|
color: var(--foreground-2);
|
|
19
30
|
line-height: 1.65;
|
|
20
31
|
text-wrap: pretty;
|
|
21
32
|
}
|
|
22
|
-
|
|
33
|
+
}
|
|
34
|
+
/* How it works: a label and a few lines, each after a tick, over a dashed rule. */
|
|
35
|
+
.details {
|
|
36
|
+
display: grid;
|
|
37
|
+
justify-content: stretch;
|
|
38
|
+
gap: 12px;
|
|
39
|
+
padding-top: 18px;
|
|
40
|
+
border-top: 1px dashed var(--line-2);
|
|
41
|
+
> span {
|
|
42
|
+
font-size: 11.5px;
|
|
43
|
+
letter-spacing: 0.04em;
|
|
44
|
+
text-transform: uppercase;
|
|
45
|
+
color: var(--foreground-3);
|
|
46
|
+
}
|
|
47
|
+
ul {
|
|
48
|
+
display: grid;
|
|
49
|
+
gap: 10px;
|
|
50
|
+
margin: 0;
|
|
51
|
+
padding: 0;
|
|
52
|
+
list-style: none;
|
|
53
|
+
}
|
|
54
|
+
li {
|
|
55
|
+
display: grid;
|
|
23
56
|
grid-template-columns: auto minmax(0, 1fr);
|
|
24
|
-
|
|
25
|
-
|
|
57
|
+
align-items: baseline;
|
|
58
|
+
gap: 10px;
|
|
59
|
+
font-size: 15px;
|
|
60
|
+
line-height: 1.55;
|
|
61
|
+
color: var(--foreground-2);
|
|
62
|
+
text-wrap: pretty;
|
|
63
|
+
svg {
|
|
64
|
+
position: relative;
|
|
65
|
+
top: 2px;
|
|
66
|
+
color: var(--foreground);
|
|
26
67
|
}
|
|
27
68
|
}
|
|
28
69
|
}
|
|
@@ -4,6 +4,9 @@ export interface ChapterProperties {
|
|
|
4
4
|
number: number;
|
|
5
5
|
title: string;
|
|
6
6
|
text: string;
|
|
7
|
+
/** A few details of how it works, under a label (`detailsLabel`). */
|
|
8
|
+
points: readonly string[];
|
|
9
|
+
detailsLabel: string;
|
|
7
10
|
/** The label over the live part ("Live · luispiresdecor.com"). */
|
|
8
11
|
live: string;
|
|
9
12
|
children?: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../../source/component/project-page/chapter/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,iBAAiB;IAChC,4CAA4C;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../../source/component/project-page/chapter/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,iBAAiB;IAChC,4CAA4C;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { ProjectPageProperties } from "@sharadox/sharadox-web-library/component/project-page/type";
|
|
2
2
|
/**
|
|
3
3
|
* A project's own page. It opens with the client and the headline, the whole story, the details, the services we
|
|
4
|
-
* made, and the first screen on a computer and a phone. Then
|
|
5
|
-
*
|
|
4
|
+
* made, and the first screen on a computer and a phone. Then a word on what follows: a few of the parts we're proudest
|
|
5
|
+
* of, chapter by chapter, each explained (what it is, how it works) and then running live in a window, the website's
|
|
6
|
+
* own components. At the end, "See it live on <domain>": the site itself, in a new tab, and the way back.
|
|
6
7
|
*
|
|
7
8
|
* @example
|
|
8
9
|
* <ProjectPage project={PORTFOLIO.projects[0]} locale="en" chapters={{ hero: <Hero locale="en" /> }} />
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/component/project-page/index.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AAExG
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/component/project-page/index.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AAExG;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,qBAAqB,+BAyE/E"}
|
|
@@ -13,8 +13,9 @@ import { SECTION } from "@sharadox/sharadox-web-library/content/section";
|
|
|
13
13
|
import styles from "./index.module.css";
|
|
14
14
|
/**
|
|
15
15
|
* A project's own page. It opens with the client and the headline, the whole story, the details, the services we
|
|
16
|
-
* made, and the first screen on a computer and a phone. Then
|
|
17
|
-
*
|
|
16
|
+
* made, and the first screen on a computer and a phone. Then a word on what follows: a few of the parts we're proudest
|
|
17
|
+
* of, chapter by chapter, each explained (what it is, how it works) and then running live in a window, the website's
|
|
18
|
+
* own components. At the end, "See it live on <domain>": the site itself, in a new tab, and the way back.
|
|
18
19
|
*
|
|
19
20
|
* @example
|
|
20
21
|
* <ProjectPage project={PORTFOLIO.projects[0]} locale="en" chapters={{ hero: <Hero locale="en" /> }} />
|
|
@@ -23,6 +24,6 @@ export function ProjectPage({ project, locale, chapters }) {
|
|
|
23
24
|
const { details, page } = PORTFOLIO;
|
|
24
25
|
const domain = new URL(project.url).host;
|
|
25
26
|
const shown = project.chapters.filter((chapter) => chapters[chapter.key]);
|
|
26
|
-
return (_jsxs("article", { className: styles.page, children: [_jsxs(Section, { className: styles.intro, padded: false, children: [_jsxs(Reveal, { className: styles.copy, children: [_jsxs(Eyebrow, { children: [translate(SECTION.portfolio, locale), " \u00B7 ", launchDate(project.date, locale)] }), _jsxs("h1", { children: [_jsx("span", { className: styles.client, children: project.client }), translate(project.name, locale)] }), _jsx("p", { className: styles.story, children: translate(project.story, locale) }), _jsxs("dl", { className: styles.details, children: [_jsxs("div", { children: [_jsx("dt", { children: translate(details.client, locale) }), _jsx("dd", { children: project.client })] }), _jsxs("div", { children: [_jsx("dt", { children: translate(details.place, locale) }), _jsx("dd", { children: translate(project.place, locale) })] }), _jsxs("div", { children: [_jsx("dt", { children: translate(details.launched, locale) }), _jsx("dd", { children: launchDate(project.date, locale) })] })] }), _jsxs("div", { className: styles.services, children: [_jsx("span", { className: "monospace", children: translate(details.services, locale) }), _jsx("ul", { children: project.services.map((service) => (_jsx("li", { children: serviceName(service, locale) }, service))) })] })] }), _jsx(Screens, { project: project, label: `${project.client} ${translate(PORTFOLIO.screens, locale)}`, priority: true })] }), shown.map((chapter, index) => (_jsx(Chapter, { number: index + 1, title: translate(chapter.title, locale), text: translate(chapter.text, locale), live: `${translate(page.live, locale)} · ${domain}`, children: chapters[chapter.key] }, chapter.key))), _jsxs(Section, { className: styles.end, children: [
|
|
27
|
+
return (_jsxs("article", { className: styles.page, children: [_jsxs(Section, { className: styles.intro, padded: false, children: [_jsxs(Reveal, { className: styles.copy, children: [_jsxs(Eyebrow, { children: [translate(SECTION.portfolio, locale), " \u00B7 ", launchDate(project.date, locale)] }), _jsxs("h1", { children: [_jsx("span", { className: styles.client, children: project.client }), translate(project.name, locale)] }), _jsx("p", { className: styles.story, children: translate(project.story, locale) }), _jsxs("dl", { className: styles.details, children: [_jsxs("div", { children: [_jsx("dt", { children: translate(details.client, locale) }), _jsx("dd", { children: project.client })] }), _jsxs("div", { children: [_jsx("dt", { children: translate(details.place, locale) }), _jsx("dd", { children: translate(project.place, locale) })] }), _jsxs("div", { children: [_jsx("dt", { children: translate(details.launched, locale) }), _jsx("dd", { children: launchDate(project.date, locale) })] })] }), _jsxs("div", { className: styles.services, children: [_jsx("span", { className: "monospace", children: translate(details.services, locale) }), _jsx("ul", { children: project.services.map((service) => (_jsx("li", { children: serviceName(service, locale) }, service))) })] })] }), _jsx(Screens, { project: project, label: `${project.client} ${translate(PORTFOLIO.screens, locale)}`, priority: true })] }), _jsxs(Section, { className: styles.lead, children: [_jsx(Eyebrow, { children: translate(page.intro.eyebrow, locale) }), _jsx("p", { className: styles.leadText, children: translate(page.intro.text, locale) })] }), shown.map((chapter, index) => (_jsx(Chapter, { number: index + 1, title: translate(chapter.title, locale), text: translate(chapter.text, locale), points: chapter.points.map((point) => translate(point, locale)), detailsLabel: translate(page.details, locale), live: `${translate(page.live, locale)} · ${domain}`, children: chapters[chapter.key] }, chapter.key))), _jsxs(Section, { className: styles.end, children: [_jsxs("h2", { children: [translate(page.visitTitle, locale), " ", _jsx("span", { className: styles.domain, children: domain })] }), _jsxs("div", { className: styles.actions, children: [_jsxs(Button, { href: project.url, arrow: true, children: [translate(page.visit, locale), " ", domain] }), _jsx(Button, { href: `/${locale}#${SECTION.portfolio.id}`, variant: "ghost", children: translate(page.back, locale) })] })] })] }));
|
|
27
28
|
}
|
|
28
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../source/component/project-page/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wCAAwC,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,sDAAsD,CAAC;AACjF,OAAO,EAAE,MAAM,EAAE,MAAM,iDAAiD,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,kDAAkD,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,gEAAgE,CAAC;AAC5F,OAAO,EAAE,OAAO,EAAE,MAAM,4DAA4D,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,iEAAiE,CAAC;AAC9F,OAAO,EAAE,OAAO,EAAE,MAAM,kDAAkD,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,+DAA+D,CAAC;AACxF,OAAO,EAAE,SAAS,EAAE,MAAM,kDAAkD,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,gDAAgD,CAAC;AACzE,OAAO,MAAM,MAAM,qBAAqB,CAAC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5B,MAAC,MAAM,IAAC,IAAI,EAAE,OAAO,CAAC,GAAG,EAAE,KAAK,mBAC7B,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,OAAG,MAAM,IAChC,EACT,KAAC,MAAM,IAAC,IAAI,EAAE,IAAI,MAAM,IAAI,OAAO,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,OAAO,EAAC,OAAO,YAChE,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,GACtB,IACL,IACE,IACF,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.page{display:grid;grid-template-columns:minmax(0, 1fr)}.intro{display:grid;grid-template-columns:minmax(0, 5fr) minmax(0, 7fr);align-items:center;margin-top:64px}@media(max-width: 1000px){.intro{grid-template-columns:minmax(0, 1fr)}}.copy{display:grid;justify-content:stretch;gap:24px;padding:clamp(40px,6vw,88px) var(--padding);text-align:left}.copy h1{display:grid;gap:14px;font-size:clamp(2.4rem,5vw,4rem);line-height:1;text-wrap:balance}.client{font-size:15px;font-weight:500;letter-spacing:0;color:var(--foreground-2)}.story{color:var(--foreground-2);line-height:1.7;text-wrap:pretty}.details{display:grid;grid-template-columns:repeat(3, minmax(0, 1fr));margin:0;border-block:1px dashed var(--line-2)}.details>div{display:grid;justify-content:stretch;align-content:start;gap:4px;padding:14px 12px 14px 0}.details>div+div{padding-left:12px;border-left:1px dashed var(--line-2)}.details dt{font-family:var(--monospace);font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:var(--foreground-3)}.details dd{margin:0;font-size:14px}.services{display:grid;justify-content:stretch;gap:10px}.services>span{font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:var(--foreground-3)}.services ul{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:8px;margin:0;padding:0;list-style:none}.services li{padding:6px 12px;border:1px solid var(--line-2);border-radius:99px;background:color-mix(in srgb, var(--foreground) 10%, var(--background));font-size:13px}.end{display:grid;justify-items:center;gap:28px;text-align:center}.end h2{max-width:
|
|
1
|
+
.page{display:grid;grid-template-columns:minmax(0, 1fr)}.intro{display:grid;grid-template-columns:minmax(0, 5fr) minmax(0, 7fr);align-items:center;margin-top:64px}@media(max-width: 1000px){.intro{grid-template-columns:minmax(0, 1fr)}}.copy{display:grid;justify-content:stretch;gap:24px;padding:clamp(40px,6vw,88px) var(--padding);text-align:left}.copy h1{display:grid;gap:14px;font-size:clamp(2.4rem,5vw,4rem);line-height:1;text-wrap:balance}.client{font-size:15px;font-weight:500;letter-spacing:0;color:var(--foreground-2)}.story{color:var(--foreground-2);line-height:1.7;text-wrap:pretty}.details{display:grid;grid-template-columns:repeat(3, minmax(0, 1fr));margin:0;border-block:1px dashed var(--line-2)}.details>div{display:grid;justify-content:stretch;align-content:start;gap:4px;padding:14px 12px 14px 0}.details>div+div{padding-left:12px;border-left:1px dashed var(--line-2)}.details dt{font-family:var(--monospace);font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:var(--foreground-3)}.details dd{margin:0;font-size:14px}.services{display:grid;justify-content:stretch;gap:10px}.services>span{font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:var(--foreground-3)}.services ul{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:8px;margin:0;padding:0;list-style:none}.services li{padding:6px 12px;border:1px solid var(--line-2);border-radius:99px;background:color-mix(in srgb, var(--foreground) 10%, var(--background));font-size:13px}.end{display:grid;justify-items:center;gap:28px;text-align:center}.end h2{max-width:22ch;text-wrap:balance}.actions{display:flex;flex-wrap:wrap;gap:12px}.lead{display:grid;justify-items:start;gap:18px;border-top:1px solid var(--line);text-align:left}.lead .leadText{max-width:52ch;font-size:clamp(1.25rem,2.2vw,1.75rem);font-weight:500;line-height:1.3;letter-spacing:-0.03em;text-wrap:pretty}.domain{color:var(--foreground-2)}
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
gap: 28px;
|
|
105
105
|
text-align: center;
|
|
106
106
|
h2 {
|
|
107
|
-
max-width:
|
|
107
|
+
max-width: 22ch;
|
|
108
108
|
text-wrap: balance;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
@@ -113,3 +113,24 @@
|
|
|
113
113
|
flex-wrap: wrap;
|
|
114
114
|
gap: 12px;
|
|
115
115
|
}
|
|
116
|
+
|
|
117
|
+
/* Before the chapters: what the page shows, in a few calm lines. */
|
|
118
|
+
.lead {
|
|
119
|
+
display: grid;
|
|
120
|
+
justify-items: start;
|
|
121
|
+
gap: 18px;
|
|
122
|
+
border-top: 1px solid var(--line);
|
|
123
|
+
text-align: left;
|
|
124
|
+
.leadText {
|
|
125
|
+
max-width: 52ch;
|
|
126
|
+
font-size: clamp(1.25rem, 2.2vw, 1.75rem);
|
|
127
|
+
font-weight: 500;
|
|
128
|
+
line-height: 1.3;
|
|
129
|
+
letter-spacing: -0.03em;
|
|
130
|
+
text-wrap: pretty;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
/* The site's address, the end's last words, a little quieter. */
|
|
134
|
+
.domain {
|
|
135
|
+
color: var(--foreground-2);
|
|
136
|
+
}
|
|
@@ -2,7 +2,8 @@ import type { SocialImageOptions } from "@sharadox/sharadox-web-library/componen
|
|
|
2
2
|
/**
|
|
3
3
|
* An image to post on social media, like the profile picture: the mark on black, half the shorter side. With the
|
|
4
4
|
* headline, the hero's three lines in Geist (the last one fading) beside the mark on a landscape image, under it on a
|
|
5
|
-
* portrait one.
|
|
5
|
+
* portrait one. The background alone has neither; the small email card is the landscape headline in proportion, its
|
|
6
|
+
* corners rounded (transparent beyond them).
|
|
6
7
|
*
|
|
7
8
|
* @example
|
|
8
9
|
* return renderSocialImage({ locale: "en", name: "portrait-headline.png" });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/component/social-image/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4DAA4D,CAAC;AAOrG
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/component/social-image/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4DAA4D,CAAC;AAOrG;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,kBAAkB,4CAmD3E"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { readFile } from "node:fs/promises";
|
|
3
3
|
import { shareImage } from "@sharadox/metadata-web-library/share-image";
|
|
4
|
-
import { SOCIAL_IMAGES, socialMarkSize } from "@sharadox/metadata-web-library/social-image";
|
|
4
|
+
import { SOCIAL_IMAGES, socialImageScale, socialMarkSize } from "@sharadox/metadata-web-library/social-image";
|
|
5
5
|
import { MARK_DATA_URL } from "@sharadox/sharadox-web-library/content/mark";
|
|
6
6
|
import { SLOGAN_LINES } from "@sharadox/sharadox-web-library/content/slogan";
|
|
7
7
|
/** The headline's font, shipped with the library (distribution/asset/font), found relative to this compiled file. */
|
|
@@ -11,17 +11,19 @@ const DIM = "linear-gradient(180deg, #ffffff 10%, #6b6b6b 120%)";
|
|
|
11
11
|
/**
|
|
12
12
|
* An image to post on social media, like the profile picture: the mark on black, half the shorter side. With the
|
|
13
13
|
* headline, the hero's three lines in Geist (the last one fading) beside the mark on a landscape image, under it on a
|
|
14
|
-
* portrait one.
|
|
14
|
+
* portrait one. The background alone has neither; the small email card is the landscape headline in proportion, its
|
|
15
|
+
* corners rounded (transparent beyond them).
|
|
15
16
|
*
|
|
16
17
|
* @example
|
|
17
18
|
* return renderSocialImage({ locale: "en", name: "portrait-headline.png" });
|
|
18
19
|
*/
|
|
19
20
|
export async function renderSocialImage({ locale, name }) {
|
|
20
21
|
const image = SOCIAL_IMAGES[name];
|
|
21
|
-
const { width, height, headline } = image;
|
|
22
|
+
const { width, height, headline, radius } = image;
|
|
22
23
|
const mark = socialMarkSize(image);
|
|
23
24
|
const landscape = width > height;
|
|
24
|
-
const
|
|
25
|
+
const scale = socialImageScale(image);
|
|
26
|
+
const size = (landscape ? 128 : 116) * scale;
|
|
25
27
|
const lines = SLOGAN_LINES[locale];
|
|
26
28
|
return shareImage(_jsxs("div", { style: {
|
|
27
29
|
width: "100%",
|
|
@@ -30,10 +32,11 @@ export async function renderSocialImage({ locale, name }) {
|
|
|
30
32
|
flexDirection: landscape ? "row-reverse" : "column",
|
|
31
33
|
alignItems: "center",
|
|
32
34
|
justifyContent: "center",
|
|
33
|
-
gap: landscape ? 96 : 40,
|
|
35
|
+
gap: (landscape ? 96 : 40) * scale,
|
|
34
36
|
background: "#000",
|
|
35
37
|
color: "#fff",
|
|
36
|
-
|
|
38
|
+
borderRadius: radius,
|
|
39
|
+
}, children: [image.mark ? _jsx("img", { src: MARK_DATA_URL, width: mark, height: mark, alt: "" }) : null, headline ? (_jsx("div", { style: {
|
|
37
40
|
display: "flex",
|
|
38
41
|
flexDirection: "column",
|
|
39
42
|
alignItems: landscape ? "flex-start" : "center",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../source/component/social-image/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../source/component/social-image/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAC9G,OAAO,EAAE,aAAa,EAAE,M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