Skip to content

Commit

Permalink
feat: add option to have a custom button for the helpful layout
Browse files Browse the repository at this point in the history
  • Loading branch information
GabsEdits committed Aug 1, 2024
1 parent e776e08 commit 6f53d40
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

- Customize your website with plugins that enhance its functionality and appearance. Aplós offers a variety of plugins that you can easily integrate into your project. Let's explore the available plugins and how you can use them to improve your website.


- Add option to have a custom button for the helpful layout

- Make comments in articles optional

- Reading time for articles
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div align="center">
<h1>Aplós</h1>

A sleek, contemporary, and purposefully designed VitePress theme

</div>
Expand Down
21 changes: 13 additions & 8 deletions src/layouts/Helpful.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,25 @@
<section id="simple-layout">
<p class="dialog-buttons">
<a href="#top" target="_top">↑ Go to top</a>
<a
v-if="theme.nav.git"
id="file-an-issue"
:href="theme.nav.git + '/issues/new'"
>File an issue</a
>
<template v-if="theme.nav.git || frontmatter.footlink">
<a
class="extra-link"
:href="theme.nav.git + '/issues/new'"
v-if="theme.nav.git && !frontmatter.footlink"
>File an issue</a
>
<a id="extra-link" :href="frontmatter.footlink.url" v-else>{{
frontmatter.footlink.text
}}</a>
</template>
</p>
</section>
</template>

<script setup lang="ts">
import { useData } from "vitepress";
const { theme } = useData();
const { theme, frontmatter } = useData();
</script>

<style lang="scss">
Expand Down Expand Up @@ -49,7 +54,7 @@ const { theme } = useData();
}
}
#file-an-issue {
#extra-link {
background-color: transparent;
color: var(--color-accent);
Expand Down

0 comments on commit 6f53d40

Please sign in to comment.