Update landing nav, fix curated onboarding state

This commit is contained in:
Daniel Supernault 2024-02-19 04:33:29 -07:00
parent 8355d5d00c
commit cae26c666d
No known key found for this signature in database
GPG key ID: 23740873EE6F76A1

View file

@ -10,7 +10,7 @@
<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>
@ -24,6 +24,19 @@
name: window.pfl.name, name: window.pfl.name,
} }
}, },
computed: {
regLink: {
get() {
if(this.config.open_registration) {
return '/register';
}
if(this.config.curated_onboarding) {
return '/auth/sign_up';
}
}
}
},
mounted() { mounted() {
$(window).scroll(function(){ $(window).scroll(function(){
$('nav').toggleClass('bg-black', $(this).scrollTop() > 20); $('nav').toggleClass('bg-black', $(this).scrollTop() > 20);