diff --git a/src/components/awards-card.js b/src/components/awards-card.js new file mode 100644 index 0000000..5e3e3d0 --- /dev/null +++ b/src/components/awards-card.js @@ -0,0 +1,71 @@ +import React from 'react'; +import Link from 'gatsby-link'; +import '../css/bootstrap.css'; +import '../css/awards-card.scss'; + +class AwardsCard extends React.Component { + constructor(props) { + super(props); + this.state = { + organization: props.organization, + year: props.year, + cards: [ + { + award: props.cardsInfo[0].award, + title: props.cardsInfo[0].title, + author: props.cardsInfo[0].author + }, + { + award: props.cardsInfo[1].award, + title: props.cardsInfo[1].title, + author: props.cardsInfo[1].author + }, + { + award: props.cardsInfo[2].award, + title: props.cardsInfo[2].title, + author: props.cardsInfo[2].author + }, + { + award: props.cardsInfo[3].award, + title: props.cardsInfo[3].title, + author: props.cardsInfo[3].author + }, + { + award: props.cardsInfo[4].award, + title: props.cardsInfo[4].title, + author: props.cardsInfo[4].author + } + ] + }; + } + + renderAwardsList () { + return this.state.cards.map(function(e, i) { + let subtext = (e.title == "" ? e.author : + '"' + e.title + '"' + " by " + e.author); + return ( +

+ {e.award} +
+ {subtext} +

+ ); + }); + } + + render () { + return ( +
+
+

{this.state.organization}

+

{this.state.year}

+
+
+ {this.renderAwardsList()} +
+
+ ); + } +} + +export default AwardsCard; diff --git a/src/css/awards-card.scss b/src/css/awards-card.scss new file mode 100644 index 0000000..0bbba42 --- /dev/null +++ b/src/css/awards-card.scss @@ -0,0 +1,41 @@ +.box { + box-shadow: 0px 5px 8px rgba(38, 77, 104, 0.4); + width: 95%; + border-radius: 5px; + +} + +.box__subheader { + border-radius: 5px 5px 0px 0px; + background-color: #A5D2F0; + color: white; + font-family: BentonSans-Medium; + letter-spacing: 1px; +} + +.box__awardslist { + padding: 3% 7% 3% 7%; + font-family: BentonSans-Book; + color: #264D68; +} + +.box__subheader--title { + padding: 5% 7% 0% 7%; + text-align: center; + line-height: 1.5; + +} + +.box__subheader--year { + text-align: right; + padding-right: 5%; + padding-bottom: 3%; +} + +.list-item { + padding-bottom: 5px; +} + +.list-item__text{ + font-family: BentonSans-Medium; +} diff --git a/src/css/awards.scss b/src/css/awards.scss new file mode 100644 index 0000000..84ffa55 --- /dev/null +++ b/src/css/awards.scss @@ -0,0 +1,42 @@ +.blue_box { + margin: 0 auto; + width: 100%; + background-color: #264D68; + height: 50%; +} + +.panel { + background-color: #264D68; + width: 100%; + height: 30vw; + color: white; +} + +.panel__title { + font-family: BentonSans-Bold; + font-size: 48px; + text-align: center; +} + + +.panel__subtitle { + font-family: BentonSans-Book; + font-size: 13px; + width: 70%; + text-align: center; + margin: auto; + line-height: 1.8; +} + +.awards { + display: flex; +} + +.awards__left { + padding-left: 8%; + padding-right: 4%; +} + +.awards__right { + padding-right: 8%; +} diff --git a/src/css/bootstrap.css b/src/css/bootstrap.css index 6167622..f6b34bf 100644 --- a/src/css/bootstrap.css +++ b/src/css/bootstrap.css @@ -261,10 +261,10 @@ th { } } @font-face { - font-family: 'Glyphicons Halflings'; - - src: url('../fonts/glyphicons-halflings-regular.eot'); - src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); + /*font-family: 'Glyphicons Halflings'; + src: url('../../../static/fonts/glyphicons-halflings-regular.eot'); + src: url('../../../static/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../../../static/fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../../../static/fonts/glyphicons-halflings-regular.woff') format('woff'), url('../../../static/fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../../../static/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); + */ } .glyphicon { position: relative; diff --git a/src/layouts/index.js b/src/layouts/index.js index 9b3ed7f..8a92a4d 100644 --- a/src/layouts/index.js +++ b/src/layouts/index.js @@ -4,7 +4,7 @@ import Helmet from 'react-helmet' import Header from '../components/Header' import './index.css' -import '../../public/static/css/bootstrap.css' +import '../../static/bootstrap.css' const TemplateWrapper = ({ children }) => (
diff --git a/src/pages/awards.js b/src/pages/awards.js new file mode 100644 index 0000000..97963e7 --- /dev/null +++ b/src/pages/awards.js @@ -0,0 +1,72 @@ +import React from 'react'; +import Link from 'gatsby-link'; +{/*import '../css/bootstrap.css';*/} +import '../css/awards.scss'; +import AwardsCard from '../components/awards-card.js'; + + +//const AwardsPage = () => ( +class AwardsPage extends React.Component { + renderAwardsCards () { + {/*Need to do this for every AwardsCard in the set of organizations*/} + return ( + + ); + } + + render () { + return ( +
+
+
+

Awards & Honors

+

In recent years, the Daily Cal has earned dozens of awards on a regional and national level for its + comprehensive and high-quality coverage of UC Berkeley, the city of Berkeley and the entire UC system. In 2016, + the Society of Professional Journalists declared the Daily Californian to be the best daily student newspaper in + California, Nevada, Arizona and Hawaii. +

+
+
+
+ {this.renderAwardsCards()} +
+
+ {this.renderAwardsCards()} +
+
+
+ ); + } +} + +export default AwardsPage; diff --git a/bootstrap.css b/static/bootstrap.css similarity index 99% rename from bootstrap.css rename to static/bootstrap.css index 6167622..4ad3d58 100644 --- a/bootstrap.css +++ b/static/bootstrap.css @@ -261,10 +261,10 @@ th { } } @font-face { - font-family: 'Glyphicons Halflings'; - + /*font-family: 'Glyphicons Halflings'; src: url('../fonts/glyphicons-halflings-regular.eot'); src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); + */ } .glyphicon { position: relative; diff --git a/static/fonts/BentonSans-Black.otf b/static/fonts/BentonSans-Black.otf new file mode 100644 index 0000000..13a5e6b Binary files /dev/null and b/static/fonts/BentonSans-Black.otf differ diff --git a/static/fonts/BentonSans-Bold.otf b/static/fonts/BentonSans-Bold.otf new file mode 100644 index 0000000..35bd4a8 Binary files /dev/null and b/static/fonts/BentonSans-Bold.otf differ diff --git a/static/fonts/BentonSans-Book.otf b/static/fonts/BentonSans-Book.otf new file mode 100644 index 0000000..1fb7eb9 Binary files /dev/null and b/static/fonts/BentonSans-Book.otf differ diff --git a/static/fonts/BentonSans-BookItalic.otf b/static/fonts/BentonSans-BookItalic.otf new file mode 100644 index 0000000..98f87a9 Binary files /dev/null and b/static/fonts/BentonSans-BookItalic.otf differ diff --git a/static/fonts/BentonSans-Light.otf b/static/fonts/BentonSans-Light.otf new file mode 100644 index 0000000..afb6db2 Binary files /dev/null and b/static/fonts/BentonSans-Light.otf differ diff --git a/static/fonts/BentonSans-Medium.otf b/static/fonts/BentonSans-Medium.otf new file mode 100644 index 0000000..102daf6 Binary files /dev/null and b/static/fonts/BentonSans-Medium.otf differ diff --git a/static/fonts/glyphicons-halflings-regular.eot b/static/fonts/glyphicons-halflings-regular.eot new file mode 100644 index 0000000..b93a495 Binary files /dev/null and b/static/fonts/glyphicons-halflings-regular.eot differ diff --git a/static/fonts/glyphicons-halflings-regular.svg b/static/fonts/glyphicons-halflings-regular.svg new file mode 100644 index 0000000..5fee068 --- /dev/null +++ b/static/fonts/glyphicons-halflings-regular.svg @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/fonts/glyphicons-halflings-regular.ttf b/static/fonts/glyphicons-halflings-regular.ttf new file mode 100644 index 0000000..1413fc6 Binary files /dev/null and b/static/fonts/glyphicons-halflings-regular.ttf differ diff --git a/static/fonts/glyphicons-halflings-regular.woff b/static/fonts/glyphicons-halflings-regular.woff new file mode 100644 index 0000000..9e61285 Binary files /dev/null and b/static/fonts/glyphicons-halflings-regular.woff differ diff --git a/static/fonts/glyphicons-halflings-regular.woff2 b/static/fonts/glyphicons-halflings-regular.woff2 new file mode 100644 index 0000000..64539b5 Binary files /dev/null and b/static/fonts/glyphicons-halflings-regular.woff2 differ