mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Update landing nav, fix curated onboarding state
This commit is contained in:
parent
8355d5d00c
commit
cae26c666d
1 changed files with 40 additions and 27 deletions
|
@ -1,33 +1,46 @@
|
||||||
<template>
|
<template>
|
||||||
<nav class="navbar navbar-expand-lg navbar-dark fixed-top">
|
<nav class="navbar navbar-expand-lg navbar-dark fixed-top">
|
||||||
<div class="container" style="max-width: 600px;">
|
<div class="container" style="max-width: 600px;">
|
||||||
<router-link to="/" class="navbar-brand">
|
<router-link to="/" class="navbar-brand">
|
||||||
<img src="/img/pixelfed-icon-color.svg" width="40" height="40" alt="Logo">
|
<img src="/img/pixelfed-icon-color.svg" width="40" height="40" alt="Logo">
|
||||||
<span class="mr-3">{{ name }}</span>
|
<span class="mr-3">{{ name }}</span>
|
||||||
</router-link>
|
</router-link>
|
||||||
<ul class="navbar-nav mr-auto">
|
<ul class="navbar-nav mr-auto">
|
||||||
</ul>
|
</ul>
|
||||||
<div class="my-2 my-lg-0">
|
<div class="my-2 my-lg-0">
|
||||||
<a class="btn btn-outline-light btn-sm rounded-pill font-weight-bold px-4" href="/login">Login</a>
|
<a class="btn btn-outline-light btn-sm rounded-pill font-weight-bold px-4" href="/login">Login</a>
|
||||||
|
|
||||||
<a v-if="config.open_registration" class="ml-2 btn btn-primary btn-primary-alt btn-sm rounded-pill font-weight-bold px-4" href="/register">Sign up</a>
|
<a v-if="config.open_registration || config.curated_onboarding" class="ml-2 btn btn-primary btn-primary-alt btn-sm rounded-pill font-weight-bold px-4" :href="regLink">Sign up</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
config: window.pfl,
|
config: window.pfl,
|
||||||
name: window.pfl.name,
|
name: window.pfl.name,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
computed: {
|
||||||
$(window).scroll(function(){
|
regLink: {
|
||||||
$('nav').toggleClass('bg-black', $(this).scrollTop() > 20);
|
get() {
|
||||||
});
|
if(this.config.open_registration) {
|
||||||
}
|
return '/register';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(this.config.curated_onboarding) {
|
||||||
|
return '/auth/sign_up';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
$(window).scroll(function(){
|
||||||
|
$('nav').toggleClass('bg-black', $(this).scrollTop() > 20);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue