first commit

This commit is contained in:
小喵 2022-11-20 20:11:01 +08:00
commit 1db6db15c9
Signed by: mt
GPG key ID: 2BCF198BD3341FB3
16 changed files with 6530 additions and 0 deletions

52
src/App.vue Normal file
View file

@ -0,0 +1,52 @@
<template>
<header>
<router-link :to="{ name: 'Home' }" class="nav-top">
<img alt="Osaka Logo" :src="`${baseUrl}osaka-castle.png`" />
Japan 2023
</router-link>
</header>
<main>
<router-view></router-view>
</main>
<footer>&copy; 2022-2023</footer>
</template>
<script>
export default {
name: 'App',
data() {
return { baseUrl: process.env.BASE_URL }
},
}
</script>
<style>
.nav-top {
display: block;
font-size: large;
padding: .5rem;
text-align: center;
text-decoration: none;
}
.nav-top img {
vertical-align: middle;
width: 20px;
}
ul.route-list {
list-style: none;
padding: 0;
}
.list-item, .route-item {
border: 1px solid;
display: block;
margin: .5rem;
padding: .5rem;
}
footer {
text-align: center;
}
</style>

11
src/main.js Normal file
View file

@ -0,0 +1,11 @@
import { createApp } from 'vue'
import { createRouter, createWebHistory } from 'vue-router'
import routes from '@/routes'
import App from '@/App'
createApp(App)
.use(createRouter({
history: createWebHistory(),
routes,
}))
.mount('#app')

30
src/pages/HomePage.vue Normal file
View file

@ -0,0 +1,30 @@
<template>
<div class="list">
<router-link
v-for="date in dates"
:key="date"
:to="{ name: 'Schedule', params: { date }}"
class="list-item"
>{{ date }}
</router-link>
</div>
</template>
<script>
import Schedules from '@/schedules'
export default {
name: 'HomePage',
data() {
return {
dates: Object.keys(Schedules),
}
},
computed: {},
methods: {},
}
</script>
<style scoped>
</style>

View file

@ -0,0 +1,13 @@
<template>
404
</template>
<script>
export default {
name: 'NotFoundPage',
}
</script>
<style scoped>
</style>

View file

@ -0,0 +1,46 @@
<template>
<div class="list">
<div class="list-title">{{ $route.params.date }}</div>
<div v-for="(el, index) in schedule.timeline" :key="index" class="list-item">
<time>{{ el.date }} {{ el.time }}</time>
<div v-if="el.place" :set="place = schedule.places[el.place]" class="place">
<div v-if="place.name" class="place-name">
<div lang="ja">{{ place.name.jp }}</div>
<div lang="zh">{{ place.name.tw }}</div>
<div lang="en">{{ place.name.en }}</div>
</div>
<div v-if="place.address" class="place-address">
<div class="zipcode">{{ place.address.zipcode }}</div>
<div lang="ja">{{ place.address.jp }}</div>
<div lang="en">{{ place.address.en }}</div>
</div>
<div v-if="place.tel" class="place-tel">
<a :href="'tel:' + place.tel" :title="place.tel">
{{ place.tel }}
</a>
</div>
</div>
<ul v-if="el.routes" class="route-list">
<li v-for="(stop, index) in el.routes" :key="index" class="route-item">
<pre>{{ stop }}</pre>
</li>
</ul>
</div>
</div>
</template>
<script>
import Schedules from '@/schedules'
export default {
name: 'SchedulePage',
data() {
return {
schedule: Schedules[this.$route.params.date],
}
},
}
</script>
<style scoped>
</style>

11
src/routes.js Normal file
View file

@ -0,0 +1,11 @@
import HomePage from '@/pages/HomePage'
import NotFoundPage from '@/pages/NotFoundPage'
import SchedulePage from '@/pages/SchedulePage'
const routes = [
{ path: '/', name: 'Home', component: HomePage },
{ path: '/schedule/:date', name: 'Schedule', component: SchedulePage },
{ path: '/:pathMatch(.*)*', name: 'NotFound', component: NotFoundPage },
]
export default routes

130
src/schedules.js Normal file
View file

