Here the header and footer components for the ETHO project websites. Aim is to have a joint footer for all projects. It is pretty straight forward and an index.html template is provided.
You need to have in the the following:
First a initiation of a config variable: The component is configurable by providing additional menus via the ethocomponent_menu variable in the section. If you do not want to have any additional menus (maybe you have a side menue) then configure the following:
<script>let ethocomponent_menu='';
</script>
Otherwise use the following.
<script>let ethocomponent_menu='' +
'<li class="nav-item"><a class="nav-link" href="#">Item 1</a></li>' +
'<li class="nav-item"><a class="nav-link" href="#">Item 2</a></li>' +
'<li class="nav-item"><a class="nav-link" href="#">Item 3</a></li>' +
'';
</script>
It is important to have the valiable config before the css loadings
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/fork-awesome.min.css" integrity="sha256-XoaMnoYC5TH6/+ihMEnospgm0J1PM/nioxbOUdnM8HY=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
<script async='' src='https://cdn.jsdelivr.net/gh/Ether1Project/ethocomponents/component.js' crossorigin="anonymous"></script>
And then add in the beginning of the the header statement (if you want a menu component)
<header-component></header-component>
and at the end the footer statement
<footer-component></footer-component>
after the body you need to load the js scripts:
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script></html>