-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
92 lines (75 loc) · 3.59 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Font Palette Color Font Demo</title>
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@hypeddev" />
<meta name="twitter:creator" content="@hypeddev" />
<meta property="og:url" content="https://color-font-palette.pages.dev" />
<meta property="og:title" content="Color Font Palette Demo" />
<meta property="og:description" content="A demo of the CSS color-palette property" />
<meta property="og:image" content="https://color-font-palette.pages.dev/colorfont.png" />
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="grid">
<div> <h2 class="color purple-palette">Color</h2>
<h2 class="color red-palette">Fonts</h2>
</div>
<h2 class="color lab-palette upright">NOW</h2>
</div>
<div class="container">
<h2 class="rocher">Quick brown fox</h2>
<h2 class="rocher grays">Quick brown fox</h2>
<h2 class="rocher pinks">Quick brown fox</h2>
</div>
<div class="container">
<h2 class="emoji">🐶✨</h2>
</div>
<div style="background-color: #f0e2cc; background-image: url('enchanted.jpg'); background-size: cover; background-position: center;" class="container">
<h2 class="bradley">Once upon</h2>
</div>
<div style="background-image: url('enchanted.jpg'); background-size: cover; background-position: center;" class="container">
<h2 class="bradley seafoam-remix">Once upon</h2>
</div>
<div class="container" style="background-color: #f0e2cc;">
<div style="max-width: 700px;">
<h2 class="bradley-non-color">Lorem, ipsum dolor sit amet consectetur adipisicing elit. Beatae ex, tenetur culpa quos ea odit unde itaque iure error excepturi.</h2>
</div>
</div>
<div class="container" style="background-color: rgb(40,60,60);">
<h2 class="merit-badge">Variable color font</h2>
</div>
<!-- <div style="background-color: rgb(230,230,230);" class="container">
<h2 class="noto">🏞️</h2>
</div> -->
<p style="text-align: center;">Code available on <a href="https://github.com/o-t-w/color-font-palette">GitHub</a>. Be sure to check out the creators of the fonts used on this site: <a href="https://www.harbortype.com/fonts/rocher-color/">Henrique Beier of Harbor Type</a> and <a href="https://djr.com/font-of-the-month-club">David Jonathan Ross</a> </p>
<div style="background-image: url(green-jelly.jpeg);" class="container jellyContainer lime">
<h2 class="jel">Jelly</h2>
<div class="buttons">
<button class="strawberry-btn">Strawberry</button>
<button class="lime-btn">Lime</button>
</div>
</div>
<div class="container">
<h2 class="reem">كوفي ريم</h2>
<p style="margin-top: 48px;">This is an example of a COLRv1 font, which is currently only supported in Chrome Canary. The typeface is <a href="https://github.com/aliftype/reem-kufi">Reem Kufi</a></p>
</div>
<script>
const strawberryBtn = document.querySelector('.strawberry-btn');
const limeBtn = document.querySelector('.lime-btn');
const jellyContainer = document.querySelector('.jellyContainer');
strawberryBtn.addEventListener('click', function() {
jellyContainer.classList.remove('lime');
jellyContainer.classList.add('strawberry');
});
limeBtn.addEventListener('click', function() {
jellyContainer.classList.remove('strawberry');
jellyContainer.classList.add('lime');
});
</script>
</body>
</html>