Skip to content

Commit

Permalink
Update MHD, add before-after slider, tune layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
adamplesnik committed Nov 29, 2024
1 parent 8bc5ebb commit 24e6456
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 15 deletions.
11 changes: 11 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"lucide-react": "^0.446.0",
"prismjs": "^1.29.0",
"react": "^18.3.1",
"react-before-after-slider-component": "^1.1.8",
"react-dom": "^18.3.1",
"react-masonry-css": "^1.0.16",
"react-router-dom": "^6.26.2"
Expand Down
8 changes: 2 additions & 6 deletions src/components/WorkTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,9 @@ const WorkTile = ({

return (
<div
className={clsx(
'flex w-full flex-col gap-8 px-6 pb-12 sm:px-8 md:px-12',
title ? 'pt-6' : 'pt-12',
className
)}
className={clsx('relative flex w-full flex-col gap-8 px-6 pb-12 sm:px-8 md:px-12', className)}
>
<span id={id} className="relative -top-12 block" />
<span id={id} className="absolute -top-12 block" />
{top && <>{top}</>}
<div className="flex flex-col gap-4 md:flex-row md:gap-12">
{title && (
Expand Down
2 changes: 1 addition & 1 deletion src/content/mhd/MhdPreview.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import WorkPreviewTile from '@/components/WorkPreviewTile'
import preview from './images/mhd-home.png'
import preview from './images/mhd-home.jpg'

const MhdPreview = () => {
return (
Expand Down
Binary file added src/content/mhd/images/mhd-after.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/content/mhd/images/mhd-before.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/content/mhd/images/mhd-home.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/content/mhd/images/mhd-home.png
Binary file not shown.
Binary file modified src/content/mhd/images/mhd-trio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/content/mhd/images/mhd-video.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 21 additions & 7 deletions src/content/mhd/index.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
import Paragraph from '@/components/Paragraph'
import WorkTile from '@/components/WorkTile'
import MasonryWrapper from '@/partials/MasonryWrapper'
import ReactBeforeSliderComponent from 'react-before-after-slider-component'
import 'react-before-after-slider-component/dist/build.css'
import mhdAfter from './images/mhd-after.jpg'
import mhdBefore from './images/mhd-before.jpg'
import mhdHome from './images/mhd-home.jpg'
import mhdLang from './images/mhd-lang.mp4'
import mhdMain from './images/mhd-main.jpg'
import mhdTest from './images/mhd-test.jpg'
import mhdTrio from './images/mhd-trio.png'
import mhdVideo from './images/mhd-video.png'
import mhd from './images/mhd.mp4'

const FIRST_IMAGE = {
imageUrl: mhdBefore,
}
const SECOND_IMAGE = {
imageUrl: mhdAfter,
}

const More = () => {
return (
<Paragraph>
Expand All @@ -25,8 +35,9 @@ const WorkMHD = () => {
title="Ticket-buying redesign"
more={<More />}
text="A complete redesign of the ticket-buying experience for Bratislava public transport, from an completely new UX to a simpler, more intuitive ticket machine interface."
top={<img src={mhdTrio} className="mb-4" />}
top={<img src={mhdHome} />}
>
<img src={mhdTrio} className="mb-4" />
<MasonryWrapper>
<div className="relative mx-auto mb-4 max-w-screen-xl">
<img src={mhdVideo} alt="" />
Expand All @@ -44,11 +55,14 @@ const WorkMHD = () => {
</video>
</div>
</div>
<img src={mhdMain} className="mb-4" />
<div className="mb-4 bg-[#BBE2DA]">
<img src={mhdTest} className="opacity-90" />
</div>
</MasonryWrapper>
<ReactBeforeSliderComponent
currentPercentPosition={69}
delimiterColor="#222"
delimiterIconStyles={{ border: '2px #fff solid', cursor: 'ew-resize' }}
firstImage={FIRST_IMAGE}
secondImage={SECOND_IMAGE}
></ReactBeforeSliderComponent>
</WorkTile>
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Work.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import WorkPhoto from '@/content/WorkPhoto'

const Work = () => {
return (
<div className="flex flex-col gap-16">
<div className="flex flex-col gap-32">
<WorkMHD />
<WorkKolbord />
<WorkThankful />
Expand Down

0 comments on commit 24e6456

Please sign in to comment.