Skip to content
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

feat(staff page)-switch layout with ccip #425

Merged
merged 6 commits into from
Aug 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions layouts/ccip.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<template>
<div class="default-layout">
<div class="default-layout__body">
<Nuxt />
<core-footer />
</div>
</div>
</template>

<script>
export default {
components: {},
data() {
return {}
},
head() {
return {}
},
}
</script>

<style>
html {
@apply bg-black-900 font-sans text-primary-100;
font-size: 20px;
word-spacing: 1px;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
box-sizing: border-box;
Comment on lines +25 to +31
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor: 如果可以用 tailwind 的語法代換,可以直接用。太複雜就維持現這樣

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

好建議! 不過我的tailwind還不夠純熟. 先維持這樣. 之後再開一個PR改語法

}

*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
}

.default-layout__body {
display: grid;
grid-template-columns: 100%;
}

body.modal-open {
overflow: hidden;
}

.page-enter-active,
.page-leave-active {
transition: 0.3s;
}
.page-enter,
.page-leave-to {
opacity: 0;
}
</style>
4 changes: 4 additions & 0 deletions pages/about/staff.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ import CoreH1 from '@/components/core/titles/H1'
import i18n from '@/i18n/about/staff.i18n'

export default {
layout(context) {
const ccip = context.query.ccip // to determine if it's opass mobile app
return ccip ? 'ccip' : 'default'
},
i18n,
name: 'PageStaff',
components: {
Expand Down
Loading