TheHeader.vue (1829B)
1 <script> 2 import SocialSharing from './SocialSharing.vue?inline'; 3 import SquircleyLogo from '@/assets/img/squircley-logo.svg?inline'; 4 5 export default { 6 name: 'TheHeader', 7 components: { 8 SocialSharing, 9 SquircleyLogo, 10 }, 11 }; 12 </script> 13 14 <template> 15 <header class="header"> 16 <div class="header__logo"> 17 <SquircleyLogo /> 18 </div> 19 <h1 class="header__title">Squircley!</h1> 20 <SocialSharing class="header__social" /> 21 </header> 22 </template> 23 24 <style scoped> 25 .header { 26 display: grid; 27 grid-template-columns: 1fr max-content 1fr; 28 grid-template-rows: auto; 29 align-items: center; 30 padding: var(--spacing-5); 31 margin-bottom: var(--spacing-7); 32 } 33 34 .header__logo { 35 grid-column: 1; 36 grid-row: 1; 37 justify-self: start; 38 width: var(--spacing-6); 39 height: var(--spacing-6); 40 } 41 42 .header__logo svg { 43 width: 100%; 44 height: 100%; 45 fill: #4d3df7; 46 } 47 48 .header__title { 49 grid-column: 2; 50 grid-row: 1; 51 justify-self: center; 52 font-size: var(--font-size-7); 53 font-weight: 900; 54 text-align: center; 55 } 56 57 .header__social { 58 grid-column: 3; 59 grid-row: 1; 60 justify-content: flex-end; 61 } 62 63 @media only screen and (max-width: 62rem) { 64 .header { 65 padding: var(--spacing-4); 66 margin-bottom: var(--spacing-4); 67 } 68 69 .header__logo { 70 width: var(--spacing-5); 71 height: var(--spacing-5); 72 border-radius: 12px; 73 } 74 75 .header__title { 76 font-size: var(--font-size-6); 77 } 78 } 79 80 @media only screen and (max-width: 48rem) { 81 .header__social { 82 display: none; 83 } 84 85 .header__title { 86 grid-column: 1; 87 justify-self: start; 88 font-size: var(--font-size-5); 89 } 90 91 .header__logo { 92 grid-column: 3; 93 justify-self: end; 94 } 95 } 96 </style>