app.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. padding: 20px 25px;
  24. background-color: #f9fafc;
  25. margin-bottom: 25px;
  26. border-radius: 2px;
  27. }
  28. .main-cnt {
  29. margin-top: -80px;
  30. padding: 80px 0 120px;
  31. box-sizing: border-box;
  32. min-height: 100%;
  33. }
  34. .container,
  35. .page-container {
  36. width: 960px;
  37. margin: 0 auto;
  38. }
  39. .page-container {
  40. padding-top: 55px;
  41. h2 {
  42. font-size: 28px;
  43. color: #1f2d3d;
  44. margin: 0;
  45. }
  46. h3 {
  47. font-size: 22px;
  48. }
  49. h2, h3, h4, h5 {
  50. font-weight: normal;
  51. color: #1f2f3d;
  52. }
  53. p {
  54. font-size: 14px;
  55. color: #5e6d82;
  56. }
  57. }
  58. .demo {
  59. margin: 20px 0;
  60. }
  61. </style>
  62. <template>
  63. <div id="app">
  64. <main-header></main-header>
  65. <div class="main-cnt">
  66. <router-view></router-view>
  67. </div>
  68. <main-footer></main-footer>
  69. </div>
  70. </template>
  71. <script>
  72. export default {
  73. name: 'app',
  74. created() {
  75. window.addEventListener('hashchange', () => {
  76. document.body.scrollTop = 0;
  77. });
  78. }
  79. };
  80. </script>