single.html 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <div class="mid">
  2. <div class="divider">
  3. <nav id="single-menu" class="l" data-dir="{{ $.Param "languagedir" | default "ltr" }}">
  4. {{ if $.Param "enableMenu" }}
  5. {{ partial "main/sections/single-menu.html" . }}
  6. {{ end }}
  7. </nav>
  8. <article id="list-main" class="m" data-dir="{{ $.Param "languagedir" | default "ltr" }}">
  9. {{ partial "main/component/toggle-sidebar.html" . }}
  10. {{ partial "main/sections/list-main.html" . }}
  11. {{ partial "main/component/pagination-single.html" . }}
  12. {{ partial "comments/comments.html" . }}
  13. </article>
  14. <section id="list-side" class="r" data-dir="{{ $.Param "languagedir" | default "ltr" }}">
  15. {{ if $.Param "enableToc" }}
  16. {{ partial "main/component/toc.html" . }}
  17. {{ end }}
  18. </section>
  19. </div>
  20. </div>
  21. {{ partial "script/single-script.html" . }}
  22. <script>
  23. var listSide = document.getElementById('list-side');
  24. var listMain = document.getElementById('list-main');
  25. var singleMenu = document.getElementById('single-menu');
  26. enquire.register("screen and (max-width:1280px)", {
  27. match: function () {
  28. listSide.className = 'r';
  29. listMain.className = 'm';
  30. singleMenu.className = 'l';
  31. },
  32. unmatch: function () {
  33. listSide.className = 'r';
  34. listMain.className = 'm';
  35. singleMenu.className = 'l';
  36. },
  37. }).register("screen and (max-width:960px)", {
  38. match: function () {
  39. listSide.className = 'hide';
  40. listMain.className = 'mr';
  41. singleMenu.className = 'l';
  42. },
  43. unmatch: function () {
  44. listSide.className = 'r';
  45. listMain.className = 'm';
  46. singleMenu.className = 'l';
  47. },
  48. }).register("screen and (max-width:600px)", {
  49. match: function () {
  50. listSide.className = 'hide';
  51. listMain.className = 'lmr';
  52. singleMenu.className = 'hide';
  53. },
  54. unmatch: function () {
  55. listSide.className = 'hide';
  56. listMain.className = 'mr';
  57. singleMenu.className = 'l';
  58. },
  59. });
  60. </script>