Skip to content

Commit

Permalink
Fixes some alignment and displays issues
Browse files Browse the repository at this point in the history
Removes extra gap below the marathon header
Sidebar is constrained to not be too long
Fixes linting error

Related to Issue #44
  • Loading branch information
BobChao87 committed Dec 29, 2021
1 parent ad86b43 commit 6cfc924
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
6 changes: 5 additions & 1 deletion components/marathon/Header.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="box">
<div class="box marathon-header-container">
<div class="main-header">
<h3 class="title is-3">
{{ marathonName }}
Expand Down Expand Up @@ -79,6 +79,10 @@ export default Vue.extend({
</script>

<style lang="scss" scoped>
.marathon-header-container {
margin: 0;
}
.main-header {
display: grid;
grid-template-columns: auto min-content;
Expand Down
11 changes: 6 additions & 5 deletions pages/marathon/_marathon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ export default Vue.extend({
},
},
mounted(): void {
// Show the sidebar by default on desktop-class devices
this.collapsed = (globalThis.innerWidth ?? 1024) < 1024;
},
watch: {
$route(to, from): void {
// Detect when the path changes (not anchors in the same page or queries)
Expand All @@ -58,6 +53,11 @@ export default Vue.extend({
},
},
mounted(): void {
// Show the sidebar by default on desktop-class devices
this.collapsed = (globalThis.innerWidth ?? 1024) < 1024;
},
methods: {
...mapActions({
getMarathon: 'api/marathon/get',
Expand All @@ -84,6 +84,7 @@ export default Vue.extend({
.marathon-sidebar {
grid-area: sidebar;
align-self: start;
min-width: min(300px, 100%);
}
Expand Down

0 comments on commit 6cfc924

Please sign in to comment.