Skip to content

Commit

Permalink
chore: fix website layout in small viewport (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocavue authored Jan 19, 2025
1 parent 8a07385 commit 597681f
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 42 deletions.
8 changes: 8 additions & 0 deletions website/components/nav.astro
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,13 @@ import NavLink from './nav-link.astro'
align-items: center;
gap: 10px;
margin-bottom: 80px;
overflow-x: hidden;
font-size: 1rem;
}

@media (max-width: 50rem) {
.nav {
flex-direction: column;
}
}
</style>
1 change: 1 addition & 0 deletions website/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ import LogoBackgroundAstro from '../components/logo-background-astro.astro'
color: var(--text-color);
font-size: 20px;
line-height: 1.6;
overflow-x: hidden;
}

h1 {
Expand Down
18 changes: 8 additions & 10 deletions website/pages/custom.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ import Layout from '../layouts/Layout.astro'
---

<Layout>
<main>
<div class="instructions">
<ThemeToggleButton />
</div>
<Nav />
<div class="instructions">
<ThemeToggleButton />
</div>
<Nav />

<div style="display: flex; flex-direction: column; gap: 20px;">
<Code code={buttonCode} lang="astro" title="theme-toggle-button.astro" />
<Code code={headCode} lang="astro" title="head.astro" />
</div>
</main>
<div style="display: flex; flex-direction: column; gap: 20px;">
<Code code={buttonCode} lang="astro" title="theme-toggle-button.astro" />
<Code code={headCode} lang="astro" title="head.astro" />
</div>
</Layout>
18 changes: 8 additions & 10 deletions website/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ import Layout from '../layouts/Layout.astro'
---

<Layout>
<main>
<div class="instructions">
<ThemeToggleButton />
</div>
<Nav />
<div class="instructions">
<ThemeToggleButton />
</div>
<Nav />

<div style="display: flex; flex-direction: column; gap: 20px;">
<Code code={buttonCode} lang="astro" title="theme-toggle-button.astro" />
<Code code={headCode} lang="astro" title="head.astro" />
</div>
</main>
<div style="display: flex; flex-direction: column; gap: 20px;">
<Code code={buttonCode} lang="astro" title="theme-toggle-button.astro" />
<Code code={headCode} lang="astro" title="head.astro" />
</div>
</Layout>
20 changes: 9 additions & 11 deletions website/pages/react.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@ import Layout from '../layouts/Layout.astro'
---

<Layout>
<main>
<div class="instructions">
<ThemeToggleButtonReact client:load />
</div>
<Nav />
<div class="instructions">
<ThemeToggleButtonReact client:load />
</div>
<Nav />

<div style="display: flex; flex-direction: column; gap: 20px;">
<Code code={buttonCode} lang="tsx" title="theme-toggle-button-react.tsx" />
<Code code={headCode} lang="astro" title="head.astro" />
<Code code={iconCssCode} lang="css" title="icon.css" />
</div>
</main>
<div style="display: flex; flex-direction: column; gap: 20px;">
<Code code={buttonCode} lang="tsx" title="theme-toggle-button-react.tsx" />
<Code code={headCode} lang="astro" title="head.astro" />
<Code code={iconCssCode} lang="css" title="icon.css" />
</div>
</Layout>
20 changes: 9 additions & 11 deletions website/pages/vue.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@ import Layout from '../layouts/Layout.astro'
---

<Layout>
<main>
<div class="instructions">
<ThemeToggleButtonVue client:load />
</div>
<Nav />
<div class="instructions">
<ThemeToggleButtonVue client:load />
</div>
<Nav />

<div style="display: flex; flex-direction: column; gap: 20px;">
<Code code={buttonCode} lang="vue" title="theme-toggle-button-vue.vue" />
<Code code={headCode} lang="astro" title="head.astro" />
<Code code={iconCssCode} lang="css" title="icon.css" />
</div>
</main>
<div style="display: flex; flex-direction: column; gap: 20px;">
<Code code={buttonCode} lang="vue" title="theme-toggle-button-vue.vue" />
<Code code={headCode} lang="astro" title="head.astro" />
<Code code={iconCssCode} lang="css" title="icon.css" />
</div>
</Layout>

0 comments on commit 597681f

Please sign in to comment.