AppHeader.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <template>
  2. <header class="app-hd">
  3. <div class="app-home">
  4. <a
  5. class="rt-icon-menu toggle-side"
  6. @click="$emit('sidebar-change')"
  7. />
  8. <img
  9. class="site-logo"
  10. src="img/logo.png"
  11. alt="Vue Router Tab - logo"
  12. >
  13. <h2 class="site-title">
  14. <a href="../">Vue Router Tab</a> - Demo
  15. </h2>
  16. </div>
  17. <site-link />
  18. </header>
  19. </template>
  20. <script>
  21. import SiteLink from './SiteLink.vue'
  22. export default {
  23. name: 'AppHeader',
  24. components: { SiteLink }
  25. }
  26. </script>
  27. <style lang="scss" scoped>
  28. .app-hd {
  29. display: flex;
  30. position: relative;
  31. z-index: 99;
  32. height: 50px;
  33. box-shadow: 0 0 8px rgba(0,0,0,.2);
  34. align-items: center;
  35. justify-content: space-between;
  36. .app-home {
  37. display: flex;
  38. align-items: center;
  39. }
  40. .toggle-side {
  41. display: none;
  42. margin-left: .5rem;
  43. padding: .5rem;
  44. font-size: 1.25rem;
  45. cursor: pointer;
  46. @include screen-mob {
  47. display: block;
  48. }
  49. }
  50. .site-logo {
  51. $s: 1.3rem;
  52. margin: 0 .5rem 0 1.5rem;
  53. width: $s;
  54. height: $s;
  55. @include screen-mob {
  56. margin-left: .5rem;
  57. }
  58. }
  59. .site-title {
  60. margin: 0;
  61. font-weight: 400;
  62. font-size: 1.3rem;
  63. line-height: 1;
  64. a {
  65. font-weight: 600;
  66. text-decoration: none;
  67. color: $text;
  68. &:hover {
  69. color: $color;
  70. }
  71. }
  72. }
  73. .site-link {
  74. margin-right: 1em;
  75. @include screen-mob {
  76. display: none;
  77. }
  78. /deep/ a {
  79. margin: 0 .3em;
  80. }
  81. }
  82. }
  83. </style>