aboutsummaryrefslogtreecommitdiffstats
path: root/spring-front/src
diff options
context:
space:
mode:
authorterminaldweller <thabogre@gmail.com>2022-03-23 12:32:43 +0000
committerterminaldweller <thabogre@gmail.com>2022-03-23 12:32:43 +0000
commita5b28f29dd683191433a70b2c3c21e06de265717 (patch)
tree714dbfd5caf284df4373ba9a1503e9e5ba83292e /spring-front/src
parentwip (diff)
downloadmdrtl-a5b28f29dd683191433a70b2c3c21e06de265717.tar.gz
mdrtl-a5b28f29dd683191433a70b2c3c21e06de265717.zip
wip
Diffstat (limited to '')
-rw-r--r--spring-front/src/App.js12
-rw-r--r--spring-front/src/components/.Left.js.swpbin0 -> 12288 bytes
-rw-r--r--spring-front/src/components/.Right.js.swpbin0 -> 12288 bytes
-rw-r--r--spring-front/src/components/Left.js34
-rw-r--r--spring-front/src/components/Right.js6
-rw-r--r--spring-front/src/index.css2
-rw-r--r--spring-front/src/index.js36
7 files changed, 55 insertions, 35 deletions
diff --git a/spring-front/src/App.js b/spring-front/src/App.js
new file mode 100644
index 0000000..2393152
--- /dev/null
+++ b/spring-front/src/App.js
@@ -0,0 +1,12 @@
+import React from "react";
+import Left from "./components/Left.js";
+import Right from "./components/Right.js";
+
+export default function App() {
+ return (
+ <div>
+ <Left />
+ <Right />
+ </div>
+ );
+}
diff --git a/spring-front/src/components/.Left.js.swp b/spring-front/src/components/.Left.js.swp
new file mode 100644
index 0000000..64301a2
--- /dev/null
+++ b/spring-front/src/components/.Left.js.swp
Binary files differ
diff --git a/spring-front/src/components/.Right.js.swp b/spring-front/src/components/.Right.js.swp
new file mode 100644
index 0000000..8f6b495
--- /dev/null
+++ b/spring-front/src/components/.Right.js.swp
Binary files differ
diff --git a/spring-front/src/components/Left.js b/spring-front/src/components/Left.js
new file mode 100644
index 0000000..7abeed4
--- /dev/null
+++ b/spring-front/src/components/Left.js
@@ -0,0 +1,34 @@
+import React from "react";
+import hljs from "highlight.js/lib/core";
+import markdown from "highlight.js/lib/languages/markdown";
+import "highlight.js/styles/devibeans.css";
+import "../index.css";
+
+hljs.registerLanguage("markdown", markdown);
+
+function update(text) {
+ let result_element = document.querySelector("#highlight-content");
+ result_element.innerText = text;
+ return hljs.highlight(text, { language: "markdown" }).value;
+}
+
+function CreateTextArea() {
+ return <textarea name="editor" className="editor" id="editor"></textarea>;
+}
+
+function CreatePreCode() {
+ return (
+ <pre id="highlight" aria-hidden="true">
+ <code className="language-markdown" id="highlight-content"></code>
+ </pre>
+ );
+}
+
+export default function Left() {
+ return (
+ <div>
+ <CreateTextArea />
+ <CreatePreCode />
+ </div>
+ );
+}
diff --git a/spring-front/src/components/Right.js b/spring-front/src/components/Right.js
new file mode 100644
index 0000000..7206ae9
--- /dev/null
+++ b/spring-front/src/components/Right.js
@@ -0,0 +1,6 @@
+import React from "react";
+import "../index.css";
+
+export default function Right() {
+ return <div>Parsed Markdown goes here!!!</div>;
+}
diff --git a/spring-front/src/index.css b/spring-front/src/index.css
index c788cb4..388f1ca 100644
--- a/spring-front/src/index.css
+++ b/spring-front/src/index.css
@@ -11,7 +11,7 @@ a {
text-decoration: none;
}
-hr {
+p {
color: #005f87;
}
diff --git a/spring-front/src/index.js b/spring-front/src/index.js
index 2b3e29d..1dba149 100644
--- a/spring-front/src/index.js
+++ b/spring-front/src/index.js
@@ -1,38 +1,6 @@
import React from "react";
import ReactDOM from "react-dom";
-import hljs from "highlight.js/lib/core";
-import markdown from "highlight.js/lib/languages/markdown";
-import "highlight.js/styles/devibeans.css";
+import App from "./App.js";
import "./index.css";
-hljs.registerLanguage("markdown", markdown);
-
-function update(text) {
- let result_element = document.querySelector("#highlight-content");
- result_element.innerText = text;
- return hljs.highlight(text, { language: "markdown" }).value;
-}
-
-function CreateTextArea() {
- return <textarea name="editor" className="editor" id="editor"></textarea>;
-}
-
-function CreatePreCode() {
- return (
- <pre id="highlight" aria-hidden="true">
- <code className="language-markdown" id="highlight-content"></code>
- </pre>
- );
-}
-
-function CreateRoot() {
- return (
- <div>
- <p>RTLMD ftw bebe!!!</p>
- </div>
- );
-}
-
-ReactDOM.render(<CreatePreCode />, document.getElementById("root2"));
-ReactDOM.render(<CreateTextArea />, document.getElementById("root2"));
-ReactDOM.render(<CreateRoot />, document.getElementById("root"));
+ReactDOM.render(<App />, document.getElementById("root"));