Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ヘッダーとサイドバー・サイドドロワーを実装 #16

Merged
merged 7 commits into from
Jan 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ coverage
*.sw?

*.tsbuildinfo

.eslintcache
10 changes: 10 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"format:nofix": "prettier --cache --check src/"
},
"dependencies": {
"@heroicons/vue": "^2.2.0",
"pinia": "^2.2.6",
"vue": "^3.5.13",
"vue-router": "^4.4.5"
Expand Down
8 changes: 5 additions & 3 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export const plugins = {
tailwindcss: {},
autoprefixer: {},
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
89 changes: 10 additions & 79 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,85 +1,16 @@
<script setup lang="ts">
import { RouterLink, RouterView } from 'vue-router'
import HelloWorld from './components/HelloWorld.vue'
import { RouterView } from 'vue-router'

import CheckinHeader from '@/layouts/CheckinHeader.vue'
import SideNavigation from '@/layouts/SideNavigation.vue'
</script>

<template>
<header>
<img alt="Vue logo" class="logo" src="@/assets/logo.svg" width="125" height="125" />

<div class="wrapper">
<HelloWorld msg="You did it!" />

<nav>
<RouterLink to="/">Home</RouterLink>
<RouterLink to="/about">About</RouterLink>
</nav>
<CheckinHeader />
<div class="flex">
<div class="hidden md:block">
<SideNavigation />
</div>
</header>

<RouterView />
<RouterView />
</div>
</template>

<style scoped>
header {
line-height: 1.5;
max-height: 100vh;
}

.logo {
display: block;
margin: 0 auto 2rem;
}

nav {
width: 100%;
font-size: 12px;
text-align: center;
margin-top: 2rem;
}

nav a.router-link-exact-active {
color: var(--color-text);
}

nav a.router-link-exact-active:hover {
background-color: transparent;
}

nav a {
display: inline-block;
padding: 0 1rem;
border-left: 1px solid var(--color-border);
}

nav a:first-of-type {
border: 0;
}

@media (min-width: 1024px) {
header {
display: flex;
place-items: center;
padding-right: calc(var(--section-gap) / 2);
}

.logo {
margin: 0 2rem 0 0;
}

header .wrapper {
display: flex;
place-items: flex-start;
flex-wrap: wrap;
}

nav {
text-align: left;
margin-left: -1rem;
font-size: 1rem;

padding: 1rem 0;
margin-top: 1rem;
}
}
</style>
86 changes: 0 additions & 86 deletions src/assets/base.css

This file was deleted.

36 changes: 0 additions & 36 deletions src/assets/main.css
Original file line number Diff line number Diff line change
@@ -1,39 +1,3 @@
@import './base.css';

#app {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
font-weight: normal;
}

a,
.green {
text-decoration: none;
color: hsla(160, 100%, 37%, 1);
transition: 0.4s;
padding: 3px;
}

@media (hover: hover) {
a:hover {
background-color: hsla(160, 100%, 37%, 0.2);
}
}

@media (min-width: 1024px) {
body {
display: flex;
place-items: center;
}

#app {
display: grid;
grid-template-columns: 1fr 1fr;
padding: 0 2rem;
}
}

@tailwind base;
@tailwind components;
@tailwind utilities;
Expand Down
41 changes: 0 additions & 41 deletions src/components/HelloWorld.vue

This file was deleted.

Loading
Loading