Frontend for Miracle TV
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

60 lines
1.4 KiB

  1. <template>
  2. <header>
  3. <div class="wrapper">
  4. <div>
  5. <svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
  6. <g fill="none" fill-rule="evenodd">
  7. <path
  8. d="M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z"
  9. fill="#FFF"
  10. />
  11. <path
  12. d="M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z"
  13. fill="#555AB9"
  14. />
  15. <path
  16. d="M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z"
  17. fill="#91BAF8"
  18. />
  19. </g>
  20. </svg>
  21. <h1>Acme</h1>
  22. </div>
  23. <div>
  24. <my-button size="small" @onClick="onLogout" label="Log out" v-if="user" />
  25. <my-button size="small" @onClick="onLogin" label="Log in" v-if="!user" />
  26. <my-button primary size="small" @onClick="onCreateAccount" label="Sign up" v-if="!user" />
  27. </div>
  28. </div>
  29. </header>
  30. </template>
  31. <script>
  32. import './header.css';
  33. import MyButton from './Button.vue';
  34. export default {
  35. name: 'my-header',
  36. components: { MyButton },
  37. props: {
  38. user: {
  39. type: Object,
  40. },
  41. },
  42. methods: {
  43. onLogin() {
  44. this.$emit('onLogin');
  45. },
  46. onLogout() {
  47. this.$emit('onLogout');
  48. },
  49. onCreateAccount() {
  50. this.$emit('onCreateAccount');
  51. },
  52. },
  53. };
  54. </script>