summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbdus <abdus@abdus.net>2021-01-09 21:15:40 +0530
committerAbdus <abdus@abdus.net>2021-01-09 21:15:40 +0530
commit3fca59639a8a2fdf23fc494f933dd74eabf65a32 (patch)
treeb2ebfd0b4f26456a39630d25907197ec169e1660
parent19ccec968318d8b916cb582f896828a27c4c49cf (diff)
downloadabdus.net-3fca59639a8a2fdf23fc494f933dd74eabf65a32.tar.bz2
abdus.net-3fca59639a8a2fdf23fc494f933dd74eabf65a32.zip
change code font. new post
-rw-r--r--content/posts/server-side-react.md15
-rw-r--r--themes/bronn/layouts/partials/head.html7
-rw-r--r--themes/bronn/static/css/layout.css2
3 files changed, 14 insertions, 10 deletions
diff --git a/content/posts/server-side-react.md b/content/posts/server-side-react.md
index 96a9531..4246cb1 100644
--- a/content/posts/server-side-react.md
+++ b/content/posts/server-side-react.md
@@ -184,7 +184,7 @@ const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
module.exports = {
- entry: path.join("src/index.js"),
+ entry: path.join("src/client/index.js"),
output: {
path: path.resolve(__dirname, "dist"),
@@ -231,7 +231,7 @@ Create `src/index.js` and `public/index.html`. Fill these files with following
content.
```javascript
-// src/index.html
+// src/client/index.js
import React from "react";
import ReactDOM from "react-dom";
@@ -243,8 +243,17 @@ function App(props) {
ReactDOM.hydrate(<App />, document.querySelector("#react-root"));
```
-[`hydrate`](https://reactjs.org/docs/react-dom.html#hydrate).
+Here, you can read more about [`hydrate`](https://reactjs.org/docs/react-dom.html#hydrate).
```html
<!-- public/index.html -->
+<html>
+ <head></head>
+ <body>
+ <div id="react-root"></div>
+ </body>
+</html>
```
+
+Now that we have a `src/client/` directory, we could create as many components
+we want and import them inside `src/client/index.js`
diff --git a/themes/bronn/layouts/partials/head.html b/themes/bronn/layouts/partials/head.html
index e63e5fd..6d6ca68 100644
--- a/themes/bronn/layouts/partials/head.html
+++ b/themes/bronn/layouts/partials/head.html
@@ -7,14 +7,9 @@
rel="stylesheet"
/>
<link
- href="https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap"
+ href="https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;500&display=swap"
rel="stylesheet"
/>
-<!--<script-->
-<!--src="https://kit.fontawesome.com/66c0687ece.js"-->
-<!--crossorigin="anonymous"-->
-<!--defer-->
-<!--></script>-->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
diff --git a/themes/bronn/static/css/layout.css b/themes/bronn/static/css/layout.css
index bca1f12..47c5a92 100644
--- a/themes/bronn/static/css/layout.css
+++ b/themes/bronn/static/css/layout.css
@@ -222,7 +222,7 @@ nav.top-nav .icon {
code,
pre {
- font-family: "Space Mono", monospace;
+ font-family: "Fira Mono", monospace;
font-size: 0.9em;
}