Skip to content

Instantly share code, notes, and snippets.

@cbdavide
Created October 21, 2017 03:34
Show Gist options
  • Save cbdavide/97c7d2da2571d316b522e33198bb4912 to your computer and use it in GitHub Desktop.
Save cbdavide/97c7d2da2571d316b522e33198bb4912 to your computer and use it in GitHub Desktop.
Renderer
from jinja2 import Template
with open('template.tpl') as file:
text = file.read()
template = Template(text)
new = template.render(slide={'num': 1, 'name': 'a'})
with open('out', 'w') as output:
output.write(new)
<template>
<div>
<div class="contain">
<router-link v-if="galImages[3].modshow" tag="div" to="/{{ slide.name }}/{{ slide.num }}" @click.native.prevent="guardarubicacion()" class="flechas-nav fle-sig eff-right animated bounceIn" aria-label="Siguiente pregunta"></router-link>
</div>
</template>
<script>
import ScormMix from '../../js/mixins/scormmixins'
export default {
}
</script>
<style lang="scss" scoped>
.notshow {
display: none;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment