+
+ prev
+ next
+ Current Page: {editContext.currentPage + 1}
+ Total Page: {pages.length}
+ Add Page
+
-
-
-
-
-
-
+
Word Count:
- {wordCount}
+
+ {wordCount}
+
>
diff --git a/src/pages/Editor/sections/OutputComponent/Output.module.css b/src/pages/Editor/sections/OutputComponent/Output.module.css
index 1536c034..a792d3b6 100644
--- a/src/pages/Editor/sections/OutputComponent/Output.module.css
+++ b/src/pages/Editor/sections/OutputComponent/Output.module.css
@@ -4,19 +4,22 @@
.imgContainer {
position: relative;
}
-.imgContainer img {
- height: 100%;
- width: 100%;
+.imgContainer {
+ position: relative;
+ height: 700px;
+ display: none;
}
+
.titleInput,
.contentInput {
- position: absolute;
border: none;
background-color: transparent;
- overflow: hidden;
z-index: 2;
+ line-height: 2rem;
width: 100%;
+ color: rgba(2, 2, 66, 0.753);
+ padding: 2px 0px;
}
::-webkit-scrollbar {
@@ -24,14 +27,10 @@
}
.titleInput {
- top: 0;
height: 10%;
}
.contentInput {
- bottom: 0;
height: 90%;
-}
-textarea{
- color: rgba(2, 2, 66, 0.753);
+
}
\ No newline at end of file
diff --git a/src/pages/Editor/sections/OutputComponent/Page.css b/src/pages/Editor/sections/OutputComponent/Page.css
new file mode 100644
index 00000000..05179ad6
--- /dev/null
+++ b/src/pages/Editor/sections/OutputComponent/Page.css
@@ -0,0 +1,53 @@
+.showPage{
+ display: block;
+}
+.controlButtons {
+ width: fit-content;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 8px;
+ }
+
+ .controlButtons span {
+ background: #2e3568;
+ padding: 2px 5px;
+ margin-right: 8px;
+ color: white;
+ border-radius: 3px;
+ cursor: pointer;
+ font-weight: 300;
+ }
+
+.downloadButtons {
+ position: absolute;
+ right: 0;
+ top: -28px;
+ font-size: 13px;
+}
+
+.downloadButtons span{
+ background: #2e684a;
+ padding: 2px 5px;
+ margin-right: 8px;
+ color: white;
+ border-radius: 3px;
+ cursor: pointer;
+ font-weight: 300;
+}
+
+.deleteButton{
+ position: absolute;
+ right: 1px;
+ font-size: 13px;
+ cursor: pointer;
+ background: #fd3e3e;
+ padding: 2px 5px;
+ color: white;
+ font-weight: 300;
+ border-radius: 3px;
+}
+
+.hideBtn{
+ display: none;
+}
\ No newline at end of file
diff --git a/src/pages/Editor/sections/OutputComponent/Page.js b/src/pages/Editor/sections/OutputComponent/Page.js
new file mode 100644
index 00000000..277809dc
--- /dev/null
+++ b/src/pages/Editor/sections/OutputComponent/Page.js
@@ -0,0 +1,62 @@
+import React, {useContext} from "react";
+import classes from "./Output.module.css";
+import {EditContext} from "../../containers/editContext";
+import "./Page.css";
+const Page = (props) => {
+ const headValues = props.head;
+ const bodyValues = props.body;
+ const editContext = useContext(EditContext);
+ const page = require(`./${editContext.pageSrc}`);
+ var show = props.visible ? "showPage" : "";
+ return (
+
+
+ Delete
+
+
+ Download Current Page
+ props.download(props.index, "as PDF")}>
+ As Pdf
+
+ props.download(props.index, "as PNG")}>
+ As png
+
+
+
props.valueChange(e.target, props.index, false)}
+ style={{
+ fontSize: `${editContext.headValues.headSize}px`,
+ paddingTop: `${headValues.headTop}px`,
+ paddingLeft: `${Number(headValues.headLeft) + 3}px`,
+ lineHeight: `${editContext.headValues.headLine}`,
+ fontFamily: `${editContext.headValues.headFont}`,
+ color: `${editContext.headValues.headColor}`,
+ width: `${headValues.headWidth}pc`,
+ letterSpacing: `${editContext.headValues.headLetterSpace}px`,
+ }}
+ >
+
props.valueChange(e.target, props.index, true)}
+ className={`${classes.contentInput} page-body`}
+ id="show-text"
+ style={{
+ fontSize: `${editContext.bodyValues.bodySize}px`,
+ paddingTop: `${bodyValues.bodyTop}px`,
+ paddingLeft: `${Number(bodyValues.bodyLeft) + 3}px`,
+ lineHeight: `${editContext.bodyValues.bodyLine}`,
+ fontFamily: `${editContext.bodyValues.bodyFont}`,
+ color: `${editContext.bodyValues.bodyColor}`,
+ width: `${bodyValues.bodyWidth}pc`,
+ letterSpacing: `${editContext.bodyValues.bodyLetterSpace}px`,
+ }}
+ >
+
+ );
+};
+export default Page;