Skip to content

Commit

Permalink
set item name as page title #157
Browse files Browse the repository at this point in the history
  • Loading branch information
gllmp committed Jul 4, 2022
1 parent 73494d9 commit 38860a6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
12 changes: 5 additions & 7 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</div>
<div id="header-center">
<h2 id="header-title">
<a href="/#">TimeSide Player</a>
<a href="/#">Loading...</a>
</h2>
</div>
<div v-if="!isUnauthorized" id="header-right">
Expand Down Expand Up @@ -98,12 +98,10 @@ export default defineComponent({
}
#header {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-gap: 5px;
grid-auto-rows: minmax(50px, auto);
vertical-align: middle;
margin: auto;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: flex-start;
}
#header-left {
Expand Down
7 changes: 4 additions & 3 deletions src/components/Player.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
class="player"
>
<div class="top-line">
<div class="title">
<h3> {{ item.title }} </h3>
<div>
<div
class="information-bubble"
@mouseover="hover = true"
Expand Down Expand Up @@ -229,6 +226,10 @@ export default defineComponent({
}
}
})
export function setTitle (item: Item) {
const titleElement = document.querySelector('#header-title')?.getElementsByTagName('a')[0]!
titleElement.innerHTML = item.title!
}
</script>

<style lang="less">
Expand Down

0 comments on commit 38860a6

Please sign in to comment.