Skip to content

Commit

Permalink
feat: adjust article design
Browse files Browse the repository at this point in the history
  • Loading branch information
EvgenyWas committed May 27, 2024
1 parent a571382 commit cb7aee7
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 9 deletions.
20 changes: 20 additions & 0 deletions components/content/ProseA.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<template>
<a
:href="href"
:target="target"
class="text-decoration-underline"
>
<slot />
</a>
</template>

<script setup lang="ts">
defineProps({
href: { type: String, default: '' },
target: {
type: String as PropType<'_blank' | '_parent' | '_self' | '_top'>,
default: '_blank',
required: false,
},
});
</script>
13 changes: 8 additions & 5 deletions components/content/ProsePre.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<template>
<pre :class="$props.class"><slot /></pre>
<pre
:class="$props.class"
class="prose-pre"
><slot /></pre>
</template>

<script setup lang="ts">
Expand All @@ -16,25 +19,25 @@ defineProps({
<style>
.v-application.v-theme--light {
.article {
pre {
.prose-pre {
background-color: rgb(var(--v-theme-on-surface));
}
}
}
.v-application.v-theme--dark {
.article {
pre {
.prose-pre {
background-color: rgb(var(--v-theme-surface));
}
}
}
pre code .line {
.prose-pre code .line {
display: block;
}
pre {
.prose-pre {
max-width: 100%;
margin: 12px 0 20px;
padding: 16px;
Expand Down
16 changes: 12 additions & 4 deletions pages/articles/[topic]/[slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,14 @@
variant="plain"
prepend-icon="fas fa-chevron-left"
rounded="md"
class="text-body-1"
@click="onPrevClick"
>
{{ prevSibling.title }}
<VTooltip
:text="prevSibling.title"
location="top"
activator="parent"
/>
Previous
</VBtn>
</VCol>

Expand All @@ -59,10 +63,14 @@
variant="plain"
append-icon="fas fa-chevron-right"
rounded="md"
class="text-body-1"
@click="onNextClick"
>
{{ nextSibling.title }}
<VTooltip
:text="nextSibling.title"
location="top"
activator="parent"
/>
Next
</VBtn>
</VCol>
</VRow>
Expand Down

0 comments on commit cb7aee7

Please sign in to comment.