This repository was archived by the owner on May 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
戦歴リストと仮のトップページを作成 #71
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
0a2b4a8
トップページと実績リストを仮で作成
mucho613 996ba46
文字数のエラー解消
mucho613 5114cda
なんちゃってレスポンシブ
mucho613 8ca207a
Merge branch 'master' into achievements-list-provisional
mucho613 fd5b35b
API から取得できるようにした
mucho613 fe7dd08
store と api client を定義
mucho613 5945529
fix indent
mucho613 caee902
eslint のエラーを解消
mucho613 d598079
eslint のエラーを解消
mucho613 e3474fb
Activity Graph を消した
mucho613 438f847
Error handling
gedorinku f375f08
Merge pull request #90 from ProgrammingLab/achievements-list-provisio…
gedorinku 08b9f72
トップページ末尾の導線設置
mucho613 b4deddb
Merge branch 'master' into achievements-list-provisional
mucho613 aba93ba
Merge branch 'master' of github.com:ProgrammingLab/prolab-accounts-cl…
mucho613 eb51385
トップページをレスポンシブな感じに整えた
mucho613 69fbe09
プロフィール詳細画面
mucho613 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import api from '@/api'; | ||
|
||
export default { | ||
async getAchievements() { | ||
const achievementData = (await api.client.get('/achievements')).data; | ||
return achievementData; | ||
}, | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
<template> | ||
<ul> | ||
<li v-for="item in achievements" :key="item.id"> | ||
<dl> | ||
<dt>{{ item.title }}</dt> | ||
<dd class="award">{{ item.award }}</dd> | ||
<dd class="year">{{ item.happened_at.split('-')[0] }}</dd> | ||
<dd>{{ item.description }}</dd> | ||
</dl> | ||
<img v-bind:src="item.image_url"> | ||
</li> | ||
</ul> | ||
</template> | ||
|
||
<script> | ||
import { mapState, mapActions } from 'vuex'; | ||
|
||
export default { | ||
name: 'AchievementsList', | ||
computed: mapState( | ||
'achievement', ['achievements'], | ||
), | ||
methods: { | ||
...mapActions( | ||
'achievement', ['getAchievements'], | ||
), | ||
}, | ||
async created() { | ||
this.getAchievements(); | ||
}, | ||
}; | ||
</script> | ||
|
||
<style scoped> | ||
ul { | ||
display: flex; | ||
flex-wrap: wrap; | ||
align-content: flex-start; | ||
margin-left: 60px; | ||
margin-right: 20px; | ||
padding: 0; | ||
align-items: flex-start; | ||
} | ||
li { | ||
margin-bottom: 40px; | ||
margin-right: 1%; | ||
border: 1px solid #666; | ||
list-style: none; | ||
width: 24%; | ||
position: relative; | ||
} | ||
li:hover { | ||
cursor: pointer; | ||
} | ||
li:hover { | ||
background-color: black; | ||
color: white; | ||
transition-duration: 0.2s; | ||
} | ||
|
||
dl { | ||
margin: 20px; | ||
} | ||
dt { | ||
font-size: 1.4rem; | ||
} | ||
dd, dt { | ||
width: 85%; | ||
} | ||
dd.award { | ||
overflow: hidden; | ||
white-space: nowrap; | ||
text-overflow: ellipsis; | ||
} | ||
dd.year { | ||
text-align: right; | ||
position: absolute; | ||
right: 0; | ||
top: 6px; | ||
color: #ccc; | ||
font-size: 3.5rem; | ||
transform: rotate(-90deg) translateY(-100%); | ||
transform-origin: right top; | ||
line-height: 1; | ||
font-family: 'Barlow'; | ||
} | ||
li:hover dd.year { | ||
color: white; | ||
} | ||
p { | ||
text-overflow: ellipsis; | ||
} | ||
img { | ||
width: 100%; | ||
} | ||
|
||
@media screen and (max-width: 1024px) { | ||
li { | ||
width: 48%; | ||
margin-right: 2%; | ||
} | ||
} | ||
|
||
@media screen and (max-width: 480px) { | ||
li { | ||
width: 100%; | ||
} | ||
} | ||
</style> |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import achievementClient from '@/api/achievement'; | ||
|
||
export default { | ||
namespaced: true, | ||
state: { | ||
achievements: null, | ||
}, | ||
/* eslint-disable no-param-reassign */ | ||
mutations: { | ||
setAchievements(state, achievements) { | ||
state.achievements = achievements.achievements; | ||
}, | ||
}, | ||
/* eslint-enable no-param-reassign */ | ||
actions: { | ||
async getAchievements({ commit }, sessionID) { | ||
try { | ||
commit('setAchievements', await achievementClient.getAchievements(sessionID)); | ||
} catch (e) { | ||
commit('criticalError/createError', e, { root: true }); | ||
} | ||
}, | ||
}, | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,122 @@ | ||
<template> | ||
<div class="home"> | ||
<img alt="Vue logo" src="../assets/logo.png"> | ||
<HelloWorld msg="Welcome to Your Vue.js App"/> | ||
<h1><img class="logo" src="@/assets/logo.svg" alt="ProLab"></h1> | ||
<section> | ||
<h2>部員募集中!</h2> | ||
<p> | ||
久留米高専プロラボ部は平日授業を終えた学生が集まり次第、電気電子・制御情報工学科棟のSJ(制御情報実験室)で活動しています。<br> | ||
興味のある方は、活動時間にSJ教室を訪ねてみてくださいね! | ||
</p> | ||
</section> | ||
|
||
<section> | ||
<h2>戦歴</h2> | ||
<AchievementsList/> | ||
</section> | ||
|
||
<footer> | ||
<div v-if="loggedIn"> | ||
<router-link to="/editprofile">プロフィール編集</router-link> | ||
<router-link to="">ログアウト</router-link> <!-- TODO: ログアウトできるようにする --> | ||
</div> | ||
<div v-else> | ||
<router-link to="/login">ログイン</router-link> | ||
</div> | ||
<small>© Programming Laboratory, 2019</small> | ||
</footer> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
// @ is an alias to /src | ||
import HelloWorld from '@/components/HelloWorld.vue'; | ||
import { mapGetters } from 'vuex'; | ||
import AchievementsList from '@/components/AchievementsList.vue'; | ||
|
||
export default { | ||
name: 'home', | ||
components: { | ||
HelloWorld, | ||
AchievementsList, | ||
}, | ||
computed: { | ||
...mapGetters('session', ['loggedIn']), | ||
}, | ||
}; | ||
</script> | ||
|
||
<style scoped> | ||
@keyframes slide { | ||
from { | ||
width: 100%; | ||
} | ||
to { | ||
width: 0; | ||
} | ||
} | ||
|
||
footer div { | ||
text-align: center; | ||
} | ||
|
||
footer a { | ||
display: inline-block; | ||
padding: 12px; | ||
border-bottom: 2px #333 solid; | ||
color: black; | ||
margin: 0 4px 24px; | ||
} | ||
|
||
footer small { | ||
display: block; | ||
} | ||
|
||
.home { | ||
max-width: 1500px; | ||
margin: 40px auto; | ||
} | ||
|
||
h1 img { | ||
max-width: 400px; | ||
width: 80%; | ||
} | ||
|
||
section { | ||
margin: 40px 0; | ||
} | ||
|
||
h2 { | ||
background-color: black; | ||
display: inline-block; | ||
color: white; | ||
font-weight: 200; | ||
line-height: 1.1; | ||
font-size: 3rem; | ||
padding: 0 20px 0 60px; | ||
margin-bottom: 10px; | ||
position: relative; | ||
} | ||
|
||
h2::after { | ||
display: block; | ||
height: 100%; | ||
content: ""; | ||
position: absolute; | ||
background-color: white; | ||
top: 0; | ||
right: 0; | ||
animation: slide 0.5s cubic-bezier(0, 0, 0.16, 0.96); | ||
} | ||
|
||
p { | ||
margin-left: 60px; | ||
margin-right: 20px; | ||
} | ||
|
||
small { | ||
text-align: center; | ||
} | ||
|
||
@media screen and (max-width: 480px) { | ||
h2 { | ||
font-size: 2rem; | ||
} | ||
} | ||
</style> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
この文言変えたいなぁ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
あとで考える