Skip to content

Commit 6bc7a3e

Browse files
committed
docs: add a logo and refresh the demo screenshot
Add the icon and light/dark wordmarks, show the wordmark at the top of the README and the icon in the demo heading and favicon, and retake the demo screenshot from the current demo. README images use absolute GitHub URLs so they also render on npmjs.com, which does not get docs/.
1 parent ab30101 commit 6bc7a3e

9 files changed

Lines changed: 103 additions & 3 deletions

File tree

‎README.md‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
<p align="center">
2+
<picture>
3+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/devmaxxx/react-clear-browser-cache/master/docs/logo-wordmark-dark.svg" />
4+
<img alt="react-clear-browser-cache" src="https://raw.githubusercontent.com/devmaxxx/react-clear-browser-cache/master/docs/logo-wordmark-light.svg" width="352" />
5+
</picture>
6+
</p>
7+
18
# react-clear-browser-cache
29

310
> Keep open tabs on your latest React build: notice a deploy, clear Cache Storage and reload, or ask the user first.
@@ -14,7 +21,7 @@ Users leave tabs open for days. After you deploy, those tabs still run the old b
1421
**[▶ Try the live demo](https://devmaxxx.github.io/react-clear-browser-cache/)** — deploy a new version in one click and watch an open tab notice it, prompt, clear Cache Storage and reload.
1522

1623
<a href="https://devmaxxx.github.io/react-clear-browser-cache/">
17-
<img alt="The demo after a deploy: the update prompt asks to reload, the event log shows meta.json returning v2 while the tab still runs v1." src="docs/demo-light.png" width="800" />
24+
<img alt="The demo after a deploy: the update prompt offers v2 and asks to reload, while the tab still runs v1." src="https://raw.githubusercontent.com/devmaxxx/react-clear-browser-cache/master/docs/demo-light.png" width="800" />
1825
</a>
1926

2027
## Features

‎docs/demo-light.png‎

89.9 KB
Loading

‎docs/logo-wordmark-dark.svg‎

Lines changed: 20 additions & 0 deletions
Loading

‎docs/logo-wordmark-light.svg‎

Lines changed: 20 additions & 0 deletions
Loading

‎docs/logo.svg‎

Lines changed: 17 additions & 0 deletions
Loading

‎example/index.html‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1" />
66
<meta name="theme-color" content="#000000" />
7-
<link rel="icon" href="/favicon.ico" />
7+
<link rel="icon" href="/favicon.ico" sizes="any" />
8+
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
89
<title>react-clear-browser-cache</title>
910
</head>
1011

‎example/public/favicon.svg‎

Lines changed: 17 additions & 0 deletions
Loading

‎example/src/demo/Demo.tsx‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,16 @@ export default function Demo() {
410410
<div className='page'>
411411
<header className='hero'>
412412
<p className='eyebrow'>Live demo · deploys simulated in your browser</p>
413-
<h1>react-clear-browser-cache</h1>
413+
<h1>
414+
<img
415+
className='logo'
416+
src={`${import.meta.env.BASE_URL}favicon.svg`}
417+
alt=''
418+
width={40}
419+
height={40}
420+
/>
421+
react-clear-browser-cache
422+
</h1>
414423
<p className='lede'>
415424
Users keep old tabs open. When you ship, their page still runs the
416425
last build and its lazy chunks are gone from the server. This boundary

‎example/src/demo/demo.css‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,19 @@ button.link {
137137
}
138138

139139
.hero h1 {
140+
display: flex;
141+
align-items: center;
142+
gap: 0.6rem;
140143
font-size: clamp(1.5rem, 4vw, 2rem);
141144
letter-spacing: -0.02em;
142145
}
143146

147+
.logo {
148+
flex: none;
149+
width: 1.4em;
150+
height: 1.4em;
151+
}
152+
144153
.lede {
145154
color: var(--muted);
146155
font-size: 0.95rem;

0 commit comments

Comments
 (0)