Skip to content

Commit 2b34151

Browse files
committed
unnecessary file removed
1 parent 0173eab commit 2b34151

31 files changed

+133
-114
lines changed

gatsby-config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module.exports = {
2525
background_color: `#663399`,
2626
theme_color: `#333`,
2727
display: `minimal-ui`,
28-
icon: `src/images/devsonket-icon.png`,
28+
icon: `src/assets/images/devsonket-icon.png`,
2929
},
3030
},
3131
{

gatsby-node.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ exports.createPages = ({ actions, graphql }) => {
3939
const edges = res.data.allFile.edges
4040
for (let i = 0; i < edges.length; i++) {
4141
const filename = edges[i].node.name
42-
console.log(filename)
4342
const { data: contributorsRaw } = await axios.get(
4443
`https://api.github.com/repos/devsonket/devsonket.github.io/commits?path=data/${filename}.json`,
4544
{

scripts/thumbnail.js

Lines changed: 65 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -31,77 +31,77 @@ const main = async () => {
3131

3232
for (let i = 0; i < filesRaw.length; i++) {
3333
const imgHTML = `
34-
<!DOCTYPE html>
35-
<html lang="en">
36-
<head>
37-
<meta charset="UTF-8" />
38-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
39-
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
40-
<title>HTML to Generate Thumbnail</title>
41-
<style>
42-
@font-face {
43-
font-family: "Hind Siliguri";
44-
src: url("./src/fonts/HindSiliguri-Light.woff2") format("woff2"),
45-
url("./src/fonts/HindSiliguri-Light.woff") format("woff");
46-
font-weight: 300;
47-
font-style: normal;
48-
}
34+
<!DOCTYPE html>
35+
<html lang="en">
36+
<head>
37+
<meta charset="UTF-8" />
38+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
39+
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
40+
<title>HTML to Generate Thumbnail</title>
41+
<style>
42+
@font-face {
43+
font-family: "Hind Siliguri";
44+
src: url("./src/assets/fonts/HindSiliguri-Light.woff2") format("woff2"),
45+
url("./src/assets/fonts/HindSiliguri-Light.woff") format("woff");
46+
font-weight: 300;
47+
font-style: normal;
48+
}
4949
50-
@font-face {
51-
font-family: "Hind Siliguri";
52-
src: url("./src/fonts/HindSiliguri-Regular.woff2") format("woff2"),
53-
url("./src/fonts/HindSiliguri-Regular.woff") format("woff");
54-
font-weight: 400;
55-
font-style: normal;
56-
}
50+
@font-face {
51+
font-family: "Hind Siliguri";
52+
src: url("./src/assets/fonts/HindSiliguri-Regular.woff2") format("woff2"),
53+
url("./src/assets/fonts/HindSiliguri-Regular.woff") format("woff");
54+
font-weight: 400;
55+
font-style: normal;
56+
}
5757
58-
@font-face {
59-
font-family: "Hind Siliguri";
60-
src: url("./src/fonts/HindSiliguri-Bold.woff2") format("woff2"),
61-
url("./src/fonts/HindSiliguri-Bold.woff") format("woff");
62-
font-weight: 800;
63-
font-style: normal;
64-
}
58+
@font-face {
59+
font-family: "Hind Siliguri";
60+
src: url("./src/assets/fonts/HindSiliguri-Bold.woff2") format("woff2"),
61+
url("./src/assets/fonts/HindSiliguri-Bold.woff") format("woff");
62+
font-weight: 800;
63+
font-style: normal;
64+
}
6565
66-
* {
67-
margin: 0;
68-
padding: 0;
69-
box-sizing: border-box;
70-
}
66+
* {
67+
margin: 0;
68+
padding: 0;
69+
box-sizing: border-box;
70+
}
7171
72-
body {
73-
font-family: "Hind Siliguri";
74-
background: ${filesRaw[i].color};
75-
color: ${isItDark(filesRaw[i].color) ? "#fffeff" : "#201f22"}
76-
}
77-
</style>
78-
</head>
79-
<body>
80-
<div
81-
style="height: 100vh; width: 100vw; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly"
82-
>
83-
<div style="font-size: 36px; font-weight: bold;">
84-
<span
85-
style="display:inline-block; background-color: ${
86-
isItDark(filesRaw[i].color) ? "#fffeff" : "#201f22"
87-
}; color: ${
72+
body {
73+
font-family: "Hind Siliguri";
74+
background: ${filesRaw[i].color};
75+
color: ${isItDark(filesRaw[i].color) ? "#fffeff" : "#201f22"}
76+
}
77+
</style>
78+
</head>
79+
<body>
80+
<div
81+
style="height: 100vh; width: 100vw; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly"
82+
>
83+
<div style="font-size: 36px; font-weight: bold;">
84+
<span
85+
style="display:inline-block; background-color: ${
86+
isItDark(filesRaw[i].color) ? "#fffeff" : "#201f22"
87+
}; color: ${
8888
filesRaw[i].color
8989
}; padding: 0 8px; border-radius: 4px; margin-right: 5px;"
90-
>ডেভ</span
91-
>সংকেত
92-
</div>
93-
<div style="text-align: center; padding: 0 120px;">
94-
<h2 style="font-size: 72px; line-height: 78px;">${
95-
filesRaw[i].title
96-
}</h2>
97-
<p style="font-size: 22px;">বাংলা ডেভেলপার চিটশিট</p>
98-
</div>
99-
<pre style="font-family: consolas; font-weight: bold; font-size: 26px;">
100-
https://devsonket.com/${filesRaw[i].id}</pre
101-
>
102-
</div>
103-
</body>
104-
</html>
90+
>ডেভ</span
91+
>সংকেত
92+
</div>
93+
<div style="text-align: center; padding: 0 120px;">
94+
<h2 style="font-size: 72px; line-height: 78px;">${
95+
filesRaw[i].title
96+
}</h2>
97+
<p style="font-size: 22px;">বাংলা ডেভেলপার চিটশিট</p>
98+
</div>
99+
<pre style="font-family: consolas; font-weight: bold; font-size: 26px;">
100+
https://devsonket.com/${filesRaw[i].id}</pre
101+
>
102+
</div>
103+
</body>
104+
</html>
105105
`
106106
await page.setContent(imgHTML)
107107
await page.screenshot({
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/components/app.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,24 +36,24 @@ body {
3636

3737
@font-face {
3838
font-family: "Hind Siliguri";
39-
src: url("../fonts/HindSiliguri-Light.woff2") format("woff2"),
40-
url("../fonts/HindSiliguri-Light.woff") format("woff");
39+
src: url("../assets/fonts/HindSiliguri-Light.woff2") format("woff2"),
40+
url("../assets/fonts/HindSiliguri-Light.woff") format("woff");
4141
font-weight: 300;
4242
font-style: normal;
4343
}
4444

4545
@font-face {
4646
font-family: "Hind Siliguri";
47-
src: url("../fonts/HindSiliguri-Regular.woff2") format("woff2"),
48-
url("../fonts/HindSiliguri-Regular.woff") format("woff");
47+
src: url("../assets/fonts/HindSiliguri-Regular.woff2") format("woff2"),
48+
url("../assets/fonts/HindSiliguri-Regular.woff") format("woff");
4949
font-weight: 400;
5050
font-style: normal;
5151
}
5252

5353
@font-face {
5454
font-family: "Hind Siliguri";
55-
src: url("../fonts/HindSiliguri-Bold.woff2") format("woff2"),
56-
url("../fonts/HindSiliguri-Bold.woff") format("woff");
55+
src: url("../assets/fonts/HindSiliguri-Bold.woff2") format("woff2"),
56+
url("../assets/fonts/HindSiliguri-Bold.woff") format("woff");
5757
font-weight: 800;
5858
font-style: normal;
5959
}

src/components/common/button.js

Lines changed: 39 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,65 @@
11
import React from "react"
2+
import { Link } from "gatsby"
23
import PropTypes from "prop-types"
34
import styled from "@emotion/styled"
45

56
const ButtonContainer = styled.span``
67

7-
const ButtonAnchor = styled.a`
8-
text-decoration: none;
8+
const btnStyle = `
9+
text-decoration: none;
910
display: inline-block;
10-
padding: 8px 18px;
11+
padding: 12px 15px;
1112
border-radius: 4px;
1213
cursor: pointer;
1314
font-weight: 600;
1415
line-height: 1;
1516
transition: 0.2s all ease;
1617
background: #02b3e4;
17-
box-shadow: 8px 10px 20px 0 rgba(46, 61, 73, 0.15);
1818
color: white;
1919
text-shadow: 0 1px 3px #86888e;
2020
@media print {
2121
display: none;
2222
}
2323
&:hover {
24-
box-shadow: 2px 4px 8px 0 rgba(46, 61, 73, 0.2);
2524
background-color: #02b7e9;
2625
}
2726
`
2827

29-
export const Button = ({ text, bgColor, href, onClick, target, rel }) => (
30-
<ButtonContainer>
31-
<ButtonAnchor
32-
target={target ? "_blank" : "self"}
33-
rel={rel ? rel : ""}
34-
onClick={onClick && onClick}
35-
style={{ backgroundColor: bgColor }}
36-
href={href}
37-
>
38-
{text}
39-
</ButtonAnchor>
40-
</ButtonContainer>
41-
)
28+
const ButtonAnchor = styled.a`
29+
${btnStyle}
30+
`
31+
32+
const ButtonLinkAnchor = styled(Link)`
33+
${btnStyle}
34+
`
35+
36+
export const Button = ({
37+
children,
38+
bgColor,
39+
href,
40+
to,
41+
onClick,
42+
target,
43+
rel,
44+
}) => {
45+
return (
46+
<ButtonContainer>
47+
{!to ? (
48+
<ButtonAnchor
49+
target={target ? "_blank" : "self"}
50+
rel={rel ? rel : ""}
51+
onClick={onClick && onClick}
52+
style={{ backgroundColor: bgColor }}
53+
href={href}
54+
>
55+
{children}
56+
</ButtonAnchor>
57+
) : (
58+
<ButtonLinkAnchor to={to}>{children}</ButtonLinkAnchor>
59+
)}
60+
</ButtonContainer>
61+
)
62+
}
4263

4364
Button.defaultProps = {
4465
text: `button`,

src/components/error.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@ import styled from "@emotion/styled"
44
import { Container } from "./common"
55

66
const ErrorContainer = styled.div`
7+
display: flex;
8+
flex-direction: column;
9+
align-items: center;
10+
justify-content: center;
711
width: 640px;
12+
@media (max-width: 768px) {
13+
width: 100%;
14+
}
15+
height: 100vh;
816
margin: 0 auto;
917
text-align: center;
1018
img {

src/components/printcontent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import styled from "@emotion/styled"
44
import { PrintSheet, Logo, Button } from "./common"
55
import { cheatsheetMap } from "../utils"
66

7-
import githubLogo from "../images/github.png"
7+
import githubLogo from "../assets/images/github.png"
88

99
const PrintSingleContent = styled.div`
1010
color: #fff;

src/components/socialshare.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react"
2-
import { useStaticQuery } from "gatsby"
2+
import { useStaticQuery, graphql } from "gatsby"
33
import styled from "@emotion/styled"
44
import { FiFacebook, FiTwitter, FiLink } from "react-icons/fi"
55

src/newcomponents/common/button.js

Whitespace-only changes.

src/newcomponents/common/card.js

Whitespace-only changes.

src/newcomponents/common/container.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/newcomponents/common/index.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/newcomponents/common/input.js

Whitespace-only changes.

src/newcomponents/common/logo.js

Whitespace-only changes.

src/newcomponents/common/seo.js

Whitespace-only changes.

src/newcomponents/common/smallbutton.js

Whitespace-only changes.

src/newcomponents/home/allitems.js

Whitespace-only changes.

src/newcomponents/home/catagory.js

Whitespace-only changes.

src/newcomponents/item/itemdetails.js

Whitespace-only changes.

src/newcomponents/popularitems.js

Whitespace-only changes.

src/pages/404.js

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,40 @@
11
import React from "react"
22

33
import Error from "../components/error"
4+
45
import { Button } from "../components/common"
56

6-
import logo from "../images/lost.svg"
7+
import errorBanner from "../assets/images/lost.svg"
78

89
export default () => (
910
<Error>
10-
<img src={logo} alt="error" />
11+
<img src={errorBanner} alt="error" />
1112
<h2>এখানে কিছু পাওয়া যায় নি!</h2>
1213
<p>
1314
আপনি চাইলে নতুন আরেকটি চিটশিট যুক্ত করতে পারেন অথবা আমাদেরকে জানাতে পারেন।
1415
আর যদি মনে করেন এটা কোনো বাগ তাহলে সেটাও জানাতে ভুলবেন না।
1516
</p>
1617
<div className="action-btn">
17-
<Button text="হোম" bgColor="#5e7986" href="/" />
18+
<Button bgColor="#5e7986" to="/">
19+
হোম
20+
</Button>
1821
<Button
1922
target="_blank"
2023
rel="noopener noreferrer"
21-
text="নতুন আরেকটা"
2224
bgColor="#4caf50"
2325
href="https://github.com/devsonket/devsonket.github.io/issues/new?title=%E0%A6%95%E0%A6%BF%E0%A6%B8%E0%A7%87%E0%A6%B0%20%E0%A6%9A%E0%A6%BF%E0%A6%9F%E0%A6%B6%E0%A7%80%E0%A6%9F%20%E0%A6%9A%E0%A6%BE%E0%A6%A8?&body=%E0%A6%95%E0%A6%BF%20%E0%A6%95%E0%A6%BF%20%E0%A6%9A%E0%A6%BE%E0%A6%A8%20%E0%A6%AC%E0%A6%BF%E0%A6%B8%E0%A7%8D%E0%A6%A4%E0%A6%BE%E0%A6%B0%E0%A6%BF%E0%A6%A4%20%E0%A6%B2%E0%A6%BF%E0%A6%96%E0%A7%81%E0%A6%A8&labels=%E0%A6%A8%E0%A6%A4%E0%A7%81%E0%A6%A8%20%E0%A6%86%E0%A6%B0%E0%A7%87%E0%A6%95%E0%A6%9F%E0%A6%BE"
24-
/>
26+
>
27+
নতুন আরেকটা
28+
</Button>
2529
<Button
2630
target="_blank"
2731
rel="noopener noreferrer"
28-
text="বাগ"
2932
bgColor="#f44336"
3033
className="btn btn-bug"
3134
href="https://github.com/devsonket/devsonket.github.io/issues/new?title=%E0%A6%B8%E0%A6%AE%E0%A6%B8%E0%A7%8D%E0%A6%AF%E0%A6%BE&body=%E0%A6%B8%E0%A6%AE%E0%A6%B8%E0%A7%8D%E0%A6%AF%E0%A6%BE%20%E0%A6%AC%E0%A6%BF%E0%A6%B8%E0%A7%8D%E0%A6%A4%E0%A6%BE%E0%A6%B0%E0%A6%BF%E0%A6%A4&labels=%E0%A6%B8%E0%A6%AE%E0%A6%B8%E0%A7%8D%E0%A6%AF%E0%A6%BE"
32-
/>
35+
>
36+
বাগ
37+
</Button>
3338
</div>
3439
</Error>
3540
)

0 commit comments

Comments
 (0)