From 6207fd482a685527fda286e0df5d4fa87aa85149 Mon Sep 17 00:00:00 2001 From: nea Date: Sat, 20 Aug 2022 15:48:04 +0200 Subject: subprojectification --- .github/workflows/build.yml | 4 +- build.gradle.kts | 58 +++++----- example/build.gradle.kts | 7 ++ .../main/kotlin/moe/nea89/website/test/AsciiArt.kt | 5 + .../main/kotlin/moe/nea89/website/test/index.kt | 126 +++++++++++++++++++++ example/src/main/resources/asciiart/boob.txt | 96 ++++++++++++++++ example/src/main/resources/images/me.jpeg | Bin 0 -> 567270 bytes example/src/main/resources/images/moisturized.jpg | Bin 0 -> 41960 bytes example/src/main/resources/index.html | 14 +++ example/webpack.config.d/noopenbrowser.js | 1 + example/webpack.config.d/style.js | 5 + settings.gradle.kts | 1 + src/main/kotlin/moe/nea89/website/AsciiArt.kt | 5 - src/main/kotlin/moe/nea89/website/KConsole.kt | 1 - src/main/kotlin/moe/nea89/website/index.kt | 124 -------------------- src/main/resources/asciiart/boob.txt | 96 ---------------- src/main/resources/images/me.jpeg | Bin 567270 -> 0 bytes src/main/resources/images/moisturized.jpg | Bin 41960 -> 0 bytes src/main/resources/index.html | 14 --- webpack.config.d/noopenbrowser.js | 1 - webpack.config.d/style.js | 3 - 21 files changed, 285 insertions(+), 276 deletions(-) create mode 100644 example/build.gradle.kts create mode 100644 example/src/main/kotlin/moe/nea89/website/test/AsciiArt.kt create mode 100644 example/src/main/kotlin/moe/nea89/website/test/index.kt create mode 100644 example/src/main/resources/asciiart/boob.txt create mode 100644 example/src/main/resources/images/me.jpeg create mode 100644 example/src/main/resources/images/moisturized.jpg create mode 100644 example/src/main/resources/index.html create mode 100644 example/webpack.config.d/noopenbrowser.js create mode 100644 example/webpack.config.d/style.js delete mode 100644 src/main/kotlin/moe/nea89/website/AsciiArt.kt delete mode 100644 src/main/kotlin/moe/nea89/website/index.kt delete mode 100644 src/main/resources/asciiart/boob.txt delete mode 100644 src/main/resources/images/me.jpeg delete mode 100644 src/main/resources/images/moisturized.jpg delete mode 100644 src/main/resources/index.html delete mode 100644 webpack.config.d/noopenbrowser.js delete mode 100644 webpack.config.d/style.js diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2c09ee8..97357be 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,11 +8,11 @@ jobs: - uses: actions/setup-java@v1 with: java-version: 8 - - run: ./gradlew clean build + - run: ./gradlew clean :example:build - name: Github Pages uses: peaceiris/actions-gh-pages@v3 if: ${{ github.ref == 'refs/heads/master' }} with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./build/distributions + publish_dir: ./example/build/distributions diff --git a/build.gradle.kts b/build.gradle.kts index f6ef050..af77441 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,45 +1,43 @@ plugins { kotlin("js") version "1.6.0" - kotlin("plugin.serialization") version "1.6.0" id("com.github.node-gradle.node") version "3.1.1" } -repositories { - mavenCentral() -} - -kotlin { - sourceSets.all { - languageSettings.optIn("kotlin.ExperimentalStdlibApi") - languageSettings.optIn("kotlin.RequiresOptIn") +allprojects { + apply(plugin = "org.jetbrains.kotlin.js") + repositories { + mavenCentral() } - js(IR) { - browser { - commonWebpackConfig { - sourceMaps = true - cssSupport.enabled = true + + kotlin { + sourceSets.all { + languageSettings.optIn("kotlin.ExperimentalStdlibApi") + languageSettings.optIn("kotlin.RequiresOptIn") + } + js(IR) { + browser { + commonWebpackConfig { + sourceMaps = true + cssSupport.enabled = true + } } + binaries.executable() } - binaries.executable() } -} -val processResources by tasks.getting(Copy::class) + afterEvaluate { + rootProject.extensions.configure { + versions.webpackCli.version = "4.10.0" + } + } -dependencies { - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0-RC") + dependencies { + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0-RC") - implementation(enforcedPlatform("org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom:0.0.1-pre.256-kotlin-1.5.31")) - implementation("org.jetbrains.kotlin-wrappers:kotlin-styled") - implementation(npm("@fontsource/comic-mono", "^4.5.0")) - implementation(npm("prop-types", "^15.6.2")) -} - -afterEvaluate { - rootProject.extensions.configure { - versions.webpackCli.version="4.10.0" + implementation(enforcedPlatform("org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom:0.0.1-pre.256-kotlin-1.5.31")) + implementation("org.jetbrains.kotlin-wrappers:kotlin-styled") + // implementation(npm("prop-types", "^15.6.2")) } } - group = "moe.nea" -version = "1.0-SNAPSHOT" \ No newline at end of file +version = "0.0.1" \ No newline at end of file diff --git a/example/build.gradle.kts b/example/build.gradle.kts new file mode 100644 index 0000000..46f4a6d --- /dev/null +++ b/example/build.gradle.kts @@ -0,0 +1,7 @@ + +dependencies { + implementation(npm("@fontsource/comic-mono", "^4.5.0")) + implementation(rootProject) +} + + diff --git a/example/src/main/kotlin/moe/nea89/website/test/AsciiArt.kt b/example/src/main/kotlin/moe/nea89/website/test/AsciiArt.kt new file mode 100644 index 0000000..30123f6 --- /dev/null +++ b/example/src/main/kotlin/moe/nea89/website/test/AsciiArt.kt @@ -0,0 +1,5 @@ +package moe.nea89.website.test + +import kotlinext.js.require + +val boobs = require("./asciiart/boob.txt") as String \ No newline at end of file diff --git a/example/src/main/kotlin/moe/nea89/website/test/index.kt b/example/src/main/kotlin/moe/nea89/website/test/index.kt new file mode 100644 index 0000000..9fdb2c1 --- /dev/null +++ b/example/src/main/kotlin/moe/nea89/website/test/index.kt @@ -0,0 +1,126 @@ +package moe.nea89.website.test + +import kotlinext.js.require +import kotlinx.browser.document +import kotlinx.html.dom.append +import kotlinx.html.dom.create +import kotlinx.html.img +import kotlinx.html.js.a +import kotlinx.html.js.div +import kotlinx.html.js.p +import moe.nea89.website.* +import styled.injectGlobal +import kotlin.time.Duration.Companion.milliseconds + +val defaultFileSystem = fileSystem { + "etc" { + "passwd" text "hunter2" + } + "home/nea" { + "todo" text """ + | - git gud + | - finish this website + | - convince the general public that comic sans is a viable font + """.trimMargin() + "moisturized" image require("images/moisturized.jpg") + "download" download require("images/me.jpeg") + } + "flag" text "CTF{12345abcdefghijklmonp3.1.4.1.5.9.2.8}" +} + +fun main() { + + require("@fontsource/comic-mono/index.css") + injectGlobal(Styles.global) + val root = document.body!!.append.div() + val console = KConsole.createFor(root, fileSystem = defaultFileSystem) + console.addLine("Starting up terminal.") + console.PS1 = ">" + console.rerender() + console.registerCommand(command("cwd", "pwd") { + val fa = requireFileAccessor() + console.addLine(fa.currentDir.joinToString(separator = "/", prefix = "/")) + }) + console.registerCommand(command("cd") { + val fa = requireFileAccessor() + val path = args.singleOrNull() + if (path == null) { + console.addLine("Usage: cd ") + return@command + } + val error = fa.cd(path) + if (error != null) { + console.addLine("cd: ${error.name}") + } + }) + console.registerCommand(command("ls") { + val fa = requireFileAccessor() + val path = when (args.size) { + 0 -> "." + 1 -> args[0] + else -> { + console.addLine("Usage: ls [directory or file]") + return@command + } + } + val file = fa.resolve(path) + if (file == null) { + console.addLine("ls: Could not find file or directory") + return@command + } + when (file) { + is KFile.Directory -> { + val longestName = file.files.keys.maxOf { it.length } + file.files.forEach { (name, file) -> + wait(200.milliseconds) + console.addLine( + name + " ".repeat(longestName + 1 - name.length) + file.fileType + ) + console.rerender() + } + } + + else -> console.addLine("ls: is a ${file.fileType}") + } + }) + console.registerCommand(command("color") { + console.addLine("This is a ", red("red"), " word: ", green("1.0"), " ", blue("BLUUEEE")) + }) + console.registerCommand(command("cat") { + val fa = requireFileAccessor() + val path = when (args.size) { + 1 -> args[0] + else -> { + console.addLine("Usage: cat [directory or file]") + return@command + } + } + val file = fa.resolve(path) + if (file == null) { + console.addLine("cat: Could not find file or directory") + return@command + } + when (file) { + is KFile.Directory -> console.addLine("cat: Is a directory") + is KFile.Text -> console.addMultilineText(file.text) + is KFile.Image -> console.addLine(document.create.p { + img(src = file.url) + }) + + is KFile.Download -> { + val link = document.create.a(file.url) + link.download = file.name.last() + document.body!!.append(link) + link.click() + link.remove() + console.addLine("Download started") + } + } + }) + console.registerCommand(command("dick", "cock") { + console.addMultilineText("Hehe") + }) + console.registerCommand(command("boob", "booob") { + console.addMultilineText(boobs) + }) +} \ No newline at end of file diff --git a/example/src/main/resources/asciiart/boob.txt b/example/src/main/resources/asciiart/boob.txt new file mode 100644 index 0000000..6ce2b11 --- /dev/null +++ b/example/src/main/resources/asciiart/boob.txt @@ -0,0 +1,96 @@ + ,c="""=c,_ + _,j "==c, + ,="`J" "h. + ,r"" c="?r `L + p" "$ ", + c" ;F `"c. ". + J' $ `h `h. + J' ,-"j" t `h + ,P ," " `h. + ,J' ," c `h + J' J' "h `h + J / ". `h. + $ ; ; `h `$. + $ `. ``; `. .`h `=q + J `. . `.`; `. .`.h " + F `. `.; ` `.; `. `.? + j' .`. `.\ `.` `.`?`.`.`.?: + $ `.`.` `.j`.`.;.`. `.3.`.`.`L`. + .f `.`.`. `.?$.`.?.`.`.`.`$`.`.`$`.` + $ `.`.`.`.`.`.$.`.`Lc.`.`.`.h.`.`$`.`. + j' `.`.`.`.`.`.$.`.`.h?cccci';h`.`?L.`.`. + J `.`.`.`.`.`$'?h.`J?,c$?`.?hP'?""?r`.`.` + `P `.`.L.`.`.j'`.`."=-"`.`z?$??$$F'3F`.J.`. + `L `.`.`h`.`.$$??`.`.`.`.$,c$$P".`.J..J`.`. + ? `.`.`?i,c$$?$"3$`.`.`.`.`.`.`.`.$.j'`.`. + `h `.`.`.$$$.$i$P".`)`.`.`.`.`.`.`.$.$.`.`. + `r `.`.`.;;F.`.`.`.`.`.`.`.`.`.`.`.$.$.`.P' + ;f `.`.`(;;h.`.`.`.`.`.`.`.`.`.`.`.$.F.`$`.` + J" `.`.`.t;$.`.`.`.`.`.`.`;;.`.`.`.$.$.j'`.`.` + P .`.`.`\9;`.`.`.`.`.,c'J?.`.`.`.$;$.J.`.`.`. + j' .`.`.`.?C`.`.`;;`."".`.`.`.`.`.?'`h$.`.`.`.`. + L .`.`.`.`.h.`./.`.`,ccc$??hJ?$F.`.`.?r`.`.`.`.`. + $ y`.`.`.`.`?i.`.;??li??"' .$$`.`.`.`$`.`.`.`.`.` + `) ; ; u.`.`.`.`.`?;.`$?; .,;c?iP.`.`.`.`?,.`.`.`.`.`. .` + f t l $.`.`.`.`.``?;.`?;;;;;;iP"`.`.`.`.`;$,`.`.`.`.`.`.` `. + t ) ,q l $.`.`.`.`.`.`"h.`"??""`.`.`.`.`.`.J?J`t.`.`.`.`.`.` `.` + "j=" "f $.`.`.`.`.`.`.`$`.`.`.`.`.`.`.``c?;;$.`.t.`.`.`.`. `.` + $.`.`.`.`.`.`.`.?h`.`.`.`.`.`.j";;;9'.`.`.?.`,P.` `.` + $.`.`.`.`.`.`.`.`"?y`.`.`.`,J?;;;;;F`.`.`.J?".`. `.` + .P.`.`.`.`.`.`.`.`.`.?hccd??;;;;;;;9c$r`.`j'.`.`. .`.` + J`.`.`.\.`.`.`.`.`.`.`.`$;;;;;;;;;;;;;$`.`P`.`.`. .`.` + $`.`.`.`?`.`.`.`.`.`.`.`.h;;;;;;;;;;;;9`.f.`.`,P `.`.` + ?`.`.`.`.h.`.`.`.`.`.`.`.`h;;;;;;;;;;;9`j`.`.$' .`.`.` + h.`;`.l.$.`.`.`.`.`.`.`.`.?;;;;;;;;;;$".`.`J.` `.`.`.` + ?.`P`.l.F.c.`.`f`.`.`.`.`.`?;;;;;jjii$`.`.`$.` .`.`$`.` + "$.`P`J`.$.`.`h`.`.`.`.`.`.F""""` $`.`.`$.` ?.`.`$`.` + J"`$.,"$.`.`?`.`.`.`.`.`j' ,JL.`.`$.` `3.`.`?`.` + `=chJ" ?.`.`.?i`.`.`.`.`$$?????"" L`.`$`.`.3r`.`(l,c + ,P ?`.`.`.?.`.`.`.J" ?`.`3`.`.`h`.`P + J ,c ?i`.`.`3`.`.`J" "i,$"=i,J"c;P + j' J" `h.`.`3`.`_J" + $ J" ?`.`3P""' + ,LJ' h._$ + J" . `" -c, + j'(r "??cc,,_ h $ + 3.P `"""""=c,,_ ? `L + zP""??cc,__ "=,_ ? ". L + .P ""??cc,_ "=c_ $ ". $ . + ," `"h,_ `=c. $ ". h $ + ,J' `"==c, `"$h ". $ .F + ," """===cc,,, "?c, "??h `L J + J' "=c,_ `?. ?. P + J' "c, `?. h j' + ,J??;;??$c,,_ `=cccc, "r $$ $ + c"`.`.`.`;;;;;;??c,._ "=c . "h. 3 .f + J??P`.`.`.`.`.;;;;;;;;;??;"==ccy, "c `h "c, 3 j +,$i;;P`.`.`.`.`.`;;;;;;;;P`.`;ccc,"c `h ". "h. j.$ +'hC;9F`.`.`.`.`.`.;;;;;;F.`.$9?;h;;$F ?. ". "?$' + ?h;P.`.`.`.`.`.`.;;;;;j'.`3;;???;;$?L ?. "c $ + $P`.`.`.`.`.`.`.,;;;;9`.`?h;;;;;?'`.h ? "h $ + ?;`.`.`.`.`.`.`.;;;;;9`.`.`"????`.`.?L "h $ + $`.`.`.`.`.`.`;;;;;;9`.`.`.`.`.`.`.``h `$ + L.`.`.`.`.``;;;;;;;?`.`.`.`.`.`.`.`.`$ `, $ + `L`.`.`.`.`;;;j;;;;;L.`.`.`.`.`.`.`.`.?. ", ?. + ?i`.`.`.;;;j;;;;;;?;`.`.`.`.`.`.`.`.`.h `, L + `?i..`,;;$;;';;;.`.h.`.`.`.`.`.`.`.`.`?c $ h + "?h$??F.``;;;.`.;$c.`.`.`.`.`.`.`.`.`$L `h J + $;`.`;;`.`.`;;?hy_.`.`.`.`.`.`,c$$h. ?.j' + .$`.`.;;`.`.`.;;;;"??$ccyyyccJ??;;;$3c $$ + j'`.`.;.`.`.`.`.;;;;;;;;;;;;;;;;;;;;$`h `$ + .$.`.`.`.`.`.`.`.``;;;;;;;;;;;;;;.`;;;$ "c $ + j'.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`;;;$. "c $- + $`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.;;;$. $L, $ + $`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`;;;$ `h "h .$ ,P + F`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.;;;h `h "h ;F. $ + C`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`;;;L `r $, $ ?,f + h`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.;;9r ? `fcF $ + $`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.;;;$ L $ j' + $`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.;;;;$ $ $ J' + $`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`;;;;;?h `cc=' J' + $`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.,;;;;;;9.J $ + ?`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`,;;;;;;;$$' $ + `h.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.,;;;;;;;9" $ + $.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.;;;;;;;;9 "h + $.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`;;;;;;;;;$ c????c + j.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`;;;;;;;;;9 .P \ No newline at end of file diff --git a/example/src/main/resources/images/me.jpeg b/example/src/main/resources/images/me.jpeg new file mode 100644 index 0000000..1d829fa Binary files /dev/null and b/example/src/main/resources/images/me.jpeg differ diff --git a/example/src/main/resources/images/moisturized.jpg b/example/src/main/resources/images/moisturized.jpg new file mode 100644 index 0000000..89767ea Binary files /dev/null and b/example/src/main/resources/images/moisturized.jpg differ diff --git a/example/src/main/resources/index.html b/example/src/main/resources/index.html new file mode 100644 index 0000000..46c68c6 --- /dev/null +++ b/example/src/main/resources/index.html @@ -0,0 +1,14 @@ + + + + + + + Nea Moe + + + + + + \ No newline at end of file diff --git a/example/webpack.config.d/noopenbrowser.js b/example/webpack.config.d/noopenbrowser.js new file mode 100644 index 0000000..27eb2d8 --- /dev/null +++ b/example/webpack.config.d/noopenbrowser.js @@ -0,0 +1 @@ +(config.devServer = config.devServer || {}).open = false \ No newline at end of file diff --git a/example/webpack.config.d/style.js b/example/webpack.config.d/style.js new file mode 100644 index 0000000..3bdbd3c --- /dev/null +++ b/example/webpack.config.d/style.js @@ -0,0 +1,5 @@ +config.resolve.modules.push("src/main/resources/") +config.resolve.modules.push(".") +config.module.rules.push({test: /\.txt$/, type: 'asset/source'}) +config.module.rules.push({test: /\.(png|jpg|jpeg|svg|gif)$/i, type: 'asset/resource'}) +console.log("Hahahahahah") diff --git a/settings.gradle.kts b/settings.gradle.kts index fefb772..f846eaa 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,2 +1,3 @@ rootProject.name = "neamoe" +include(":example") diff --git a/src/main/kotlin/moe/nea89/website/AsciiArt.kt b/src/main/kotlin/moe/nea89/website/AsciiArt.kt deleted file mode 100644 index 6acc8b5..0000000 --- a/src/main/kotlin/moe/nea89/website/AsciiArt.kt +++ /dev/null @@ -1,5 +0,0 @@ -package moe.nea89.website - -import kotlinext.js.require - -val boobs = require("./asciiart/boob.txt") as String \ No newline at end of file diff --git a/src/main/kotlin/moe/nea89/website/KConsole.kt b/src/main/kotlin/moe/nea89/website/KConsole.kt index dd37223..56a6e3c 100644 --- a/src/main/kotlin/moe/nea89/website/KConsole.kt +++ b/src/main/kotlin/moe/nea89/website/KConsole.kt @@ -34,7 +34,6 @@ class KConsole( element.classList.add(Styles.consoleClass) val console = KConsole(element, text, prompt, fileSystem) document.body!!.onkeydown = console::keydown - console.addLine("Starting up terminal.") console.rerender() return console } diff --git a/src/main/kotlin/moe/nea89/website/index.kt b/src/main/kotlin/moe/nea89/website/index.kt deleted file mode 100644 index e52d942..0000000 --- a/src/main/kotlin/moe/nea89/website/index.kt +++ /dev/null @@ -1,124 +0,0 @@ -package moe.nea89.website - -import kotlinext.js.require -import kotlinx.browser.document -import kotlinx.html.dom.append -import kotlinx.html.dom.create -import kotlinx.html.img -import kotlinx.html.js.a -import kotlinx.html.js.div -import kotlinx.html.js.p -import styled.injectGlobal -import kotlin.time.Duration.Companion.milliseconds - -val defaultFileSystem = fileSystem { - "etc" { - "passwd" text "hunter2" - } - "home/nea" { - "todo" text """ - | - git gud - | - finish this website - | - convince the general public that comic sans is a viable font - """.trimMargin() - "moisturized" image require("images/moisturized.jpg") - "download" download require("images/me.jpeg") - } - "flag" text "CTF{12345abcdefghijklmonp3.1.4.1.5.9.2.8}" -} - -fun main() { - - require("@fontsource/comic-mono/index.css") - injectGlobal(Styles.global) - val root = document.body!!.append.div() - val console = KConsole.createFor(root, fileSystem = defaultFileSystem) - console.PS1 = ">" - console.rerender() - console.registerCommand(command("cwd", "pwd") { - val fa = requireFileAccessor() - console.addLine(fa.currentDir.joinToString(separator = "/", prefix = "/")) - }) - console.registerCommand(command("cd") { - val fa = requireFileAccessor() - val path = args.singleOrNull() - if (path == null) { - console.addLine("Usage: cd ") - return@command - } - val error = fa.cd(path) - if (error != null) { - console.addLine("cd: ${error.name}") - } - }) - console.registerCommand(command("ls") { - val fa = requireFileAccessor() - val path = when (args.size) { - 0 -> "." - 1 -> args[0] - else -> { - console.addLine("Usage: ls [directory or file]") - return@command - } - } - val file = fa.resolve(path) - if (file == null) { - console.addLine("ls: Could not find file or directory") - return@command - } - when (file) { - is KFile.Directory -> { - val longestName = file.files.keys.maxOf { it.length } - file.files.forEach { (name, file) -> - wait(200.milliseconds) - console.addLine( - name + " ".repeat(longestName + 1 - name.length) + file.fileType - ) - console.rerender() - } - } - - else -> console.addLine("ls: is a ${file.fileType}") - } - }) - console.registerCommand(command("color") { - console.addLine("This is a ", red("red"), " word: ", green("1.0"), " ", blue("BLUUEEE")) - }) - console.registerCommand(command("cat") { - val fa = requireFileAccessor() - val path = when (args.size) { - 1 -> args[0] - else -> { - console.addLine("Usage: cat [directory or file]") - return@command - } - } - val file = fa.resolve(path) - if (file == null) { - console.addLine("cat: Could not find file or directory") - return@command - } - when (file) { - is KFile.Directory -> console.addLine("cat: Is a directory") - is KFile.Text -> console.addMultilineText(file.text) - is KFile.Image -> console.addLine(document.create.p { - img(src = file.url) - }) - - is KFile.Download -> { - val link = document.create.a(file.url) - link.download = file.name.last() - document.body!!.append(link) - link.click() - link.remove() - console.addLine("Download started") - } - } - }) - console.registerCommand(command("dick", "cock") { - console.addMultilineText("Hehe") - }) - console.registerCommand(command("boob", "booob") { - console.addMultilineText(boobs) - }) -} \ No newline at end of file diff --git a/src/main/resources/asciiart/boob.txt b/src/main/resources/asciiart/boob.txt deleted file mode 100644 index 6ce2b11..0000000 --- a/src/main/resources/asciiart/boob.txt +++ /dev/null @@ -1,96 +0,0 @@ - ,c="""=c,_ - _,j "==c, - ,="`J" "h. - ,r"" c="?r `L - p" "$ ", - c" ;F `"c. ". - J' $ `h `h. - J' ,-"j" t `h - ,P ," " `h. - ,J' ," c `h - J' J' "h `h - J / ". `h. - $ ; ; `h `$. - $ `. ``; `. .`h `=q - J `. . `.`; `. .`.h " - F `. `.; ` `.; `. `.? - j' .`. `.\ `.` `.`?`.`.`.?: - $ `.`.` `.j`.`.;.`. `.3.`.`.`L`. - .f `.`.`. `.?$.`.?.`.`.`.`$`.`.`$`.` - $ `.`.`.`.`.`.$.`.`Lc.`.`.`.h.`.`$`.`. - j' `.`.`.`.`.`.$.`.`.h?cccci';h`.`?L.`.`. - J `.`.`.`.`.`$'?h.`J?,c$?`.?hP'?""?r`.`.` - `P `.`.L.`.`.j'`.`."=-"`.`z?$??$$F'3F`.J.`. - `L `.`.`h`.`.$$??`.`.`.`.$,c$$P".`.J..J`.`. - ? `.`.`?i,c$$?$"3$`.`.`.`.`.`.`.`.$.j'`.`. - `h `.`.`.$$$.$i$P".`)`.`.`.`.`.`.`.$.$.`.`. - `r `.`.`.;;F.`.`.`.`.`.`.`.`.`.`.`.$.$.`.P' - ;f `.`.`(;;h.`.`.`.`.`.`.`.`.`.`.`.$.F.`$`.` - J" `.`.`.t;$.`.`.`.`.`.`.`;;.`.`.`.$.$.j'`.`.` - P .`.`.`\9;`.`.`.`.`.,c'J?.`.`.`.$;$.J.`.`.`. - j' .`.`.`.?C`.`.`;;`."".`.`.`.`.`.?'`h$.`.`.`.`. - L .`.`.`.`.h.`./.`.`,ccc$??hJ?$F.`.`.?r`.`.`.`.`. - $ y`.`.`.`.`?i.`.;??li??"' .$$`.`.`.`$`.`.`.`.`.` - `) ; ; u.`.`.`.`.`?;.`$?; .,;c?iP.`.`.`.`?,.`.`.`.`.`. .` - f t l $.`.`.`.`.``?;.`?;;;;;;iP"`.`.`.`.`;$,`.`.`.`.`.`.` `. - t ) ,q l $.`.`.`.`.`.`"h.`"??""`.`.`.`.`.`.J?J`t.`.`.`.`.`.` `.` - "j=" "f $.`.`.`.`.`.`.`$`.`.`.`.`.`.`.``c?;;$.`.t.`.`.`.`. `.` - $.`.`.`.`.`.`.`.?h`.`.`.`.`.`.j";;;9'.`.`.?.`,P.` `.` - $.`.`.`.`.`.`.`.`"?y`.`.`.`,J?;;;;;F`.`.`.J?".`. `.` - .P.`.`.`.`.`.`.`.`.`.?hccd??;;;;;;;9c$r`.`j'.`.`. .`.` - J`.`.`.\.`.`.`.`.`.`.`.`$;;;;;;;;;;;;;$`.`P`.`.`. .`.` - $`.`.`.`?`.`.`.`.`.`.`.`.h;;;;;;;;;;;;9`.f.`.`,P `.`.` - ?`.`.`.`.h.`.`.`.`.`.`.`.`h;;;;;;;;;;;9`j`.`.$' .`.`.` - h.`;`.l.$.`.`.`.`.`.`.`.`.?;;;;;;;;;;$".`.`J.` `.`.`.` - ?.`P`.l.F.c.`.`f`.`.`.`.`.`?;;;;;jjii$`.`.`$.` .`.`$`.` - "$.`P`J`.$.`.`h`.`.`.`.`.`.F""""` $`.`.`$.` ?.`.`$`.` - J"`$.,"$.`.`?`.`.`.`.`.`j' ,JL.`.`$.` `3.`.`?`.` - `=chJ" ?.`.`.?i`.`.`.`.`$$?????"" L`.`$`.`.3r`.`(l,c - ,P ?`.`.`.?.`.`.`.J" ?`.`3`.`.`h`.`P - J ,c ?i`.`.`3`.`.`J" "i,$"=i,J"c;P - j' J" `h.`.`3`.`_J" - $ J" ?`.`3P""' - ,LJ' h._$ - J" . `" -c, - j'(r "??cc,,_ h $ - 3.P `"""""=c,,_ ? `L - zP""??cc,__ "=,_ ? ". L - .P ""??cc,_ "=c_ $ ". $ . - ," `"h,_ `=c. $ ". h $ - ,J' `"==c, `"$h ". $ .F - ," """===cc,,, "?c, "??h `L J - J' "=c,_ `?. ?. P - J' "c, `?. h j' - ,J??;;??$c,,_ `=cccc, "r $$ $ - c"`.`.`.`;;;;;;??c,._ "=c . "h. 3 .f - J??P`.`.`.`.`.;;;;;;;;;??;"==ccy, "c `h "c, 3 j -,$i;;P`.`.`.`.`.`;;;;;;;;P`.`;ccc,"c `h ". "h. j.$ -'hC;9F`.`.`.`.`.`.;;;;;;F.`.$9?;h;;$F ?. ". "?$' - ?h;P.`.`.`.`.`.`.;;;;;j'.`3;;???;;$?L ?. "c $ - $P`.`.`.`.`.`.`.,;;;;9`.`?h;;;;;?'`.h ? "h $ - ?;`.`.`.`.`.`.`.;;;;;9`.`.`"????`.`.?L "h $ - $`.`.`.`.`.`.`;;;;;;9`.`.`.`.`.`.`.``h `$ - L.`.`.`.`.``;;;;;;;?`.`.`.`.`.`.`.`.`$ `, $ - `L`.`.`.`.`;;;j;;;;;L.`.`.`.`.`.`.`.`.?. ", ?. - ?i`.`.`.;;;j;;;;;;?;`.`.`.`.`.`.`.`.`.h `, L - `?i..`,;;$;;';;;.`.h.`.`.`.`.`.`.`.`.`?c $ h - "?h$??F.``;;;.`.;$c.`.`.`.`.`.`.`.`.`$L `h J - $;`.`;;`.`.`;;?hy_.`.`.`.`.`.`,c$$h. ?.j' - .$`.`.;;`.`.`.;;;;"??$ccyyyccJ??;;;$3c $$ - j'`.`.;.`.`.`.`.;;;;;;;;;;;;;;;;;;;;$`h `$ - .$.`.`.`.`.`.`.`.``;;;;;;;;;;;;;;.`;;;$ "c $ - j'.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`;;;$. "c $- - $`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.;;;$. $L, $ - $`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`;;;$ `h "h .$ ,P - F`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.;;;h `h "h ;F. $ - C`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`;;;L `r $, $ ?,f - h`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.;;9r ? `fcF $ - $`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.;;;$ L $ j' - $`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.;;;;$ $ $ J' - $`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`;;;;;?h `cc=' J' - $`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.,;;;;;;9.J $ - ?`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`,;;;;;;;$$' $ - `h.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.,;;;;;;;9" $ - $.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.;;;;;;;;9 "h - $.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`;;;;;;;;;$ c????c - j.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`;;;;;;;;;9 .P \ No newline at end of file diff --git a/src/main/resources/images/me.jpeg b/src/main/resources/images/me.jpeg deleted file mode 100644 index 1d829fa..0000000 Binary files a/src/main/resources/images/me.jpeg and /dev/null differ diff --git a/src/main/resources/images/moisturized.jpg b/src/main/resources/images/moisturized.jpg deleted file mode 100644 index 89767ea..0000000 Binary files a/src/main/resources/images/moisturized.jpg and /dev/null differ diff --git a/src/main/resources/index.html b/src/main/resources/index.html deleted file mode 100644 index ca5f28f..0000000 --- a/src/main/resources/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - Nea Moe - - - - - - \ No newline at end of file diff --git a/webpack.config.d/noopenbrowser.js b/webpack.config.d/noopenbrowser.js deleted file mode 100644 index 27eb2d8..0000000 --- a/webpack.config.d/noopenbrowser.js +++ /dev/null @@ -1 +0,0 @@ -(config.devServer = config.devServer || {}).open = false \ No newline at end of file diff --git a/webpack.config.d/style.js b/webpack.config.d/style.js deleted file mode 100644 index 0b521a8..0000000 --- a/webpack.config.d/style.js +++ /dev/null @@ -1,3 +0,0 @@ -config.resolve.modules.push("src/main/resources/") -config.module.rules.push({test: /\.txt$/, type: 'asset/source'}) -config.module.rules.push({test: /\.(png|jpg|jpeg|svg|gif)$/i, type: 'asset/resource'}) \ No newline at end of file -- cgit