diff --git a/react-app/src/components/FeedItem/FeedItem.scss b/react-app/src/components/FeedItem/FeedItem.scss new file mode 100644 index 000000000..0acbb0398 --- /dev/null +++ b/react-app/src/components/FeedItem/FeedItem.scss @@ -0,0 +1,69 @@ +@use "../../styles/media" as *; + +.item-block { +p { + margin: 2px 0; + + @media #{$mobile-only} { + margin-bottom: 5px; + margin-top: 0; + } + } + + a { + cursor: pointer; + text-decoration: none; + } + + .title { + font-size: 16px; + font-family: Verdana, Geneva, sans-serif; + } + + .subtext-laptop { + font-size: 12px; + font-weight: bold; + letter-spacing: 0.5px; + + a { + &:hover { + text-decoration: underline; + }; + } + @media #{$mobile-only} { + display: none; + } + } + + .subtext-palm { + font-size: 13px; + font-weight: bold; + letter-spacing: 0.5px; + + a { + &:hover { + text-decoration: underline; + }; + } + + .details { + margin-top: 5px; + + .right { + float: right; + } + } + @media #{$laptop-only} { + display: none; + } + } + + .domain { + color: #696969; + letter-spacing: 0.5px; + } + + .item-details { + padding: 10px; + } +} diff --git a/react-app/src/components/FeedItem/FeedItem.tsx b/react-app/src/components/FeedItem/FeedItem.tsx new file mode 100644 index 000000000..54f66cb4b --- /dev/null +++ b/react-app/src/components/FeedItem/FeedItem.tsx @@ -0,0 +1,73 @@ +import { Link } from 'react-router-dom'; +import type { Story } from '../../models'; +import { useSettings } from '../../settings'; +import { formatCommentCount } from '../../utils/commentCount'; +import './FeedItem.scss'; + +export function FeedItem({ item }: { item: Story }) { + const { settings } = useSettings(); + const hasUrl = item.url.indexOf('http') === 0; + const isJob = item.type === 'job'; + const titleStyle = { fontSize: `${settings.titleFontSize}px` }; + const comments = formatCommentCount(item.comments_count); + + return ( +
+ + {item.title} + + {item.domain && ({item.domain})} +
+ ) : ( ++ + {item.title} + +
+ )} ++ These are jobs at startups that were funded by Y Combinator. You can also get a job at a YC + startup through Triplebyte. +
+ )} +