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. </article>
  15. <section id="list-side" class="r">
  16. {{ if $.Param "enableToc" }}
  17. {{ partial "main/component/toc.html" . }}
  18. {{ end }}
  19. </section>
  20. </div>
  21. </div>
  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>