footer.js 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /*
  2. The MIT License (MIT)
  3. Copyright (c) 2014-2018 Nikolai Suslov and the Krestianstvo.org project contributors. (https://github.com/NikolaySuslov/livecodingspace/blob/master/LICENSE.md)
  4. */
  5. //import page from '/lib/page.mjs';
  6. class Footer {
  7. constructor() {
  8. console.log("footer constructor");
  9. this.language = _LangManager.language;
  10. }
  11. init() {
  12. // let rootDoc = _app.indexApp.entry == 'index' ? document.querySelector('#indexPage') : document.querySelector('#app');
  13. let rootDoc = document.querySelector('#app');
  14. let el = document.createElement("div");
  15. el.setAttribute("id", "footer");
  16. rootDoc.appendChild(el);
  17. document.querySelector("#footer").$cell({
  18. id: 'footer',
  19. $cell: true,
  20. $type: "div",
  21. $components: [
  22. {
  23. $type: "div",
  24. class: "mdc-layout-grid",
  25. $components: [
  26. {
  27. $type: "div",
  28. class: "mdc-layout-grid__inner",
  29. $components: [
  30. {
  31. $type: "div",
  32. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  33. $components: [
  34. _app.widgets.divider
  35. ]
  36. },
  37. {
  38. $type: "div",
  39. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  40. $components: [
  41. {
  42. $type: "a",
  43. style: "cursor:pointer; margin-right: 10px",
  44. class: "mdc-typography link-in-text mdc-theme--text-hint-on-background",
  45. $text: "Krestianstvo.org",
  46. href: "https://www.krestianstvo.org"
  47. },
  48. {
  49. $type: "span",
  50. class: "mdc-typography mdc-theme--text-hint-on-background",
  51. $text: "| 2020 "
  52. }
  53. ]
  54. }
  55. ]
  56. }
  57. ]
  58. }
  59. ]
  60. })
  61. }
  62. }
  63. export { Footer }