From 5d96744335e8a21832b9ea94e6c1997f8f98e36b Mon Sep 17 00:00:00 2001 From: Michael Fatemi Date: Wed, 25 Nov 2020 20:43:15 -0500 Subject: [PATCH] Added recent news, mission, etc --- .eslintcache | 2 +- src/App.css | 15 ++++++++++----- src/components/ArticleList.tsx | 5 +++-- src/components/ArticleRow.tsx | 8 ++++---- src/components/Footer.tsx | 1 - src/components/Hero.tsx | 21 +++------------------ src/components/Layout.tsx | 13 +++++++------ src/components/Mission.tsx | 14 +++++--------- src/components/Navbar.tsx | 10 +--------- src/components/NewsAndMission.tsx | 16 ++++++++++++++++ src/components/RecentNews.tsx | 21 +++++++++++++++++++++ src/css/article.css | 24 ++++++++++++++++++++++++ src/css/footer.css | 1 - src/css/hero.css | 16 ++++++++++++++++ src/css/mission.css | 3 +++ src/css/navbar.css | 6 ++++++ src/css/segment.css | 1 + src/index.css | 9 +++++++++ src/pages/index.tsx | 13 +++++-------- src/pages/news.tsx | 4 ++-- 20 files changed, 137 insertions(+), 66 deletions(-) create mode 100644 src/components/NewsAndMission.tsx create mode 100644 src/components/RecentNews.tsx create mode 100644 src/css/article.css create mode 100644 src/css/hero.css create mode 100644 src/css/mission.css diff --git a/.eslintcache b/.eslintcache index 0dc0079..9f04857 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","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 +[{"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","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\RecentNews.tsx":"23","C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\NewsAndMission.tsx":"24"},{"size":362,"mtime":1606326357566,"results":"25","hashOfConfig":"26"},{"size":501,"mtime":1606350798836,"results":"27","hashOfConfig":"26"},{"size":462,"mtime":1606328149896,"results":"28","hashOfConfig":"26"},{"size":511,"mtime":1606328176836,"results":"29","hashOfConfig":"26"},{"size":495,"mtime":1606345497930,"results":"30","hashOfConfig":"26"},{"size":576,"mtime":1606351486206,"results":"31","hashOfConfig":"26"},{"size":430,"mtime":1606354132896,"results":"32","hashOfConfig":"26"},{"size":769,"mtime":1606350621367,"results":"33","hashOfConfig":"26"},{"size":606,"mtime":1606345456179,"results":"34","hashOfConfig":"26"},{"size":610,"mtime":1606354446593,"results":"35","hashOfConfig":"26"},{"size":756,"mtime":1606350522955,"results":"36","hashOfConfig":"26"},{"size":461,"mtime":1606354385817,"results":"37","hashOfConfig":"26"},{"size":209,"mtime":1606329157659,"results":"38","hashOfConfig":"26"},{"size":238,"mtime":1606354957048,"results":"39","hashOfConfig":"26"},{"size":1575,"mtime":1606354971296,"results":"40","hashOfConfig":"26"},{"size":1004,"mtime":1606354854758,"results":"41","hashOfConfig":"26"},{"size":1068,"mtime":1606349956703,"results":"42","hashOfConfig":"26"},{"size":516,"mtime":1606354128670,"results":"43","hashOfConfig":"26"},{"size":460,"mtime":1606354752175,"results":"44","hashOfConfig":"26"},{"size":702,"mtime":1606354788077,"results":"45","hashOfConfig":"26"},{"size":393,"mtime":1606353365754,"results":"46","hashOfConfig":"26"},{"size":927,"mtime":1606353194486,"results":"47","hashOfConfig":"26"},{"size":456,"mtime":1606354001145,"results":"48","hashOfConfig":"26"},{"size":301,"mtime":1606354130867,"results":"49","hashOfConfig":"26"},{"filePath":"50","messages":"51","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"e5jqdg",{"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},{"filePath":"90","messages":"91","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"92","messages":"93","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"94","messages":"95","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"96","messages":"97","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",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\RecentNews.tsx",[],"C:\\Users\\legoc\\Desktop\\SGA React Website\\sga-website\\src\\components\\NewsAndMission.tsx",[]] \ No newline at end of file diff --git a/src/App.css b/src/App.css index d04400e..17450fe 100644 --- a/src/App.css +++ b/src/App.css @@ -24,10 +24,6 @@ } } -img { - max-width: 100%; -} - .space-2 { margin: 1rem; padding: 1rem; @@ -52,10 +48,19 @@ img { .row { display: flex; + flex-direction: row; } .col { display: flex; flex-direction: column; - justify-content: center; + align-items: center; +} + +.flex-1 { + flex: 1; +} + +.flex-2 { + flex: 2; } diff --git a/src/components/ArticleList.tsx b/src/components/ArticleList.tsx index 4aafa15..585d2d1 100644 --- a/src/components/ArticleList.tsx +++ b/src/components/ArticleList.tsx @@ -1,6 +1,7 @@ import React from 'react'; import ArticleRow from './ArticleRow'; import sanity from '../sanity'; +import '../css/article.css'; export default function ArticleList() { let [articles, setArticles] = React.useState([]); @@ -40,7 +41,7 @@ export default function ArticleList() { } return ( -
+
{articles.map((article) => { return ; })} @@ -48,7 +49,7 @@ export default function ArticleList() {
{!reachedEnd ? (