Skip to content

Commit

Permalink
added FOSS header to the landing page.
Browse files Browse the repository at this point in the history
  • Loading branch information
imprakharshukla committed Oct 15, 2021
1 parent 2d1bce4 commit 6769e3a
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
46 changes: 46 additions & 0 deletions components/landing/landingHeader.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<template>
<div :class="!view.atTopOfPage?'hidden':''">
<div class="h-8 bg-blue-700 flex justify-center items-center">
<p class="font-bold text-gray-200 text-sm">We love open source. Star this <a href="https://github.com/AndronixApp/andronix-website-base" class="underline">website</a> and other projects @ <a
href="https://git.andronix.app" class="underline">Github</a></p>
</div>
</div>
</template>

<script>
export default {
name: "landingHeader",
beforeMount() {
window.addEventListener('scroll', this.handleScroll)
},
methods: {
// the function to call when the user scrolls, added as a method
handleScroll() {
// when the user scrolls, check the pageYOffset
if (window.pageYOffset > 0) {
// user is scrolled
if (this.view.atTopOfPage) {
this.view.atTopOfPage = false
}
} else {
// user is at top of page
if (!this.view.atTopOfPage) {
this.view.atTopOfPage = true
}
}
}
},
data: function () {
return {
view: {
atTopOfPage: true
}
}
}
}
</script>

<style scoped>
</style>
1 change: 1 addition & 0 deletions layouts/default.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<div class="bg-background">
<landing-header/>
<nav-bar/>
<side-bar/>
<Nuxt class="lg:max-w-screen-2xl pt-20 mx-auto"/>
Expand Down

1 comment on commit 6769e3a

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Published on https://andronix.app as production
🚀 Deployed on https://6169c643a35dfd39c717523b--andronix.netlify.app

Please sign in to comment.