summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authornea <romangraef@gmail.com>2022-08-20 15:48:04 +0200
committernea <romangraef@gmail.com>2022-08-20 15:48:04 +0200
commit6207fd482a685527fda286e0df5d4fa87aa85149 (patch)
tree497bc3aa56286ce29224ae83382396ee69462e82 /src
parent893ece6b2f02329d460538311f572cb5b1936d3f (diff)
downloadneamoe-6207fd482a685527fda286e0df5d4fa87aa85149.tar.gz
neamoe-6207fd482a685527fda286e0df5d4fa87aa85149.tar.bz2
neamoe-6207fd482a685527fda286e0df5d4fa87aa85149.zip
subprojectification
Diffstat (limited to 'src')
-rw-r--r--src/main/kotlin/moe/nea89/website/AsciiArt.kt5
-rw-r--r--src/main/kotlin/moe/nea89/website/KConsole.kt1
-rw-r--r--src/main/kotlin/moe/nea89/website/index.kt124
-rw-r--r--src/main/resources/asciiart/boob.txt96
-rw-r--r--src/main/resources/images/me.jpegbin567270 -> 0 bytes
-rw-r--r--src/main/resources/images/moisturized.jpgbin41960 -> 0 bytes
-rw-r--r--src/main/resources/index.html14
7 files changed, 0 insertions, 240 deletions
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 <directory>")
- 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.`.`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;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.`.`.`.`.``;;;;;;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`.`.`.`.`.`.`.`.`.;;;;;;;;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
--- a/src/main/resources/images/me.jpeg
+++ /dev/null
Binary files differ
diff --git a/src/main/resources/images/moisturized.jpg b/src/main/resources/images/moisturized.jpg
deleted file mode 100644
index 89767ea..0000000
--- a/src/main/resources/images/moisturized.jpg
+++ /dev/null
Binary files 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 @@
-<!doctype html>
-<html lang="en">
-<head>
- <meta charset="UTF-8">
- <meta name="viewport"
- content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <title>Nea Moe</title>
-</head>
-<body>
-<noscript>You need to enable JavaScript to run this app.</noscript>
-<script type="text/javascript" src="neamoe.js"></script>
-</body>
-</html> \ No newline at end of file