42 | )} */}
43 | >
44 | );
45 |
46 | export default Cards;
47 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Yuri Yakovlev
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/og-image/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 ZEIT, Inc.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/pages/api/speakers.ts:
--------------------------------------------------------------------------------
1 | import { NextApiRequest, NextApiResponse } from 'next';
2 | import algoliasearch from 'algoliasearch';
3 |
4 | import {
5 | ALGOLIA_API_KEY,
6 | ALGOLIA_APPLICATION_ID,
7 | ALGOLIA_INDEX_NAME,
8 | } from '@config';
9 |
10 | // POST /api/speakers
11 | const handleGET = async (req: NextApiRequest, res: NextApiResponse) => {
12 | const client = algoliasearch(ALGOLIA_APPLICATION_ID, ALGOLIA_API_KEY);
13 | const index = client.initIndex(ALGOLIA_INDEX_NAME);
14 |
15 | const query = req.query.phrase ? String(req.query.phrase) : '';
16 | const page = req.query.page && Number(req.query.page);
17 | const hitsPerPage = req.query.hitsPerPage && Number(req.query.hitsPerPage);
18 |
19 | const searchResult = await index.search(query, {
20 | ...(page && { page }),
21 | ...(hitsPerPage && { hitsPerPage }),
22 | });
23 |
24 | res.status(200).json(searchResult);
25 | };
26 |
27 | export default (req: NextApiRequest, res: NextApiResponse) => {
28 | switch (req.method) {
29 | case 'GET':
30 | return handleGET(req, res);
31 |
32 | default:
33 | res.status(405).json({
34 | error: `The HTTP ${req.method} method is not supported at this route.`,
35 | });
36 | }
37 | };
38 |
--------------------------------------------------------------------------------
/components/card/Card.tsx:
--------------------------------------------------------------------------------
1 | import { FC } from 'react';
2 | import Link from 'next/link';
3 |
4 | import Social from '@components/Social';
5 | import Tags from '@components/Tags';
6 |
7 | import { Speaker } from '@speakers';
8 | import { generateLocation } from '@utils/helpers';
9 |
10 | interface Props {
11 | hit: Speaker;
12 | }
13 |
14 | const Card: FC = ({ hit }) => {
15 | return (
16 |
⭐ Hey Legend! ⭐ It's in your hands making your profile shine!
89 |
90 | Please open this{' '}
91 |
96 | file
97 | {' '}
98 | and edit {userId} info or add the first talk to the list. Make
99 | everybody happy!
100 |
101 |
102 | );
103 |
104 | export default Talks;
105 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as
6 | contributors and maintainers pledge to making participation in our project and
7 | our community a harassment-free experience for everyone, regardless of age, body
8 | size, disability, ethnicity, sex characteristics, gender identity and expression,
9 | level of experience, education, socio-economic status, nationality, personal
10 | appearance, race, religion, or sexual identity and orientation.
11 |
12 | ## Our Standards
13 |
14 | Examples of behavior that contributes to creating a positive environment
15 | include:
16 |
17 | * Using welcoming and inclusive language
18 | * Being respectful of differing viewpoints and experiences
19 | * Gracefully accepting constructive criticism
20 | * Focusing on what is best for the community
21 | * Showing empathy towards other community members
22 |
23 | Examples of unacceptable behavior by participants include:
24 |
25 | * The use of sexualized language or imagery and unwelcome sexual attention or
26 | advances
27 | * Trolling, insulting/derogatory comments, and personal or political attacks
28 | * Public or private harassment
29 | * Publishing others' private information, such as a physical or electronic
30 | address, without explicit permission
31 | * Other conduct which could reasonably be considered inappropriate in a
32 | professional setting
33 |
34 | ## Our Responsibilities
35 |
36 | Project maintainers are responsible for clarifying the standards of acceptable
37 | behavior and are expected to take appropriate and fair corrective action in
38 | response to any instances of unacceptable behavior.
39 |
40 | Project maintainers have the right and responsibility to remove, edit, or
41 | reject comments, commits, code, wiki edits, issues, and other contributions
42 | that are not aligned to this Code of Conduct, or to ban temporarily or
43 | permanently any contributor for other behaviors that they deem inappropriate,
44 | threatening, offensive, or harmful.
45 |
46 | ## Scope
47 |
48 | This Code of Conduct applies both within project spaces and in public spaces
49 | when an individual is representing the project or its community. Examples of
50 | representing a project or community include using an official project e-mail
51 | address, posting via an official social media account, or acting as an appointed
52 | representative at an online or offline event. Representation of a project may be
53 | further defined and clarified by project maintainers.
54 |
55 | ## Enforcement
56 |
57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
58 | reported by contacting the project team at hi@mynameisyuri.com. All
59 | complaints will be reviewed and investigated and will result in a response that
60 | is deemed necessary and appropriate to the circumstances. The project team is
61 | obligated to maintain confidentiality with regard to the reporter of an incident.
62 | Further details of specific enforcement policies may be posted separately.
63 |
64 | Project maintainers who do not follow or enforce the Code of Conduct in good
65 | faith may face temporary or permanent repercussions as determined by other
66 | members of the project's leadership.
67 |
68 | ## Attribution
69 |
70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72 |
73 | [homepage]: https://www.contributor-covenant.org
74 |
75 | For answers to common questions about this code of conduct, see
76 | https://www.contributor-covenant.org/faq
77 |
--------------------------------------------------------------------------------
/og-image/src/template.ts:
--------------------------------------------------------------------------------
1 | import { readFileSync } from 'fs';
2 | import * as marked from 'marked';
3 | import { sanitizeHtml } from './sanitizer';
4 |
5 | import { ParsedRequest } from './types';
6 |
7 | function getCss(theme: string, fontSize: string) {
8 | const regular = readFileSync(
9 | `${__dirname}/../fonts/Inter-UI-Regular.woff2`,
10 | ).toString('base64');
11 | const bold = readFileSync(
12 | `${__dirname}/../fonts/Inter-UI-Bold.woff2`,
13 | ).toString('base64');
14 | let background = 'white';
15 | let foreground = '#4E4E52';
16 | let radial = 'lightgray';
17 |
18 | if (theme === 'dark') {
19 | background = 'black';
20 | foreground = 'white';
21 | radial = 'dimgray';
22 | }
23 |
24 | return `
25 | @font-face {
26 | font-family: 'Inter UI';
27 | font-style: normal;
28 | font-weight: normal;
29 | src: url(data:font/woff2;charset=utf-8;base64,${regular}) format('woff2');
30 | }
31 |
32 | @font-face {
33 | font-family: 'Inter UI';
34 | font-style: normal;
35 | font-weight: bold;
36 | src: url(data:font/woff2;charset=utf-8;base64,${bold}) format('woff2');
37 | }
38 |
39 | body {
40 | background: ${background};
41 | background-image: radial-gradient(${radial} 5%, transparent 0);
42 | background-size: 60px 60px;
43 | height: 100vh;
44 | display: flex;
45 | text-align: center;
46 | align-items: center;
47 | justify-content: center;
48 | }
49 |
50 | code {
51 | color: #D400FF;
52 | font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, sans-serif;
53 | white-space: pre-wrap;
54 | }
55 |
56 | code:before, code:after {
57 | content: '\`';
58 | }
59 |
60 | .img-wrapper {
61 | display: flex;
62 | align-items: center;
63 | align-content: center;
64 | justify-content: space-evenly;
65 | justify-items: center;
66 | }
67 |
68 | .logo {
69 | width: 256px;
70 | height: 256px;
71 | border-radius: 50%;
72 | }
73 |
74 | .plus {
75 | color: #BBB;
76 | font-family: Times New Roman, Verdana;
77 | font-size: 100px;
78 | }
79 |
80 | .spacer {
81 | margin: 80px;
82 | }
83 |
84 | .heading {
85 | font-family: 'Inter UI', sans-serif;
86 | font-size: ${sanitizeHtml(fontSize)};
87 | font-style: normal;
88 | color: ${foreground};
89 | }
90 |
91 | .tag {
92 | margin: 0;
93 | margin-right: 20px;
94 | margin-bottom: 10px;
95 | display: inline-block;
96 | color: ${foreground};
97 | padding: 5px 17px;
98 | border-radius: 14px;
99 | border: 5px solid #D9D9D9;
100 | font-size: 50px;
101 | white-space: nowrap;
102 | }
103 | `;
104 | }
105 |
106 | export function getHtml(parsedReq: ParsedRequest) {
107 | const { text, theme, md, fontSize, images, tags } = parsedReq;
108 | return `
109 |
110 |
111 | Generated Image
112 |
113 |
116 |
117 |