Skip to content
This repository was archived by the owner on May 7, 2021. It is now read-only.

Commit bf0fafa

Browse files
authored
Merge pull request #162 from ProgrammingLab/kp/header
ヘッダの整備
2 parents 5177cc1 + fab832b commit bf0fafa

File tree

8 files changed

+67
-71
lines changed

8 files changed

+67
-71
lines changed

src/App.vue

Lines changed: 63 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,45 @@
11
<template>
22
<div id="app">
3+
<header>
4+
<router-link :to="{ name: 'home' }">
5+
<img class="logo" src="@/assets/logo.svg" alt="ProLab">
6+
</router-link>
7+
<loading-indicator/>
8+
</header>
9+
310
<error-page v-if="isError"/>
4-
<loading-indicator class="loading"/>
11+
512
<router-view v-show="!isError"/>
13+
14+
<footer>
15+
<div v-if="loggedIn">
16+
<router-link to="/editprofile">プロフィール編集</router-link>
17+
<router-link :to="{ name: 'editAchievements' }" exact>実績編集</router-link>
18+
<Logout/>
19+
</div>
20+
<div v-else>
21+
<router-link to="/login">ログイン</router-link>
22+
</div>
23+
<small>&copy; Programming Laboratory, 2019</small>
24+
</footer>
625
</div>
726
</template>
827

