diff --git a/docute-landing.js b/docute-landing.js new file mode 100644 index 0000000..9c89413 --- /dev/null +++ b/docute-landing.js @@ -0,0 +1,33 @@ +const landing = { + html: ` +
+

+

This is not an official EssentialsX site.

+
+ Visit wiki + + Hide downloads + Show downloads + +
+ +
+ `, + component: { + components: { + DownloadPage, + }, + data() { + return { + showDownloads: false, + }; + }, + methods: { + toggleDownloads() { + this.showDownloads = !this.showDownloads; + } + } + }, +}; + +window.landing = landing; \ No newline at end of file diff --git a/index.html b/index.html index c6a61d0..5291e07 100644 --- a/index.html +++ b/index.html @@ -13,10 +13,14 @@
+ - + + + + diff --git a/main.css b/main.css index be952b2..417b34b 100644 --- a/main.css +++ b/main.css @@ -70,3 +70,29 @@ button:active { .link:hover { color: var(--main); } + +a.big::before { + content: "➔"; + background: var(--main-dark); + border-radius: 4px 0 0 4px; + display: inline-block; + padding: 0.3em 0.5em; + margin: 0 0.5em 0 0; + color: white; + font-size: 16pt; + text-align: center; +} + +a.big.download { + content: +} + +a.big { + background: var(--main); + border-radius: 4px; + display: inline-block; + padding: 0 0.5em 0 0; + color: white; + font-size: 16pt; + text-align: center; +} diff --git a/main.js b/main.js index ad7d20e..4c3d267 100644 --- a/main.js +++ b/main.js @@ -3,7 +3,8 @@ const mirrorCI = "https://ci.akpmakes.tech/job/EssentialsX/"; axios.defaults.baseURL = mirrorCI; // ender.zone doesn't allow CORS -const landing = window.dlPage; +//const landing = window.landing; +//const dlPage = window.dlPage; docute.init({ url: "https://raw.githubusercontent.com/wiki/EssentialsX/Essentials/", diff --git a/vue-dlpage.js b/vue-dlpage.js index 85da387..28a4190 100644 --- a/vue-dlpage.js +++ b/vue-dlpage.js @@ -1,74 +1,65 @@ -const component = { - html: ` - -
-

-

This is not an official EssentialsX site.

+const DownloadPage = { + template: ` +

Download EssentialsX

-
-

The latest version of EssentialsX is {{build}}.

-

Could not retrieve information about the latest version.

- - - - - - - - - - - -
PluginMainMirror
{{ plugin.name }}DownloadDownload
- -
-

Help for EssentialsX

-
- Go to EssentialsX Wiki -
-
-
+

The latest version of EssentialsX is {{build}}.

+

+ Could not retrieve information about the latest version. + Click here to visit the build server. +

+ + + + + + + + + + + +
PluginMainMirror
{{ plugin.name }}DownloadDownload
+ + `, - component: { - data() { - return { - buildNo: null, - failed: null, - plugins: [], - }; - }, - computed: { - build() { - return this.buildNo ? `b${this.buildNo}` : "unknown"; - }, + data() { + return { + buildNo: null, + failed: null, + plugins: [], + }; + }, + computed: { + build() { + return this.buildNo ? `b${this.buildNo}` : "unknown"; }, - methods: { - updateInfo() { - axios.get("lastSuccessfulBuild/api/json") - .then(response => { - this.buildNo = response.data.id; - this.plugins = response.data.artifacts.map(artifact => { - return { - name: `EssentialsX ${artifact.displayPath.match(/EssentialsX([A-Za-z]*)/)[1]}`, - main: `${mainCI}lastSuccessfulBuild/artifact/${artifact.relativePath}`, - mirror: `${mirrorCI}lastSuccessfulBuild/artifact/${artifact.relativePath}`, - }; - }); - this.failed = null; - }, error => { - if (error.response) { - this.failed = error.response.data; - } else { - this.failed = error.message; - } + }, + methods: { + updateInfo() { + axios.get("lastSuccessfulBuild/api/json") + .then(response => { + this.buildNo = response.data.id; + this.plugins = response.data.artifacts.map(artifact => { + return { + name: `EssentialsX ${artifact.displayPath.match(/EssentialsX([A-Za-z]*)/)[1]}`, + main: `${mainCI}lastSuccessfulBuild/artifact/${artifact.relativePath}`, + mirror: `${mirrorCI}lastSuccessfulBuild/artifact/${artifact.relativePath}`, + }; + }); + this.failed = null; + }, error => { + if (error.response) { + this.failed = error.response.data; + } else { + this.failed = error.message; } - ); - } - }, - mounted: function () { - this.updateInfo(); + } + ); } }, + mounted: function () { + this.updateInfo(); + } }; -window.dlPage = component; \ No newline at end of file +window.DownloadPage = DownloadPage; \ No newline at end of file