-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
83e3520
commit 3cb6786
Showing
18 changed files
with
738 additions
and
755 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,24 +1,26 @@ | ||
<template> | ||
<div class="mb-1"> | ||
<div :class="[opened ? 'bg-ui-backgroundTertiary' : '']" class="rounded-md px-1 w-full h-full" @click="$emit('click')" > | ||
<slot>Navlink</slot> | ||
</div> | ||
<div class="mb-1"> | ||
<div | ||
:class="[opened ? 'bg-ui-backgroundTertiary' : '']" | ||
class="rounded-md px-1 w-full h-full" | ||
@click="$emit('click')" | ||
> | ||
<slot>Navlink</slot> | ||
</div> | ||
|
||
<div v-if="opened"> | ||
<slot name="popup"/> | ||
</div> | ||
<div v-if="opened"> | ||
<slot name="popup" /> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { defineComponent } from '@vue/composition-api' | ||
export default defineComponent({ | ||
props: { | ||
opened: { | ||
type: Boolean, | ||
default: false | ||
} | ||
} | ||
props: { | ||
opened: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
}, | ||
}) | ||
</script> |
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 |
---|---|---|
@@ -1,56 +1,58 @@ | ||
<template> | ||
<div class="group popup-parent cursor-pointer relative md:px-1 md:py-3 flex justify-center rounded-md flex-col gap-2 hover:text-ui-primary text-ui-typo"> | ||
<span class=" group-hover:bg-ui-backgroundTertiary nav-link"> | ||
<slot>Navlink</slot> | ||
</span> | ||
|
||
<div ref="popupRef" class="popup" @click="hidePopup(), $emit('signal:close')"> | ||
<slot name="popup" /> | ||
</div> | ||
<div | ||
class="group popup-parent cursor-pointer relative md:px-1 md:py-3 flex justify-center rounded-md flex-col gap-2 hover:text-ui-primary text-ui-typo" | ||
> | ||
<span class="group-hover:bg-ui-backgroundTertiary nav-link"> | ||
<slot>Navlink</slot> | ||
</span> | ||
|
||
<div | ||
ref="popupRef" | ||
class="popup" | ||
@click="hidePopup(), $emit('signal:close')" | ||
> | ||
<slot name="popup" /> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { defineComponent, ref } from '@vue/composition-api' | ||
export default defineComponent({ | ||
setup() { | ||
const popupRef = ref(null) | ||
const hidePopup = () => { | ||
const hidden = 'hidden' | ||
const popup = popupRef.value | ||
popup.classList.add(hidden) | ||
window.setTimeout(()=>popup.classList.remove(hidden), 20) | ||
} | ||
return {popupRef, hidePopup} | ||
}, | ||
setup() { | ||
const popupRef = ref(null) | ||
const hidePopup = () => { | ||
const hidden = 'hidden' | ||
const popup = popupRef.value | ||
popup.classList.add(hidden) | ||
window.setTimeout(() => popup.classList.remove(hidden), 20) | ||
} | ||
return { popupRef, hidePopup } | ||
}, | ||
}) | ||
</script> | ||
|
||
<style scoped> | ||
.popup-parent{ | ||
-webkit-tap-highlight-color: transparent; | ||
.popup-parent { | ||
-webkit-tap-highlight-color: transparent; | ||
} | ||
.popup{ | ||
@apply top-12 -left-1; | ||
@apply md:absolute overflow-hidden; | ||
@apply group-hover:p-3 group-hover:border group-hover:w-full; | ||
@apply group-hover:h-auto group-hover:overflow-visible; | ||
@apply group-hover:transition-none group-hover:opacity-100; | ||
@apply duration-200 pointer-events-none; | ||
@apply bg-white rounded md:rounded-md border-gray-200; | ||
@apply md:p-3 md:w-max w-full md:h-auto h-0 border-0 opacity-0; | ||
.popup { | ||
@apply top-12 -left-1; | ||
@apply md:absolute overflow-hidden; | ||
@apply group-hover:p-3 group-hover:border group-hover:w-full; | ||
@apply group-hover:h-auto group-hover:overflow-visible; | ||
@apply group-hover:transition-none group-hover:opacity-100; | ||
@apply duration-200 pointer-events-none; | ||
@apply bg-white rounded md:rounded-md border-gray-200; | ||
@apply md:p-3 md:w-max w-full md:h-auto h-0 border-0 opacity-0; | ||
} | ||
@screen md{ | ||
.popup{ | ||
@apply group-hover:w-max; | ||
box-shadow: 0px 10px 36px rgba(0, 0, 0, 0.1); | ||
@apply group-hover:pointer-events-auto; | ||
} | ||
@screen md { | ||
.popup { | ||
@apply group-hover:w-max; | ||
box-shadow: 0px 10px 36px rgba(0, 0, 0, 0.1); | ||
@apply group-hover:pointer-events-auto; | ||
} | ||
} | ||
</style> | ||
|
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 |
---|---|---|
@@ -1,36 +1,38 @@ | ||
<template> | ||
<div class=" overflow-hidden"> | ||
<img :class="imageClass" :src="src" :alt="alt"> | ||
<div class="hidden"> | ||
<img v-for="source in srcs" :key="source" :src="source" alt="" rel="preload"> | ||
</div> | ||
<div class="overflow-hidden"> | ||
<img :class="imageClass" :src="src" :alt="alt" /> | ||
<div class="hidden"> | ||
<img | ||
v-for="source in srcs" | ||
:key="source" | ||
:src="source" | ||
alt="" | ||
rel="preload" | ||
/> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { defineComponent } from '@vue/composition-api' | ||
export default defineComponent({ | ||
props: { | ||
src: { | ||
type: String, | ||
required: true | ||
}, | ||
alt: { | ||
type: String, | ||
default: "" | ||
}, | ||
srcs: { | ||
type: Array, | ||
default: () => ([]) | ||
}, | ||
imageClass: { | ||
type: Array, | ||
default: () => ([]) | ||
} | ||
props: { | ||
src: { | ||
type: String, | ||
required: true, | ||
}, | ||
alt: { | ||
type: String, | ||
default: '', | ||
}, | ||
srcs: { | ||
type: Array, | ||
default: () => [], | ||
}, | ||
setup() { | ||
imageClass: { | ||
type: Array, | ||
default: () => [], | ||
}, | ||
}, | ||
setup() {}, | ||
}) | ||
</script> |
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 |
---|---|---|
@@ -1,65 +1,65 @@ | ||
<template> | ||
<div id="sanity-content"> | ||
<slot name="before"/> | ||
<SanityContent | ||
v-if="isValidBlock(blocks)" | ||
:blocks="blocks" | ||
:serializers="{...sr, ...serializers}"/> | ||
<slot name="after"/> | ||
</div> | ||
<div id="sanity-content"> | ||
<slot name="before" /> | ||
<SanityContent | ||
v-if="isValidBlock(blocks)" | ||
:blocks="blocks" | ||
:serializers="{ ...sr, ...serializers }" | ||
/> | ||
<slot name="after" /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { defineComponent, ref } from '@vue/composition-api' | ||
import ImageSr from './sr/ImageSr.vue' | ||
import YouTubeSr from './sr/YouTubeSr.vue' | ||
import CodeSr from './sr/CodeSr.vue' | ||
export default defineComponent({ | ||
props: { | ||
blocks: { | ||
required: true, | ||
type: Array | ||
}, | ||
serializers: { | ||
type: Object, | ||
default: () => ({}) | ||
} | ||
props: { | ||
blocks: { | ||
required: true, | ||
type: Array, | ||
}, | ||
setup(){ | ||
const sr = ref({ | ||
types: { | ||
image: ImageSr, | ||
youtube: YouTubeSr, | ||
code: CodeSr | ||
} | ||
}) | ||
serializers: { | ||
type: Object, | ||
default: () => ({}), | ||
}, | ||
}, | ||
setup() { | ||
const sr = ref({ | ||
types: { | ||
image: ImageSr, | ||
youtube: YouTubeSr, | ||
code: CodeSr, | ||
}, | ||
}) | ||
const isValidBlock = (block) => { | ||
return block && Array.isArray(block) | ||
} | ||
return {sr, isValidBlock} | ||
const isValidBlock = (block) => { | ||
return block && Array.isArray(block) | ||
} | ||
return { sr, isValidBlock } | ||
}, | ||
}) | ||
</script> | ||
|
||
<style scoped> | ||
#sanity-content a{ | ||
font-weight: bold; | ||
@apply text-ui-primary; | ||
#sanity-content a { | ||
font-weight: bold; | ||
@apply text-ui-primary; | ||
} | ||
#sanity-content a:hover{ | ||
text-decoration: underline; | ||
text-decoration-color: var(--color-ui-primary-dark); | ||
#sanity-content a:hover { | ||
text-decoration: underline; | ||
text-decoration-color: var(--color-ui-primary-dark); | ||
} | ||
#sanity-content ul{ | ||
list-style-type: square; | ||
list-style: inside; | ||
#sanity-content ul { | ||
list-style-type: square; | ||
list-style: inside; | ||
} | ||
#sanity-content h2{ | ||
@apply mt-10 font-sans; | ||
#sanity-content h2 { | ||
@apply mt-10 font-sans; | ||
} | ||
</style> | ||
</style> |
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 |
---|---|---|
@@ -1,24 +1,22 @@ | ||
<template> | ||
<div> | ||
<template v-if="code && language==='html'"> | ||
<div class="mb-10" v-html="code"/> | ||
</template> | ||
</div> | ||
<div> | ||
<template v-if="code && language === 'html'"> | ||
<div class="mb-10" v-html="code" /> | ||
</template> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { defineComponent } from '@vue/composition-api' | ||
export default defineComponent({ | ||
props: { | ||
code: { | ||
type: String, | ||
default: null | ||
}, | ||
language: { | ||
type: String, | ||
default: 'html' | ||
} | ||
} | ||
props: { | ||
code: { | ||
type: String, | ||
default: null, | ||
}, | ||
language: { | ||
type: String, | ||
default: 'html', | ||
}, | ||
}, | ||
}) | ||
</script> |
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 |
---|---|---|
@@ -1,22 +1,20 @@ | ||
<template> | ||
<div class="mb-5 border border-gray-200 rounded-md overflow-hidden"> | ||
<img class="" :alt="alt" :src="$urlFor(asset)"/> | ||
</div> | ||
<div class="mb-5 border border-gray-200 rounded-md overflow-hidden"> | ||
<img class="" :alt="alt" :src="$urlFor(asset)" /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { defineComponent } from '@vue/composition-api' | ||
export default defineComponent({ | ||
props: { | ||
alt: { | ||
type: String, | ||
default: '', | ||
}, | ||
asset: { | ||
type: Object, | ||
default: null | ||
} | ||
} | ||
props: { | ||
alt: { | ||
type: String, | ||
default: '', | ||
}, | ||
asset: { | ||
type: Object, | ||
default: null, | ||
}, | ||
}, | ||
}) | ||
</script> |
Oops, something went wrong.