diff --git a/README.md b/README.md index 897dc83..f1c2ed1 100644 --- a/README.md +++ b/README.md @@ -1,44 +1,53 @@ -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). +# Rejected.us - Share Your Rejection Stories -## Available Scripts - -In the project directory, you can run: +This project is a simple web application that displays a collection of "rejection stories" from various individuals, aiming to normalize and share these experiences. It was originally bootstrapped with Create React App. -### `npm start` +## Project Structure -Runs the app in the development mode.
-Open [http://localhost:3000](http://localhost:3000) to view it in the browser. +The main components of this application are: -The page will reload if you make edits.
-You will also see any lint errors in the console. +- `public/index.html`: The main HTML file. +- `src/index.js`: The entry point for the React application. +- `src/App.js`: The main application component that lays out the page and renders the list of stories. +- `src/Header.js`: The header component for the application. +- `src/Footer.js`: The footer component, including links for contributing. +- `src/Story.js`: A component responsible for rendering an individual story card. It takes a `story` object as a prop. +- `src/data/stories.js`: This file exports an array of JavaScript objects, where each object represents a story. Each story object contains details like `fullName`, `handle`, `avatar`, `story`, etc. -### `npm test` +## How to Contribute a Story -Launches the test runner in the interactive watch mode.
-See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. +We welcome contributions! To add your own rejection story: -### `npm run build` +1. Fork the repository. +2. Open the `src/data/stories.js` file. +3. Add a new story object to the array, following the existing format. Make sure to include: + * `fullName`: Your full name. + * `handle`: Your Twitter/X handle (or other relevant social media handle). + * `website`: A link to your website or social media profile. + * `bio`: A short bio. + * `avatar`: The filename of your avatar image (e.g., `yourname.jpg`). Place this image in the `public/images/` directory. + * `story`: Your rejection story. + * `double`: (Optional) Set to `true` if you think your story might benefit from a wider display format (currently not implemented but planned for future). +4. Create a new branch for your changes. +5. Commit your changes and open a pull request against the main repository. -Builds the app for production to the `build` folder.
-It correctly bundles React in production mode and optimizes the build for the best performance. +## Available Scripts -The build is minified and the filenames include the hashes.
-Your app is ready to be deployed! +In the project directory, you can run: -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. +### `npm start` -### `npm run eject` +Runs the app in the development mode. Open [http://localhost:3000](http://localhost:3000) to view it in the browser. The page will reload if you make edits. -**Note: this is a one-way operation. Once you `eject`, you can’t go back!** +### `npm test` -If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. +Launches the test runner in the interactive watch mode. -Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. +### `npm run build` -You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. +Builds the app for production to the `build` folder. It correctly bundles React in production mode and optimizes the build for the best performance. ## Learn More -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). - -To learn React, check out the [React documentation](https://reactjs.org/). +- [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started) +- [React documentation](https://reactjs.org/) diff --git a/public/index.html b/public/index.html index 1c9c61f..ff7ed4b 100644 --- a/public/index.html +++ b/public/index.html @@ -1,34 +1,41 @@ - + - - - - + + gtag("config", "UA-21008844-16"); + - - - - - - - - Rejected.us - - - -
- - + --> diff --git a/src/App.js b/src/App.js index f53530b..59cf6cb 100644 --- a/src/App.js +++ b/src/App.js @@ -1,39 +1,19 @@ import React from "react"; import Header from "./Header"; +import Footer from "./Footer.js"; import storiesData from "./data/stories.js"; +import Story from "./Story"; export default function App() { - const stories = storiesData.map((story) => { - return ( -
- {story.handle} - - {story.fullName} - - - - @{story.handle} - - - {story.bio} - - -

{story.story}

-
- ); - }); + const stories = storiesData.map((story) => { + return ; + }); - return ( -
-
-
{stories}
-
- ); + return ( +
+
+
{stories}
+
+
+ ); } diff --git a/src/Footer.js b/src/Footer.js new file mode 100644 index 0000000..b6b9ed4 --- /dev/null +++ b/src/Footer.js @@ -0,0 +1,18 @@ +import React from "react"; + +export default function Footer() { + return ( + + ); +} diff --git a/src/Header.js b/src/Header.js index 95f9bb0..b7c66d2 100644 --- a/src/Header.js +++ b/src/Header.js @@ -1,23 +1,11 @@ import React from "react"; export default function Header() { - return ( -
-
-

- We've all faced rejection. -

-
- To add your own rejection story, please{" "} - - open a PR - {" "} - or tweet me at @jkup -
-
- Created by Jon Kuperman -
-
-
- ); + return ( +
+

+ We've all faced rejection. +

+
+ ); } diff --git a/src/Story.js b/src/Story.js new file mode 100644 index 0000000..90fc03d --- /dev/null +++ b/src/Story.js @@ -0,0 +1,39 @@ +import React from 'react'; + +const Story = ({ story }) => { + const { double } = story; + + return ( +
+
+ + {story.handle} + +
+ {story.fullName} + + + @{story.handle} + + {story.bio} + +
+
+
{story.story}
+
+ ); +}; + +export default Story; diff --git a/src/index.css b/src/index.css index 5d1d961..3fd1da6 100644 --- a/src/index.css +++ b/src/index.css @@ -1,62 +1,156 @@ +* { + font-family: "Mulish", sans-serif; + font-weight: 500; + line-height: 1.6; + color: #282828; +} + body { - background: #3c3c3c; - font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", - Helvetica, Arial, "Lucida Grande", sans-serif; - font-weight: 300; - font-size: 16px; - line-height: 1.6; + background: #fcfaf6; + display: flex; + flex-direction: column; + block-size: 100svh; + overflow: hidden; +} + +.main-container { + display: flex; + flex-direction: column; + block-size: 100svh; + overflow-y: auto; } a { - color: #193549; - text-decoration-color: #ffc600; + color: #1da1f2; + text-decoration: none; +} + +:link { + color: #1da1f2; +} + +:visited { + color: #551a8b; +} + +:link:active, +:visited:active { + color: #ff0000; +} + +::selection { + background: #333; + color: #fff; } .Story.Rejection--width2 { - width: 600px; + inline-size: 600px; } -.App-style { - display: flex; - flex-wrap: wrap; - justify-content: center; +.app-container { + padding-block-start: 32px; + padding-block-end: 16px; + overflow-y: auto; + display: flex; + flex-wrap: wrap; + row-gap: 24px; + column-gap: 24px; + + justify-content: center; } .app-header { - background: white; - border-bottom: 8px solid #56c6c0; - padding-bottom: 20px; - text-align: center; + flex-shrink: 0; + background: white; + border-block-end: 4px solid #282828; + text-align: center; +} + +.app-footer { + display: flex; + align-items: center; + flex-wrap: wrap; + justify-content: space-between; + flex-shrink: 0; + background: white; + padding-inline: 24px; + border-block-start: 2px solid #282828; + font-size: 12px; + color: #666570; +} + +.story { + /* border: 7px solid #5b5b5b; */ + box-sizing: border-box; + border-radius: 24px; + padding: 24px; + margin-inline: 12px; + inline-size: 400px; + content-visibility: auto; + text-wrap: pretty; + block-size: max-content; +} + +.story-header { + display: flex; + flex-wrap: wrap; + gap: 12px; +} + +.story-header-image { + display: flex; + flex-shrink: 0; + inline-size: 72px; + block-size: 72px; + border-radius: 50%; + overflow: hidden; +} + +.story-header-image .story-image { + max-inline-size: 100%; + max-block-size: 100%; + object-fit: cover; + aspect-ratio: 1; +} + +.story-header-info { + flex: 1; + display: flex; + flex-direction: column; + gap: 4px; +} + +.story-fullname { + font-size: 1rem; + font-weight: 600; } -.app-title { - margin: 0 0 20px 0; +.story-bio-container { + display: inline-flex; + align-items: center; + column-gap: 8px; + row-gap: 2px; + flex-wrap: wrap; } -.Story { - background: white; - border: 7px solid #5b5b5b; - box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); - box-sizing: border-box; - clear: both; - margin: 10px; - padding: 10px; - width: 400px; +.story-bio { + font-size: 12px; } -.Story-image { - float: left; - margin-right: 10px; - width: 100px; +.story-desc { + font-family: "Comic Neue", cursive; + font-weight: 500; + line-height: 1.5; + margin-block-start: 12px; + margin-block-end: 0; + margin-inline: 0; + font-weight: 500; } -.Story-fullname { - display: flex; - font-weight: bold; +.story-desc:first-letter { + font-size: 2em; } -.Story-bio { - color: #193549; - font-weight: bold; - font-size: 12px; +.story-desc:first-line { + font-weight: bold; }