12 | 11 dolor sit amet, consectetur adipiscing elit. Curabitur nec blandit leo. Praesent malesuada neque fringilla lacus varius, at dignissim mauris efficitur.
13 | Etiam et eros quis nisl finibus pellentesque. Proin a magna sollicitudin, consequat sem id, maximus ante. Suspendisse ultrices massa in finibus viverra.
14 | Fusce sit amet congue turpis.
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
Learn more!
25 |
26 |
27 |
28 | );
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "forum",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^4.2.4",
7 | "@testing-library/react": "^9.5.0",
8 | "@testing-library/user-event": "^7.2.1",
9 | "autosize": "^4.0.2",
10 | "history": "^5.0.0",
11 | "install": "^0.13.0",
12 | "npm": "^6.14.8",
13 | "react": "^16.13.1",
14 | "react-dom": "^16.13.1",
15 | "react-icons": "^3.11.0",
16 | "react-router-dom": "^5.2.0",
17 | "react-scripts": "3.4.3"
18 | },
19 | "scripts": {
20 | "predeploy": "npm run build",
21 | "deploy": "gh-pages -d build",
22 | "start": "react-scripts start",
23 | "build": "react-scripts build",
24 | "test": "react-scripts test",
25 | "eject": "react-scripts eject"
26 | },
27 | "eslintConfig": {
28 | "extends": "react-app"
29 | },
30 | "browserslist": {
31 | "production": [
32 | ">0.2%",
33 | "not dead",
34 | "not op_mini all"
35 | ],
36 | "development": [
37 | "last 1 chrome version",
38 | "last 1 firefox version",
39 | "last 1 safari version"
40 | ]
41 | },
42 | "devDependencies": {
43 | "@svgr/webpack": "^5.4.0",
44 | "gh-pages": "^3.1.0"
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/src/Home.css:
--------------------------------------------------------------------------------
1 | .home-container {
2 | margin-top: 7vh;
3 | margin-left: 16vw;
4 | width: 35vw;
5 | }
6 |
7 | .learn-more {
8 | display: flex;
9 | flex-direction: row;
10 | cursor: initial;
11 | font-size: 18px;
12 | font-weight: bold;
13 | margin-top: 30px;
14 | letter-spacing: 0.5px;
15 | margin-left: 0.25vw;
16 | }
17 |
18 | .play-o {
19 | cursor: pointer;
20 | border-radius: 50%;
21 | background: var(--gradient);
22 | width: 56px;
23 | height: 56px;
24 | margin-right: 15px;
25 | transition: margin-right 250ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
26 | }
27 | .play-o:hover {
28 | transition: margin-right 250ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
29 | margin-right: 20px;
30 | }
31 | .play-o:hover > .play-i > .play-svg {
32 | transform: translateY(1px);
33 | }
34 |
35 | .play-i {
36 | position: relative;
37 | border-radius: 50%;
38 | margin: 4px;
39 | width: 48px;
40 | height: 48px;
41 | background-color: var(--background);
42 | box-shadow: 0 0 10px 2px transparent;
43 |
44 | display: flex;
45 | }
46 | .play-o:hover > .play-i {
47 | box-shadow: 0 0 12px 1px #ff6600;
48 | }
49 | .play-svg {
50 | display: block;
51 | margin: auto;
52 | width: 26px;
53 | height: 26px;
54 |
55 | position: relative;
56 | left: 3px;
57 | }
58 |
59 | .learn-more > .label {
60 | margin-block: auto;
61 | }
62 |
63 | @media only screen and (max-width: 560px) {
64 | .home-container {
65 | padding-left: 4vw;
66 | padding-right: 4vw;
67 | margin-left: 0;
68 | margin-right: 0;
69 | width: auto;
70 | flex-flow: column;
71 | margin-left: 0;
72 | text-align: center;
73 | }
74 | .learn-more {
75 | margin-top: 20px;
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
2 |
3 | ## Available Scripts
4 |
5 | In the project directory, you can run:
6 |
7 | ### `npm start`
8 |
9 | Runs the app in the development mode.
10 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
11 |
12 | The page will reload if you make edits.
13 | You will also see any lint errors in the console.
14 |
15 | ### `npm test`
16 |
17 | Launches the test runner in the interactive watch mode.
18 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
19 |
20 | ### `npm run build`
21 |
22 | Builds the app for production to the `build` folder.
23 | It correctly bundles React in production mode and optimizes the build for the best performance.
24 |
25 | The build is minified and the filenames include the hashes.
26 | Your app is ready to be deployed!
27 |
28 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
29 |
30 | ### `npm run eject`
31 |
32 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!**
33 |
34 | 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.
35 |
36 | 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.
37 |
38 | 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.
39 |
40 | ## Learn More
41 |
42 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
43 |
44 | To learn React, check out the [React documentation](https://reactjs.org/).
45 |
46 | ### Code Splitting
47 |
48 | This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
49 |
50 | ### Analyzing the Bundle Size
51 |
52 | This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
53 |
54 | ### Making a Progressive Web App
55 |
56 | This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
57 |
58 | ### Advanced Configuration
59 |
60 | This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
61 |
62 | ### Deployment
63 |
64 | This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
65 |
66 | ### `npm run build` fails to minify
67 |
68 | This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
69 |
--------------------------------------------------------------------------------
/src/VkLogo.js:
--------------------------------------------------------------------------------
1 | import * as React from "react";
2 |
3 | function SvgVk(props) {
4 | return (
5 |
11 | );
12 | }
13 |
14 | export default SvgVk;
15 |
--------------------------------------------------------------------------------
/src/App.js:
--------------------------------------------------------------------------------
1 | import React, { PureComponent } from "react";
2 | import { DiGithubAlt } from "react-icons/di";
3 | import { ImFacebook, ImTwitter } from "react-icons/im";
4 | import { HashRouter, Link, Redirect, Route, Switch } from "react-router-dom";
5 | import About from "./About";
6 | import "./App.css";
7 | import Contact from "./Contact";
8 | import Home from "./Home";
9 | import "./Transitions.css";
10 | import VkLogo from "./VkLogo";
11 |
12 | export default class App extends PureComponent {
13 | constructor() {
14 | super();
15 |
16 | this.iconSize = "27px";
17 | this.shareIcons = [
18 | {el: DiGithubAlt, link: "https://github.com/jiftoo/"},
19 | {el: ImTwitter, link: "https://github.com/jiftoo/"},
20 | {el: VkLogo, link: "https://github.com/jiftoo/"},
21 | {el: ImFacebook, link: "https://github.com/jiftoo/"},
22 | ];
23 |
24 | this.animationTimeout = -1;
25 |
26 | this.state = {
27 | white: false,
28 | pageIndex: 0,
29 | links: this.shareIcons.map((icon, i) => (
30 | {
32 | this.setWhiteActive(ev.target, true);
33 | this.animationTimeout = setTimeout(() => this.setWhiteActive(null, false), 4000);
34 | }}
35 | href={icon.link}
36 | key={i}
37 | >
38 | {React.createElement(icon.el, {size: this.iconSize})}
39 |
40 | )),
41 | };
42 |
43 | this.unloadHandler = this.unloadHandler.bind(this);
44 | }
45 |
46 | // Clear the animation on unload, after the user presses the back button after going to one of the social links
47 | unloadHandler(event) {
48 | clearTimeout(this.animationTimeout);
49 | this.setWhiteActive(null, false);
50 | }
51 | componentDidMount() {
52 | window.addEventListener("unload", this.unloadHandler);
53 | }
54 | componentWillUnmount() {
55 | window.removeEventListener("unload", this.unloadHandler);
56 | }
57 |
58 | setWhiteActive(target, bool) {
59 | if (bool) {
60 | target.classList.add("share-container-expand");
61 | document.getElementById("not-buttons").classList.add("fade-out");
62 | } else {
63 | document.querySelectorAll(".fade-out, .share-container-expand").forEach((el) => el.classList.remove("fade-out", "share-container-expand"));
64 | }
65 | }
66 |
67 | setLocation(pageIndex) {
68 | this.setState({pageIndex});
69 | }
70 |
71 | render() {
72 | return (
73 |
74 |