app.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <style lang="css">
  2. @import '../node_modules/highlight.js/styles/color-brewer.css';
  3. @import 'assets/styles/common.css';
  4. @import 'assets/styles/fonts/style.css';
  5. html, body {
  6. margin: 0;
  7. padding: 0;
  8. height: 100%;
  9. }
  10. #app {
  11. height: 100%;
  12. }
  13. body {
  14. font-family: 'Helvetica Neue',Helvetica,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',SimSun,sans-serif;
  15. overflow: auto;
  16. font-weight: 400;
  17. -webkit-font-smoothing: antialiased;
  18. }
  19. a {
  20. color: #4078c0;
  21. text-decoration: none;
  22. }
  23. .hljs {
  24. line-height: 1.8;
  25. font-family: Menlo, Monaco, Consolas, Courier, monospace;
  26. font-size: 12px;
  27. padding: 18px 24px;
  28. background-color: #f9fafc;
  29. border: solid 1px #eaeefb;
  30. margin-bottom: 25px;
  31. border-radius: 2px;
  32. -webkit-font-smoothing: auto;
  33. }
  34. .main-cnt {
  35. margin-top: -80px;
  36. padding: 80px 0 120px;
  37. box-sizing: border-box;
  38. min-height: 100%;
  39. }
  40. .container,
  41. .page-container {
  42. width: 1140px;
  43. margin: 0 auto;
  44. }
  45. .page-container {
  46. padding-top: 55px;
  47. h2 {
  48. font-size: 28px;
  49. color: #1f2d3d;
  50. margin: 0;
  51. }
  52. h3 {
  53. font-size: 22px;
  54. }
  55. h2, h3, h4, h5 {
  56. font-weight: normal;
  57. color: #1f2f3d;
  58. }
  59. p {
  60. font-size: 14px;
  61. color: #5e6d82;
  62. }
  63. }
  64. .demo {
  65. margin: 20px 0;
  66. }
  67. @media (max-width: 1140px) {
  68. .container,
  69. .page-container {
  70. width: 100%;
  71. }
  72. }
  73. </style>
  74. <template>
  75. <div id="app">
  76. <main-header></main-header>
  77. <div class="main-cnt">
  78. <router-view></router-view>
  79. </div>
  80. <main-footer></main-footer>
  81. </div>
  82. </template>
  83. <script>
  84. export default {
  85. name: 'app',
  86. created() {
  87. window.addEventListener('hashchange', () => {
  88. document.body.scrollTop = 0;
  89. document.documentElement.scrollTop = 0;
  90. });
  91. }
  92. };
  93. </script>