inicios del FrontEnd

This commit is contained in:
2021-04-21 21:47:04 -05:00
parent 4a7fb24eb2
commit cf9505f26d
196 changed files with 28978 additions and 0 deletions

40
APP/plugins/RTLPlugin.js Normal file
View File

@@ -0,0 +1,40 @@
export default {
install(Vue) {
let app = new Vue({
data() {
return {
isRTL: false
};
},
methods: {
getDocClasses() {
return document.body.classList;
},
enableRTL() {
import('@/assets/sass/vendor/bootstrap-rtl.scss')
this.isRTL = true;
this.getDocClasses().add('rtl');
this.getDocClasses().add('menu-on-right');
this.toggleBootstrapRTL(true);
},
disableRTL() {
this.isRTL = false;
this.getDocClasses().remove('rtl');
this.getDocClasses().remove('menu-on-right');
this.toggleBootstrapRTL(false);
},
toggleBootstrapRTL(value) {
for (let i = 0; i < document.styleSheets.length; i++) {
let styleSheet = document.styleSheets[i];
let { href } = styleSheet;
if (href && href.endsWith('bootstrap-rtl.css')) {
styleSheet.disabled = !value;
}
}
}
}
});
Vue.prototype.$rtl = app;
}
};