-
-
Notifications
You must be signed in to change notification settings - Fork 272
Better press page #196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Better press page #196
Changes from 14 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
28d8c96
Better Styling for press page
dirtyredz 608e1b8
Added 3 lists for the "In The News" section.
dirtyredz 79b2ebc
Update Button test for onClick
dirtyredz 7bcd8c4
Tests for PressLinks components
dirtyredz 3e40e85
Merge from master
dirtyredz 8201dea
Move PressLinks into Press
dirtyredz bbc413a
Use proper press import
dirtyredz dd5cae3
Ignore Links data structure
dirtyredz c8bf708
Merge branch 'master' into BetterPressPage
dirtyredz cd0ab2c
Merge branch 'master' into BetterPressPage
dirtyredz 1c39db4
Merge branch 'master' into BetterPressPage
kylemh 361aca7
Merge branch 'master' into BetterPressPage
kylemh 4886c07
Merge branch 'master' into BetterPressPage
kylemh 8c0728a
Merge branch 'master' into BetterPressPage
dirtyredz 16cb650
Changes for project consistancy and readability
dirtyredz 0945f7c
Press Articles readability, and fixed tests
dirtyredz b143fb4
Pass aria and data attributes to button
dirtyredz ed500fa
Nested Class instead of element class (still winning the war)
dirtyredz e53cabd
Using datum prop button
dirtyredz eab9302
Asc Order on objects
dirtyredz 970e76b
Check if prop actually exists
dirtyredz c15cf7c
Moved ArticleItem to its own directory and renamed ArticleGroup
dirtyredz 9a5f669
Use module resolved paths instead of relative paths
kylemh b9c0f9f
Rename component class
kylemh 5ad37dc
Rename test suite
kylemh 404d84b
Update ArticleGroup.test.js.snap
kylemh 0c7d7e5
Dont use snapshot in data and aria testing
dirtyredz 55e18a2
Use Region and Article for easier readability
dirtyredz 7cc32a3
Remove dead comments and simplify rendering logic
kylemh 5c34b9c
Specify disabled rule and use resolved path
kylemh fc0af68
Resolve lint error and rendering error
kylemh 2ab4333
Put missing required prop in test case
kylemh 5b08534
Retry the refactor 😅
kylemh dce7e88
Add required prop to <OutboundLink /> on <ArticleGroup />
kylemh 03a1542
Updated Snap
dirtyredz cc2c97d
Merge branch 'master' into BetterPressPage
kylemh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,6 +28,7 @@ body { | |
| line-height: 1.5; | ||
| hyphens: none; | ||
| margin: 0; | ||
| min-width: 300px; | ||
| } | ||
|
|
||
| h1, | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| import React, { Component } from 'react'; | ||
| import PropTypes from 'prop-types'; | ||
| import styles from './PressLinks.css'; | ||
| import OutboundLink from '../../_common_/OutboundLink/OutboundLink'; | ||
| import Button from '../../_common_/Button/Button'; | ||
|
|
||
| class LinkGroup extends Component { | ||
| static propTypes = { | ||
| title: PropTypes.string.isRequired, | ||
| links: PropTypes.arrayOf( | ||
| PropTypes.shape({ | ||
| url: PropTypes.string.isRequired, | ||
| title: PropTypes.string.isRequired, | ||
| }), | ||
| ).isRequired, | ||
| MaxLinks: PropTypes.number.isRequired, | ||
| }; | ||
|
|
||
| state = { | ||
| ShowAll: false, | ||
dirtyredz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }; | ||
|
|
||
| clickHandler = () => { | ||
| const { ShowAll } = this.state; | ||
| this.setState({ ShowAll: !ShowAll }); | ||
dirtyredz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }; | ||
|
|
||
| render() { | ||
| const { ShowAll } = this.state; | ||
| const { title, links, MaxLinks } = this.props; | ||
| return ( | ||
| <div className={styles.articlesGroup}> | ||
| <h2>{title}</h2> | ||
| <ul> | ||
| {links.map((link, index) => { | ||
| if (index >= MaxLinks && !ShowAll) { | ||
| return null; | ||
| } | ||
| return ( | ||
| <li key={`GroupLink_${link.url}`}> | ||
| <OutboundLink href={link.url}>{link.title}</OutboundLink> | ||
| </li> | ||
| ); | ||
| })} | ||
| </ul> | ||
| {links.length > MaxLinks && ( | ||
| <Button | ||
| aria-pressed={ShowAll} // this needs to be passed and accepted by the button component | ||
dirtyredz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| className={styles.ShowAllButton} | ||
dirtyredz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| theme={ShowAll ? 'slate' : 'primary'} | ||
| onClick={this.clickHandler} | ||
| > | ||
| {ShowAll ? 'Show Less' : 'Show All'} | ||
| </Button> | ||
| )} | ||
| </div> | ||
| ); | ||
| } | ||
| } | ||
|
|
||
| export default LinkGroup; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,211 @@ | ||
| const Boston = [ | ||
| { | ||
| url: 'https://insights.dice.com/2017/01/11/tech-pros-volunteer-fun-ways/', | ||
| title: 'How Tech Pros Can Volunteer in Fun Ways', | ||
| }, | ||
| { | ||
| url: | ||
| 'https://www.necn.com/news/business/MassChallenge-Finnest_-Operation-Code_-Sunrise-Health_NECN-441063423.html', | ||
| title: 'MassChallenge Finalists: Finnest, Operation Code, Sunrise Health', | ||
| }, | ||
| { | ||
| url: 'http://www.wickedbandwidth.com/02072017-techbreakfast-microsoft-nerd/', | ||
| title: 'TechBreakfast at Microsoft NERD', | ||
| }, | ||
| { | ||
| url: 'https://www.youtube.com/watch?v=YGaG_HL3oEQ', | ||
| title: 'Operation Code - #BNT80 Boston New Technology Startup Demo', | ||
| }, | ||
| { | ||
| url: 'https://www.youtube.com/watch?v=GcvVsVsH-Gg', | ||
| title: 'MassChallenge Finalist | Operation Code | Conrad Hollomon', | ||
| }, | ||
| { | ||
| url: | ||
| 'https://venturefizz.com/stories/boston/operation-code-creating-coding-community-veterans-and-citizens', | ||
| title: 'Operation Code – Creating a Coding Community with Veterans and Citizens', | ||
| }, | ||
| { | ||
| url: 'https://www.deepcoredata.com/innovation-spotlight-veterans-mission-operation-code/', | ||
| title: 'Innovation Spotlight: Operation Code', | ||
| }, | ||
| { | ||
| url: 'https://blogs.microsoft.com/newengland/2017/11/10/tech4vets-masschallenge-veterans/', | ||
| title: 'tech4vets Masschallenge Veterans', | ||
| }, | ||
| ]; | ||
|
|
||
| const General = [ | ||
| { | ||
| url: | ||
| 'https://blog.opportunityatwork.org/techhire-educator-spotlight-operation-code-debd0a796f9d', | ||
| title: 'TechHire Educator Spotlight: Operation Code', | ||
| }, | ||
| { | ||
| url: 'https://www.switchup.org/blog/why-veterans-will-make-excellent-programmers', | ||
| title: 'Why Veterans Will Make Excellent Programmers', | ||
| }, | ||
| { | ||
| url: 'https://www.wired.com/story/thousands-of-veterans-want-to-learn-to-code-but-cant/', | ||
| title: 'THOUSANDS OF VETERANS WANT TO LEARN TO CODE — BUT CAN’T', | ||
| }, | ||
| { | ||
| url: | ||
| 'https://medium.com/the-hum/hacking-entrepreneurship-an-interview-with-david-molina-of-operation-code-12a7e199e4e0', | ||
| title: 'Hacking Entrepreneurship — An Interview with David Molina of Operation Code', | ||
| }, | ||
| { | ||
| url: | ||
| 'https://medium.com/operation-code/a-marine-vets-path-into-coding-brings-him-back-home-4fcf5645d740', | ||
| title: 'A Marine Vet’s Path into Coding Brings Him Back Home', | ||
| }, | ||
| { | ||
| url: 'http://blog.teamtreehouse.com/operation-code-connecting-veterans-with-code', | ||
| title: 'Operation Code: Connecting Veterans with Code Skills', | ||
| }, | ||
| { | ||
| url: 'https://blog.github.com/2016-11-11-operation-code-connecting-tech-and-veterans/', | ||
| title: 'Operation Code: connecting tech and veterans', | ||
| }, | ||
| { | ||
| url: | ||
| 'https://www.geekwire.com/2016/call-duty-technology-veterans-rally-support-operation-code/', | ||
| title: | ||
| 'When the call of duty is technology, veterans rally to support each other through Operation Code', // eslint-disable-line | ||
| }, | ||
| { | ||
| url: 'https://www.youtube.com/watch?v=qoy7scC2SHk', | ||
| title: 'Get Coding Now with Operation Code Army Veteran and Founder David Molina', | ||
| }, | ||
| { | ||
| url: 'https://www.youtube.com/watch?v=xN7yMoe38xc', | ||
| title: 'The New Developer - Operation Code - GitHub Universe 2016', | ||
| }, | ||
| { | ||
| url: 'https://www.youtube.com/watch?v=-wSwlLeKFdE', | ||
| title: 'What happens when military veterans learn to code - CodeConf 2016', | ||
| }, | ||
| { | ||
| url: 'https://opensource.com/article/17/4/operation-code-mentors-veterans', | ||
| title: 'How Operation Code helps veterans learn programming skills', | ||
| }, | ||
| { | ||
| url: | ||
| 'https://softwareengineeringdaily.com/2016/03/20/helping-veterans-learn-code-david-molina/', | ||
| title: 'Helping Veterans Learn to Code with David Molina', | ||
| }, | ||
| { | ||
| url: 'https://developingstory.netlify.com/tds-66-david-molina-from-operation-code', | ||
| title: 'Podcast: a developing story as told by developers', | ||
| }, | ||
| { | ||
| url: 'https://www.instagram.com/p/21p5bFxUjd/?taken-by=davidcmolina', | ||
| title: 'Instagram: David Molina', | ||
| }, | ||
| { | ||
| url: | ||
| 'http://blog.teamtreehouse.com/from-aviation-electrician-to-back-end-engineering-bret-funk-operation-code-story', | ||
| title: 'From Aviation Electrician to Back End Engineering: Bret Funk’s Operation Code story', | ||
| }, | ||
| { | ||
| url: | ||
| 'http://blog.teamtreehouse.com/navy-veteran-to-software-developer-geno-guerreros-operation-code-story', | ||
| title: 'Navy Veteran to Software Developer: Geno Guerrero’s Operation Code Story', | ||
| }, | ||
| { | ||
| url: 'http://blog.teamtreehouse.com/marine-corps-veteran-front-end-developer-billy-le', | ||
| title: 'From Marine Corps Veteran to Front End Developer: Billy Le’s Operation Code Story', | ||
| }, | ||
| { | ||
| url: 'https://techcrunch.com/2015/11/11/few-options-for-veterans-looking-to-enter-tech/', | ||
| title: 'Few Options For Veterans Looking To Enter Tech', | ||
| }, | ||
| { | ||
| url: | ||
| 'https://www.ibtimes.com/coding-boot-camps-go-after-veterans-take-silicon-valleys-vacant-tech-jobs-2174421', | ||
| title: "Coding Boot Camps Go After Veterans To Take Silicon Valley's Vacant Tech Jobs", | ||
| }, | ||
| { | ||
| url: 'https://www.makeschool.com/blog/20-diversity-and-inclusion-leaders-to-follow-in-2018', | ||
| title: '20 Diversity and Inclusion Leaders to Follow in 2018', | ||
| }, | ||
| { | ||
| url: | ||
| 'http://bitshare.cm/news/tech-innovation-meets-military-service-geekwires-memorial-day-remembrance-and-update/', | ||
| title: 'Tech innovation meets military service: GeekWire’s Memorial Day remembrance and update', | ||
| }, | ||
| { | ||
| url: 'https://www.millennialaction.org/press-archives/vetstechpr', | ||
| title: "MAP HOSTS CONGRESSIONAL BRIEFING ON VETERANS' READINESS IN TECH CAREERS", | ||
| }, | ||
| { | ||
| url: | ||
| 'https://www.advfn.com/news_Analytics-Pros-Inc-Hosts-Training-for-Veterans-a_72657464.html', | ||
| title: "Analytics Pros, Inc. Hosts Training for Veterans and Veterans' Spouses", | ||
| }, | ||
| { | ||
| url: | ||
| 'http://mentoringdevelopers.com/episode-36-how-to-pick-a-programming-language-to-learn-for-new-developers-part-2/', | ||
| title: 'Episode 36 – How to pick a programming language to learn for new developers – Part 2', | ||
| }, | ||
| { | ||
| url: 'https://www.blogs.va.gov/VAntage/33028/upskill-veterans-training-technology-jobs/', | ||
| title: 'How to “upskill” Veterans’ training for technology jobs', | ||
| }, | ||
| { | ||
| url: 'https://www.instagram.com/p/BbZT3Q-BBDC/', | ||
| title: 'Instagram: Operation Code made the front cover of Oregon Veterans News Magazine', | ||
| }, | ||
| { | ||
| url: 'https://blog.sabio.la/jameel-from-jarhead-to-softwareengineer-9130702da5c1', | ||
| title: 'Jameel: From Marines to SoftwareEngineer', | ||
| }, | ||
| { | ||
| url: | ||
| 'https://www.seattletimes.com/business/technology/seattles-code-fellows-wins-approval-under-gi-bill/', | ||
| title: 'Seattle coding-school tuition to be covered by GI Bill', | ||
| }, | ||
| { | ||
| url: | ||
| 'https://www.koin.com/news/veteran-gi-bill-should-cover-code-school_20180208085618706/960235415', | ||
| title: 'Veteran: GI Bill should cover code school', | ||
| }, | ||
| { | ||
| url: 'http://patriotbootcamp.org/blog/operation-code', | ||
| title: | ||
| 'Patriot Boot Camp And Operation Code Join Forces To Help Military Veterans Become Technology Entrepreneurs', // eslint-disable-line | ||
| }, | ||
| { | ||
| url: 'http://www.maswired.com/operation-code-wants-veterans-to-work-in-tech/', | ||
| title: 'Operation Code wants veterans to work in tech', | ||
| }, | ||
| { | ||
| url: 'http://diversemilitary.net/2017/06/27/coding-bootcamps-accepts-gi-bill/', | ||
| title: 'Coding Bootcamps Accepts GI Bill', | ||
| }, | ||
| { | ||
| url: | ||
| 'https://news.clearancejobs.com/2017/07/17/operation-code-looks-help-veterans-land-careers/', | ||
| title: 'Operation Code Looks to Help Veterans Land IT Careers', | ||
| }, | ||
| ]; | ||
|
|
||
| const NYC = [ | ||
| { | ||
| url: | ||
| 'https://wtkr.com/2018/05/16/new-program-aims-to-help-veterans-land-jobs-in-tech-industry/', | ||
| title: 'New program aims to help veterans land jobs in tech industry', | ||
| }, | ||
| { | ||
| url: | ||
| 'http://www.wdtv.com/content/news/Veterans-in-Residence-program-helping-veterans-grow-businesses-482707221.html', | ||
| title: 'Veterans in Residence', | ||
| }, | ||
| { | ||
| url: | ||
| 'https://www.wework.com/blog/posts/after-flying-solo-veterans-find-others-who-have-their-back', | ||
| title: 'After Flying Solo, Veterans Find Others Who Have Their Backs', | ||
| }, | ||
| ]; | ||
|
|
||
| export { NYC, Boston, General }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| .logos a { | ||
| color: #249cbc; | ||
| text-decoration: none; | ||
| } | ||
|
|
||
| .logos .articlesGroup > h2 { | ||
| text-align: center; | ||
| } | ||
|
|
||
| .logos .articlesGroup { | ||
| width: 375px; | ||
| padding-top: 15px; | ||
| } | ||
|
|
||
| @media screen and (max-width: 414px) { | ||
dirtyredz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| .logos .articlesGroup { | ||
| width: 275px; | ||
| } | ||
| } | ||
|
|
||
| .flexContainer { | ||
| width: 100%; | ||
| display: flex; | ||
| flex-flow: row wrap; | ||
| justify-content: space-around; | ||
| padding: 15px 0 0 0; | ||
| } | ||
|
|
||
| button.ShowAllButton { | ||
dirtyredz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| min-width: 100px; | ||
| line-height: 0.5; | ||
| font-size: 0.9rem; | ||
| margin: auto; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| import React from 'react'; | ||
| import PropTypes from 'prop-types'; | ||
| import styles from './PressLinks.css'; | ||
| import * as Links from './Links'; | ||
| import LinkGroup from './LinkGroup'; | ||
|
|
||
| PressLinks.propTypes = { | ||
| MaxLinks: PropTypes.number, | ||
| }; | ||
|
|
||
| PressLinks.defaultProps = { | ||
| MaxLinks: 5, | ||
| }; | ||
|
|
||
| function PressLinks({ MaxLinks }) { | ||
| return ( | ||
| <div className={styles.logos}> | ||
| <div className={styles.flexContainer}> | ||
| {Object.keys(Links).map(group => ( | ||
| <LinkGroup | ||
| key={`LinkGroup_${group}`} | ||
dirtyredz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| title={group} | ||
| links={Links[group]} | ||
| MaxLinks={MaxLinks} | ||
| /> | ||
| ))} | ||
| </div> | ||
| </div> | ||
| ); | ||
| } | ||
|
|
||
| export default PressLinks; | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.