diff --git a/README.md b/README.md index 724003d..918a399 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,13 @@ Emoji component: [https://medium.com/@seanmcp/%EF%B8%8F-how-to-use-emojis-in-rea HTML parsing: `npm install html-react-parser` +Markdown to JSX documentation: +* https://github.com/quantizor/markdown-to-jsx +* https://markdown-to-jsx.quantizor.dev/ + +Markdown to JSX install: `npm install markdown-to-jsx` + + https://www.npmjs.com/package/html-react-parser Convert SVG to React component: https://svg2jsx.com/ diff --git a/package-lock.json b/package-lock.json index c0be53c..62bae38 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "@testing-library/user-event": "^13.5.0", "bootstrap": "5.2.3", "html-react-parser": "^3.0.9", + "markdown-to-jsx": "^7.4.1", "node-sass": "^9.0.0", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -12484,6 +12485,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/markdown-to-jsx": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/markdown-to-jsx/-/markdown-to-jsx-7.4.1.tgz", + "integrity": "sha512-GbrbkTnHp9u6+HqbPRFJbObi369AgJNXi/sGqq5HRsoZW063xR1XDCaConqq+whfEIAlzB1YPnOgsPc7B7bc/A==", + "engines": { + "node": ">= 10" + }, + "peerDependencies": { + "react": ">= 0.14.0" + } + }, "node_modules/mdn-data": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", diff --git a/package.json b/package.json index 0606a8f..3f390f8 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "@testing-library/user-event": "^13.5.0", "bootstrap": "5.2.3", "html-react-parser": "^3.0.9", + "markdown-to-jsx": "^7.4.1", "node-sass": "^9.0.0", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/src/App.js b/src/App.js index ed631d9..2d15c0f 100644 --- a/src/App.js +++ b/src/App.js @@ -38,10 +38,10 @@ import FD20231111EN from './Pages/Radio/fielddays/en/20231111' import FD20231111NL from './Pages/Radio/fielddays/nl/20231111' import FD20231230EN from './Pages/Radio/fielddays/en/20231230' import FD20231230NL from './Pages/Radio/fielddays/nl/20231230' -import FD20240121EN from './Pages/Radio/fielddays/en/20240121' -import FD20240121NL from './Pages/Radio/fielddays/nl/20240121' import fielddaysdata from './Pages/Radio/fielddays/fielddays.json' +import MarkdownPage from './Pages/markdownPage'; + import Linux from './Pages/Linux/Linux'; import Footer from './UI/Footer'; @@ -49,7 +49,6 @@ import BasicPage from './Pages/BasicPage'; import Japan from './Japan/Japan'; import Japanese from './Pages/Japanese/Japan'; - function App() { return ( @@ -86,11 +85,11 @@ function App() { }> }> - }> + }> }> }> - }> + }> diff --git a/src/Pages/Radio/fielddays/en/20231230.js b/src/Pages/Radio/fielddays/en/20231230.js index 92bd5a9..104aabe 100644 --- a/src/Pages/Radio/fielddays/en/20231230.js +++ b/src/Pages/Radio/fielddays/en/20231230.js @@ -12,7 +12,7 @@ const FD20231230NL = () => {
-

Fieldday - Stiphoutse bossen, Kamerven

+

Field day - Stiphoutse bossen, Kamerven

2023-12-30

This was my second activation for WWFF.

diff --git a/src/Pages/Radio/fielddays/en/20240121.js b/src/Pages/Radio/fielddays/en/20240121.js deleted file mode 100644 index c8b1832..0000000 --- a/src/Pages/Radio/fielddays/en/20240121.js +++ /dev/null @@ -1,73 +0,0 @@ -import React from 'react'; - -const FD20240121EN = () => { - return ( -
-
-
- intro -
-
- -
-
-
-

Field day - De Groote Peel, Kokmeeuwenweg

-

2024-01-20

- -

This day was a failure to me.

-

I was only to make 1 park-to-park QSO with SP3W/P, in SP-1888 and SP-1878 in Poland.

-

I had to suddenly tear down my station immediately (and rightfully so) by Staatsbosbeheer, the organization that maintains nature preserves in the Netherlands. I was deployed in a vulnerable area. There was a sign, which I did not see. Stupid of me.

-

It was a succesful test for my new antenna deployment though. I made use of a plastic tube, strong screwing pegs and special hooks from Nite Ize.

- - - - - - - - antenna setup - - -

The mastholder, bit of a mess currently. I should be able to improve this...

- - - - - - mast - - -

The sign, that I sadly did not notice. It is important to respect these areas, so pay attention to the surroundings when you will do an activation.

-

"Kwetsbaar gebied" = Vulnerable area, "Geen toegang" = Access denied.

- - - - - - geen toegang bordje - - -

The maintainer of Staatsbosbeheer comes to write the fine.

- - - - - - staatsbosbeheer - - -

I admit being wrong here, I had no problem accepting the fine. It is important to respect the rules of the park. Make sure you are not in a closed-off area and start putting pegs in the ground. For the ground and the life in it may be disturbed. Do not annoy others with your hobby and respect the rules.

- -
-
-
-
- ) -} - -export default FD20240121EN; diff --git a/src/Pages/Radio/fielddays/en/20240121.md b/src/Pages/Radio/fielddays/en/20240121.md new file mode 100644 index 0000000..2dc7976 --- /dev/null +++ b/src/Pages/Radio/fielddays/en/20240121.md @@ -0,0 +1,34 @@ +Field day - De Groote Peel, Kokmeeuwenweg +========================================= + +_2024-01-20_ + +This day was a failure to me. + +I was only to make 1 park-to-park QSO with SP3W/P, in SP-1888 and SP-1878 in Poland. + +I had to suddenly tear down my station immediately (and rightfully so) by Staatsbosbeheer, the organization that maintains nature preserves in the Netherlands. I was deployed in a vulnerable area. There was a sign, which I did not see. Stupid of me. + +It was a succesful test for my new antenna deployment though. I made use of a plastic tube, strong screwing pegs and special hooks from Nite Ize. + +* [Nite Ize CamJam hooks](https://www.niteize.nl/p/camjam-spanhaak-zwart-ni-ncj-01-r3) +* [60mm HWA tube](https://www.praxis.nl/bouwmaterialen/waterafvoer/dakgoten-en-accessoires/martens-hwa-buis-60mm-2-meter-grijs/2215168) +* [Wurmi Erdsandwurm pegs](https://www.wurmi-shop.de/) + +![antenna setup](/images/radio/velddagen/2024-01-21/setup) + +The mastholder, bit of a mess currently. I should be able to improve this... + +![mast](/images/radio/velddagen/2024-01-21/mast) + +The sign, that I sadly did not notice. It is important to respect these areas, so pay attention to the surroundings when you will do an activation. + +"Kwetsbaar gebied" = _Vulnerable area_, "Geen toegang" = _Access denied_. + +![geen toegang bordje](/images/radio/velddagen/2024-01-21/geen-toegang) + +The maintainer of Staatsbosbeheer comes to write the fine. + +![staatsbosbeheer](/images/radio/velddagen/2024-01-21/staatsbosbeheer) + +I admit being wrong here, I had no problem accepting the fine. It is important to respect the rules of the park. Make sure you are not in a closed-off area and start putting pegs in the ground. For the ground and the life in it may be disturbed. Do not annoy others with your hobby and respect the rules. \ No newline at end of file diff --git a/src/Pages/Radio/fielddays/nl/20240121.js b/src/Pages/Radio/fielddays/nl/20240121.js deleted file mode 100644 index 7efb788..0000000 --- a/src/Pages/Radio/fielddays/nl/20240121.js +++ /dev/null @@ -1,70 +0,0 @@ -import React from 'react'; - -const FD20240121NL = () => { - return ( -
-
-
- intro -
-
- -
-
-
-

Velddag - De Groote Peel, Kokmeeuwenweg

-

2024-01-20

- -

Deze dag was een mislukking voor me.

-

Ik heb slechts 1 park-to-park QSO kunnen maken met SP3W/P, in SP-1888 en SP-1878 in Polen.

-

Ik moest plotseling mijn opstelling direct (en terecht) verwijderen van Staatsbosbeheer. Ik stond opgesteld op een kwetsbaar gebied. Er stond een bordje, maar helaas had ik het zelf niet gezien, stom van me.

-

Het was wel een test voor mijn nieuwe antenne-opstelling. Ik had een plastic buis gebruikt met sterke haringen en speciale spanhaken van Nite Ize.

- - - - - - - - antenna setup - - -

De masthouder, een provisorische opstelling. Moet veel beter kunnen denk ik...

- - - - - - mast - - -

Het bordje, dat ik helaas niet had opgemerkt. Het is belangrijk om deze gebieden te respecteren, dus let goed op als je een activatie gaat doen.

- - - - - - geen toegang bordje - - -

De handhaver van Staatsbosbeheer komt de boete schrijven.

- - - - - - staatsbosbeheer - - -
-
-
-
- ) -} - -export default FD20240121NL; diff --git a/src/Pages/Radio/fielddays/nl/20240121.md b/src/Pages/Radio/fielddays/nl/20240121.md new file mode 100644 index 0000000..206a610 --- /dev/null +++ b/src/Pages/Radio/fielddays/nl/20240121.md @@ -0,0 +1,32 @@ +Velddag - De Groote Peel, Kokmeeuwenweg +======================================= + +_2024-01-20_ + +Deze dag was een mislukking voor me. + +Ik heb slechts 1 park-to-park QSO kunnen maken met SP3W/P, in SP-1888 en SP-1878 in Polen. + +Ik moest plotseling mijn opstelling direct (en terecht) verwijderen van Staatsbosbeheer. Ik stond opgesteld op een kwetsbaar gebied. Er stond een bordje, maar helaas had ik het zelf niet gezien, stom van me. + +Het was wel een test voor mijn nieuwe antenne-opstelling. Ik had een plastic buis gebruikt met sterke haringen en speciale spanhaken van Nite Ize. + +* [Nite Ize CamJam spanhaken](https://www.niteize.nl/p/camjam-spanhaak-zwart-ni-ncj-01-r3) +* [60mm HWA buis](https://www.praxis.nl/bouwmaterialen/waterafvoer/dakgoten-en-accessoires/martens-hwa-buis-60mm-2-meter-grijs/2215168) +* [Wurmi Erdsandwurm haring](https://www.wurmi-shop.de/) + +![antenna setup](/images/radio/velddagen/2024-01-21/setup) + +De masthouder, een provisorische opstelling. Moet veel beter kunnen denk ik... + +![mast](/images/radio/velddagen/2024-01-21/mast) + +Het bordje, dat ik helaas niet had opgemerkt. Het is belangrijk om deze gebieden te respecteren, dus let goed op als je een activatie gaat doen. + +![geen toegang bordje](/images/radio/velddagen/2024-01-21/geen-toegang) + +De handhaver van Staatsbosbeheer komt de boete schrijven. + +![staatsbosbeheer](/images/radio/velddagen/2024-01-21/staatsbosbeheer) + +Ik geef toe dat ik hier fout was en had geen probleem met het accepteren van deze boete. Het is belangrijk om de regels van het park te respecteren. Dus voordat je haringen de grond in slaat, bedenk dat je de bodem en het leven daarmee verstoord. Zorg dat je geen last bent tot anderen met je hobbies en respecteer de regels. \ No newline at end of file diff --git a/src/Pages/markdownPage.js b/src/Pages/markdownPage.js new file mode 100644 index 0000000..e3c4837 --- /dev/null +++ b/src/Pages/markdownPage.js @@ -0,0 +1,53 @@ +import React, { useState, useEffect } from 'react'; +import Markdown from 'markdown-to-jsx'; + +const MarkdownPage = ({ md }) => { + const file_name = md; + const [markdownContent, setPost] = useState(''); + + useEffect(() => { + import(`./${file_name}`) + .then(res => { + fetch(res.default) + .then(res => res.text()) + .then(res => setPost(res)) + .catch(err => console.log(err)); + }) + .catch(err => console.log(err)); + }); + + const MyArticle = ({ children }) =>
{children}
+ + const MyParagraph = ({ children, ...props }) =>

{children}

+ + const MyImage = ({ src, alt }) => { + return ( + + + + + {alt} + ) + } + + return ( + + {markdownContent} + + ) +} + +export default MarkdownPage; diff --git a/src/UI/Footer.js b/src/UI/Footer.js index 49f263b..43dad25 100644 --- a/src/UI/Footer.js +++ b/src/UI/Footer.js @@ -9,13 +9,14 @@ const Footer = () => { return ( ) } diff --git a/src/overrides.scss b/src/overrides.scss index 7cc5c67..6ffc8d1 100644 --- a/src/overrides.scss +++ b/src/overrides.scss @@ -15,6 +15,10 @@ $theme-colors: ( // Import Bootstrap and its default variables @import '~bootstrap/scss/bootstrap.scss'; +.main-page { + padding: 0px 40px 0px 40px; +} + body.dark { background-color: map-get($theme-colors, "dark") !important; }