Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

pattern-page.js 819B

123456789101112131415161718192021222324252627282930313233
  1. import {ThemeSelect} from './theme-select';
  2. export const PatternPage = {
  3. props: ['id', 'query'],
  4. data() {
  5. const pattern = window.patterns.filter(pattern => {
  6. return pattern.id == this.id;
  7. })[0];
  8. return {pattern};
  9. },
  10. components: {
  11. 'theme-select': ThemeSelect
  12. },
  13. template: `
  14. <div class="pv-content">
  15. <div v-if="pattern">
  16. <h2 class="pv-content__header">{{pattern.name}} Pattern</h2>
  17. <theme-select :theme="query.theme" :query="query" />
  18. <h3 class="pv-title-label">Example</h3>
  19. <div>
  20. <div class="pv-pattern__example"><div style="position: static" v-html="pattern.markup"></div></div>
  21. </div>
  22. <h3 class="pv-title-label">HTML</h3>
  23. <pre class="pv-markup">{{pattern.markup}}</pre>
  24. </div>
  25. </div>
  26. `,
  27. };