Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@bricksroo
Last active February 7, 2024 13:03
Show Gist options
  • Star 18 You must be signed in to star a gist
  • Fork 8 You must be signed in to fork a gist
  • Save bricksroo/4652f3c37b280e6f977890fb530893de to your computer and use it in GitHub Desktop.
Save bricksroo/4652f3c37b280e6f977890fb530893de to your computer and use it in GitHub Desktop.
Reveal.js in Vue
<template>
<div id="app">
<!-- <img src="./assets/logo.png">
<HelloWorld msg="Welcome to Your Vue.js App"/> -->
<div class="reveal">
<div class="slides">
<section>Single Horizontal Slide</section>
<section>
<section>Vertical Slide 1</section>
<section>Vertical Slide 2</section>
</section>
</div>
</div>
</div>
</template>
<script>
// import HelloWorld from './components/HelloWorld.vue'
import Reveal from 'reveal.js/js/reveal'
export default {
name: 'app',
components: {
// HelloWorld
},
mounted() {
Reveal.initialize()
}
}
</script>
<style>
@import url('../node_modules/reveal.js/css/reveal.css');
@import url('../node_modules/reveal.js/css/theme/white.css');
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
/* margin-top: 60px; */
height: 100vh;
}
</style>
{
"name": "reveal",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"reveal.js": "^3.6.0",
"vue": "^2.5.13"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.0.0-beta.6",
"@vue/cli-plugin-eslint": "^3.0.0-beta.6",
"@vue/cli-service": "^3.0.0-beta.6",
"vue-template-compiler": "^2.5.13"
},
"babel": {
"presets": [
"@vue/app"
]
},
"eslintConfig": {
"root": true,
"extends": [
"plugin:vue/essential",
"eslint:recommended"
]
},
"postcss": {
"plugins": {
"autoprefixer": {}
}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
@yucheg2
Copy link

yucheg2 commented Feb 7, 2024

do you know how to dynamically add and change sections?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment