Showing the changes to assets/javascripts (1 of 8 files). Show all
Unified · Split
| @@ -0,0 +1,14 @@ | ||
| 1 | +#= require views/pages/base | |
| 2 | + | |
| 3 | +class app.views.VuePage extends app.views.BasePage | |
| 4 | + afterRender: -> | |
| 5 | + for el in @findAllByTag('pre') | |
| 6 | + lang = if el.classList.contains('html') or el.textContent[0] is '<' | |
| 7 | + 'markup' | |
| 8 | + else if el.classList.contains('css') | |
| 9 | + 'css' | |
| 10 | + else | |
| 11 | + 'javascript' | |
| 12 | + el.setAttribute('class', '') | |
| 13 | + @highlightCode el, lang | |
| 14 | + return | |