Browse Source

fix responsive behavior

olinox14 1 year ago
parent
commit
600a725f95
5 changed files with 22 additions and 3 deletions
  1. 3 1
      components/BadgeSection.vue
  2. 5 0
      components/Banner/Logo.vue
  3. 4 0
      components/Topbar.vue
  4. 8 0
      pages/index.vue
  5. 2 2
      plugins/vuetify.ts

+ 3 - 1
components/BadgeSection.vue

@@ -4,7 +4,9 @@
     <v-row>
       <v-col
         v-for="col in cols"
-        cols="4"
+        cols="12"
+        sm="6"
+        md="4"
       >
         <div
           v-for="item in col"

+ 5 - 0
components/Banner/Logo.vue

@@ -47,6 +47,11 @@ defineProps({
   :deep(.v-img) {
     width: 100%;
   }
+
+  @media (max-width: 540px) {
+    width: 100%;
+    margin: 12px auto;
+  }
 }
 
 :deep(.v-img__img) {

+ 4 - 0
components/Topbar.vue

@@ -71,6 +71,10 @@
 
     > * {
       margin-left: 24px;
+
+      @media (max-width: 540px) {
+        margin-left: 4px;
+      }
     }
 
     .logo {

+ 8 - 0
pages/index.vue

@@ -143,6 +143,10 @@ const showLongIntro: Ref<boolean> = ref(false)
   margin: 0 auto;
   width: 100%;
 
+  @media (max-width: 600px) {
+    padding: 36px 10%;
+  }
+
   :deep(a) {
     color: rgb(var(--v-theme-on-primary-alt--clickable));
   }
@@ -178,6 +182,10 @@ const showLongIntro: Ref<boolean> = ref(false)
     margin: 0 auto;
     justify-content: center;
     align-items: center;
+
+    @media (max-width: 540px) {
+      flex-direction: column;
+    }
   }
 }
 

+ 2 - 2
plugins/vuetify.ts

@@ -50,8 +50,8 @@ export const lightTheme: Theme = {
     'code-background': '#f6f8fa',
     'on-code-background': '#000000',
 
-    'surface': '#ffffff',
-    'on-surface': '#000000',
+    'surface': '#f9f9f9',
+    'on-surface': '#4d4d4d',
 
     'primary': '#334467',
     'on-primary': '#ffffff',