app.vue 1.7 KB

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