├── .editorconfig ├── .eslintignore ├── .eslintrc.json ├── .gitignore ├── README.md ├── babel.config.js ├── next-env.d.ts ├── next.config.js ├── package.json ├── prettier.config.js ├── public ├── _redirects ├── background.webp ├── favicon.ico ├── github-banner.jpg └── logo.webp ├── src ├── components │ ├── Anchor │ │ └── index.ts │ ├── Footer │ │ ├── index.tsx │ │ └── styles.ts │ ├── Header │ │ ├── index.tsx │ │ └── styles.ts │ └── PageContainer │ │ ├── index.tsx │ │ └── styles.ts ├── pages │ ├── _app.tsx │ ├── _document.tsx │ └── index.tsx └── styles │ ├── global.ts │ ├── pages │ └── Home.ts │ ├── styled.d.ts │ └── theme.ts ├── tsconfig.json └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | charset = utf-8 7 | end_of_line = lf 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .next 3 | /*.js -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "es2020": true, 5 | "node": true, 6 | "jest": true 7 | }, 8 | "extends": [ 9 | "plugin:react/recommended", 10 | "standard", 11 | "plugin:@typescript-eslint/recommended", 12 | "prettier/@typescript-eslint", 13 | "prettier/standard", 14 | "prettier/react" 15 | ], 16 | "parser": "@typescript-eslint/parser", 17 | "parserOptions": { 18 | "ecmaFeatures": { 19 | "jsx": true 20 | }, 21 | "ecmaVersion": 12, 22 | "sourceType": "module" 23 | }, 24 | "plugins": [ 25 | "react", 26 | "@typescript-eslint", 27 | "prettier" 28 | ], 29 | "rules": { 30 | "prettier/prettier": "error", 31 | "space-before-function-paren": "off", 32 | "react/prop-types": "off" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | # local env files 28 | .env.local 29 | .env.development.local 30 | .env.test.local 31 | .env.production.local 32 | 33 | # vercel 34 | .vercel 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # web-opensources-courses 2 | 3 | > Cursos gratuito de TI para toda comunidade, vamos democratizar nossos conhecimentos para contruir um futuro melhor juntos. 4 | 5 | Criado por [Odenir Gomes](https://github.com/odenirdev). 6 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ["next/babel"], 3 | plugins: [ 4 | ["styled-components", { "ssr": true }], 5 | "inline-react-svg" 6 | ] 7 | }; 8 | -------------------------------------------------------------------------------- /next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | /// 4 | -------------------------------------------------------------------------------- /next.config.js: -------------------------------------------------------------------------------- 1 | const withImages = require('next-images') 2 | 3 | module.exports = withImages({ 4 | esModule: true, 5 | }) 6 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web-opensources-courses", 3 | "description": "Cursos gratuito de TI para toda comunidade, vamos democratizar nossos conhecimentos para contruir um futuro melhor juntos", 4 | "version": "1.0.0", 5 | "private": true, 6 | "scripts": { 7 | "dev": "next dev", 8 | "build": "next build", 9 | "start": "next start" 10 | }, 11 | "dependencies": { 12 | "axios": "^0.26.1", 13 | "next": "9.5.2", 14 | "next-images": "^1.4.1", 15 | "react": "16.13.1", 16 | "react-dom": "16.13.1", 17 | "react-icons": "^4.3.1", 18 | "styled-components": "^5.1.1" 19 | }, 20 | "devDependencies": { 21 | "@netlify/plugin-nextjs": "^4.3.0", 22 | "@types/node": "^14.6.0", 23 | "@types/react": "^16.9.46", 24 | "@types/styled-components": "^5.1.2", 25 | "@typescript-eslint/eslint-plugin": "^3.9.1", 26 | "@typescript-eslint/parser": "^3.9.1", 27 | "babel-plugin-inline-react-svg": "^1.1.1", 28 | "eslint": "^7.7.0", 29 | "eslint-config-prettier": "^6.11.0", 30 | "eslint-config-standard": "^14.1.1", 31 | "eslint-plugin-import": "^2.22.0", 32 | "eslint-plugin-node": "^11.1.0", 33 | "eslint-plugin-prettier": "^3.1.4", 34 | "eslint-plugin-promise": "^4.2.1", 35 | "eslint-plugin-react": "^7.20.6", 36 | "eslint-plugin-standard": "^4.0.1", 37 | "prettier": "^2.1.0", 38 | "typescript": "^4.0.2" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /prettier.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | semi: false, 3 | singleQuote: true, 4 | arrowParens: 'avoid', 5 | trailingComma: 'none', 6 | endOfLine: 'auto' 7 | }; -------------------------------------------------------------------------------- /public/_redirects: -------------------------------------------------------------------------------- 1 | /* /index.html 200 2 | -------------------------------------------------------------------------------- /public/background.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensource-university/web/7adf908febd6d3c693d99ca69e614b442584e712/public/background.webp -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensource-university/web/7adf908febd6d3c693d99ca69e614b442584e712/public/favicon.ico -------------------------------------------------------------------------------- /public/github-banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensource-university/web/7adf908febd6d3c693d99ca69e614b442584e712/public/github-banner.jpg -------------------------------------------------------------------------------- /public/logo.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/opensource-university/web/7adf908febd6d3c693d99ca69e614b442584e712/public/logo.webp -------------------------------------------------------------------------------- /src/components/Anchor/index.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components' 2 | 3 | export const Anchor = styled.a` 4 | min-height: 42px; 5 | padding: 0.5rem 2rem; 6 | background: linear-gradient(98deg, #42a539 80%, #56c5ff 100%); 7 | 8 | display: flex; 9 | align-items: center; 10 | 11 | color: var(--white); 12 | text-transform: uppercase; 13 | font: 700 2rem var(--font); 14 | 15 | text-decoration: none; 16 | 17 | border-radius: 4px; 18 | 19 | cursor: pointer; 20 | ` 21 | -------------------------------------------------------------------------------- /src/components/Footer/index.tsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from 'react' 2 | import { FiChevronUp } from 'react-icons/fi' 3 | import axios from 'axios' 4 | 5 | import { Anchor } from '../Anchor' 6 | 7 | import * as S from './styles' 8 | 9 | interface Contributor { 10 | src: string 11 | avatar: string 12 | } 13 | 14 | export const Footer: React.FC = () => { 15 | const [contributors, setContributors] = useState([]) 16 | 17 | const parseContributor = (value: any) => { 18 | return { 19 | avatar: value.avatar_url, 20 | src: value.html_url 21 | } 22 | } 23 | 24 | useEffect(() => { 25 | ;(async () => { 26 | const response = await axios.get( 27 | 'https://api.github.com/repos/opensource-courses/courses/contributors' 28 | ) 29 | const serializedContributors = response.data.map(value => 30 | parseContributor(value) 31 | ) 32 | 33 | setContributors(serializedContributors) 34 | })() 35 | }, []) 36 | 37 | return ( 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | {contributors.map((contributor, index) => ( 46 | 52 | 53 | 54 | ))} 55 | 56 | 57 |

MIT License (c) 2022 Opensource Courses

58 | 59 | 60 | 61 | 62 |
63 |
64 | ) 65 | } 66 | -------------------------------------------------------------------------------- /src/components/Footer/styles.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components' 2 | 3 | export const Container = styled.div` 4 | display: flex; 5 | align-items: center; 6 | 7 | position: relative; 8 | 9 | min-height: var(--footer-height); 10 | 11 | backdrop-filter: blur(3px); 12 | box-shadow: 0 0 5px #000; 13 | 14 | a { 15 | color: var(--secundary); 16 | } 17 | 18 | .logo { 19 | height: 3.5rem; 20 | } 21 | 22 | .gotoTop { 23 | transform: translateY(-50%); 24 | 25 | position: absolute; 26 | right: 2rem; 27 | top: 0; 28 | 29 | width: 42px; 30 | height: 42px; 31 | 32 | color: var(--white); 33 | background: var(--primary); 34 | padding: 0; 35 | 36 | display: flex; 37 | justify-content: center; 38 | align-items: center; 39 | } 40 | 41 | p { 42 | font-size: 1rem; 43 | text-align: center; 44 | 45 | @media (max-width: 768px) { 46 | margin: 2rem 0; 47 | font-size: 1.3rem; 48 | } 49 | } 50 | ` 51 | 52 | export const Grid = styled.div` 53 | width: 100%; 54 | max-width: 1080px; 55 | 56 | margin: 0 auto; 57 | padding: 0 2rem; 58 | 59 | display: flex; 60 | justify-content: space-between; 61 | align-items: center; 62 | 63 | @media (max-width: 768px) { 64 | flex-direction: column; 65 | padding: 2rem; 66 | 67 | .logo { 68 | height: 64px; 69 | 70 | margin-bottom: 2rem; 71 | } 72 | } 73 | ` 74 | 75 | export const ContributorsList = styled.div` 76 | display: flex; 77 | flex-wrap: wrap; 78 | justify-content: center; 79 | 80 | img { 81 | margin: 0.2rem; 82 | } 83 | ` 84 | 85 | export const Contributor = styled.img` 86 | object-fit: contain; 87 | 88 | width: 42px; 89 | height: 42px; 90 | 91 | border-radius: 21px; 92 | ` 93 | -------------------------------------------------------------------------------- /src/components/Header/index.tsx: -------------------------------------------------------------------------------- 1 | import Link from 'next/link' 2 | import React from 'react' 3 | 4 | import { Container, Grid } from './styles' 5 | 6 | export const Header: React.FC = () => { 7 | return ( 8 | 9 | 10 | 11 | OpenSource Courses 12 | 13 | 14 | 34 | 35 | 36 | ) 37 | } 38 | -------------------------------------------------------------------------------- /src/components/Header/styles.ts: -------------------------------------------------------------------------------- 1 | import styled from 'styled-components' 2 | 3 | export const Container = styled.header` 4 | width: 100%; 5 | 6 | backdrop-filter: blur(3px); 7 | box-shadow: 0 0 5px #000; 8 | 9 | display: flex; 10 | align-items: center; 11 | justify-content: center; 12 | 13 | min-height: var(--header-height); 14 | 15 | img { 16 | width: 100%; 17 | max-width: 4rem; 18 | height: auto; 19 | 20 | @media (max-width: 768px) { 21 | max-width: 6rem; 22 | } 23 | } 24 | ` 25 | 26 | export const Grid = styled.div` 27 | width: 100%; 28 | max-width: 1080px; 29 | 30 | padding: 0 2rem; 31 | 32 | position: relative; 33 | 34 | display: flex; 35 | align-items: center; 36 | justify-content: center; 37 | 38 | @media (max-width: 768px) { 39 | padding: 2rem; 40 | flex-direction: column; 41 | } 42 | 43 | .logo { 44 | position: absolute; 45 | left: 2rem; 46 | 47 | @media (max-width: 768px) { 48 | position: initial; 49 | margin: 0 0 2rem; 50 | } 51 | } 52 | 53 | ul { 54 | li { 55 | display: inline; 56 | 57 | margin-right: 1rem; 58 | 59 | a { 60 | font-size: 1.2rem; 61 | text-transform: uppercase; 62 | font-weight: 700; 63 | 64 | text-decoration: none; 65 | color: var(--white); 66 | } 67 | } 68 | } 69 | ` 70 | -------------------------------------------------------------------------------- /src/components/PageContainer/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | import { Header } from '../Header' 4 | import { Footer } from '../Footer' 5 | 6 | import { Container, Main } from './styles' 7 | 8 | export const PageContainer: React.FC = ({ children }) => { 9 | return ( 10 | 11 |
12 |
{children}
13 |