diff --git a/.eslintcache b/.eslintcache index 2676e21..0dc0079 100644 --- a/.eslintcache +++ b/.eslintcache @@ -1 +1 @@ -[{"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\reportWebVitals.js":"1","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\InitiativeList.tsx":"2","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\hooks\\useFooter.tsx":"3","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\hooks\\useMission.tsx":"4","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\index.tsx":"5","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\InitiativeColumn.tsx":"6","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\pages\\index.tsx":"7","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\App.tsx":"8","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\pages\\initiatives.tsx":"9","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\Navbar.tsx":"10","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\InitiativeRow.tsx":"11","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\Hero.tsx":"12","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\pages\\404.tsx":"13","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\pages\\news.tsx":"14","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\ArticleList.tsx":"15","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\ArticleRow.tsx":"16","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\pages\\newsArticle.tsx":"17","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\Mission.tsx":"18","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\Layout.tsx":"19","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\Footer.tsx":"20"},{"size":362,"mtime":1606326357566,"results":"21","hashOfConfig":"22"},{"size":531,"mtime":1606348100862,"results":"23","hashOfConfig":"22"},{"size":462,"mtime":1606328149896,"results":"24","hashOfConfig":"22"},{"size":511,"mtime":1606328176836,"results":"25","hashOfConfig":"22"},{"size":495,"mtime":1606345497930,"results":"26","hashOfConfig":"22"},{"size":618,"mtime":1606331752021,"results":"27","hashOfConfig":"22"},{"size":510,"mtime":1606329069016,"results":"28","hashOfConfig":"22"},{"size":798,"mtime":1606331983608,"results":"29","hashOfConfig":"22"},{"size":606,"mtime":1606345456179,"results":"30","hashOfConfig":"22"},{"size":627,"mtime":1606331620633,"results":"31","hashOfConfig":"22"},{"size":727,"mtime":1606329117521,"results":"32","hashOfConfig":"22"},{"size":671,"mtime":1606331360251,"results":"33","hashOfConfig":"22"},{"size":209,"mtime":1606329157659,"results":"34","hashOfConfig":"22"},{"size":255,"mtime":1606345458665,"results":"35","hashOfConfig":"22"},{"size":1540,"mtime":1606349201104,"results":"36","hashOfConfig":"22"},{"size":1014,"mtime":1606332759971,"results":"37","hashOfConfig":"22"},{"size":1053,"mtime":1606345461880,"results":"38","hashOfConfig":"22"},{"size":658,"mtime":1606331766968,"results":"39","hashOfConfig":"22"},{"size":564,"mtime":1606331555747,"results":"40","hashOfConfig":"22"},{"size":713,"mtime":1606345684335,"results":"41","hashOfConfig":"22"},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"e5jqdg",{"filePath":"44","messages":"45","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"46","messages":"47","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"48","messages":"49","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"50","messages":"51","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"52","messages":"53","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"54","messages":"55","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"56","messages":"57","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"58","messages":"59","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"60","messages":"61","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"62","messages":"63","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"64","messages":"65","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"66","messages":"67","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"68","messages":"69","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"70","messages":"71","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"72","messages":"73","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"74","messages":"75","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"76","messages":"77","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"78","messages":"79","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"80","messages":"81","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\reportWebVitals.js",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\InitiativeList.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\hooks\\useFooter.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\hooks\\useMission.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\index.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\InitiativeColumn.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\pages\\index.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\App.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\pages\\initiatives.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\Navbar.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\InitiativeRow.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\Hero.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\pages\\404.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\pages\\news.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\ArticleList.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\ArticleRow.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\pages\\newsArticle.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\Mission.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\Layout.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\Footer.tsx",[]] \ No newline at end of file +[{"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\reportWebVitals.js":"1","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\InitiativeList.tsx":"2","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\hooks\\useFooter.tsx":"3","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\hooks\\useMission.tsx":"4","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\index.tsx":"5","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\InitiativeColumn.tsx":"6","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\pages\\index.tsx":"7","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\App.tsx":"8","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\pages\\initiatives.tsx":"9","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\Navbar.tsx":"10","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\InitiativeRow.tsx":"11","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\Hero.tsx":"12","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\pages\\404.tsx":"13","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\pages\\news.tsx":"14","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\ArticleList.tsx":"15","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\ArticleRow.tsx":"16","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\pages\\newsArticle.tsx":"17","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\Mission.tsx":"18","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\Layout.tsx":"19","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\Footer.tsx":"20","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\Segment.tsx":"21","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\SegmentGroup.tsx":"22"},{"size":362,"mtime":1606326357566,"results":"23","hashOfConfig":"24"},{"size":501,"mtime":1606350798836,"results":"25","hashOfConfig":"24"},{"size":462,"mtime":1606328149896,"results":"26","hashOfConfig":"24"},{"size":511,"mtime":1606328176836,"results":"27","hashOfConfig":"24"},{"size":495,"mtime":1606345497930,"results":"28","hashOfConfig":"24"},{"size":576,"mtime":1606351486206,"results":"29","hashOfConfig":"24"},{"size":498,"mtime":1606350576793,"results":"30","hashOfConfig":"24"},{"size":769,"mtime":1606350621367,"results":"31","hashOfConfig":"24"},{"size":606,"mtime":1606345456179,"results":"32","hashOfConfig":"24"},{"size":627,"mtime":1606331620633,"results":"33","hashOfConfig":"24"},{"size":756,"mtime":1606350522955,"results":"34","hashOfConfig":"24"},{"size":671,"mtime":1606331360251,"results":"35","hashOfConfig":"24"},{"size":209,"mtime":1606329157659,"results":"36","hashOfConfig":"24"},{"size":255,"mtime":1606345458665,"results":"37","hashOfConfig":"24"},{"size":1588,"mtime":1606351088876,"results":"38","hashOfConfig":"24"},{"size":1055,"mtime":1606350101179,"results":"39","hashOfConfig":"24"},{"size":1068,"mtime":1606349956703,"results":"40","hashOfConfig":"24"},{"size":658,"mtime":1606331766968,"results":"41","hashOfConfig":"24"},{"size":564,"mtime":1606331555747,"results":"42","hashOfConfig":"24"},{"size":713,"mtime":1606345684335,"results":"43","hashOfConfig":"24"},{"size":393,"mtime":1606353365754,"results":"44","hashOfConfig":"24"},{"size":927,"mtime":1606353194486,"results":"45","hashOfConfig":"24"},{"filePath":"46","messages":"47","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"e5jqdg",{"filePath":"48","messages":"49","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"50","messages":"51","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"52","messages":"53","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"54","messages":"55","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"56","messages":"57","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"58","messages":"59","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"60","messages":"61","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"62","messages":"63","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"64","messages":"65","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"66","messages":"67","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"68","messages":"69","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"70","messages":"71","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"72","messages":"73","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"74","messages":"75","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"76","messages":"77","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"78","messages":"79","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"80","messages":"81","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"82","messages":"83","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"84","messages":"85","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"86","messages":"87","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"88","messages":"89","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\reportWebVitals.js",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\InitiativeList.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\hooks\\useFooter.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\hooks\\useMission.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\index.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\InitiativeColumn.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\pages\\index.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\App.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\pages\\initiatives.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\Navbar.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\InitiativeRow.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\Hero.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\pages\\404.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\pages\\news.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\ArticleList.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\ArticleRow.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\pages\\newsArticle.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\Mission.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\Layout.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\Footer.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\Segment.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\SegmentGroup.tsx",[]] \ No newline at end of file diff --git a/public/index.html b/public/index.html index 997584d..aa069f2 100644 --- a/public/index.html +++ b/public/index.html @@ -24,7 +24,6 @@ work correctly both with client-side routing and a non-root public URL. Learn how to configure a non-root public URL by running `npm run build`. --> - React App diff --git a/src/App.css b/src/App.css index 74b5e05..d04400e 100644 --- a/src/App.css +++ b/src/App.css @@ -1,38 +1,61 @@ -.App { - text-align: center; +.header { + text-align: center; + font-weight: bold; + margin: 1rem 0rem; + font-size: 1.5rem; } -.App-logo { - height: 40vmin; - pointer-events: none; +/* Three column layout */ +.split-thirds { + margin: 2rem auto; + display: flex; + flex-wrap: wrap; } -@media (prefers-reduced-motion: no-preference) { - .App-logo { - animation: App-logo-spin infinite 20s linear; - } +@media (min-width: 1024px) { + .split-thirds > div { + width: 33.33%; + } } -.App-header { - background-color: #282c34; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; +@media (max-width: 1024px) { + .split-thirds > div { + width: 100%; + } } -.App-link { - color: #61dafb; +img { + max-width: 100%; } -@keyframes App-logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } +.space-2 { + margin: 1rem; + padding: 1rem; +} + +.space-4 { + margin: 2rem; + padding: 2rem; +} + +.button { + border-color: #474849; + border-width: 2px; + border-radius: 0.25rem; + background-color: inherit; + box-shadow: none; +} + +.text-center { + text-align: center; +} + +.row { + display: flex; +} + +.col { + display: flex; + flex-direction: column; + justify-content: center; } diff --git a/src/App.tsx b/src/App.tsx index 43134a3..285dad3 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -2,13 +2,15 @@ import React from 'react'; import { BrowserRouter, Route, Switch } from 'react-router-dom'; import Layout from './components/Layout'; +import './App.css'; + import index from './pages/index'; import initiatives from './pages/initiatives'; import news from './pages/news'; import newsArticle from './pages/newsArticle'; import notFound from './pages/404'; -function App() { +export default function App() { return ( @@ -23,5 +25,3 @@ function App() { ); } - -export default App; diff --git a/src/components/ArticleList.tsx b/src/components/ArticleList.tsx index 4ff6c0e..4aafa15 100644 --- a/src/components/ArticleList.tsx +++ b/src/components/ArticleList.tsx @@ -23,8 +23,6 @@ export default function ArticleList() { let articles = await sanity.fetch(query, params); - console.log(articles.length); - if (articles.length < 3) { setReachedEnd(true); } @@ -47,18 +45,21 @@ export default function ArticleList() { return ; })} - {!reachedEnd ? ( - - ) : ( -
No more articles to show
- )} +
+ {!reachedEnd ? ( + + ) : ( +
No more articles to show
+ )} +
); } diff --git a/src/components/ArticleRow.tsx b/src/components/ArticleRow.tsx index 3a0e328..3b03b14 100644 --- a/src/components/ArticleRow.tsx +++ b/src/components/ArticleRow.tsx @@ -26,9 +26,11 @@ export default function ArticleRow({
-

{article.title}

+

{article.title}

- {article.publish_date} + + {article.publish_date} - {article.author || 'No author'} +
diff --git a/src/components/InitiativeColumn.tsx b/src/components/InitiativeColumn.tsx index 9993bf5..6862fe5 100644 --- a/src/components/InitiativeColumn.tsx +++ b/src/components/InitiativeColumn.tsx @@ -1,6 +1,6 @@ -import React from 'react'; import BlockContent from '@sanity/block-content-to-react'; import imageUrl from '../imageUrl'; +import '../css/initiative.css'; export default function InitiativeColumn({ name, thumbnail, content }) { let thumbUrl: string | null = null; @@ -9,12 +9,14 @@ export default function InitiativeColumn({ name, thumbnail, content }) { } return ( -
-

- {name} -

- {thumbUrl ? {name} : null} - +
+

{name}

+ {thumbUrl ? ( + {name} + ) : null} +
+ +
); } diff --git a/src/components/InitiativeList.tsx b/src/components/InitiativeList.tsx index 90af11a..44e699c 100644 --- a/src/components/InitiativeList.tsx +++ b/src/components/InitiativeList.tsx @@ -12,7 +12,7 @@ export default function InitiativeList() { } return ( -
+
{initiatives.map((initiative) => { return ; })} diff --git a/src/components/InitiativeRow.tsx b/src/components/InitiativeRow.tsx index 0bb21f0..835dd85 100644 --- a/src/components/InitiativeRow.tsx +++ b/src/components/InitiativeRow.tsx @@ -20,7 +20,9 @@ export default function InitiativeRow({ ) : null}
-

{initiative.name}

+

+ {initiative.name} +

diff --git a/src/components/Segment.tsx b/src/components/Segment.tsx new file mode 100644 index 0000000..656f275 --- /dev/null +++ b/src/components/Segment.tsx @@ -0,0 +1,15 @@ +import { Link } from 'react-router-dom'; +import '../css/segment.css'; + +export default function InfoColumn({ title, content, imageURL, infoURL }) { + return ( +
+

{title}

+ {title} +

{content}

+ + MORE INFO + +
+ ); +} diff --git a/src/components/SegmentGroup.tsx b/src/components/SegmentGroup.tsx new file mode 100644 index 0000000..d2e0ac4 --- /dev/null +++ b/src/components/SegmentGroup.tsx @@ -0,0 +1,26 @@ +import Segment from './Segment'; + +export default function InfoColumnGroup() { + return ( +
+ + + +
+ ); +} diff --git a/src/css/initiative.css b/src/css/initiative.css index 0eefbca..df4ade6 100644 --- a/src/css/initiative.css +++ b/src/css/initiative.css @@ -1,3 +1,12 @@ .initiative-row { display: flex; } + +.initiative-img { + padding: 0.5rem; +} + +.initiative-summary { + padding: 0.5rem; + font-size: 1.5rem; +} \ No newline at end of file diff --git a/src/css/segment.css b/src/css/segment.css new file mode 100644 index 0000000..eb1311d --- /dev/null +++ b/src/css/segment.css @@ -0,0 +1,20 @@ +.segment { + padding: 0px 17px; +} + +.segment-body { + color: #444; + font-size: 22px; + line-height: 33px; + font-weight: 300; +} + +.segment-button { + text-transform: uppercase; + padding: 13px 23px; + border-width: 2px; + border-radius: 0.25rem; + border-style: solid; + border-color: #38A3BD; + color: #38A3BD; +} diff --git a/src/index.css b/src/index.css index ec2585e..e9b593a 100644 --- a/src/index.css +++ b/src/index.css @@ -11,3 +11,17 @@ code { font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace; } + +* { + box-sizing: border-box; +} + +a { + color: inherit; + text-decoration: none; +} + +a:visited { + color: inherit; + text-decoration: none; +} diff --git a/src/index.d.ts b/src/index.d.ts index 63c392d..11a1b93 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -10,6 +10,8 @@ declare namespace SGA { title: string; thumbnail: {}; content: any[]; + author: string; + summary: string; publish_date: string; _id: string; } diff --git a/src/pages/index.tsx b/src/pages/index.tsx index e81cec1..345b94f 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,17 +1,20 @@ import React from 'react'; import Hero from '../components/Hero'; +import SegmentGroup from '../components/SegmentGroup'; -import InitiativeList from '../components/InitiativeList'; import Mission from '../components/Mission'; const IndexPage = () => { return ( <> {/* Hero image */} - + + + {/* Info columns */} + {/* Initiatives section */} - + {/* */} {/* Mission */} diff --git a/src/pages/newsArticle.tsx b/src/pages/newsArticle.tsx index ca0d849..599cea8 100644 --- a/src/pages/newsArticle.tsx +++ b/src/pages/newsArticle.tsx @@ -19,13 +19,13 @@ export default function NewsArticle() { thumbUrl = imageUrl(article.thumbnail).url() || undefined; } - console.log(article); - return ( <> -
- Published: {article.publish_date} +
+ + {article.publish_date} - {article.author || 'No author'} +
Go to all news articles