Skip to content

Commit 1276cf0

Browse files
committed
Add easingSmoothstepInverse() (re: #207)
1 parent 7d00e2d commit 1276cf0

File tree

19 files changed

+155
-126
lines changed

19 files changed

+155
-126
lines changed

docs/_data/menu.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/_includes/default.njk

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width,initial-scale=1" />
6+
<title>
7+
{% if title %} {{ title }} &middot; culori {% else %} culori {%
8+
endif %}
9+
</title>
10+
11+
<link rel="icon" type="image/png" href='{{"/favicon.png" | url }}' />
12+
<link rel="stylesheet" href='{{"/css/main.css" | url }}' />
13+
</head>
14+
<body>
15+
<header>
16+
<div class="container">
17+
<div class="logo">
18+
<a href='{{"/" | url }}'>
19+
<img
20+
width="132"
21+
height="30"
22+
src='{{ "/img/culori.svg" | url }}'
23+
alt="culori"
24+
/>
25+
</a>
26+
<span
27+
>v{{ pkg.version }} (<a
28+
href="https://github.com/evercoder/culori/releases"
29+
>changelog</a
30+
>)</span
31+
>
32+
</div>
33+
<nav>
34+
<ul class='nav'>
35+
<li {% if page.url == '/getting-started/' %}class="active"{% endif %}>
36+
<a href="/getting-started/">Getting Started</a>
37+
</li>
38+
<li {% if page.url == '/api/' %}class="active"{% endif %}>
39+
<a href="/api/">API Reference</a>
40+
</li>
41+
<li {% if page.url == '/color-spaces/' %}class="active"{% endif %}>
42+
<a href="/color-spaces/">Color Spaces</a>
43+
</li>
44+
<li {% if page.url == '/guides/' %}class="active"{% endif %}>
45+
<a href="/guides/">Guides</a>
46+
</li>
47+
<li>
48+
<a href="https://github.com/Evercoder/culori"
49+
>GitHub <span aria-hidden="true">↗</span></a
50+
>
51+
</li>
52+
</ul>
53+
</nav>
54+
</div>
55+
</header>
56+
57+
<div class="container">
58+
<article>
59+
<h1>{{ title }}</h1>
60+
{{ content | safe }}
61+
</article>
62+
</div>
63+
<footer>
64+
<div class="container">
65+
66+
<p>
67+
Culori is built by <a href="https://moqups.com">Moqups</a> &middot; <a href="/colophon/">Colophon</a> &middot; <a href="/resources/">Resources</a>
68+
<p>
69+
70+
<p>
71+
Can this page be improved?
72+
<a
73+
href="https://github.com/Evercoder/culori/blob/main/{{ page.inputPath }}"
74+
>Edit it on GitHub</a
75+
>
76+
</p>
77+
</div>
78+
</footer>
79+
80+
81+
<script type="module">
82+
import * as culori from '/culori.min.mjs';
83+
84+
/* Expose as global variable */
85+
window.culori = culori;
86+
87+
const { p3, random, formatCss, formatHex } = culori;
88+
89+
const r = () => random('lch', { l: [30, 80], c: [60, 90] });
90+
let r1 = r();
91+
let r2 = r();
92+
if (CSS.supports('color: color(display-p3 0 0 0)')) {
93+
r1 = formatCss(p3(r1));
94+
r2 = formatCss(p3(r2));
95+
} else {
96+
r1 = formatHex(r1);
97+
r2 = formatHex(r2);
98+
}
99+
document.body.style.setProperty('--random-1', r1);
100+
document.body.style.setProperty('--random-2', r2);
101+
</script>
102+
</body>
103+
</html>

docs/_includes/layouts/default.html

Lines changed: 0 additions & 46 deletions
This file was deleted.

docs/_includes/partials/footer.html

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/_includes/partials/header.html

Lines changed: 0 additions & 35 deletions
This file was deleted.

docs/api.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
layout: layouts/default
2+
layout: default.njk
33
title: API Reference
4-
menu-order: 2
54
codebase: 'https://github.com/evercoder/culori/blob/main'
65
---
76

@@ -38,6 +37,7 @@ codebase: 'https://github.com/evercoder/culori/blob/main'
3837
<li><a href='#easingMidpoint'>easingMidpoint</a></li>
3938
<li><a href='#easingSmootherstep'>easingSmootherstep</a></li>
4039
<li><a href='#easingSmoothstep'>easingSmoothstep</a></li>
40+
<li><a href='#easingSmoothstepInverse'>easingSmoothstepInverse</a></li>
4141
<li><a href='#filterBrightness'>filterBrightness</a></li>
4242
<li><a href='#filterContrast'>filterContrast</a></li>
4343
<li><a href='#filterDeficiencyDeuter'>filterDeficiencyDeuter</a></li>
@@ -575,6 +575,12 @@ interpolate(['red', 0.25, 'blue']);
575575

576576
The [Smoothstep][smoothstep] easing function.
577577

578+
<a id="easingSmoothstepInverse" href="#easingSmoothstepInverse">#</a> **easingSmoothstep**
579+
580+
<span aria-label='Source:'>☞</span> [src/easing/smoothstep.js]({{codebase}}/src/easing/smoothstep.js)
581+
582+
The inverse of the [Smoothstep][smoothstep] easing function.
583+
578584
<a id="easingSmootherstep" href="#easingSmootherstep">#</a> **easingSmootherstep**
579585

580586
<span aria-label='Source:'>☞</span> [src/easing/smootherstep.js]({{codebase}}/src/easing/smootherstep.js)

docs/colophon.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
layout: layouts/default
2+
layout: default.njk
33
title: Colophon
4-
menu-order: 6
54
---
65

76
Culori is developed by [Dan Burzo](http://danburzo.ro) with the help of many collaborators, and released under the MIT license.

docs/color-spaces.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
layout: layouts/default
2+
layout: default.njk
33
title: Color Spaces
4-
menu-order: 3
54
---
65

76
This is an overview of the color spaces built into culori, listing their channels and expected ranges.

docs/css/main.css

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ body {
6969
padding-top: 0.5em;
7070
}
7171

72-
nav .active a {
72+
ul.nav .active a {
7373
font-weight: bold;
7474
border-color: var(--link-color);
7575
}
@@ -114,19 +114,16 @@ table code {
114114
padding: 0;
115115
}
116116

117-
nav ul {
117+
ul.nav {
118118
display: flex;
119119
flex-wrap: wrap;
120120
list-style: none;
121121
padding: 0;
122+
margin: 2rem 0;
123+
gap: 1.25em;
122124
}
123125

124-
nav ul > * {
125-
margin-right: 1.25em;
126-
margin-bottom: 1em;
127-
}
128-
129-
nav a {
126+
ul.nav a {
130127
border-bottom: 0.2em solid transparent;
131128
}
132129

docs/getting-started.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
layout: layouts/default
3-
title: "Getting Started"
4-
menu-order: 1
2+
layout: default.njk
3+
title: "Getting Started with Culori"
54
---
65

76
## Install Culori from npm

0 commit comments

Comments
 (0)