diff --git a/mo-home.js b/mo-home.js new file mode 100644 index 0000000..4399e6f --- /dev/null +++ b/mo-home.js @@ -0,0 +1,43 @@ +// Runs at minimo.io homepage, loaded via jsdelivr (fetched from Github) +// @minimo-io +// v0.1 + +jQuery(document).ready(function(){ + var READMORELANG, READLESSLANG; + const app = Vue.createApp({ + data() { + return { + readMoreActive: false, + readMoreText: "-", + readMoreIcon: "fa fa-arrow-right", + } + }, + mounted(){ + READMORELANG = jQuery(".readMoreBtn").data("readmorelang"); + READLESSLANG = jQuery(".readMoreBtn").data("readlesslang"); + this.readMoreText = READMORELANG; + + }, + methods:{ + readMore(){ + if (this.readMoreActive){ + this.readMoreText = READMORELANG; + this.readMoreIcon = "fa fa-arrow-right"; + + }else{ + this.readMoreText = READLESSLANG; + this.readMoreIcon = "fa fa-minus"; + } + this.readMoreActive = ! this.readMoreActive; + + jQuery(".profile-more").toggle("200", function(){ + + }); + + + } + } + }) + app.mount('#mo-home-vue-app') + +}); \ No newline at end of file diff --git a/test.html b/test.html new file mode 100644 index 0000000..c4f9487 --- /dev/null +++ b/test.html @@ -0,0 +1,69 @@ + + + + + + + Vue Tests + + + + +
+ This is a hidden text. Named for some obscure action to be active on the web. +
+ Now it's time to rock & roll! +
+
+ {{ readMoreText }} +
+ + + + + \ No newline at end of file