peek-carousel 1.1.1 → 2.0.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/COPYRIGHT.md +50 -28
- package/LICENSE +68 -18
- package/LICENSE-MIT +22 -0
- package/README.en.md +14 -2
- package/README.md +15 -3
- package/THIRD_PARTY_NOTICES.md +42 -23
- package/dist/peek-carousel.cjs +2 -2
- package/dist/peek-carousel.css +2 -2
- package/dist/peek-carousel.esm.js +2 -2
- package/dist/peek-carousel.js +2 -2
- package/dist/peek-carousel.min.css +2 -2
- package/docs/integrations.md +6 -3
- package/examples/custom-theme.css +212 -48
- package/examples/custom-theme.html +85 -63
- package/examples/custom-theme.ja.html +91 -0
- package/examples/custom-theme.js +6 -121
- package/examples/custom-theme.ko.html +90 -0
- package/examples/example-built.html +47 -34
- package/examples/example-built.ja.html +168 -0
- package/examples/example-built.ko.html +167 -0
- package/examples/example.min.css +3 -3
- package/examples/example.min.js +3 -3
- package/package.json +16 -6
- package/public/fonts/OFL-noto.txt +93 -0
- package/public/fonts/noto-sans-ja.css +46 -0
- package/public/fonts/noto-sans-ja.woff2 +0 -0
- package/public/fonts/noto-sans-ko.css +53 -0
- package/public/fonts/noto-sans-ko.woff2 +0 -0
|
@@ -1,68 +1,90 @@
|
|
|
1
1
|
<!doctype html>
|
|
2
2
|
<html lang="en">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>PeekCarousel — Live CSS Theme Editor</title>
|
|
7
|
+
<meta name="description" content="Design your carousel with CSS variables. Try presets, accent colors, card corners and button sizes, then copy your theme CSS.">
|
|
8
|
+
<meta name="robots" content="index, follow, max-image-preview:large">
|
|
9
|
+
<meta name="theme-color" content="#ffffff">
|
|
10
|
+
<meta property="og:type" content="website">
|
|
11
|
+
<meta property="og:site_name" content="PeekCarousel">
|
|
12
|
+
<meta property="og:locale" content="en_US">
|
|
13
|
+
<meta property="og:url" content="https://lledellebell.github.io/peek-carousel/examples/custom-theme.html">
|
|
14
|
+
<meta property="og:title" content="PeekCarousel — Live CSS Theme Editor">
|
|
15
|
+
<meta property="og:description" content="Design your carousel with CSS variables. Try presets, accent colors, card corners and button sizes, then copy your theme CSS.">
|
|
16
|
+
<meta property="og:image" content="https://lledellebell.github.io/peek-carousel/public/assets/share_image.png">
|
|
17
|
+
<meta property="og:image:type" content="image/png">
|
|
18
|
+
<meta property="og:image:width" content="1200">
|
|
19
|
+
<meta property="og:image:height" content="720">
|
|
20
|
+
<meta property="og:image:alt" content="PeekCarousel on a white background with blue controls and image cards">
|
|
21
|
+
<meta name="twitter:card" content="summary_large_image">
|
|
22
|
+
<meta name="twitter:title" content="PeekCarousel — Live CSS Theme Editor">
|
|
23
|
+
<meta name="twitter:description" content="Design your carousel with CSS variables. Try presets, accent colors, card corners and button sizes, then copy your theme CSS.">
|
|
24
|
+
<meta name="twitter:image" content="https://lledellebell.github.io/peek-carousel/public/assets/share_image.png">
|
|
25
|
+
<meta name="twitter:image:alt" content="PeekCarousel on a white background with blue controls and image cards">
|
|
26
|
+
<link rel="canonical" href="https://lledellebell.github.io/peek-carousel/examples/custom-theme.html">
|
|
27
|
+
<link rel="alternate" hreflang="en" href="https://lledellebell.github.io/peek-carousel/examples/custom-theme.html">
|
|
28
|
+
<link rel="alternate" hreflang="ja" href="https://lledellebell.github.io/peek-carousel/examples/custom-theme.ja.html">
|
|
29
|
+
<link rel="alternate" hreflang="ko" href="https://lledellebell.github.io/peek-carousel/examples/custom-theme.ko.html">
|
|
30
|
+
<link rel="alternate" hreflang="x-default" href="https://lledellebell.github.io/peek-carousel/examples/custom-theme.html">
|
|
31
|
+
<meta property="og:locale:alternate" content="ja_JP">
|
|
32
|
+
<meta property="og:locale:alternate" content="ko_KR">
|
|
33
|
+
<script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","@id":"https://lledellebell.github.io/peek-carousel/examples/custom-theme.html","url":"https://lledellebell.github.io/peek-carousel/examples/custom-theme.html","name":"PeekCarousel — Live CSS Theme Editor","description":"Design your carousel with CSS variables. Try presets, accent colors, card corners and button sizes, then copy your theme CSS.","inLanguage":"en","mainEntity":{"@id":"https://lledellebell.github.io/peek-carousel/examples/example-built.html#library-source"}},{"@type":"SoftwareSourceCode","@id":"https://lledellebell.github.io/peek-carousel/examples/example-built.html#library-source","name":"PeekCarousel","description":"Design your carousel with CSS variables. Try presets, accent colors, card corners and button sizes, then copy your theme CSS.","codeRepository":"https://github.com/lledellebell/peek-carousel","programmingLanguage":"JavaScript","runtimePlatform":"Web browser","license":"https://github.com/lledellebell/peek-carousel/blob/master/LICENSE","url":"https://github.com/lledellebell/peek-carousel"}]}</script>
|
|
34
|
+
<link rel="preload" href="../public/fonts/inter-latin.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
35
|
+
<link rel="stylesheet" href="../public/fonts/inter-latin.css">
|
|
36
|
+
|
|
37
|
+
<link rel="icon" href="../public/favicon-32x32.png">
|
|
38
|
+
<link rel="stylesheet" href="../dist/peek-carousel.min.css">
|
|
39
|
+
<link rel="stylesheet" href="./example.min.css">
|
|
40
|
+
<link rel="stylesheet" href="./custom-theme.css">
|
|
41
|
+
</head>
|
|
42
|
+
<body class="preview">
|
|
43
|
+
<a class="preview__skip" href="#theme-carousel">Skip to playground</a>
|
|
44
|
+
<header class="preview__header">
|
|
45
|
+
<a class="preview__brand" href="#"><span class="preview__brand_mark" aria-hidden="true">▱</span> PeekCarousel</a>
|
|
46
|
+
<nav class="preview__nav" aria-label="Main navigation">
|
|
47
|
+
<a href="./example-built.html">Playground</a>
|
|
48
|
+
<a href="https://github.com/lledellebell/peek-carousel/blob/master/README.en.md">Docs <span aria-hidden="true">↗</span></a>
|
|
49
|
+
<a href="https://github.com/lledellebell/peek-carousel">GitHub <span aria-hidden="true">↗</span></a>
|
|
50
|
+
</nav>
|
|
51
|
+
<nav class="preview__languages" aria-label="Choose language">
|
|
52
|
+
<a href="./custom-theme.html" lang="en" hreflang="en" aria-label="EN — English" aria-current="page">EN</a>
|
|
53
|
+
<a href="./custom-theme.ja.html" lang="ja" hreflang="ja" aria-label="日本語">日本語</a>
|
|
54
|
+
<a href="./custom-theme.ko.html" lang="ko" hreflang="ko" aria-label="한국어">한국어</a>
|
|
55
|
+
</nav>
|
|
56
|
+
</header>
|
|
11
57
|
<main>
|
|
12
|
-
|
|
13
|
-
<p
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
<label
|
|
27
|
-
>Card radius
|
|
28
|
-
<input
|
|
29
|
-
type="range"
|
|
30
|
-
id="theme-radius"
|
|
31
|
-
min="0"
|
|
32
|
-
max="40"
|
|
33
|
-
value="16"
|
|
34
|
-
/><output for="theme-radius" id="radius-value">16px</output></label
|
|
35
|
-
>
|
|
36
|
-
<label
|
|
37
|
-
>Button size
|
|
38
|
-
<input
|
|
39
|
-
type="range"
|
|
40
|
-
id="theme-size"
|
|
41
|
-
min="32"
|
|
42
|
-
max="64"
|
|
43
|
-
value="36"
|
|
44
|
-
/><output for="theme-size" id="size-value">36px</output></label
|
|
45
|
-
>
|
|
46
|
-
<button type="button" id="theme-reset">Reset theme</button>
|
|
58
|
+
<section class="preview__hero" aria-labelledby="theme-title">
|
|
59
|
+
<p class="preview__eyebrow"><span class="preview__status" aria-hidden="true"></span>YOUR GALLERY. YOUR SIGNATURE.</p>
|
|
60
|
+
<h1 id="theme-title">PeekCarousel.<br><span>Make it feel like you.</span></h1>
|
|
61
|
+
<div class="preview__intro"><p>One carousel. A style of your own.<br>Choose a preset, fine-tune the details, and take the CSS with you.</p><a class="preview__link" href="./example-built.html">Back to the playground <span aria-hidden="true">↗</span></a></div>
|
|
62
|
+
</section>
|
|
63
|
+
<section class="playground" aria-labelledby="theme-preview-title">
|
|
64
|
+
<div class="playground__preview">
|
|
65
|
+
<div class="playground__toolbar"><h2 class="preview__eyebrow" id="theme-preview-title">LIVE THEME PREVIEW</h2><span class="playground__live"><span class="preview__status" aria-hidden="true"></span>Live preview</span></div>
|
|
66
|
+
<div class="playground__stage"><div id="theme-carousel" class="peek-carousel playground__theme" role="region" aria-label="Custom theme preview" data-demo-a11y="{"slide":"slide","position":"{current} of {total}","show":"Show slide {current} of {total}","choose":"Choose a slide","previous":"Previous slide","next":"Next slide","start":"Start automatic slide rotation","stop":"Stop automatic slide rotation"}"><div class="peek-carousel__track"><div class="peek-carousel__item"><figure class="peek-carousel__figure"><img class="peek-carousel__image" width="650" height="490" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22650%22%20height%3D%22490%22%3E%3Crect%20width%3D%22650%22%20height%3D%22490%22%20fill%3D%22hsl(210%2038%25%2040%25)%22%2F%3E%3Ccircle%20cx%3D%22460%22%20cy%3D%22140%22%20r%3D%2270%22%20fill%3D%22%23fff6%22%2F%3E%3Cpath%20d%3D%22M0%20490L220%20180L410%20490ZM230%20490L460%20230L650%20490Z%22%20fill%3D%22%23fff3%22%2F%3E%3C%2Fsvg%3E" alt="Illustrated mountain landscape 1"><figcaption class="peek-carousel__caption">Landscape 1</figcaption></figure></div>
|
|
67
|
+
<div class="peek-carousel__item"><figure class="peek-carousel__figure"><img class="peek-carousel__image" width="650" height="490" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22650%22%20height%3D%22490%22%3E%3Crect%20width%3D%22650%22%20height%3D%22490%22%20fill%3D%22hsl(245%2038%25%2040%25)%22%2F%3E%3Ccircle%20cx%3D%22460%22%20cy%3D%22140%22%20r%3D%2270%22%20fill%3D%22%23fff6%22%2F%3E%3Cpath%20d%3D%22M0%20490L220%20180L410%20490ZM230%20490L460%20230L650%20490Z%22%20fill%3D%22%23fff3%22%2F%3E%3C%2Fsvg%3E" alt="Illustrated mountain landscape 2"><figcaption class="peek-carousel__caption">Landscape 2</figcaption></figure></div>
|
|
68
|
+
<div class="peek-carousel__item"><figure class="peek-carousel__figure"><img class="peek-carousel__image" width="650" height="490" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22650%22%20height%3D%22490%22%3E%3Crect%20width%3D%22650%22%20height%3D%22490%22%20fill%3D%22hsl(280%2038%25%2040%25)%22%2F%3E%3Ccircle%20cx%3D%22460%22%20cy%3D%22140%22%20r%3D%2270%22%20fill%3D%22%23fff6%22%2F%3E%3Cpath%20d%3D%22M0%20490L220%20180L410%20490ZM230%20490L460%20230L650%20490Z%22%20fill%3D%22%23fff3%22%2F%3E%3C%2Fsvg%3E" alt="Illustrated mountain landscape 3"><figcaption class="peek-carousel__caption">Landscape 3</figcaption></figure></div>
|
|
69
|
+
<div class="peek-carousel__item"><figure class="peek-carousel__figure"><img class="peek-carousel__image" width="650" height="490" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22650%22%20height%3D%22490%22%3E%3Crect%20width%3D%22650%22%20height%3D%22490%22%20fill%3D%22hsl(315%2038%25%2040%25)%22%2F%3E%3Ccircle%20cx%3D%22460%22%20cy%3D%22140%22%20r%3D%2270%22%20fill%3D%22%23fff6%22%2F%3E%3Cpath%20d%3D%22M0%20490L220%20180L410%20490ZM230%20490L460%20230L650%20490Z%22%20fill%3D%22%23fff3%22%2F%3E%3C%2Fsvg%3E" alt="Illustrated mountain landscape 4"><figcaption class="peek-carousel__caption">Landscape 4</figcaption></figure></div>
|
|
70
|
+
<div class="peek-carousel__item"><figure class="peek-carousel__figure"><img class="peek-carousel__image" width="650" height="490" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22650%22%20height%3D%22490%22%3E%3Crect%20width%3D%22650%22%20height%3D%22490%22%20fill%3D%22hsl(350%2038%25%2040%25)%22%2F%3E%3Ccircle%20cx%3D%22460%22%20cy%3D%22140%22%20r%3D%2270%22%20fill%3D%22%23fff6%22%2F%3E%3Cpath%20d%3D%22M0%20490L220%20180L410%20490ZM230%20490L460%20230L650%20490Z%22%20fill%3D%22%23fff3%22%2F%3E%3C%2Fsvg%3E" alt="Illustrated mountain landscape 5"><figcaption class="peek-carousel__caption">Landscape 5</figcaption></figure></div></div></div></div>
|
|
71
|
+
<p class="playground__description">Copy this rule into your app after the library stylesheet.</p>
|
|
47
72
|
</div>
|
|
48
|
-
<
|
|
49
|
-
id="theme-
|
|
50
|
-
class="
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
<script src="../dist/peek-carousel.js"></script>
|
|
66
|
-
<script type="module" src="./custom-theme.js"></script>
|
|
67
|
-
</body>
|
|
73
|
+
<aside class="playground__settings" aria-labelledby="theme-settings-title">
|
|
74
|
+
<p class="preview__eyebrow">THE FINISHING TOUCHES</p><h2 id="theme-settings-title">Your next look.</h2>
|
|
75
|
+
<div class="playground__theme_settings">
|
|
76
|
+
<div class="playground__preset"><span id="theme-preset-label">Preset</span><input type="hidden" id="theme-preset" value="default"><button type="button" id="theme-preset-trigger" aria-haspopup="listbox" aria-expanded="false" aria-controls="theme-preset-options" aria-labelledby="theme-preset-label theme-preset-value"><span id="theme-preset-value">Original</span><svg aria-hidden="true" width="16" height="16" viewBox="0 0 16 16"><path d="m4 6 4 4 4-4" fill="none" stroke="currentColor" stroke-width="1.5"/></svg></button><ul id="theme-preset-options" role="listbox" aria-labelledby="theme-preset-label" hidden><li role="option" tabindex="-1" data-preset="default" aria-selected="true">Original</li><li role="option" tabindex="-1" data-preset="light" aria-selected="false">Light</li><li role="option" tabindex="-1" data-preset="flat" aria-selected="false">Flat</li></ul></div>
|
|
77
|
+
<label for="theme-accent">Accent color<span class="playground__color_controls"><output for="theme-accent" id="theme-accent-value">#2458e8</output><input type="color" id="theme-accent" value="#2458e8"></span></label>
|
|
78
|
+
<label for="theme-radius">Card radius<input type="range" id="theme-radius" min="0" max="40" value="16"><output for="theme-radius" id="radius-value">16px</output></label>
|
|
79
|
+
<label for="theme-size">Button size<input type="range" id="theme-size" min="32" max="64" value="36"><output for="theme-size" id="size-value">36px</output></label>
|
|
80
|
+
<button type="button" id="theme-reset">Reset theme</button>
|
|
81
|
+
</div>
|
|
82
|
+
</aside>
|
|
83
|
+
</section>
|
|
84
|
+
<section class="preview__theme_code" aria-labelledby="theme-css-title"><h2 id="theme-css-title">Your CSS. Ready to go.</h2><p>Copy this rule into your app after the library stylesheet.</p><textarea id="theme-css" readonly aria-label="Generated custom theme CSS" spellcheck="false"></textarea></section>
|
|
85
|
+
</main>
|
|
86
|
+
<footer class="preview__footer"><span>PeekCarousel <span class="preview__footer_note">— A little more perspective.</span></span><span>Vanilla JavaScript · <a href="https://github.com/lledellebell/peek-carousel/blob/master/LICENSE" >Application-use terms</a></span><small class="preview__copyright">© 2025 PeekCarousel · © 2026 PeekCarousel contributors. <a href="https://github.com/lledellebell/peek-carousel/blob/master/COPYRIGHT.md">Copyright & permitted reuse</a> · <a href="https://github.com/lledellebell/peek-carousel/blob/master/THIRD_PARTY_NOTICES.md">Image rights & credits</a></small></footer>
|
|
87
|
+
<script src="../dist/peek-carousel.js"></script>
|
|
88
|
+
<script src="./custom-theme.js"></script>
|
|
89
|
+
</body>
|
|
68
90
|
</html>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="ja">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>PeekCarousel — CSSテーマのライブエディター</title>
|
|
7
|
+
<meta name="description" content="CSS変数でカルーセルをデザイン。プリセット、アクセントカラー、角丸、ボタンサイズを試して、テーマのCSSをコピーできます。">
|
|
8
|
+
<meta name="robots" content="index, follow, max-image-preview:large">
|
|
9
|
+
<meta name="theme-color" content="#ffffff">
|
|
10
|
+
<meta property="og:type" content="website">
|
|
11
|
+
<meta property="og:site_name" content="PeekCarousel">
|
|
12
|
+
<meta property="og:locale" content="ja_JP">
|
|
13
|
+
<meta property="og:url" content="https://lledellebell.github.io/peek-carousel/examples/custom-theme.ja.html">
|
|
14
|
+
<meta property="og:title" content="PeekCarousel — CSSテーマのライブエディター">
|
|
15
|
+
<meta property="og:description" content="CSS変数でカルーセルをデザイン。プリセット、アクセントカラー、角丸、ボタンサイズを試して、テーマのCSSをコピーできます。">
|
|
16
|
+
<meta property="og:image" content="https://lledellebell.github.io/peek-carousel/public/assets/share_image.png">
|
|
17
|
+
<meta property="og:image:type" content="image/png">
|
|
18
|
+
<meta property="og:image:width" content="1200">
|
|
19
|
+
<meta property="og:image:height" content="720">
|
|
20
|
+
<meta property="og:image:alt" content="白い背景に青いコントロールと写真カードを配置したPeekCarousel">
|
|
21
|
+
<meta name="twitter:card" content="summary_large_image">
|
|
22
|
+
<meta name="twitter:title" content="PeekCarousel — CSSテーマのライブエディター">
|
|
23
|
+
<meta name="twitter:description" content="CSS変数でカルーセルをデザイン。プリセット、アクセントカラー、角丸、ボタンサイズを試して、テーマのCSSをコピーできます。">
|
|
24
|
+
<meta name="twitter:image" content="https://lledellebell.github.io/peek-carousel/public/assets/share_image.png">
|
|
25
|
+
<meta name="twitter:image:alt" content="白い背景に青いコントロールと写真カードを配置したPeekCarousel">
|
|
26
|
+
<link rel="canonical" href="https://lledellebell.github.io/peek-carousel/examples/custom-theme.ja.html">
|
|
27
|
+
<link rel="alternate" hreflang="en" href="https://lledellebell.github.io/peek-carousel/examples/custom-theme.html">
|
|
28
|
+
<link rel="alternate" hreflang="ja" href="https://lledellebell.github.io/peek-carousel/examples/custom-theme.ja.html">
|
|
29
|
+
<link rel="alternate" hreflang="ko" href="https://lledellebell.github.io/peek-carousel/examples/custom-theme.ko.html">
|
|
30
|
+
<link rel="alternate" hreflang="x-default" href="https://lledellebell.github.io/peek-carousel/examples/custom-theme.html">
|
|
31
|
+
<meta property="og:locale:alternate" content="en_US">
|
|
32
|
+
<meta property="og:locale:alternate" content="ko_KR">
|
|
33
|
+
<script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","@id":"https://lledellebell.github.io/peek-carousel/examples/custom-theme.ja.html","url":"https://lledellebell.github.io/peek-carousel/examples/custom-theme.ja.html","name":"PeekCarousel — CSSテーマのライブエディター","description":"CSS変数でカルーセルをデザイン。プリセット、アクセントカラー、角丸、ボタンサイズを試して、テーマのCSSをコピーできます。","inLanguage":"ja","mainEntity":{"@id":"https://lledellebell.github.io/peek-carousel/examples/example-built.html#library-source"}},{"@type":"SoftwareSourceCode","@id":"https://lledellebell.github.io/peek-carousel/examples/example-built.html#library-source","name":"PeekCarousel","description":"CSS変数でカルーセルをデザイン。プリセット、アクセントカラー、角丸、ボタンサイズを試して、テーマのCSSをコピーできます。","codeRepository":"https://github.com/lledellebell/peek-carousel","programmingLanguage":"JavaScript","runtimePlatform":"Web browser","license":"https://github.com/lledellebell/peek-carousel/blob/master/LICENSE","url":"https://github.com/lledellebell/peek-carousel"}]}</script>
|
|
34
|
+
<link rel="preload" href="../public/fonts/inter-latin.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
35
|
+
<link rel="stylesheet" href="../public/fonts/inter-latin.css">
|
|
36
|
+
<link rel="preload" href="../public/fonts/noto-sans-ja.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
37
|
+
<link rel="stylesheet" href="../public/fonts/noto-sans-ja.css">
|
|
38
|
+
<link rel="icon" href="../public/favicon-32x32.png">
|
|
39
|
+
<link rel="stylesheet" href="../dist/peek-carousel.min.css">
|
|
40
|
+
<link rel="stylesheet" href="./example.min.css">
|
|
41
|
+
<link rel="stylesheet" href="./custom-theme.css">
|
|
42
|
+
</head>
|
|
43
|
+
<body class="preview">
|
|
44
|
+
<a class="preview__skip" href="#theme-carousel">デモへ移動</a>
|
|
45
|
+
<header class="preview__header">
|
|
46
|
+
<a class="preview__brand" href="#"><span class="preview__brand_mark" aria-hidden="true">▱</span> PeekCarousel</a>
|
|
47
|
+
<nav class="preview__nav" aria-label="メインナビゲーション">
|
|
48
|
+
<a href="./example-built.ja.html">デモ</a>
|
|
49
|
+
<a href="https://github.com/lledellebell/peek-carousel/blob/master/README.en.md">ドキュメント <span aria-hidden="true">↗</span></a>
|
|
50
|
+
<a href="https://github.com/lledellebell/peek-carousel">GitHub <span aria-hidden="true">↗</span></a>
|
|
51
|
+
</nav>
|
|
52
|
+
<nav class="preview__languages" aria-label="言語を選択">
|
|
53
|
+
<a href="./custom-theme.html" lang="en" hreflang="en" aria-label="EN — English">EN</a>
|
|
54
|
+
<a href="./custom-theme.ja.html" lang="ja" hreflang="ja" aria-label="日本語" aria-current="page">日本語</a>
|
|
55
|
+
<a href="./custom-theme.ko.html" lang="ko" hreflang="ko" aria-label="한국어">한국어</a>
|
|
56
|
+
</nav>
|
|
57
|
+
</header>
|
|
58
|
+
<main>
|
|
59
|
+
<section class="preview__hero" aria-labelledby="theme-title">
|
|
60
|
+
<p class="preview__eyebrow"><span class="preview__status" aria-hidden="true"></span>あなたのギャラリーに、あなたらしさを。</p>
|
|
61
|
+
<h1 id="theme-title">PeekCarousel.<br><span>自分らしい表情に。</span></h1>
|
|
62
|
+
<div class="preview__intro"><p>ひとつのカルーセルに、自分だけのスタイルを。<br>プリセットを選び、細部を調整したら、CSSをプロジェクトへ。</p><a class="preview__link" href="./example-built.ja.html">デモに戻る <span aria-hidden="true">↗</span></a></div>
|
|
63
|
+
</section>
|
|
64
|
+
<section class="playground" aria-labelledby="theme-preview-title">
|
|
65
|
+
<div class="playground__preview">
|
|
66
|
+
<div class="playground__toolbar"><h2 class="preview__eyebrow" id="theme-preview-title">テーマをプレビュー</h2><span class="playground__live"><span class="preview__status" aria-hidden="true"></span>ライブプレビュー</span></div>
|
|
67
|
+
<div class="playground__stage"><div id="theme-carousel" class="peek-carousel playground__theme" role="region" aria-label="カスタムテーマのプレビュー" data-demo-a11y="{"slide":"スライド","position":"全{total}枚中{current}枚目","show":"全{total}枚中{current}枚目を表示","choose":"スライドを選択","previous":"前のスライド","next":"次のスライド","start":"自動再生を開始","stop":"自動再生を停止"}"><div class="peek-carousel__track"><div class="peek-carousel__item"><figure class="peek-carousel__figure"><img class="peek-carousel__image" width="650" height="490" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22650%22%20height%3D%22490%22%3E%3Crect%20width%3D%22650%22%20height%3D%22490%22%20fill%3D%22hsl(210%2038%25%2040%25)%22%2F%3E%3Ccircle%20cx%3D%22460%22%20cy%3D%22140%22%20r%3D%2270%22%20fill%3D%22%23fff6%22%2F%3E%3Cpath%20d%3D%22M0%20490L220%20180L410%20490ZM230%20490L460%20230L650%20490Z%22%20fill%3D%22%23fff3%22%2F%3E%3C%2Fsvg%3E" alt="山の風景のイラスト 1"><figcaption class="peek-carousel__caption">風景 1</figcaption></figure></div>
|
|
68
|
+
<div class="peek-carousel__item"><figure class="peek-carousel__figure"><img class="peek-carousel__image" width="650" height="490" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22650%22%20height%3D%22490%22%3E%3Crect%20width%3D%22650%22%20height%3D%22490%22%20fill%3D%22hsl(245%2038%25%2040%25)%22%2F%3E%3Ccircle%20cx%3D%22460%22%20cy%3D%22140%22%20r%3D%2270%22%20fill%3D%22%23fff6%22%2F%3E%3Cpath%20d%3D%22M0%20490L220%20180L410%20490ZM230%20490L460%20230L650%20490Z%22%20fill%3D%22%23fff3%22%2F%3E%3C%2Fsvg%3E" alt="山の風景のイラスト 2"><figcaption class="peek-carousel__caption">風景 2</figcaption></figure></div>
|
|
69
|
+
<div class="peek-carousel__item"><figure class="peek-carousel__figure"><img class="peek-carousel__image" width="650" height="490" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22650%22%20height%3D%22490%22%3E%3Crect%20width%3D%22650%22%20height%3D%22490%22%20fill%3D%22hsl(280%2038%25%2040%25)%22%2F%3E%3Ccircle%20cx%3D%22460%22%20cy%3D%22140%22%20r%3D%2270%22%20fill%3D%22%23fff6%22%2F%3E%3Cpath%20d%3D%22M0%20490L220%20180L410%20490ZM230%20490L460%20230L650%20490Z%22%20fill%3D%22%23fff3%22%2F%3E%3C%2Fsvg%3E" alt="山の風景のイラスト 3"><figcaption class="peek-carousel__caption">風景 3</figcaption></figure></div>
|
|
70
|
+
<div class="peek-carousel__item"><figure class="peek-carousel__figure"><img class="peek-carousel__image" width="650" height="490" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22650%22%20height%3D%22490%22%3E%3Crect%20width%3D%22650%22%20height%3D%22490%22%20fill%3D%22hsl(315%2038%25%2040%25)%22%2F%3E%3Ccircle%20cx%3D%22460%22%20cy%3D%22140%22%20r%3D%2270%22%20fill%3D%22%23fff6%22%2F%3E%3Cpath%20d%3D%22M0%20490L220%20180L410%20490ZM230%20490L460%20230L650%20490Z%22%20fill%3D%22%23fff3%22%2F%3E%3C%2Fsvg%3E" alt="山の風景のイラスト 4"><figcaption class="peek-carousel__caption">風景 4</figcaption></figure></div>
|
|
71
|
+
<div class="peek-carousel__item"><figure class="peek-carousel__figure"><img class="peek-carousel__image" width="650" height="490" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22650%22%20height%3D%22490%22%3E%3Crect%20width%3D%22650%22%20height%3D%22490%22%20fill%3D%22hsl(350%2038%25%2040%25)%22%2F%3E%3Ccircle%20cx%3D%22460%22%20cy%3D%22140%22%20r%3D%2270%22%20fill%3D%22%23fff6%22%2F%3E%3Cpath%20d%3D%22M0%20490L220%20180L410%20490ZM230%20490L460%20230L650%20490Z%22%20fill%3D%22%23fff3%22%2F%3E%3C%2Fsvg%3E" alt="山の風景のイラスト 5"><figcaption class="peek-carousel__caption">風景 5</figcaption></figure></div></div></div></div>
|
|
72
|
+
<p class="playground__description">ライブラリのスタイルシートの後に、このルールを追加してください。</p>
|
|
73
|
+
</div>
|
|
74
|
+
<aside class="playground__settings" aria-labelledby="theme-settings-title">
|
|
75
|
+
<p class="preview__eyebrow">仕上げのひと工夫</p><h2 id="theme-settings-title">次のスタイルへ。</h2>
|
|
76
|
+
<div class="playground__theme_settings">
|
|
77
|
+
<div class="playground__preset"><span id="theme-preset-label">プリセット</span><input type="hidden" id="theme-preset" value="default"><button type="button" id="theme-preset-trigger" aria-haspopup="listbox" aria-expanded="false" aria-controls="theme-preset-options" aria-labelledby="theme-preset-label theme-preset-value"><span id="theme-preset-value">オリジナル</span><svg aria-hidden="true" width="16" height="16" viewBox="0 0 16 16"><path d="m4 6 4 4 4-4" fill="none" stroke="currentColor" stroke-width="1.5"/></svg></button><ul id="theme-preset-options" role="listbox" aria-labelledby="theme-preset-label" hidden><li role="option" tabindex="-1" data-preset="default" aria-selected="true">オリジナル</li><li role="option" tabindex="-1" data-preset="light" aria-selected="false">ライト</li><li role="option" tabindex="-1" data-preset="flat" aria-selected="false">フラット</li></ul></div>
|
|
78
|
+
<label for="theme-accent">アクセントカラー<span class="playground__color_controls"><output for="theme-accent" id="theme-accent-value">#2458e8</output><input type="color" id="theme-accent" value="#2458e8"></span></label>
|
|
79
|
+
<label for="theme-radius">カードの角丸<input type="range" id="theme-radius" min="0" max="40" value="16"><output for="theme-radius" id="radius-value">16px</output></label>
|
|
80
|
+
<label for="theme-size">ボタンサイズ<input type="range" id="theme-size" min="32" max="64" value="36"><output for="theme-size" id="size-value">36px</output></label>
|
|
81
|
+
<button type="button" id="theme-reset">テーマをリセット</button>
|
|
82
|
+
</div>
|
|
83
|
+
</aside>
|
|
84
|
+
</section>
|
|
85
|
+
<section class="preview__theme_code" aria-labelledby="theme-css-title"><h2 id="theme-css-title">あなたのCSS。すぐ使えます。</h2><p>ライブラリのスタイルシートの後に、このルールを追加してください。</p><textarea id="theme-css" readonly aria-label="生成されたカスタムテーマCSS" spellcheck="false"></textarea></section>
|
|
86
|
+
</main>
|
|
87
|
+
<footer class="preview__footer"><span>PeekCarousel <span class="preview__footer_note">— 視点を、少し広げよう。</span></span><span>Vanilla JavaScript · <a href="https://github.com/lledellebell/peek-carousel/blob/master/LICENSE" >アプリ利用条件</a></span><small class="preview__copyright">© 2025 PeekCarousel · © 2026 PeekCarousel contributors. <a href="https://github.com/lledellebell/peek-carousel/blob/master/COPYRIGHT.md">著作権と再利用条件</a> · <a href="https://github.com/lledellebell/peek-carousel/blob/master/THIRD_PARTY_NOTICES.md">画像の権利とクレジット</a></small></footer>
|
|
88
|
+
<script src="../dist/peek-carousel.js"></script>
|
|
89
|
+
<script src="./custom-theme.js"></script>
|
|
90
|
+
</body>
|
|
91
|
+
</html>
|
package/examples/custom-theme.js
CHANGED
|
@@ -1,121 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
'button-background': '#ffffff',
|
|
8
|
-
'button-hover-background': '#e2e8f0',
|
|
9
|
-
'button-active-background': '#cbd5e1',
|
|
10
|
-
'button-border-color': '#cbd5e1',
|
|
11
|
-
'button-radius': '12px',
|
|
12
|
-
'counter-background': '#ffffff',
|
|
13
|
-
'indicators-background': '#ffffff',
|
|
14
|
-
'indicator-color': '#94a3b8',
|
|
15
|
-
'indicator-track-color': '#e2e8f0',
|
|
16
|
-
'indicator-active-color': '#2563eb',
|
|
17
|
-
'indicator-shadow': 'none',
|
|
18
|
-
'focus-color': '#2563eb',
|
|
19
|
-
'caption-background': '#ffffff',
|
|
20
|
-
'active-shadow': '0 12px 32px #0003',
|
|
21
|
-
'image-filter': 'none',
|
|
22
|
-
},
|
|
23
|
-
flat: {
|
|
24
|
-
'card-radius': '4px',
|
|
25
|
-
'card-shadow': 'none',
|
|
26
|
-
'active-shadow': 'none',
|
|
27
|
-
'image-filter': 'none',
|
|
28
|
-
'button-background': '#22c55e',
|
|
29
|
-
'button-hover-background': '#16a34a',
|
|
30
|
-
'button-active-background': '#15803d',
|
|
31
|
-
'button-border-color': 'transparent',
|
|
32
|
-
'button-radius': '8px',
|
|
33
|
-
'indicator-active-color': '#22c55e',
|
|
34
|
-
'indicator-shadow': 'none',
|
|
35
|
-
'focus-color': '#22c55e',
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
function setToken(name, value) {
|
|
39
|
-
const property = '--peek-carousel-' + name;
|
|
40
|
-
gallery.style.setProperty(property, value);
|
|
41
|
-
tokens.set(property, value);
|
|
42
|
-
}
|
|
43
|
-
function showCSS() {
|
|
44
|
-
document.querySelector('#theme-css').value =
|
|
45
|
-
'.theme-preview {\n' +
|
|
46
|
-
[...tokens]
|
|
47
|
-
.map(([key, value]) => ' ' + key + ': ' + value + ';')
|
|
48
|
-
.join('\n') +
|
|
49
|
-
'\n}';
|
|
50
|
-
}
|
|
51
|
-
function applyPreset(name) {
|
|
52
|
-
for (const property of tokens.keys()) {
|
|
53
|
-
gallery.style.removeProperty(property);
|
|
54
|
-
}
|
|
55
|
-
tokens.clear();
|
|
56
|
-
for (const [key, value] of Object.entries(presets[name])) {
|
|
57
|
-
setToken(key, value);
|
|
58
|
-
}
|
|
59
|
-
const radius = presets[name]['card-radius'] || '16px';
|
|
60
|
-
document.querySelector('#theme-radius').value = Number(
|
|
61
|
-
radius.replace(/px$/, ''),
|
|
62
|
-
);
|
|
63
|
-
document.querySelector('#radius-value').value = radius;
|
|
64
|
-
document.querySelector('#theme-size').value = 36;
|
|
65
|
-
document.querySelector('#size-value').value = '36px';
|
|
66
|
-
document.querySelector('#theme-accent').value =
|
|
67
|
-
presets[name]['focus-color'] || '#22c55e';
|
|
68
|
-
showCSS();
|
|
69
|
-
}
|
|
70
|
-
for (let index = 0; index < 5; index++) {
|
|
71
|
-
const item = document.createElement('div');
|
|
72
|
-
item.className = 'peek-carousel__item';
|
|
73
|
-
const figure = document.createElement('figure');
|
|
74
|
-
figure.className = 'peek-carousel__figure';
|
|
75
|
-
const image = document.createElement('img');
|
|
76
|
-
image.className = 'peek-carousel__image';
|
|
77
|
-
image.width = 650;
|
|
78
|
-
image.height = 490;
|
|
79
|
-
image.alt = 'Colored landscape ' + (index + 1);
|
|
80
|
-
image.src =
|
|
81
|
-
'data:image/svg+xml,' +
|
|
82
|
-
encodeURIComponent(
|
|
83
|
-
`<svg xmlns="http://www.w3.org/2000/svg" width="650" height="490"><rect width="650" height="490" fill="hsl(${index * 65} 40% 35%)"/><circle cx="460" cy="140" r="70" fill="#fff6"/><path d="M0 490L220 180L410 490ZM230 490L460 230L650 490Z" fill="#fff3"/></svg>`,
|
|
84
|
-
);
|
|
85
|
-
const caption = document.createElement('figcaption');
|
|
86
|
-
caption.className = 'peek-carousel__caption';
|
|
87
|
-
caption.textContent = 'Landscape ' + (index + 1);
|
|
88
|
-
figure.append(image, caption);
|
|
89
|
-
item.append(figure);
|
|
90
|
-
gallery.querySelector('.peek-carousel__track').append(item);
|
|
91
|
-
}
|
|
92
|
-
new PeekCarousel(gallery, {
|
|
93
|
-
startIndex: 0,
|
|
94
|
-
enableKeyboard: false,
|
|
95
|
-
enableWheel: false,
|
|
96
|
-
});
|
|
97
|
-
document
|
|
98
|
-
.querySelector('#theme-preset')
|
|
99
|
-
.addEventListener('change', (event) => applyPreset(event.target.value));
|
|
100
|
-
document.querySelector('#theme-accent').addEventListener('input', (event) => {
|
|
101
|
-
setToken('focus-color', event.target.value);
|
|
102
|
-
setToken('indicator-active-color', event.target.value);
|
|
103
|
-
showCSS();
|
|
104
|
-
});
|
|
105
|
-
for (const [id, token] of [
|
|
106
|
-
['theme-radius', 'card-radius'],
|
|
107
|
-
['theme-size', 'button-size'],
|
|
108
|
-
]) {
|
|
109
|
-
document.querySelector('#' + id).addEventListener('input', (event) => {
|
|
110
|
-
const value = event.target.value + 'px';
|
|
111
|
-
setToken(token, value);
|
|
112
|
-
document.querySelector('#' + id.replace('theme-', '') + '-value').value =
|
|
113
|
-
value;
|
|
114
|
-
showCSS();
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
document.querySelector('#theme-reset').addEventListener('click', () => {
|
|
118
|
-
document.querySelector('#theme-preset').value = 'default';
|
|
119
|
-
applyPreset('default');
|
|
120
|
-
});
|
|
121
|
-
applyPreset('default');
|
|
1
|
+
/*! PeekCarousel v2.0.0
|
|
2
|
+
* Copyright (c) 2025 PeekCarousel
|
|
3
|
+
* Copyright (c) 2026 PeekCarousel contributors
|
|
4
|
+
* @license See LICENSE, LICENSE-MIT and THIRD_PARTY_NOTICES.md.
|
|
5
|
+
*/
|
|
6
|
+
var PeekCarouselTheme=function(e){"use strict";return e.initTheme=function(e){const t=[];function o(e,o,n){e.addEventListener(o,n),t.push(()=>e.removeEventListener(o,n))}const n=document.querySelector("#theme-carousel"),r=new Map,a={default:{},light:{"text-color":"#172033","button-background":"#ffffff","button-hover-background":"#e2e8f0","button-active-background":"#cbd5e1","button-border-color":"#cbd5e1","button-radius":"12px","counter-background":"#ffffff","indicators-background":"#ffffff","indicator-color":"#94a3b8","indicator-track-color":"#e2e8f0","indicator-active-color":"#2563eb","indicator-shadow":"none","focus-color":"#2563eb","caption-background":"#ffffff","active-shadow":"0 12px 32px #0003","image-filter":"none"},flat:{"card-radius":"4px","card-shadow":"none","active-shadow":"none","image-filter":"none","button-background":"#2458e8","button-hover-background":"#1c45b8","button-active-background":"#173994","button-border-color":"transparent","button-radius":"8px","indicator-active-color":"#2458e8","indicator-shadow":"none","focus-color":"#2458e8"}};function c(e,t){const o="--peek-carousel-"+e;n.style.setProperty(o,t),r.set(o,t)}function u(){document.querySelector("#theme-css").value=".playground__theme {\n"+[...r].map(([e,t])=>" "+e+": "+t+";").join("\n")+"\n}"}function s(e){f.setValue(e);for(const e of r.keys())n.style.removeProperty(e);r.clear();for(const[t,o]of Object.entries(a[e]))c(t,o);const t=a[e]["card-radius"]||"16px";document.querySelector("#theme-radius").value=Number(t.replace(/px$/,"")),document.querySelector("#radius-value").value=t,document.querySelector("#theme-size").value=36,document.querySelector("#size-value").value="36px",document.querySelector("#theme-accent").value=a[e]["focus-color"]||"#2458e8",document.querySelector("#theme-accent-value").value=document.querySelector("#theme-accent").value;for(const e of document.querySelectorAll('input[type="range"]'))l(e);u()}function l(e){const t=(Number(e.value)-Number(e.min))/(Number(e.max)-Number(e.min))*100;e.style.setProperty("--range-progress",`${t}%`)}const i=new e(n,{startIndex:0,enableKeyboard:!1,enableWheel:!1});i.elements.controls&&i.elements.nav&&i.elements.controls.appendChild(i.elements.nav);const d=function(e){const{container:t,items:o,indicators:n}=e,r=JSON.parse(t.dataset.demoA11y),a=[];let c=!1;function u(e,t){return e.replace("{current}",t+1).replace("{total}",o.length)}function s(e,t,o){e&&e.getAttribute(t)!==o&&e.setAttribute(t,o)}function l(e,t,o){e.addEventListener(t,o),a.push(()=>e.removeEventListener(t,o))}function i(){const{currentIndex:a,isAutoRotating:c,counterElement:l}=e;for(let e=0;e<o.length;e++)s(o[e],"role","group"),s(o[e],"aria-roledescription",r.slide),s(o[e],"aria-label",u(r.position,e)),s(o[e],"aria-hidden",String(e!==a));for(let e=0;e<n.length;e++){const t=n[e];t.removeAttribute("role"),t.removeAttribute("aria-selected"),s(t,"aria-label",u(r.show,e)),s(t,"aria-pressed",String(e===a)),s(t,"tabindex","0")}const i=t.querySelector(".peek-carousel__indicators");s(i,"role","group"),s(i,"aria-label",r.choose),s(e.elements.prevBtn,"aria-label",r.previous),s(e.elements.nextBtn,"aria-label",r.next),s(l,"aria-live",c?"off":"polite"),s(e.elements.autoRotateBtn,"aria-label",c?r.stop:r.start)}function d(){e.stopAutoRotate(),i()}l(t,"pointerdown",t=>{c=t.target.closest("button")===e.elements.autoRotateBtn}),l(t,"pointerup",()=>{c=!1}),l(t,"focusin",t=>{t.target===e.elements.autoRotateBtn&&c||d()}),l(t,"pointerenter",d),l(document,"visibilitychange",()=>{document.hidden&&d()}),l(t,"click",i),l(t,"keydown",t=>{const o=n.indexOf(t.target);if(-1===o)return;const r={ArrowLeft:o-1,ArrowRight:o+1,Home:0,End:n.length-1};Object.prototype.hasOwnProperty.call(r,t.key)&&(t.preventDefault(),d(),e.goTo(r[t.key]),i(),n[e.currentIndex].focus())});const f=new MutationObserver(i);return f.observe(t,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-current","aria-selected","aria-pressed"]}),i(),{sync:i,destroy(){f.disconnect();for(const e of a)e()}}}(i),f=function(e){const t=document.getElementById("theme-preset"),o=document.getElementById("theme-preset-trigger"),n=document.getElementById("theme-preset-options"),r=document.getElementById("theme-preset-value"),a=[...n.querySelectorAll('[role="option"]')],c=[];function u(e,t,o){e.addEventListener(t,o),c.push(()=>e.removeEventListener(t,o))}function s(e=!1){n.hidden=!0,o.setAttribute("aria-expanded","false"),e&&o.focus()}function l(e){t.value=e;for(const t of a){const o=t.dataset.preset===e;t.setAttribute("aria-selected",String(o)),o&&(r.textContent=t.textContent)}}function i(){n.hidden=!1,o.setAttribute("aria-expanded","true"),a.find(e=>e.dataset.preset===t.value).focus()}function d(o){l(o.dataset.preset),e(t.value),s(!0)}u(o,"click",()=>{n.hidden?i():s()}),u(o,"keydown",e=>{"ArrowDown"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),i())});for(const e of a)u(e,"click",()=>d(e));return u(n,"keydown",e=>{const t=a.indexOf(document.activeElement),o={ArrowDown:(t+1)%a.length,ArrowUp:(t+a.length-1)%a.length,Home:0,End:a.length-1};if(Object.prototype.hasOwnProperty.call(o,e.key))e.preventDefault(),a[o[e.key]].focus();else if("Enter"===e.key||" "===e.key)e.preventDefault(),d(a[t]);else if("Escape"===e.key||"Tab"===e.key)"Escape"===e.key&&e.preventDefault(),s(!0);else if(1===e.key.length&&!e.isComposing){const t=a.find(t=>t.textContent.toLowerCase().startsWith(e.key.toLowerCase()));t?.focus()}}),u(document,"pointerdown",e=>{o.parentElement.contains(e.target)||s()}),l(t.value),{setValue:l,destroy(){s();for(const e of c)e()}}}(s);o(document.querySelector("#theme-preset"),"change",e=>s(e.target.value)),o(document.querySelector("#theme-accent"),"input",e=>{c("focus-color",e.target.value),c("indicator-active-color",e.target.value),document.querySelector("#theme-accent-value").value=e.target.value,u()});for(const[e,t]of[["theme-radius","card-radius"],["theme-size","button-size"]])o(document.querySelector("#"+e),"input",o=>{const n=o.target.value+"px";l(o.target),c(t,n),document.querySelector("#"+e.replace("theme-","")+"-value").value=n,u()});return o(document.querySelector("#theme-reset"),"click",()=>{document.querySelector("#theme-preset").value="default",s("default")}),s("default"),{carousel:i,destroy(){d.destroy(),f.destroy();for(const e of t)e();i.destroy()}}},Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e}({});PeekCarouselTheme.initTheme(PeekCarousel);
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="ko">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>PeekCarousel — CSS 테마 실시간 편집기</title>
|
|
7
|
+
<meta name="description" content="CSS 변수로 나만의 캐러셀을 디자인하세요. 프리셋, 포인트 색상, 카드 모서리와 버튼 크기를 조절하고 테마 CSS를 복사할 수 있습니다.">
|
|
8
|
+
<meta name="robots" content="index, follow, max-image-preview:large">
|
|
9
|
+
<meta name="theme-color" content="#ffffff">
|
|
10
|
+
<meta property="og:type" content="website">
|
|
11
|
+
<meta property="og:site_name" content="PeekCarousel">
|
|
12
|
+
<meta property="og:locale" content="ko_KR">
|
|
13
|
+
<meta property="og:url" content="https://lledellebell.github.io/peek-carousel/examples/custom-theme.ko.html">
|
|
14
|
+
<meta property="og:title" content="PeekCarousel — CSS 테마 실시간 편집기">
|
|
15
|
+
<meta property="og:description" content="CSS 변수로 나만의 캐러셀을 디자인하세요. 프리셋, 포인트 색상, 카드 모서리와 버튼 크기를 조절하고 테마 CSS를 복사할 수 있습니다.">
|
|
16
|
+
<meta property="og:image" content="https://lledellebell.github.io/peek-carousel/public/assets/share_image.png">
|
|
17
|
+
<meta property="og:image:type" content="image/png">
|
|
18
|
+
<meta property="og:image:width" content="1200">
|
|
19
|
+
<meta property="og:image:height" content="720">
|
|
20
|
+
<meta property="og:image:alt" content="흰 배경에 파란 컨트롤과 사진 카드를 배치한 PeekCarousel">
|
|
21
|
+
<meta name="twitter:card" content="summary_large_image">
|
|
22
|
+
<meta name="twitter:title" content="PeekCarousel — CSS 테마 실시간 편집기">
|
|
23
|
+
<meta name="twitter:description" content="CSS 변수로 나만의 캐러셀을 디자인하세요. 프리셋, 포인트 색상, 카드 모서리와 버튼 크기를 조절하고 테마 CSS를 복사할 수 있습니다.">
|
|
24
|
+
<meta name="twitter:image" content="https://lledellebell.github.io/peek-carousel/public/assets/share_image.png">
|
|
25
|
+
<meta name="twitter:image:alt" content="흰 배경에 파란 컨트롤과 사진 카드를 배치한 PeekCarousel">
|
|
26
|
+
<link rel="canonical" href="https://lledellebell.github.io/peek-carousel/examples/custom-theme.ko.html">
|
|
27
|
+
<link rel="alternate" hreflang="en" href="https://lledellebell.github.io/peek-carousel/examples/custom-theme.html">
|
|
28
|
+
<link rel="alternate" hreflang="ja" href="https://lledellebell.github.io/peek-carousel/examples/custom-theme.ja.html">
|
|
29
|
+
<link rel="alternate" hreflang="ko" href="https://lledellebell.github.io/peek-carousel/examples/custom-theme.ko.html">
|
|
30
|
+
<link rel="alternate" hreflang="x-default" href="https://lledellebell.github.io/peek-carousel/examples/custom-theme.html">
|
|
31
|
+
<meta property="og:locale:alternate" content="en_US">
|
|
32
|
+
<meta property="og:locale:alternate" content="ja_JP">
|
|
33
|
+
<script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","@id":"https://lledellebell.github.io/peek-carousel/examples/custom-theme.ko.html","url":"https://lledellebell.github.io/peek-carousel/examples/custom-theme.ko.html","name":"PeekCarousel — CSS 테마 실시간 편집기","description":"CSS 변수로 나만의 캐러셀을 디자인하세요. 프리셋, 포인트 색상, 카드 모서리와 버튼 크기를 조절하고 테마 CSS를 복사할 수 있습니다.","inLanguage":"ko","mainEntity":{"@id":"https://lledellebell.github.io/peek-carousel/examples/example-built.html#library-source"}},{"@type":"SoftwareSourceCode","@id":"https://lledellebell.github.io/peek-carousel/examples/example-built.html#library-source","name":"PeekCarousel","description":"CSS 변수로 나만의 캐러셀을 디자인하세요. 프리셋, 포인트 색상, 카드 모서리와 버튼 크기를 조절하고 테마 CSS를 복사할 수 있습니다.","codeRepository":"https://github.com/lledellebell/peek-carousel","programmingLanguage":"JavaScript","runtimePlatform":"Web browser","license":"https://github.com/lledellebell/peek-carousel/blob/master/LICENSE","url":"https://github.com/lledellebell/peek-carousel"}]}</script>
|
|
34
|
+
|
|
35
|
+
<link rel="preload" href="../public/fonts/noto-sans-ko.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
36
|
+
<link rel="stylesheet" href="../public/fonts/noto-sans-ko.css">
|
|
37
|
+
<link rel="icon" href="../public/favicon-32x32.png">
|
|
38
|
+
<link rel="stylesheet" href="../dist/peek-carousel.min.css">
|
|
39
|
+
<link rel="stylesheet" href="./example.min.css">
|
|
40
|
+
<link rel="stylesheet" href="./custom-theme.css">
|
|
41
|
+
</head>
|
|
42
|
+
<body class="preview">
|
|
43
|
+
<a class="preview__skip" href="#theme-carousel">미리보기로 건너뛰기</a>
|
|
44
|
+
<header class="preview__header">
|
|
45
|
+
<a class="preview__brand" href="#"><span class="preview__brand_mark" aria-hidden="true">▱</span> PeekCarousel</a>
|
|
46
|
+
<nav class="preview__nav" aria-label="주요 탐색">
|
|
47
|
+
<a href="./example-built.ko.html">미리보기</a>
|
|
48
|
+
<a href="https://github.com/lledellebell/peek-carousel/blob/master/README.md">문서 <span aria-hidden="true">↗</span></a>
|
|
49
|
+
<a href="https://github.com/lledellebell/peek-carousel">GitHub <span aria-hidden="true">↗</span></a>
|
|
50
|
+
</nav>
|
|
51
|
+
<nav class="preview__languages" aria-label="언어 선택">
|
|
52
|
+
<a href="./custom-theme.html" lang="en" hreflang="en" aria-label="EN — English">EN</a>
|
|
53
|
+
<a href="./custom-theme.ja.html" lang="ja" hreflang="ja" aria-label="日本語">日本語</a>
|
|
54
|
+
<a href="./custom-theme.ko.html" lang="ko" hreflang="ko" aria-label="한국어" aria-current="page">한국어</a>
|
|
55
|
+
</nav>
|
|
56
|
+
</header>
|
|
57
|
+
<main>
|
|
58
|
+
<section class="preview__hero" aria-labelledby="theme-title">
|
|
59
|
+
<p class="preview__eyebrow"><span class="preview__status" aria-hidden="true"></span>나의 갤러리에, 나만의 분위기를.</p>
|
|
60
|
+
<h1 id="theme-title">PeekCarousel.<br><span>내 취향을 담은 장면.</span></h1>
|
|
61
|
+
<div class="preview__intro"><p>하나의 캐러셀, 나다운 스타일.<br>프리셋을 고르고 디테일을 조절한 뒤, CSS를 가져가세요.</p><a class="preview__link" href="./example-built.ko.html">미리보기로 돌아가기 <span aria-hidden="true">↗</span></a></div>
|
|
62
|
+
</section>
|
|
63
|
+
<section class="playground" aria-labelledby="theme-preview-title">
|
|
64
|
+
<div class="playground__preview">
|
|
65
|
+
<div class="playground__toolbar"><h2 class="preview__eyebrow" id="theme-preview-title">실시간 테마 미리보기</h2><span class="playground__live"><span class="preview__status" aria-hidden="true"></span>실시간 미리보기</span></div>
|
|
66
|
+
<div class="playground__stage"><div id="theme-carousel" class="peek-carousel playground__theme" role="region" aria-label="사용자 테마 미리보기" data-demo-a11y="{"slide":"슬라이드","position":"전체 {total}장 중 {current}번째","show":"전체 {total}장 중 {current}번째 슬라이드 표시","choose":"슬라이드 선택","previous":"이전 슬라이드","next":"다음 슬라이드","start":"자동 재생 시작","stop":"자동 재생 중지"}"><div class="peek-carousel__track"><div class="peek-carousel__item"><figure class="peek-carousel__figure"><img class="peek-carousel__image" width="650" height="490" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22650%22%20height%3D%22490%22%3E%3Crect%20width%3D%22650%22%20height%3D%22490%22%20fill%3D%22hsl(210%2038%25%2040%25)%22%2F%3E%3Ccircle%20cx%3D%22460%22%20cy%3D%22140%22%20r%3D%2270%22%20fill%3D%22%23fff6%22%2F%3E%3Cpath%20d%3D%22M0%20490L220%20180L410%20490ZM230%20490L460%20230L650%20490Z%22%20fill%3D%22%23fff3%22%2F%3E%3C%2Fsvg%3E" alt="산 풍경 일러스트 1"><figcaption class="peek-carousel__caption">풍경 1</figcaption></figure></div>
|
|
67
|
+
<div class="peek-carousel__item"><figure class="peek-carousel__figure"><img class="peek-carousel__image" width="650" height="490" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22650%22%20height%3D%22490%22%3E%3Crect%20width%3D%22650%22%20height%3D%22490%22%20fill%3D%22hsl(245%2038%25%2040%25)%22%2F%3E%3Ccircle%20cx%3D%22460%22%20cy%3D%22140%22%20r%3D%2270%22%20fill%3D%22%23fff6%22%2F%3E%3Cpath%20d%3D%22M0%20490L220%20180L410%20490ZM230%20490L460%20230L650%20490Z%22%20fill%3D%22%23fff3%22%2F%3E%3C%2Fsvg%3E" alt="산 풍경 일러스트 2"><figcaption class="peek-carousel__caption">풍경 2</figcaption></figure></div>
|
|
68
|
+
<div class="peek-carousel__item"><figure class="peek-carousel__figure"><img class="peek-carousel__image" width="650" height="490" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22650%22%20height%3D%22490%22%3E%3Crect%20width%3D%22650%22%20height%3D%22490%22%20fill%3D%22hsl(280%2038%25%2040%25)%22%2F%3E%3Ccircle%20cx%3D%22460%22%20cy%3D%22140%22%20r%3D%2270%22%20fill%3D%22%23fff6%22%2F%3E%3Cpath%20d%3D%22M0%20490L220%20180L410%20490ZM230%20490L460%20230L650%20490Z%22%20fill%3D%22%23fff3%22%2F%3E%3C%2Fsvg%3E" alt="산 풍경 일러스트 3"><figcaption class="peek-carousel__caption">풍경 3</figcaption></figure></div>
|
|
69
|
+
<div class="peek-carousel__item"><figure class="peek-carousel__figure"><img class="peek-carousel__image" width="650" height="490" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22650%22%20height%3D%22490%22%3E%3Crect%20width%3D%22650%22%20height%3D%22490%22%20fill%3D%22hsl(315%2038%25%2040%25)%22%2F%3E%3Ccircle%20cx%3D%22460%22%20cy%3D%22140%22%20r%3D%2270%22%20fill%3D%22%23fff6%22%2F%3E%3Cpath%20d%3D%22M0%20490L220%20180L410%20490ZM230%20490L460%20230L650%20490Z%22%20fill%3D%22%23fff3%22%2F%3E%3C%2Fsvg%3E" alt="산 풍경 일러스트 4"><figcaption class="peek-carousel__caption">풍경 4</figcaption></figure></div>
|
|
70
|
+
<div class="peek-carousel__item"><figure class="peek-carousel__figure"><img class="peek-carousel__image" width="650" height="490" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22650%22%20height%3D%22490%22%3E%3Crect%20width%3D%22650%22%20height%3D%22490%22%20fill%3D%22hsl(350%2038%25%2040%25)%22%2F%3E%3Ccircle%20cx%3D%22460%22%20cy%3D%22140%22%20r%3D%2270%22%20fill%3D%22%23fff6%22%2F%3E%3Cpath%20d%3D%22M0%20490L220%20180L410%20490ZM230%20490L460%20230L650%20490Z%22%20fill%3D%22%23fff3%22%2F%3E%3C%2Fsvg%3E" alt="산 풍경 일러스트 5"><figcaption class="peek-carousel__caption">풍경 5</figcaption></figure></div></div></div></div>
|
|
71
|
+
<p class="playground__description">라이브러리 스타일시트 다음에 이 규칙을 추가하세요.</p>
|
|
72
|
+
</div>
|
|
73
|
+
<aside class="playground__settings" aria-labelledby="theme-settings-title">
|
|
74
|
+
<p class="preview__eyebrow">마지막 디테일까지</p><h2 id="theme-settings-title">다음 스타일을 찾아서.</h2>
|
|
75
|
+
<div class="playground__theme_settings">
|
|
76
|
+
<div class="playground__preset"><span id="theme-preset-label">프리셋</span><input type="hidden" id="theme-preset" value="default"><button type="button" id="theme-preset-trigger" aria-haspopup="listbox" aria-expanded="false" aria-controls="theme-preset-options" aria-labelledby="theme-preset-label theme-preset-value"><span id="theme-preset-value">기본</span><svg aria-hidden="true" width="16" height="16" viewBox="0 0 16 16"><path d="m4 6 4 4 4-4" fill="none" stroke="currentColor" stroke-width="1.5"/></svg></button><ul id="theme-preset-options" role="listbox" aria-labelledby="theme-preset-label" hidden><li role="option" tabindex="-1" data-preset="default" aria-selected="true">기본</li><li role="option" tabindex="-1" data-preset="light" aria-selected="false">라이트</li><li role="option" tabindex="-1" data-preset="flat" aria-selected="false">플랫</li></ul></div>
|
|
77
|
+
<label for="theme-accent">포인트 색상<span class="playground__color_controls"><output for="theme-accent" id="theme-accent-value">#2458e8</output><input type="color" id="theme-accent" value="#2458e8"></span></label>
|
|
78
|
+
<label for="theme-radius">카드 모서리<input type="range" id="theme-radius" min="0" max="40" value="16"><output for="theme-radius" id="radius-value">16px</output></label>
|
|
79
|
+
<label for="theme-size">버튼 크기<input type="range" id="theme-size" min="32" max="64" value="36"><output for="theme-size" id="size-value">36px</output></label>
|
|
80
|
+
<button type="button" id="theme-reset">테마 초기화</button>
|
|
81
|
+
</div>
|
|
82
|
+
</aside>
|
|
83
|
+
</section>
|
|
84
|
+
<section class="preview__theme_code" aria-labelledby="theme-css-title"><h2 id="theme-css-title">바로 가져가는 나만의 CSS.</h2><p>라이브러리 스타일시트 다음에 이 규칙을 추가하세요.</p><textarea id="theme-css" readonly aria-label="생성된 사용자 테마 CSS" spellcheck="false"></textarea></section>
|
|
85
|
+
</main>
|
|
86
|
+
<footer class="preview__footer"><span>PeekCarousel <span class="preview__footer_note">— 시선을 조금 더 넓게.</span></span><span>Vanilla JavaScript · <a href="https://github.com/lledellebell/peek-carousel/blob/master/LICENSE" >앱 이용 조건</a></span><small class="preview__copyright">© 2025 PeekCarousel · © 2026 PeekCarousel contributors. <a href="https://github.com/lledellebell/peek-carousel/blob/master/COPYRIGHT.md">저작권과 재사용 조건</a> · <a href="https://github.com/lledellebell/peek-carousel/blob/master/THIRD_PARTY_NOTICES.md">이미지 권리와 출처</a></small></footer>
|
|
87
|
+
<script src="../dist/peek-carousel.js"></script>
|
|
88
|
+
<script src="./custom-theme.js"></script>
|
|
89
|
+
</body>
|
|
90
|
+
</html>
|