DEV Community

jsong89
jsong89

Posted on • Updated on

About lab6

Github repo: https://github.com/juuuuuuun/jun-ssg
Github page: https://juuuuuuun.github.io/Dinosaurs-are-cool/

Overview..

This nice api provides users with a beginner tutorial and a lot of useful features to provide users with a very sophisticated and nice static site in an easy way.

What I interested in..

Among them, I especially liked the Theme feature. When designing a website, I always wanted to change the website to dark mode in a simple way, taking into account the user's situation at any time of the day or night. But, unfortunately, I was lazy (giggle) and always left the idea in the corner of my head. Nevertheless, Docusaurus finally got me intrigued by the Theme feature and decided to add it to my SSG-api. Therefore, I created issue about this and start to work on it. I made Argument receive the application of Theme, and also made it possible to change the generated pages to dark mode by adding the css code below.

theme == "dark" ? theme = `<style>
        body {
            background-color: #292929;
        }
        h1, h2, h3, h4, h5, h6, b, strong, th, p, a, xmp, code{
            color: #fff;
        }
        </style>` : "";
Enter fullscreen mode Exit fullscreen mode

With closing..

This concludes my rap this week. However, this is not the end. I will further refine and extend this feature to upgrade it to a much more sophisticated feature.

Top comments (0)