geekcampsg/website

Abstract console content into JS data object

stanleynguyen opened this issue · 0 comments

https://github.com/GeekcampSG/geekcampsg.github.io/blob/1596899108d475afc72abcdba857061dc6864131/src/sections/1.landing.js#L45-L175
can be easily abstracted for ease in editing. Something like:

const config = {
    [{
       text: "title",
       color: "y"
     }]: "GeekcampSG 2020 Online",
    [{
       text: "dates",
       color: "y"
     }]: {
          [{
               text: "day1",
               color: "y"
          }]: {
               [{
                    text: "start",
                    color: "y"
               }]: "2020-09-19T14:00",
               [{
                    text: "end",
                    color: "y"
               }]: "2020-09-19T18:00"
          }
     },
     [{
          text: "location",
          color: "r",
     }]: '<a href="https://bit.ly/geekcampsg2020" rel="noopener noreferrer" target="_blank">bit.ly/geekcampsg2020</a>'
}

and then render accordingly with dangerouslySetInnerHTML whenver appropriate