app.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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. button, input, select, textarea {
  24. font-family: inherit;
  25. font-size: inherit;
  26. line-height: inherit;
  27. color: inherit;
  28. }
  29. .hljs {
  30. line-height: 1.8;
  31. font-family: Menlo, Monaco, Consolas, Courier, monospace;
  32. font-size: 12px;
  33. padding: 18px 24px;
  34. background-color: #f9fafc;
  35. border: solid 1px #eaeefb;
  36. margin-bottom: 25px;
  37. border-radius: 2px;
  38. -webkit-font-smoothing: auto;
  39. }
  40. .main-cnt {
  41. margin-top: -80px;
  42. padding: 80px 0 120px;
  43. box-sizing: border-box;
  44. min-height: 100%;
  45. }
  46. .container,
  47. .page-container {
  48. width: 1140px;
  49. margin: 0 auto;
  50. }
  51. .page-container {
  52. padding-top: 55px;
  53. h2 {
  54. font-size: 28px;
  55. color: #1f2d3d;
  56. margin: 0;
  57. }
  58. h3 {
  59. font-size: 22px;
  60. }
  61. h2, h3, h4, h5 {
  62. font-weight: normal;
  63. color: #1f2f3d;
  64. }
  65. p {
  66. font-size: 14px;
  67. color: #5e6d82;
  68. }
  69. }
  70. .demo {
  71. margin: 20px 0;
  72. }
  73. @media (max-width: 1140px) {
  74. .container,
  75. .page-container {
  76. width: 100%;
  77. }
  78. }
  79. </style>
  80. <template>
  81. <div id="app">
  82. <main-header></main-header>
  83. <div class="main-cnt">
  84. <router-view></router-view>
  85. </div>
  86. <main-footer></main-footer>
  87. </div>
  88. </template>
  89. <script>
  90. export default {
  91. name: 'app',
  92. created() {
  93. window.addEventListener('hashchange', () => {
  94. document.body.scrollTop = 0;
  95. document.documentElement.scrollTop = 0;
  96. });
  97. }
  98. };
  99. </script>