Giter Club home page Giter Club logo

slidev-theme-penguin's Introduction

repository-banner.png

slidev-theme-penguin

NPM version

A Penguin 🐧 theme for Slidev.

This theme is based on my personal brand, but it can be easily use and customized for your own.

Live demo: here

You can help me keep working on this project 💚

Generous Unicorns 🦄

OmgImAlexis

Install

Add the following frontmatter to your slides.md. Start Slidev then it will prompt you to install the theme automatically.

---
theme: penguin
---

It is also required to install the npm package vite-svg-loader and adding a vite.config.js in your project with the following:

import svgLoader from 'vite-svg-loader'

export default {
  plugins: [svgLoader()],
}

Learn more about how to use a theme.

Layouts

This theme provides the following layouts:

Header and footer

By default any layout will not contain a header and a footer

But you can add this properties to add header and footer

---
themeConfig:
  logoHeader: '/logo.svg'
  eventLogo: 'https://img2.storyblok.com/352x0/f/84560/2388x414/23d8eb4b8d/vue-amsterdam-with-name.png'
  eventUrl: 'https://vuejs.amsterdam/'
  twitter: '@alvarosabu'
  twitterUrl: 'https://twitter.com/alvarosabu'
---
With properties Without properties
introDark introLight

Date on footer is automatic

Intro intro

Usage:

  • Add intro in the layout field.
---
layout: intro
---
Dark Light
introDark introLight

Presenter presenter

Usage:

  • Add presenter in the layout field.
  • Add presenterImage for the speaker image.
---
layout: presenter
presenterImage: 'https://res.cloudinary.com/alvarosaburido/image/upload/v1622370075/as-portfolio/alvaro_saburido.jpg'
---
Dark Light
presenterDark presenterLight

New Section new-section

Usage:

  • Add new-section in the layout field.
---
layout: new-section
---
Dark Light
newSectionDark newSectionLight

Text Image text-image

Usage:

  • Add text-image in the layout field and add the image url on the media field.
---
layout: text-image
media: 'https://media.giphy.com/media/VkMV9TldsPd28/giphy.gif'
---
Dark Light
textImageDark textImageLight
  • Add reverse:true to reverse the order of the layout
---
layout: text-image
media: 'https://media.giphy.com/media/VkMV9TldsPd28/giphy.gif'
reverse: true
---
Dark Light
textImageDark textImageLight

Text Window text-window

Usage:

  • Add text-window in the layout field.
---
layout: text-window
---
Dark Light
textWindowDark textWindowLight
  • Add reverse:true to reverse the order of the layout
---
layout: text-window
reverse: true
---
Dark Light
textWindowDark textWindowLight

To set the content inside the window console, just use the syntax sugar ::window:: for slot name:

---
layout: text-window
---

# Consoles

Use code snippets and get the highlighting directly into a nice looking window!

::window::

I go inside the window

Components

This theme provides the following components:

Auto-favicon fancy link fancy-link

FancyLink Component will allow you to automatically add the favicon just aside your link.

auto-favicon

To use it you just need to add it to your examples.md like this:

Say hi at <fancy-link href="https://twitter.com/alvarosabu">@alvarosabu</fancy-link>

Console window the-console

<the-console>
  <iframe height="300" style="width: 100%;" scrolling="no" title="Text Clock" src="https://codepen.io/searleb/embed/pvQaJB?default-tab=html%2Cresult" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true">
    See the Pen <a href="https://codepen.io/searleb/pen/pvQaJB">
    Text Clock</a> by Bill Searle (<a href="https://codepen.io/searleb">@searleb</a>)
    on <a href="https://codepen.io">CodePen</a>.
  </iframe>
</the-console>s

TODO:

Contributing

  • npm install
  • npm run dev to start theme preview of example.md
  • Edit the example.md and style to see the changes
  • npm run export to generate the preview PDF
  • npm run screenshot to generate the preview PNG

slidev-theme-penguin's People

Contributors

alvarosabu avatar lirantal avatar zuramai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

slidev-theme-penguin's Issues

Light theme doesn't work

Hi, I love the theme but I can't figure out how to make the light theme to work. Is there any thing to do apart from theme: penguin ? The light theme seems to be black which doesn't really make sense as you can see in the picture.

I just added the two packages necessary to make it works like in the documentation and the config file at the root.
doesnotwork

Whitespace in PDF generation

Hello,

With the penguin theme, there is a white space at the bottom and the right of the slide that is added when generating PDF. This seems to only happen with pdf. Example: example-export.pdf

I pinpointed the issue from the CornerCurves, more specifically, CurveSmall. The use of left-40, introduces the bug.

