-
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.
feat: create basic framework for feature content component #81
- Loading branch information
Lev Z Király
authored and
Lev Z Király
committed
Nov 23, 2023
1 parent
bd48447
commit 671d796
Showing
4 changed files
with
46 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<script lang="ts" setup> | ||
interface Props { | ||
params: TextWindowItem["params"]; | ||
} | ||
const props = defineProps<Props>(); | ||
const { params } = toRefs(props); | ||
const { data, isPending, isPlaceholderData } = useProfileById(params); | ||
const openNewWindowFromAnchor = useAnchorClickHandler(); | ||
const isLoading = computed(() => { | ||
return isPending.value || isPlaceholderData.value; | ||
}); | ||
</script> | ||
|
||
<template> | ||
<div | ||
class="relative isolate grid h-full w-full overflow-auto" | ||
:class="{ 'opacity-50 grayscale': isLoading }" | ||
> | ||
<!-- eslint-disable-next-line vue/no-v-html, vuejs-accessibility/click-events-have-key-events, vuejs-accessibility/no-static-element-interactions --> | ||
<div v-if="data" class="prose max-w-3xl p-8" @click="openNewWindowFromAnchor" v-html="data" /> | ||
|
||
<Centered v-if="isLoading"> | ||
<LoadingIndicator /> | ||
</Centered> | ||
</div> | ||
</template> | ||
|
||
<style> | ||
/* stylelint-disable-next-line selector-class-pattern */ | ||
.tbHeader { | ||
margin: 0; | ||
} | ||
</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
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