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

Gallery, card, avatar, animation background, flexblock, ... more component support out-of-box #1297

Closed
zillionare opened this issue Feb 15, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@zillionare
Copy link

https://github.com/ksky521/nodeppt seems have more components out-of-box. Slidev is powerful and hackable, but hard for one know very little about js and vue.

It would be great if slidev can have those very common components for presentation:

  1. Gallery (scrollable cards)
  2. Card with image, title, text and clickable
  3. avatar
  4. more in-page layout components, like Grids (with 9 grid cells)
  5. Timeline, refer to https://github.com/NUKnightLab/TimelineJS3, very common in presentation
  6. markdown mindmap, refer to https://stackblitz.com/edit/markmap-vue?file=src%2Fapp.vue it's way beautiful than mindmap in mermaid.
@zillionare zillionare added the enhancement New feature or request label Feb 15, 2024
@antfu
Copy link
Member

antfu commented Feb 15, 2024

Thanks for bringing this up - while Slidev is somewhat quite opinionated already - I don't want it to be more opinionated. The point of having Slidev that built on top of Web is that we want you to have full control with everything available for Web. I am happy to open more flexibility if anything is not yet possible to integrate, but definitely not more components. Thank you.

@antfu antfu closed this as not planned Won't fix, can't repro, duplicate, stale Feb 15, 2024
@zillionare
Copy link
Author

Understand. I found vue devUI contains many components suitable for presentation:

Steps:
图片

Timeline:
图片

Progress to show how many slides left:
图片

However, I'm not familiar with web front tech, don't know how to integrate it with slidev.

as DevUI's documentation says:

import Components from 'unplugin-vue-components/vite'
import { DevUiResolver } from 'unplugin-vue-components/resolvers'
export default defineConfig({
  plugins: [
    // 新增
    Components({
      resolvers: [
        DevUiResolver()
      ]
    })
  ]
})

by doing this, I can make devUI works as I want, but this will cause some important slidev components failed to be loaded, for example, it will report failed to resolve component SlidesTotal.

Many thanks if anyone could help!

@KermanX
Copy link
Member

KermanX commented Feb 20, 2024

Currently, you can manually import the DevUI‘s components in each slide when you are using it:

<script setup>
import MyComponent from "devui/.../a.vue"
</script>

# Slide 3

<my-component />

Using unplugin-vue-components can be a little bit hard currently. I will work on this maybe in the next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants