diff options
Diffstat (limited to 'src/jsMain/kotlin/moe/nea89/website/Styles.kt')
-rw-r--r-- | src/jsMain/kotlin/moe/nea89/website/Styles.kt | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/src/jsMain/kotlin/moe/nea89/website/Styles.kt b/src/jsMain/kotlin/moe/nea89/website/Styles.kt new file mode 100644 index 0000000..e1470d7 --- /dev/null +++ b/src/jsMain/kotlin/moe/nea89/website/Styles.kt @@ -0,0 +1,55 @@ +package moe.nea89.website + +import kotlinx.css.* +import kotlinx.css.properties.IterationCount +import kotlinx.css.properties.Timing +import kotlinx.css.properties.s +import styled.StyleSheet +import styled.animation + + +object Styles : StyleSheet("DefaultConsoleStyles") { + val consoleClass = "Console" + val promptClass = "prompt" + + val bgColor = CustomColor.BLACK.color + val fgColor = CustomColor.WHITE.color + val monospacedFont = "monospace" + + val global by css { + "*" { + padding(0.px) + margin(0.px) + boxSizing = BoxSizing.borderBox + } + + ".$promptClass" { + width = LinearDimension.fitContent + borderRightColor = fgColor + borderRightWidth = 2.px + paddingRight = 2.px + borderRightStyle = BorderStyle.solid + animation(1.s, Timing.stepStart, iterationCount = IterationCount.infinite) { + 0 { + borderRightStyle = BorderStyle.solid + } + 50 { + borderRightStyle = BorderStyle.none + } + } + } + + ".$consoleClass" { + width = 100.pct + height = 100.pct + backgroundColor = bgColor + color = fgColor + fontFamily = monospacedFont + width = 100.pct + height = 100.pct + pre { + fontFamily = monospacedFont + } + } + } +}
\ No newline at end of file |