-
-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added trending toggle in client settings #2735
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b523d5b
Added trending toggle in client settings
nargacu83 f9d3a40
✨ Added comments toggle in client settings (#2739)
frozenduck a49a58c
Added showHomeTrendingVideos entry in backend
nargacu83 ef85026
Added Logo component
nargacu83 7a55330
Added home-search-container when the homepage is empty
nargacu83 3e37314
Fixed Logo and Search not showing
nargacu83 039df24
Moved useRoute to script
nargacu83 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 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,52 @@ | ||
<template> | ||
<nuxt-link class="logo-link" to="/"> | ||
<h1 class="logo"> | ||
<span>View</span> | ||
<span class="logo-colored">Tube</span> | ||
</h1> | ||
<img class="logo-small" src="@/assets/icon.svg" alt="ViewTube" /> | ||
</nuxt-link> | ||
</template> | ||
|
||
<style lang="scss"> | ||
.logo-link { | ||
text-decoration: none; | ||
margin: auto 10px auto 10px; | ||
box-sizing: border-box; | ||
display: flex; | ||
flex-direction: row-reverse; | ||
align-items: center; | ||
position: relative; | ||
z-index: +1; | ||
|
||
.logo { | ||
font-family: $header-font; | ||
font-size: 1.5rem; | ||
color: var(--title-color); | ||
width: auto; | ||
overflow: hidden; | ||
white-space: nowrap; | ||
transition: width 300ms linear; | ||
display: flex; | ||
margin: 4px 0 0 0; | ||
|
||
span { | ||
display: block; | ||
} | ||
|
||
.logo-colored { | ||
color: transparent; | ||
background-image: var(--theme-color-gradient); | ||
background-clip: text; | ||
-webkit-background-clip: text; | ||
} | ||
} | ||
|
||
.logo-small { | ||
margin: auto; | ||
height: calc(#{$header-height} - 20px); | ||
transform: scale(0.8) translateY(-2px); | ||
transition: clip-path 300ms $intro-easing, transform 300ms linear; | ||
} | ||
} | ||
</style> |
This file contains 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 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,20 +1,19 @@ | ||
<script setup lang="ts"> | ||
import Logo from '@/components/Logo.vue'; | ||
import MainSearchBox from '@/components/MainSearchBox.vue'; | ||
import UserMenu from '@/components/header/UserMenu.vue'; | ||
import { useSettingsStore } from '@/store/settings'; | ||
import { useUserStore } from '@/store/user'; | ||
|
||
const settingsStore = useSettingsStore(); | ||
const userStore = useUserStore(); | ||
const { posAbsolute, topPositionPx } = useHeaderScroll(); | ||
</script> | ||
|
||
<template> | ||
<div class="header" :class="{ absolute: posAbsolute }"> | ||
<nuxt-link class="logo-link" to="/"> | ||
<h1 class="logo"> | ||
<span>View</span> | ||
<span class="logo-colored">Tube</span> | ||
</h1> | ||
<img class="logo-small" src="@/assets/icon.svg" alt="ViewTube" /> | ||
</nuxt-link> | ||
<MainSearchBox /> | ||
<Logo v-if="(userStore.isLoggedIn && settingsStore.showHomeSubscriptions) || settingsStore.showHomeTrendingVideos" /> | ||
<MainSearchBox v-if="(userStore.isLoggedIn && settingsStore.showHomeSubscriptions) || settingsStore.showHomeTrendingVideos" /> | ||
<UserMenu /> | ||
</div> | ||
</template> | ||
|
@@ -28,7 +27,7 @@ const { posAbsolute, topPositionPx } = useHeaderScroll(); | |
left: 0; | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
justify-content: right; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was needed because when we hide the |
||
z-index: 800; | ||
background-color: var(--header-transparent); | ||
backdrop-filter: blur(10px); | ||
|
@@ -51,49 +50,10 @@ const { posAbsolute, topPositionPx } = useHeaderScroll(); | |
position: absolute; | ||
} | ||
|
||
.logo-link { | ||
text-decoration: none; | ||
margin: auto 10px auto 10px; | ||
box-sizing: border-box; | ||
display: flex; | ||
flex-direction: row-reverse; | ||
align-items: center; | ||
position: relative; | ||
z-index: +1; | ||
|
||
.logo { | ||
font-family: $header-font; | ||
font-size: 1.5rem; | ||
color: var(--title-color); | ||
width: auto; | ||
overflow: hidden; | ||
white-space: nowrap; | ||
transition: width 300ms linear; | ||
display: flex; | ||
margin: 4px 0 0 0; | ||
|
||
span { | ||
display: block; | ||
} | ||
|
||
.logo-colored { | ||
color: transparent; | ||
background-image: var(--theme-color-gradient); | ||
background-clip: text; | ||
-webkit-background-clip: text; | ||
} | ||
} | ||
|
||
.logo-small { | ||
margin: auto; | ||
height: calc(#{$header-height} - 20px); | ||
transform: scale(0.8) translateY(-2px); | ||
transition: clip-path 300ms $intro-easing, transform 300ms linear; | ||
} | ||
|
||
@media screen and (max-width: $mobile-width) { | ||
@media screen and (max-width: $mobile-width) { | ||
.logo-link { | ||
width: 40px; | ||
|
||
.logo { | ||
width: 0; | ||
} | ||
|
This file contains 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 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 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 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 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 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 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
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.
I thought that moving the Logo to it's own component would help for any use case outside of the header bar.