gbowne1 / RadioLogger

A Radio Logging application build with NodeJS and ExpressJS
GNU General Public License v3.0
6 stars 7 forks source link

[TODO] Reusable WebComponents #45

Open gbowne1 opened 1 year ago

gbowne1 commented 1 year ago

We should start implementing Reusable Web conponents such as the navbar, etc. so that all of the items in the rendered views that are supposed to be the sqme are the same across all pages.

I added a component folder to the client side, and a copy of the navbar as navbar.html and based on some research, a index.js and navbar.css.

gbowne1 commented 1 year ago

@jzunigarce I think this is a good idea. This should keep making pages very simple process.

jzunigarce commented 1 year ago

Could you use ejs partials or a js framework

gbowne1 commented 1 year ago

yes. To do this all we need to do is use an include wherever the item is to be rendered to. I don't think we will need a JS framework. What we have now is pretty light and includes everything that is likely to be needed in the UI without that many additional libraries, if any.

gbowne1 commented 1 year ago

Yeah we could probably start using ejs partials.

The navnar and sidebar will be the same across all pages and routes.

I know it's possible to make reusable components in PHP so it must be possible with JS, cjs, ejs, mjs, ajax, jQuery, etc. so they could be included in the html rendering.