single.html 1.9 KB

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