Allow inherited theme to set location of Vue.js, Buefy etc.

that way, can use a local version instead of CDN
This commit is contained in:
Lance Edgar 2019-05-21 16:00:56 -05:00
parent d5d04b7dac
commit 678c966113

View file

@ -283,19 +283,9 @@
<%def name="core_javascript()"> <%def name="core_javascript()">
${self.jquery()} ${self.jquery()}
${self.vuejs()}
## Vue.js ${self.buefy()}
${h.javascript_link('https://unpkg.com/vue')} ${self.fontawesome()}
## vue-resource
## (needed for e.g. this.$http.get() calls, used by grid at least)
${h.javascript_link('https://cdn.jsdelivr.net/npm/vue-resource@1.5.1')}
## Buefy 0.7.4
${h.javascript_link('https://unpkg.com/buefy@0.7.4/dist/buefy.min.js')}
## FontAwesome 5.3.1
<script defer src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>
## Tailbone / Buefy stuff ## Tailbone / Buefy stuff
${h.javascript_link(request.static_url('tailbone:static/js/tailbone.buefy.datepicker.js') + '?ver={}'.format(tailbone.__version__))} ${h.javascript_link(request.static_url('tailbone:static/js/tailbone.buefy.datepicker.js') + '?ver={}'.format(tailbone.__version__))}
@ -327,6 +317,23 @@
${h.javascript_link('https://code.jquery.com/jquery-1.12.4.min.js')} ${h.javascript_link('https://code.jquery.com/jquery-1.12.4.min.js')}
</%def> </%def>
<%def name="vuejs()">
## Vue.js (latest)
${h.javascript_link('https://unpkg.com/vue')}
## vue-resource
## (needed for e.g. this.$http.get() calls, used by grid at least)
${h.javascript_link('https://cdn.jsdelivr.net/npm/vue-resource@1.5.1')}
</%def>
<%def name="buefy()">
${h.javascript_link('https://unpkg.com/buefy@0.7.4/dist/buefy.min.js')}
</%def>
<%def name="fontawesome()">
<script defer src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>
</%def>
<%def name="extra_javascript()"></%def> <%def name="extra_javascript()"></%def>
<%def name="core_styles()"> <%def name="core_styles()">