928
<script>
1029
import { mapGetters } from 'vuex';
1130
import ErrorPage from './components/ErrorPage.vue';
1231
import LoadingIndicator from './components/LoadingIndicator.vue';
32+
import Logout from '@/components/Logout.vue';
1333
1434
export default {
1535
components: {
1636
ErrorPage,
1737
LoadingIndicator,
38+
Logout,
1839
},
1940
computed: {
2041
...mapGetters('criticalError', ['isError']),
42+
...mapGetters('session', ['loggedIn']),
2143
},
2244
metaInfo: {
2345
title: 'Untitled',
@@ -27,22 +49,51 @@ export default {
2749
</script>
2850

2951
<style>
30-
html {
31-
height: 100%;
32-
}
33-
3452
body {
3553
font-family: 'Noto Sans JP', sans-serif;
36-
height: 100%;
3754
}
3855
39-
#app {
40-
height: 100%;
41-
}
42-
43-
.loading {
44-
position: fixed;
56+
header {
57+
position: sticky;
4558
top: 0;
4659
z-index: 127;
60+
width: 100%;
61+
padding-top: 10px;
62+
max-width: 1500px;
63+
margin: 0 auto;
64+
border-bottom: 4px #333 solid;
65+
background: rgba(255, 255, 255, 0.8);
66+
}
67+
68+
header img {
69+
max-width: 250px;
70+
width: 40%;
71+
margin: 20px 40px;
72+
}
73+
74+
footer div {
75+
text-align: center;
76+
}
77+
78+
footer a {
79+
display: inline-block;
80+
padding: 12px;
81+
border-bottom: 2px #333 solid;
82+
color: black;
83+
margin: 0 4px 24px;
84+
}
85+
86+
footer small {
87+
display: block;
88+
}
89+
90+
small {
91+
text-align: center;
92+
}
93+
94+
@media screen and (max-width: 480px) {
95+
header img {
96+
margin-left: 30px;
97+
}
4798
}
4899
</style>

src/components/ErrorPage.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
<div id="error">
44
<h1 id="title">{{ number }}</h1>
55
<p id="message">{{ message }}</p>
6-
<router-link :to="{ name: 'home' }">
7-
Go to home page
8-
</router-link>
96
</div>
107
</div>
118
</template>
@@ -18,6 +15,7 @@
1815
align-items: center;
1916
width: 100%;
2017
height: 100%;
18+
margin: 200px 0;
2119
}
2220
#error {
2321
margin: auto;

src/components/LoadingIndicator.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default {
2828
2929
.loading-indicator-active {
3030
height: 100%;
31-
background-color: cornflowerblue;
31+
background-color: rgb(147, 176, 255);
3232
animation: loading 1.5s linear infinite;
3333
}
3434

src/views/EditProfile.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@
152152
<p class="has-text-danger" v-if="hasValidationError">入力値に誤りがあります</p>
153153
<p v-if="isSuccess">保存しました</p>
154154
</form>
155-
<router-link :to="{ name: 'home' }" exact>トップページに戻る</router-link>
156155
</section>
157156
</div>
158157
</template>

src/views/Home.vue

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<template>
22
<div class="home">
3-
<h1><img class="logo" src="@/assets/logo.svg" alt="ProLab"></h1>
43
<section>
54
<h2>部員募集中!</h2>
65
<p>
@@ -22,25 +21,11 @@
2221
<publicMemberList includeLeftUser/>
2322
</div>
2423
</section>
25-
26-
<footer>
27-
<div v-if="loggedIn">
28-
<router-link to="/editprofile">プロフィール編集</router-link>
29-
<router-link :to="{ name: 'editAchievements' }" exact>実績編集</router-link>
30-
<Logout/>
31-
</div>
32-
<div v-else>
33-
<router-link to="/login">ログイン</router-link>
34-
</div>
35-
<small>&copy; Programming Laboratory, 2019</small>
36-
</footer>
3724
</div>
3825
</template>
3926

4027
<script>
41-
import { mapGetters } from 'vuex';
4228
import AchievementsList from '@/components/AchievementsList.vue';
43-
import Logout from '@/components/Logout.vue';
4429
import publicMemberList from '@/components/PublicMemberList.vue';
4530
4631
export default {
@@ -51,12 +36,8 @@ export default {
5136
},
5237
components: {
5338
AchievementsList,
54-
Logout,
5539
publicMemberList,
5640
},
57-
computed: {
58-
...mapGetters('session', ['loggedIn']),
59-
},
6041
};
6142
</script>
6243

@@ -70,22 +51,6 @@ export default {
7051
}
7152
}
7253
73-
footer div {
74-
text-align: center;
75-
}
76-
77-
footer a {
78-
display: inline-block;
79-
padding: 12px;
80-
border-bottom: 2px #333 solid;
81-
color: black;
82-
margin: 0 4px 24px;
83-
}
84-
85-
footer small {
86-
display: block;
87-
}
88-
8954
.home {
9055
max-width: 1500px;
9156
margin: 40px auto;
@@ -96,15 +61,6 @@ footer small {
9661
margin-right: 30px;
9762
}
9863
99-
h1 {
100-
margin-left: 5px;
101-
}
102-
103-
h1 img {
104-
max-width: 400px;
105-
width: 80%;
106-
}
107-
10864
section {
10965
margin: 40px 0;
11066
}
@@ -137,14 +93,7 @@ p {
13793
margin-right: 20px;
13894
}
13995
140-
small {
141-
text-align: center;
142-
}
143-
14496
@media screen and (max-width: 480px) {
145-
h1 {
146-
margin-left: 30px;
147-
}
14897
h2 {
14998
padding-left: 30px;
15099
font-size: 2rem;

src/views/Login.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<template>
22
<div class="container">
33
<div class="box">
4-
<img class="logo" src="../assets/logo.svg" alt="ProLab">
54
<form v-on:submit.prevent="onLogin">
65
<label for="id">Name or Email Address</label>
76
<input required type="text" v-model="name">
@@ -61,6 +60,7 @@ export default {
6160
align-items: center;
6261
flex-direction: column;
6362
height: 100%;
63+
margin-top: 100px;
6464
}
6565
6666
img {

src/views/memberIntroduction/Profile.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
</a></dd>
4141
</template>
4242
</dl>
43-
<button v-on:click="onBack">もどる</button>
4443
</div>
4544
</template>
4645

src/views/oauth/Login.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
<div v-if="checkingChallenge">Please Wait</div>
55
<div v-else-if="!challengeError">
66
<div class="box">
7-
<img class="logo" src="../../assets/logo.svg" alt="ProLab">
87
<form v-on:submit.prevent="onLogin">
98
<label for="id">Name or Email Address</label>
109
<input required type="text" v-model="name">
@@ -25,6 +24,7 @@
2524
align-items: center;
2625
flex-direction: column;
2726
height: 100%;
27+
margin-top: 100px;
2828
}
2929
3030
img {

0 commit comments

Comments
 (0)