Skip to content

Commit

Permalink
Prettified Code!
Browse files Browse the repository at this point in the history
  • Loading branch information
smaranjitghose authored and actions-user committed May 31, 2021
1 parent 10b7ead commit d84dc2b
Show file tree
Hide file tree
Showing 19 changed files with 378 additions and 286 deletions.
24 changes: 12 additions & 12 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
module.exports = {
bracketSpacing: true,
jsxBracketSameLine: false,
singleQuote: false,
trailingComma: 'all',
arrowParens: 'avoid',
endOfLine: 'lf',
embeddedLanguageFormatting: 'auto',
printWidth: 80,
proseWrap: "preserve",
tabWidth: 2,
semi : true,
useTabs: true,
bracketSpacing: true,
jsxBracketSameLine: false,
singleQuote: false,
trailingComma: "all",
arrowParens: "avoid",
endOfLine: "lf",
embeddedLanguageFormatting: "auto",
printWidth: 80,
proseWrap: "preserve",
tabWidth: 2,
semi: true,
useTabs: true,
};
17 changes: 12 additions & 5 deletions src/components/Header/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ function Header() {

return (
<>
<header ref={headerRef} className={`${styles.Header} ${styles.HeaderDrop}`}>
<header
ref={headerRef}
className={`${styles.Header} ${styles.HeaderDrop}`}
>
<NavLink
to="/"
onClick={() => {
Expand All @@ -73,7 +76,8 @@ function Header() {
exact
activeClassName={styles.header_active_links}
onClick={() => {
if (headerRef.current.classList.contains(styles.HeaderOpen)) drop();
if (headerRef.current.classList.contains(styles.HeaderOpen))
drop();
window.isHome = false;
}}
>
Expand All @@ -85,7 +89,8 @@ function Header() {
exact
activeClassName={styles.header_active_links}
onClick={() => {
if (headerRef.current.classList.contains(styles.HeaderOpen)) drop();
if (headerRef.current.classList.contains(styles.HeaderOpen))
drop();
window.isHome = false;
}}
>
Expand All @@ -97,7 +102,8 @@ function Header() {
exact
activeClassName={styles.header_active_links}
onClick={() => {
if (headerRef.current.classList.contains(styles.HeaderOpen)) drop();
if (headerRef.current.classList.contains(styles.HeaderOpen))
drop();
window.isHome = false;
}}
>
Expand All @@ -109,7 +115,8 @@ function Header() {
exact
activeClassName={styles.header_active_links}
onClick={() => {
if (headerRef.current.classList.contains(styles.HeaderOpen)) drop();
if (headerRef.current.classList.contains(styles.HeaderOpen))
drop();
window.isHome = false;
}}
>
Expand Down
5 changes: 4 additions & 1 deletion src/components/ScrollToTopButton/ScrollToTopButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ const ScrollToTop = () => {
};

function scrollFunction() {
if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 50) {
if (
document.body.scrollTop > 50 ||
document.documentElement.scrollTop > 50
) {
if (!buttonState.visible) {
changeButtonState({
visible: true,
Expand Down
138 changes: 69 additions & 69 deletions src/index.scss
Original file line number Diff line number Diff line change
@@ -1,142 +1,142 @@
@font-face {
font-family: HomemadeApple;
src: url(./fonts/HomemadeApple-Regular.ttf);
font-family: HomemadeApple;
src: url(./fonts/HomemadeApple-Regular.ttf);
}
@font-face {
font-family: Gasalt;
src: url(./fonts/Gasalt-Black.ttf);
font-family: Gasalt;
src: url(./fonts/Gasalt-Black.ttf);
}
@font-face {
font-family: Dawning;
src: url(./fonts/DawningofaNewDay-Regular.ttf);
font-family: Dawning;
src: url(./fonts/DawningofaNewDay-Regular.ttf);
}
@font-face {
font-family: CedarvilleCursive;
src: url(./fonts/CedarvilleCursive-Regular.ttf);
font-family: CedarvilleCursive;
src: url(./fonts/CedarvilleCursive-Regular.ttf);
}
@font-face {
font-family: Caveat;
src: url(./fonts/Caveat-Regular.ttf);
font-family: Caveat;
src: url(./fonts/Caveat-Regular.ttf);
}
@font-face {
font-family: LeagueScript;
src: url(./fonts/LeagueScript-Regular.ttf);
font-family: LeagueScript;
src: url(./fonts/LeagueScript-Regular.ttf);
}
@font-face {
font-family: IndieFlower;
src: url(./fonts/IndieFlower-Regular.ttf);
font-family: IndieFlower;
src: url(./fonts/IndieFlower-Regular.ttf);
}
@font-face {
font-family: Liu;
src: url(./fonts/LiuJianMaoCao-Regular.ttf);
font-family: Liu;
src: url(./fonts/LiuJianMaoCao-Regular.ttf);
}
@font-face {
font-family: NothingYouCouldDo;
src: url(./fonts/NothingYouCouldDo-Regular.ttf);
font-family: NothingYouCouldDo;
src: url(./fonts/NothingYouCouldDo-Regular.ttf);
}
@font-face {
font-family: Lato;
src: url(./fonts/Poppins-Regular.otf);
font-family: Lato;
src: url(./fonts/Poppins-Regular.otf);
}
@font-face {
font-family: Luckiest Guy;
src: url(./fonts/LuckiestGuy-Regular.ttf);
font-family: Luckiest Guy;
src: url(./fonts/LuckiestGuy-Regular.ttf);
}

@font-face {
font-family: Enola;
src: url(./fonts/Enola-Regular.ttf);
font-family: Enola;
src: url(./fonts/Enola-Regular.ttf);
}
@font-face {
font-family: RGhandwritten;
src: url(./fonts/Rghandwritten-Regular.ttf);
font-family: RGhandwritten;
src: url(./fonts/Rghandwritten-Regular.ttf);
}

@font-face {
font-family: RayFont;
src: url(./fonts/RayFont-Regular.ttf);
font-family: RayFont;
src: url(./fonts/RayFont-Regular.ttf);
}

@font-face {
font-family: Moody;
src: url(./fonts/Moody-Regular.ttf);
font-family: Moody;
src: url(./fonts/Moody-Regular.ttf);
}

@font-face {
font-family: Norm;
src: url(./fonts/Norm-Regular.ttf);
font-family: Norm;
src: url(./fonts/Norm-Regular.ttf);
}

* {
margin: 0;
padding: 0;
box-sizing: border-box;
box-sizing: border-box !important;
transition: all 0.3s ease-out;
margin: 0;
padding: 0;
box-sizing: border-box;
box-sizing: border-box !important;
transition: all 0.3s ease-out;
}

html {
height: 100%;
width: 100%;
scroll-behavior: smooth;
height: 100%;
width: 100%;
scroll-behavior: smooth;
}

body {
background-color: #ffffff !important;
width: 100%;
height: 100%;
color: #1e1e1e !important;
background-color: #ffffff !important;
width: 100%;
height: 100%;
color: #1e1e1e !important;

font-family: Montserrat;
font-family: Montserrat;
}

@font-face {
font-family: Ruled1;
src: url(./fonts/Lato-Light.ttf);
font-family: Ruled1;
src: url(./fonts/Lato-Light.ttf);
}
@font-face {
font-family: Ruled2;
src: url(./fonts/Lato-Light.ttf);
font-family: Ruled2;
src: url(./fonts/Lato-Light.ttf);
}
@font-face {
font-family: OnlyMargin;
src: url(./fonts/Lato-Light.ttf);
font-family: OnlyMargin;
src: url(./fonts/Lato-Light.ttf);
}
@font-face {
font-family: Blank1;
src: url(./fonts/Lato-Light.ttf);
font-family: Blank1;
src: url(./fonts/Lato-Light.ttf);
}
@font-face {
font-family: Blank2;
src: url(./fonts/Lato-Light.ttf);
font-family: Blank2;
src: url(./fonts/Lato-Light.ttf);
}

body::-webkit-scrollbar {
width: 12px;
width: 12px;
}

body::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 8px rgba(12, 11, 11, 0.7);
box-shadow: inset 0 0 8px rgba(12, 11, 11, 0.7);
border-radius: 10px;
-webkit-box-shadow: inset 0 0 8px rgba(12, 11, 11, 0.7);
box-shadow: inset 0 0 8px rgba(12, 11, 11, 0.7);
border-radius: 10px;
}

body::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 13px rgba(31, 113, 180, 5);
box-shadow: inset 0 0 13px rgba(31, 113, 180, 5);
border-radius: 10px;
-webkit-box-shadow: inset 0 0 13px rgba(31, 113, 180, 5);
box-shadow: inset 0 0 13px rgba(31, 113, 180, 5);
}

::selection:not(textarea) {
color: none;
background: none;
color: none;
background: none;
}

::-moz-selection:not(textarea) {
color: none;
background: none;
color: none;
background: none;
}

.root{
overflow: hidden ;
}
.root {
overflow: hidden;
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ const DownloadFileModal = props => {
<Button className={styles.downloadButton} onClick={handleDownloadFile}>
Download
</Button>
<Button className={styles.closeModal} color="secondary" onClick={toggle}>
<Button
className={styles.closeModal}
color="secondary"
onClick={toggle}
>
X
</Button>
</ModalFooter>
Expand Down
3 changes: 2 additions & 1 deletion src/pages/Editor/containers/editContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ const EditContextProvider = props => {
else if (dataUrls.length === nodes.length)
downloadZip(dataUrls, baseFileName);
} else if (type === "PDF") {
if (dataUrls.length === nodes.length) downloadPdf(dataUrls, baseFileName);
if (dataUrls.length === nodes.length)
downloadPdf(dataUrls, baseFileName);
}
})
.catch(error => {
Expand Down
8 changes: 6 additions & 2 deletions src/pages/Editor/sections/OutputComponent/Output.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,15 @@ const OutputComponent = ({ pageNo, show }) => {
>
<div>
Word Count:&nbsp;
<span style={{ color: "#28b8c6", fontSize: "0.85rem" }}>{wordCount}</span>
<span style={{ color: "#28b8c6", fontSize: "0.85rem" }}>
{wordCount}
</span>
</div>
<div>
Page Number:&nbsp;
<span style={{ color: "#28b8c6", fontSize: "0.85rem" }}>{pageNo}</span>
<span style={{ color: "#28b8c6", fontSize: "0.85rem" }}>
{pageNo}
</span>
</div>
</div>
</div>
Expand Down
6 changes: 5 additions & 1 deletion src/pages/Editor/sections/Settings/Settings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ const Settings = () => {
></input>
<Divider orientation="vertical" flexItem />
{/* Download functionality */}
<Button color="none" onClick={handleopenModal} className={styles.download}>
<Button
color="none"
onClick={handleopenModal}
className={styles.download}
>
Download File
</Button>
<Divider orientation="vertical" flexItem />
Expand Down
12 changes: 6 additions & 6 deletions src/pages/Home/sections/About/About.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ function About() {
who is tired of{" "}
<b>
<i>
writing assignments on paper, drawing sketches by hand, scanning each
page, converting it all to a PDF
writing assignments on paper, drawing sketches by hand, scanning
each page, converting it all to a PDF
</i>
</b>
, and then finally submitting?
Expand Down Expand Up @@ -88,13 +88,13 @@ function About() {
<img src={openSource} alt="Open Source" style={{ width: "55vw" }} />
<div className={styles.open_source}>
<div>
As Doc2Pen helps save a lot of time, you can now invest your valuable time
towards learning some practical stuff.
As Doc2Pen helps save a lot of time, you can now invest your valuable
time towards learning some practical stuff.
</div>
<br />
<div>
And So, here comes the Good News! Doc2pen is an Open Source Project and we
welcome your contributions 🙂.
And So, here comes the Good News! Doc2pen is an Open Source Project
and we welcome your contributions 🙂.
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit d84dc2b

Please sign in to comment.