Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: run Slidev in browser#1800

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
kermanx wants to merge17 commits intoslidevjs:main
base:main
Choose a base branch
Loading
fromkermanx:feat/browserify

Conversation

kermanx
Copy link
Member

@kermanxkermanx commentedAug 5, 2024
edited
Loading

[WIP] This PR tries to run Slidev in the browser, with a better editor. I think the most commonly used functions work in the browser, but some don't. In this PR, changes to existing code will be very minimal, so the Node.js version will always be workable.

Although Slidev can run in StackBlitz, it is slow regarding startup time and operational efficiency.

Preview:https://deploy-preview-1800--slidev.netlify.app/web/

twitwi, cnguyen-de, and sghng reacted with heart emoji
@netlifyNetlify
Copy link

netlifybot commentedAug 5, 2024
edited
Loading

Deploy Preview forslidev ready!

NameLink
🔨 Latest commit17469cd
🔍 Latest deploy loghttps://app.netlify.com/sites/slidev/deploys/66b24820cf91ad0008eb37a4
😎 Deploy Previewhttps://deploy-preview-1800--slidev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to yourNetlify site configuration.

@cnguyen-de
Copy link
Contributor

cnguyen-de commentedDec 16, 2024
edited
Loading

If the user can download an exported pdf version from the live version, this feature would be a killer feature for slidev.

Together with#1972 would be huge.

kermanx reacted with thumbs up emoji

@cnguyen-de
Copy link
Contributor

cnguyen-de commentedDec 18, 2024
edited
Loading

I tried out the PR and added some code on my local branch to test if you can add new slide with custom template other than default one, it looks something like this in packages/web/src/virtual/nav-controls.vue

...const selectedTemplate = ref('default')function add() {  slidesSource.push({    frontmatter: { layout: selectedTemplate.value },    content: `# ${slidesSource.length + 1}`,    note: '',  })...// should be dynamically generated based on the current themeconst templates = [{  value: 'default',}, {  value: 'fact',}, {  value: 'section',}, {  value: 'quote',}]</script><template>  <MenuButton>    <template #button>      <IconButton title="Add Slide">        <carbon:add-large />      </IconButton>    </template>    <template #menu>      <SelectList v-model="selectedTemplate" title="Template" :items="templates" @click="add()" />    </template>  </MenuButton>...

However whenever a new slide is added, the layout being shown is still the layout of the last slide. When inspecting the value in devtools, the value of frontmatter is correct. Upon creating new slide, the layout is applied. But same issue happens again, so basically the frontmatter config is delayed by one slide. I don't know all the internals yet to find a fix so I'm writing here to report the bug.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@kermanx@cnguyen-de

[8]ページ先頭

©2009-2025 Movatter.jp