-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add main header descriptive * change search anything to search on BCD because search anything might be confusing on pages because people might think that it might be related to search anything on specific page * pl-8 on the header * update top navigation * use class="white--text" * move things in the header * change sizings * add send feedback button * send feedback after search * add footer as well * add dark theme checker and appropriate styles add * make a very top header * fix light theme * add rel nooppener * send feedback -> feedback * Fix header background * Feedback margin Co-authored-by: Michael Zaikin <[email protected]>
- Loading branch information
Showing
26 changed files
with
346 additions
and
486 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,117 @@ | ||
<template> | ||
<header class="header-class pl-4 pr-4" :class="headerAdditionalClass"> | ||
<div class="d-flex align-center"> | ||
<RouterLink to="/" class="no-decoration d-flex align-center"> | ||
<h2 class="script-casual primary--text">BCD</h2> | ||
<span class="ml-3 text-small overline text--secondary">Tezos Contract Explorer</span> | ||
</RouterLink> | ||
</div> | ||
<div> | ||
<v-btn text small :to="{ name: 'search' }" class="text--secondary" active-class="bg-before-transparent"> | ||
Search | ||
</v-btn> | ||
<v-btn text small :to="{ path: `/stats/${config.networks[0]}/general` }" class="text--secondary" active-class="bg-before-transparent"> | ||
Stats | ||
</v-btn> | ||
<v-btn text small :to="{ name: 'dapps' }" class="text--secondary" active-class="bg-before-transparent"> | ||
Dapps | ||
</v-btn> | ||
<v-btn | ||
text | ||
active-class="bg-before-transparent" | ||
class="text--secondary" | ||
to="/docs" | ||
small | ||
> | ||
API | ||
</v-btn> | ||
</div> | ||
<div class="searchbox-wrapper"> | ||
<SearchBox v-if="!noSearch" :inplace="true"></SearchBox> | ||
<v-btn text small @click="openFeedback" class="text--secondary ml-5" outlined rounded active-class="bg-before-transparent"> | ||
Feedback | ||
</v-btn> | ||
<SocialsList class="socials-list ml-3"/> | ||
<ThemeSwitcher /> | ||
</div> | ||
</header> | ||
</template> | ||
|
||
<script> | ||
import SocialsList from "./SocialsList"; | ||
import SearchBox from "./SearchBox"; | ||
import ThemeSwitcher from "./ThemeSwitcher"; | ||
export default { | ||
name: "MainHeaderDescriptive", | ||
components: { ThemeSwitcher, SearchBox, SocialsList}, | ||
props: { | ||
noSearch: Boolean, | ||
}, | ||
computed: { | ||
headerAdditionalClass() { | ||
if (this.isHome) { | ||
return this.isDarkTheme ? '' : 'bg-canvas-base'; | ||
} else { | ||
return 'bg-sidenav-base'; | ||
} | ||
}, | ||
isHome() { | ||
return this.$route.path === '/'; | ||
}, | ||
isDarkTheme() { | ||
return this.$vuetify.theme.dark; | ||
} | ||
}, | ||
methods: { | ||
openFeedback() { | ||
window.open('https://docs.google.com/forms/d/e/1FAIpQLSdTkewJ9UJHZByjpFndubp6kwEOENRBtvGIg9FisIdUJHB1mA/viewform', '_blank'); | ||
if (this.$gtag) { | ||
this.$gtag.event('Social Click', { | ||
'event_category': 'Feedback', | ||
'event_label': this.$router.currentRoute.fullPath | ||
}); | ||
} | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.header-class { | ||
position: fixed; | ||
height: var(--main-header-weight); | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
z-index: var(--z-index-main-header); | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
} | ||
.searchbox-wrapper { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
height: 2.5rem; | ||
gap: 0.75rem; | ||
& > * { | ||
height: 2.5rem; | ||
} | ||
} | ||
.list-class { | ||
padding: 0; | ||
background: transparent; | ||
} | ||
.socials-list { | ||
display: flex; | ||
align-items: center; | ||
gap: 0.75rem; | ||
} | ||
.list-item-group-class { | ||
display: flex; | ||
& > a { | ||
height: 2.5rem !important; | ||
} | ||
} | ||
</style> |
Oops, something went wrong.