Skip to content

Commit c4e36af

Browse files
author
lassejaco
committed
archive devcon 7 bandaid
1 parent e663bed commit c4e36af

File tree

4 files changed

+73
-7
lines changed

4 files changed

+73
-7
lines changed

devcon-archive/src/components/common/page-hero/PageHero.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ type PathSegment = {
3636
}
3737

3838
type PageHeroProps = {
39+
banner?: React.ReactNode
3940
title?: string
4041
titleSubtext?: string
4142
titleClassName?: string
@@ -170,6 +171,12 @@ export const PageHero = (props: PageHeroProps) => {
170171

171172
{props.children}
172173

174+
{props.banner && (
175+
<div className={css['banner']}>
176+
<div className="section">{props.banner}</div>
177+
</div>
178+
)}
179+
173180
{props.scenes && (
174181
<div className={css['scenes']}>
175182
{props.scenes.map((scene: any, i: number) => {

devcon-archive/src/components/common/page-hero/page-hero.module.scss

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
left: 0px;
2222
}
2323

24-
// Gradient
24+
// Gradient f
2525
&:before {
2626
background-repeat: no-repeat;
2727
background-position: center right;
@@ -164,7 +164,8 @@
164164
.info {
165165
@include layout-content;
166166
height: 100%;
167-
167+
position: relative;
168+
168169
.path {
169170
display: flex;
170171
padding-top: $gaps-gap-4;
@@ -262,6 +263,7 @@
262263
}
263264

264265
.scenes {
266+
position: relative;
265267
margin-bottom: $gaps-gap-4;
266268
width: 100%;
267269
display: grid;
@@ -398,3 +400,46 @@
398400
width: 100%;
399401
}
400402
}
403+
404+
.banner {
405+
406+
position: absolute;
407+
top: 0px;
408+
left: 0px;
409+
right: 0px;
410+
// bottom: 0px;
411+
// padding: 5px;
412+
413+
a {
414+
color: white;
415+
text-decoration: underline;
416+
}
417+
418+
419+
:global(.section) {
420+
> * {
421+
background-color: #30354b;
422+
color: white;
423+
font-size: 14px;
424+
padding: 4px 10px;
425+
margin: 8px;
426+
border-radius: 4px;
427+
428+
// Add animation
429+
opacity: 0;
430+
animation: fadeIn 0.5s ease-in forwards;
431+
}
432+
}
433+
}
434+
435+
// Add keyframes at the end of the file
436+
@keyframes fadeIn {
437+
from {
438+
opacity: 0;
439+
transform: translateY(-100%);
440+
}
441+
to {
442+
opacity: 1;
443+
transform: translateY(0);
444+
}
445+
}

devcon-archive/src/components/domain/archive/Archive.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { Interests } from './interests'
1212
import OnDemandVideoIcon from 'src/assets/icons/on_demand_video.svg'
1313
import { Button } from 'src/components/common/button'
1414
import { ARCHIVE_DESCRIPTION, ARCHIVE_IMAGE_URL, ARCHIVE_TITLE } from 'src/utils/constants'
15+
import { Link } from 'src/components/common/link'
1516
// import LibButton from 'lib/components/button'
1617

1718
type ArchiveProps = {}
@@ -72,7 +73,13 @@ export const Archive = (props: ArchiveProps) => {
7273
title="Archive"
7374
titleClassName={css['white-title']}
7475
// titleSubtext="Devcon"
75-
/>
76+
banner={
77+
<div>
78+
Devcon 7 videos will be added to the archive soon.{' '}
79+
<Link to="https://app.devcon.org/schedule">Visit the app in the meantime to watch them now.</Link>
80+
</div>
81+
}
82+
></PageHero>
7683

7784
<div className={css['content']}>
7885
<Interests />

devcon-archive/src/context/query-mapper.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,21 @@ export function ToNavigationData(nodes: any, videoTags?: any[], type?: 'default'
2424
export function ToArchiveNavigation(videoTags?: any[]): Array<Link> {
2525
const links = new Array<Link>()
2626
links.push({ title: 'Watch', url: '/archive/watch', type: 'page' })
27-
const eventLinks = [6, 5, 4, 3, 2, 1, 0].map(
28-
event =>
29-
({
27+
const eventLinks = [
28+
{
29+
title: 'Devcon 7',
30+
url: 'https://app.devcon.org/schedule',
31+
type: 'page',
32+
},
33+
].concat(
34+
[6, 5, 4, 3, 2, 1, 0].map(
35+
event =>
36+
({
3037
title: `Devcon ${event}`,
3138
url: `/archive/watch?event=devcon-${event}`,
3239
type: 'page',
3340
} as Link)
34-
)
41+
))
3542
const tagLinks = videoTags?.filter((i: string) => !!i).map(i => {
3643
return { title: i, url: `/archive/watch?tags=${encodeURIComponent(i)}`, type: 'page' } as Link
3744
})

0 commit comments

Comments
 (0)