diff --git a/availabili.tf/src/assets/loader.css b/availabili.tf/src/assets/loader.css new file mode 100644 index 0000000..e69de29 diff --git a/availabili.tf/src/assets/main.css b/availabili.tf/src/assets/main.css index a501771..15e0196 100644 --- a/availabili.tf/src/assets/main.css +++ b/availabili.tf/src/assets/main.css @@ -19,12 +19,6 @@ a.button { padding: unset; } -@media (hover: hover) { - a:hover { - background-color: var(--accent-transparent); - } -} - button { display: flex; align-items: center; diff --git a/availabili.tf/src/commit.ts b/availabili.tf/src/commit.ts new file mode 100644 index 0000000..ff2871d --- /dev/null +++ b/availabili.tf/src/commit.ts @@ -0,0 +1,11 @@ +export default interface Commit { + verified: boolean; + html_url: string; + sha: string; + commit: { + author: { + name: string; + }; + message: string; + }; +}; diff --git a/availabili.tf/src/components/GithubCommitHistory.vue b/availabili.tf/src/components/GithubCommitHistory.vue new file mode 100644 index 0000000..0f2b060 --- /dev/null +++ b/availabili.tf/src/components/GithubCommitHistory.vue @@ -0,0 +1,40 @@ + + + + + diff --git a/availabili.tf/src/components/GithubCommitHistoryItem.vue b/availabili.tf/src/components/GithubCommitHistoryItem.vue new file mode 100644 index 0000000..451ccca --- /dev/null +++ b/availabili.tf/src/components/GithubCommitHistoryItem.vue @@ -0,0 +1,57 @@ + + + + + diff --git a/availabili.tf/src/components/MatchCard.vue b/availabili.tf/src/components/MatchCard.vue new file mode 100644 index 0000000..7c2807f --- /dev/null +++ b/availabili.tf/src/components/MatchCard.vue @@ -0,0 +1,57 @@ + + + + + diff --git a/availabili.tf/src/stores/commits.ts b/availabili.tf/src/stores/commits.ts new file mode 100644 index 0000000..caa42c3 --- /dev/null +++ b/availabili.tf/src/stores/commits.ts @@ -0,0 +1,30 @@ +import type Commit from "@/commit"; +import { defineStore } from "pinia"; +import { ref } from "vue"; + +export const useCommitsStore = defineStore("commits", () => { + const commits = ref([]); + const commitsMap = ref<{ [id: string]: Commit }>({ }); + + function fetchCommits() { + const user = "HumanoidSandvichDispenser"; + const repo = "availabili.tf"; + + if (commits.value.length == 0) { + fetch(`https://api.github.com/repos/${user}/${repo}/commits`) + .then((response) => response.json()) + .then((response: Commit[]) => { + commits.value = response; + response.forEach((commit) => { + commitsMap.value[commit.sha] = commit; + }); + }); + } + } + + return { + commits, + commitsMap, + fetchCommits, + }; +}); diff --git a/availabili.tf/src/views/HomeView.vue b/availabili.tf/src/views/HomeView.vue index e97880a..8c566fd 100644 --- a/availabili.tf/src/views/HomeView.vue +++ b/availabili.tf/src/views/HomeView.vue @@ -1,13 +1,38 @@ + + diff --git a/availabili.tf/src/views/TeamDetailsView.vue b/availabili.tf/src/views/TeamDetailsView.vue index 2b33cca..e6af331 100644 --- a/availabili.tf/src/views/TeamDetailsView.vue +++ b/availabili.tf/src/views/TeamDetailsView.vue @@ -8,6 +8,7 @@ import MembersList from "@/components/MembersList.vue"; import moment from "moment"; import EventList from "@/components/EventList.vue"; import { useTeamsEventsStore } from "@/stores/teams/events"; +import MatchCard from "@/components/MatchCard.vue"; const route = useRoute(); const teamsStore = useTeamsStore(); @@ -81,7 +82,8 @@ onMounted(() => { - No recent matches. + No recent matches. + @@ -135,4 +137,10 @@ onMounted(() => { .icons button:hover { color: var(--text); } + +@media (max-width: 1024px) { + .content-container { + flex-direction: column; + } +}