@ -0,0 +1,130 @@
const Schedules = {
'2023-01-10 ~ 2023-01-14': {
places: {
kia: {
name: {
en: 'Kansai International Airport',
jp: '関西国際空港',
tw: '關西國際機場',
},
address: {
en: '1 Senshukukokita, Izumisano-shi, Osaka',
jp: '大阪府泉佐野市泉州空港北1',
zipcode: '549-0001',
},
url: 'https://www.kansai-airport.or.jp/',
},
'mop-osaka-tsurumi': {
name: {
en: 'MITSUI OUTLET PARK Osaka Tsurumi',
jp: '三井アウトレットパーク大阪鶴見',
tw: '三井 OUTLET PARK 大阪鶴見',
},
address: {
en: '2 Chome-7-70 Mattaomiya, Tsurumi Ward, Osaka',
jp: '大阪府大阪市鶴見区茨田大宮丁目70',
zipcode: '538-0031',
},
url: 'https://mitsui-shopping-park.com/mop/osaka/',
},
'hotel-amaterrace': {
name: {
en: ' Hotel Amaterrace Yosuga',
jp: 'ホテル アマテラス 縁 -よすが-',
tw: '緣天照露台飯店',
},
address: {
en: '5 Chome-21-4 Nipponbashi, Naniwa Ward, Osaka',
jp: '大阪府大阪市浪速区日本橋丁目4',
zipcode: '556-0005',
},
tel: '06-7501-8533',
url: 'https://hotel-amaterrace.com/',
},
'temma': {
name: {
en: 'Temma Station',
jp: '天満駅',
tw: '天滿站',
},
},
'donki-osaka-temma': {
name: {
en: 'Don Quijote Osaka Temma Station',
jp: 'ドン・キホーテ 天満駅店',
tw: '驚安殿堂唐吉訶德天滿站店',
},
address: {
en: '1-42 Nishikicho, Kita Ward, Osaka',
jp: '大阪府大阪市北区錦町42',
zipcode: '530-0034',
},
url: 'https://www.donki.com/store/shop_detail.php?shop_id=609',
},
'ichiran-dotonbori-south': {
name: {
en: 'Ichiran Dotonbori Store Annex',
jp: '一蘭 道頓堀店別館',
tw: '一蘭 道頓堀店別館',
},
url: 'https://ichiran.com/shop/kinki/dotonbori-south/',
},
'kuromon': {
name: {
en: 'Kuromon Market',
jp: '黒門市場',
tw: '黑門市場',
},
address: {
en: '2 Chome Nipponbashi, Chuo Ward, Osaka',
jp: '大阪府大阪市中央区日本橋2丁目',
zipcode: '542-0073',
},
url: 'https://kuromon.com/',
},
},
timeline: [
{ date: '2023-01-10', time: '10:25', place: 'kia' },
{
date: '2023-01-10',
time: '11:10~12:39',
routes: [
{
time: '11:10~11:55',
from: '關西機場',
to: '南海難波',
lines: ['南海機場線', '南海本線'],
color: '#228b22',
},
{ time: '12:02~12:03', from: '難波站', to: '心齋橋站', lines: ['御堂筋線'], color: '#dd2f18' },
{ time: '12:08~12:33', from: '心齋橋站', to: '門真南', lines: ['長堀鶴見綠地線'], color: '#afd331' },
],
},
{ date: '2023-01-10', time: '12:30-17:30', place: 'mop-osaka-tsurumi' },
{
date: '2023-01-10',
time: '17:33~18:13',
routes: [
{ time: '11:10~11:55', from: '門真南', to: '長堀橋', lines: ['長堀鶴見綠地線'], color: '#afd331' },
{ time: '11:10~11:55', from: '長堀橋', to: '惠美須町', lines: ['堺筋線'], color: '#ad4a28' },
],
},
{ date: '2023-01-10', time: '18:15-18:30', place: 'hotel-amaterrace' },
{
date: '2023-01-10',
time: '18:30~18:48',
routes: [
{ time: '18:34~18:45', from: '惠美須町', to: '扇町(大阪)', lines: ['堺筋線'], color: '#ad4a28' },
],
},
{ date: '2023-01-10', time: '18:48-22:00', place: 'temma' },
{ date: '2023-01-10', time: '22:00-22:30', place: 'donki-osaka-temma' },
{ date: '2023-01-10', time: '23:00', place: 'ichiran-dotonbori-south' },
{ date: '2023-01-10', time: '24:00-08:00', place: 'hotel-amaterrace' },
{ date: '2023-01-11', time: '08:00-08:20', routeUrl: 'https://goo.gl/maps/DwjZ8DZ8Zpi9uUpH9' },
{ date: '2023-01-11', time: '08:20-11:00', place: 'kuromon' },
],
},
}
export default Schedules