Skip to content

Commit 344a028

Browse files
committed
Merge branch 'main' into prod
2 parents 6bd1e8b + bee3200 commit 344a028

File tree

5 files changed

+41
-5
lines changed

5 files changed

+41
-5
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88
- name: Checkout Source
9-
uses: actions/checkout@v2
9+
uses: actions/checkout@v4
1010
with:
1111
fetch-depth: 0
1212
submodules: true
13-
- uses: actions/setup-node@v2
13+
- uses: actions/setup-node@v4
1414
with:
1515
node-version: "14"
1616
- run: npm install
@@ -19,7 +19,7 @@ jobs:
1919
uses: ./.github/actions/build
2020
- name: Upload
2121
if: github.ref == 'refs/heads/prod'
22-
uses: actions/upload-artifact@v2
22+
uses: actions/upload-artifact@v4
2323
with:
2424
name: build
2525
path: |
@@ -38,12 +38,12 @@ jobs:
3838
if: github.ref == 'refs/heads/prod'
3939
steps:
4040
- name: Checkout Source
41-
uses: actions/checkout@v2
41+
uses: actions/checkout@v4
4242
with:
4343
ref: gh-pages
4444
fetch-depth: 0
4545
- name: Download
46-
uses: actions/download-artifact@v2
46+
uses: actions/download-artifact@v4
4747
with:
4848
name: build
4949
path: .

main.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,3 +240,20 @@ input[type="range"] {
240240
#app:not(.home) h1 {
241241
display: none;
242242
}
243+
244+
/* Onboarding image */
245+
246+
.onboarding-gif {
247+
border-radius: 8px;
248+
padding-bottom: 20px;
249+
max-width: 100%;
250+
height: auto;
251+
}
252+
253+
/* Hide onboarding image on small screens */
254+
255+
@media (max-width: 1000px) {
256+
.onboarding-gif {
257+
display: none;
258+
}
259+
}

media/onboarding.gif

262 KB
Loading

src/components/onboarding.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import m from "mithril";
2+
3+
interface OnboardingAttrs {
4+
readonly src?: string;
5+
readonly alt?: string;
6+
readonly class?: string;
7+
}
8+
9+
export default class Onboarding implements m.ClassComponent<OnboardingAttrs> {
10+
view(vnode: m.Vnode<OnboardingAttrs>) {
11+
return m("img", {
12+
src: vnode.attrs.src || "media/onboarding.gif",
13+
alt: vnode.attrs.alt || "Onboarding animation",
14+
class: vnode.attrs.class || "onboarding-gif",
15+
});
16+
}
17+
}

src/views/start.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import m from "mithril";
22
import { App } from "../gifcap";
33
import Button from "../components/button";
44
import View from "../components/view";
5+
import Onboarding from "../components/onboarding";
56

67
const isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
78

@@ -18,6 +19,7 @@ export default class StartView implements m.ClassComponent<StartViewAttrs> {
1819

1920
view() {
2021
return m(View, [
22+
m(Onboarding),
2123
m("p", "Create animated GIFs from a screen recording."),
2224
m("p", "Client-side only, no data is uploaded. Modern browser required."),
2325
isMobile ? m("p", "Sorry, mobile does not support screen recording.") : undefined,

0 commit comments

Comments
 (0)