CornerCurves.vue
<CurveSmall class="absolute bottom-0 left-40 opacity-40" />

I don't know how to fix it. I don't either know if the final issue comes from the template or a bug in slidev itself.

Although, this is very annoying because PDF format is a very practical format for sharing.

Could you takes a look? Thanks!

[Bug] Slides review and code blocks are empty

Just need some css fixes.

Slidev has switched to shikiji-compat which is not 100% compatible with shiki

I am using the material theme myself, but that's just a personal reference and anyone can override with his own shiki.ts

automatically added to the last line in the code block.

When I use a code block in a slide, a blank line is automatically added to the last line in the code block.

Is there any way to disable this?

This is sample code and preview.

---
layout: center
---

# install VS Code extension

```bash
code --install-extension antfu.slidev
```

localhost_3030_10(FHD)

Failed to import svg figures from theme

[vite] Internal server error: Failed to resolve import "/public/curve-big.svg" from "node_modules/slidev-theme-penguin/components/CornerCurves.vue". Does the file exist?
  Plugin: vite:import-analysis
  File: /Users/x400048/Projects/talks/vue-3-workshop-porsche/node_modules/slidev-theme-penguin/components/CornerCurves.vue
  1  |  
  2  |  import { defineComponent as _defineComponent } from "vue";
  3  |  import CurveBig from "/public/curve-big.svg";
     |                        ^
  4  |  import CurveSmall from "/public/curve-small.svg";
  5  |  const _sfc_main = _defineComponent({

How to customize?

Firstly I really love your theme and thank you for sharing.

Since 2022 feature and switch to unocss. I'm a bit lost on how can I customize theme/css.

Do you have any clues/tips for that? I'd like to change primary color for example.

Theme not working

I installed the penguin theme, but it's not working.
When I open the slides, the following message appears:

Uncaught (in promise) DOMException: Failed to execute 'createElement' on 'Document': The tag name provided ('/node_modules/slidev-theme-penguin/components/corner-curves/assets/curve-big.svg') is not a valid name.

Thank you!

I am opening this issue just to say thank you for the nice theme (i am going use it for my talk tomorrow).

And in particular for this funny reference to the last concert of Soda Estereo.

image

Nada mas queda.

[vite] Internal server error: Unknown layout "presenter"

fresh install Slidev v0.27.18 and copy your example.md:

yarn run v1.22.17
warning ../../../package.json: No license field
$ slidev --open

●■▲
Slidev v0.27.18

theme none
entry /Users/zhonglun/Google Drive/web/fastzhong-about/slides.md

slide show > http://localhost:3030/
presenter mode > http://localhost:3030/presenter
remote control > pass --remote to enable

shortcuts > restart | open | edit

3:19:42 PM [vite] Internal server error: Unknown layout "presenter"
Plugin: slidev:layout-transform:pre
File: /@slidev/slides/2.md
at transformMarkdown (/Users/zhonglun/Google Drive/web/fastzhong-about/node_modules/@slidev/cli/dist/chunk-DVHCB7TL.js:604:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
3:19:43 PM [vite] Internal server error: Unknown layout "new-section"
Plugin: slidev:layout-transform:pre
File: /@slidev/slides/5.md
at transformMarkdown (/Users/zhonglun/Google Drive/web/fastzhong-about/node_modules/@slidev/cli/dist/chunk-DVHCB7TL.js:604:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)

Content does not show when building presentation with `slidev builld`

Thanks for the theme! I've used it a couple of times and It looks really nice!

I was exploring publishing the presentation as a static website via Github actions. The deployment succeeds but when I look at the static website the content is not there - I see the HTML in the browser's developer tools though (example below). I get the same behavior when I run

yarn build
npx vite preview

Full example:

(I'm not super experienced with Vue, Node, etc. so it's likely I'm overlooking something simple)

presenter image is not working on non default base directory

If base directory changes from default, presenter image is not working.

In the original repository, the URL is converted based on the Base Directory when using the image.

https://github.com/slidevjs/themes/blob/f0ead018f3c4a2e3dc433e8526e2f5a3205d8b29/packages/theme-apple-basic/layoutHelper.ts#L6

Here we need to do the same with the following line

https://github.com/alvarosaburido/slidev-theme-penguin/blob/92084073838971cb079c0d8f1b7f5c7b2624aed3/layouts/presenter.vue#L37

Failed to resolve import "uno.css"

I used yarn gloally add this theme.And Slidev run fine and 'theme' shows slidev-theme-penguin correctly。
But Slidev doesn't render my slides properly,and Terminal prompts me that the uno.css file is missing.
How can I fix it?
image
P.S. I try to find this file in my computer by everything,however,I can't find it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.