single.html 1.8 KB

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