Skip to content

Commit

Permalink
chore: remove old landing page & related components (#1151)
Browse files Browse the repository at this point in the history
  • Loading branch information
vnugent committed Jun 10, 2024
1 parent 8b6f8df commit 5fc955b
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 645 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import Link from 'next/link'
import React from 'react'
import { MediaType } from '../../js/types'
import { MediaType } from '../../../js/types'
import {
UserCircleIcon,
TagIcon
} from '@heroicons/react/24/outline'
import { getUploadDateSummary, urlResolver } from '../../js/utils'
import { ATagWrapper } from '../Utils'
import { getUploadDateSummary, urlResolver } from '../../../js/utils'
import { ATagWrapper } from '../../../components/Utils'

export interface PostBodyProps {
destUrl: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
import { useState } from 'react'
import Image from 'next/image'
import clx from 'classnames'
import Card from '../ui/Card/Card'
import TagList from '../media/TagList'
import { MediaWithTags } from '../../js/types'
import { getUploadDateSummary } from '../../js/utils'
import Card from '../../../components/ui/Card/Card'
import TagList from '../../../components/media/TagList'
import { MediaWithTags } from '../../../js/types'
import { getUploadDateSummary } from '../../../js/utils'
import { PostHeader } from './Post'
import { resolver as urlResolver } from '../media/Tag'
import { ATagWrapper } from '../Utils'
import { resolver as urlResolver } from '../../../components/media/Tag'
import { ATagWrapper } from '../../../components/Utils'

const MOBILE_IMAGE_MAX_WIDITH = 600

Expand Down
2 changes: 1 addition & 1 deletion src/app/(default)/components/RecentTags.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RecentImageCard } from '@/components/home/RecentMediaCard'
import { RecentImageCard } from '@/app/(default)/components/RecentMediaCard'
import { SectionContainer } from './ui/SectionContainer'
import { getMediaForFeedSC } from '@/js/graphql/gql/serverApi'

Expand Down
13 changes: 0 additions & 13 deletions src/components/home/DenseAreas.tsx

This file was deleted.

70 changes: 0 additions & 70 deletions src/components/home/Map.tsx

This file was deleted.

34 changes: 0 additions & 34 deletions src/components/home/RecentMedia.tsx

This file was deleted.

71 changes: 0 additions & 71 deletions src/components/maps/MarkerLayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,62 +56,6 @@ const closeupLayerStyle: LayerProps = {
}
}

const closeupLayerStyleBright: LayerProps = {
...closeupLayerStyle,
id: 'all-markers-bright',
minzoom: 11,
filter: ['==', 'leaf', true],
layout: {
...closeupLayerStyle.layout,
'text-size': ['interpolate', ['linear'], ['zoom'], 8, 14, 14, 15]
},
paint: {
'icon-color': '#ffffff',
'text-halo-blur': 4,
'text-halo-width': 4,
'text-color': '#000000',
'text-halo-color': '#eaeaea'
}
}

const largeAreaLayerStyleBright: LayerProps = {
...closeupLayerStyle,
id: 'area-markers-bright',
minzoom: 8,
maxzoom: 14,
filter: ['all', ['!=', 'leaf', true], ['>', 'totalClimbs', 30], ['<', 'totalClimbs', 500], ['>', 'density', 0.35]],
layout: {
...closeupLayerStyle.layout,
'text-size': ['interpolate', ['linear'], ['zoom'], 8, 14, 14, 15]
},
paint: {
'icon-color': '#ffffff',
'text-halo-blur': 4,
'text-halo-width': 4,
'text-color': '#000000',
'text-halo-color': '#eaeaea'
}
}

const destinationLayerStyleBright: LayerProps = {
...closeupLayerStyle,
id: 'destination-markers-bright',
minzoom: 5,
maxzoom: 8,
filter: ['all', ['!=', 'leaf', true], ['>=', 'totalClimbs', 300], ['>', 'density', 0.5]],
layout: {
...closeupLayerStyle.layout,
'text-size': ['interpolate', ['linear'], ['zoom'], 8, 14, 14, 15]
},
paint: {
'icon-color': '#ffffff',
'text-halo-blur': 4,
'text-halo-width': 4,
'text-color': '#000000',
'text-halo-color': '#eaeaea'
}
}

interface MarkerLayerProps {
geojson: FeatureCollection<GeoJSON.Geometry, Properties> | undefined
}
Expand All @@ -133,21 +77,6 @@ export default function MarkerLayer ({ geojson }: MarkerLayerProps): JSX.Element
)
}

export function MarkerLayer2 ({ geojson }: MarkerLayerProps): JSX.Element | null {
if (geojson == null) return null
return (
<Source
id='areas'
type='geojson'
data={geojson}
>
<Layer {...destinationLayerStyleBright} />
<Layer {...largeAreaLayerStyleBright} />
<Layer {...closeupLayerStyleBright} />
</Source>
)
}

// Important! Pass these IDs to Mapbox GL so that onClick/onHover receives
// the active Geojson object
export const InteractiveLayerIDs = [layerStyle.id, closeupLayerStyle.id] as string[]
72 changes: 0 additions & 72 deletions src/components/ui/FeatureCard/FeatureCard.tsx

This file was deleted.

36 changes: 0 additions & 36 deletions src/components/ui/FeatureCard/FeatureImage.tsx

This file was deleted.

18 changes: 0 additions & 18 deletions src/components/ui/FeatureCard/index.ts

This file was deleted.

Loading

0 comments on commit 5fc955b

Please sign in to comment.