🚀 CLI-like personal webpage built with Kotlin/JS

Overview

kotlin-cv.js

Code Quality Build

Personal terminal-like simple webpage template built with Kotlin/JS.

The template features CLI commands help, cat, ls, their completion and execution, and it's easy to implement your commands. The original idea of the CLI-like webpage is borrowed from the cool zenith.tech website.

Build and run

The built website contains three files:

  • styles.css – fancy styles for the website
  • index.html – boilerplate HTML doc that contains call to kotlin-cv.js
  • kotlin-cv.js – the "CLI" core, built with Kotlin/JS.

To set up a website like this, follow these steps:

F.A.Q.

How to change the prompt

Edit the code that generates HTML with kotlinx:

div("prompt") { 
    pre {
        +"@kotlin › " 
    }
}

How to add a new command

Implement an object from the Command interface and add it to the commands list. For example, a command to open some link (in this particular example is URL to CV) could be implemented this way:

"cv" to object : Command {
    override val help = "open my cv"
    override fun complete(argv: List<String>): List<String> = listOf()
    override fun exec(argv: List<String>, print: (String) -> Unit) =
        window.open("https://tiulp.in/cv.pdf", blank)!!.focus()
}

How to add "files"

Add a new "file" to the "files" list.

How to insert HTML from a string

Use unsafe:

p {
    unsafe {
        +"</br>"
    }
}
You might also like...
Opinionated Redux-like implementation backed by Kotlin Coroutines and Kotlin Multiplatform Mobile

CoRed CoRed is Redux-like implementation that maintains the benefits of Redux's core idea without the boilerplate. No more action types, action creato

👋 A common toolkit (utils) ⚒️ built to help you further reduce Kotlin boilerplate code and improve development efficiency. Do you think 'kotlin-stdlib' or 'android-ktx' is not sweet enough? You need this! 🍭

Toolkit [ 🚧 Work in progress ⛏ 👷 🔧️ 🚧 ] Snapshot version: repositories { maven("https://s01.oss.sonatype.org/content/repositories/snapshots") }

Notes-App-Kotlin - Notes App Built Using Kotlin
Notes-App-Kotlin - Notes App Built Using Kotlin

Notes-App-Kotlin Splash Screen Home Page Adding New Notes Filter Feature Search

A react-like kotlin library to create an inventory ui easily in paper plugins
A react-like kotlin library to create an inventory ui easily in paper plugins

A react-like kotlin library to create an inventory ui easily in paper plugins

Bego Chat is chat application in Kotlin and Firebase with the following features: last seen , user status like typing ,online and last seen with MVVM pattern and clean architecture

Compose ChatApp(Bego Chat) Bego Chat is Compose chat application in Kotlin and Firebase with the following features: sending all file types and abilit

📒 NotyKT is a complete 💎Kotlin-stack (Backend + Android) 📱 application built to demonstrate the use of Modern development tools with best practices implementation🦸.
📒 NotyKT is a complete 💎Kotlin-stack (Backend + Android) 📱 application built to demonstrate the use of Modern development tools with best practices implementation🦸.

NotyKT 🖊️ NotyKT is the complete Kotlin-stack note taking 🖊️ application 📱 built to demonstrate a use of Kotlin programming language in server-side

async/await for Android built upon coroutines introduced in Kotlin 1.1

Async/Await A Kotlin library for Android to write asynchronous code in a simpler and more reliable way using async/await approach, like: async { pr

Klimatic is an android app built using Kotlin. It try to showcase all the latest technologies used in android.
Klimatic is an android app built using Kotlin. It try to showcase all the latest technologies used in android.

Klimatic Klimatic is an android app built using Kotlin. It try to showcase all the latest technologies used in android. Built using Android Architectu

Rock paper scissors game for Android built with Kotlin
Rock paper scissors game for Android built with Kotlin

Android-rock-paper-scissors Rock paper scissors game for Android built with Kotlin It's a pretty basic app. I built it to get more practice with kotli

Owner
Viktor
(Y)ML Engineer · I don't like to train Deep Neural Nets on large datasets
Viktor
A plugin for Termux to use native Android GUI components from CLI applications.

Termux:GUI This is a plugin for Termux that enables command line programs to use the native android GUI. In the examples directory you can find demo v

null 342 Dec 23, 2022
Reapp is everything you need to build amazing apps with React: a collection of packages that work together, our UI kit, and a CLI that scaffolds your app and includes a server and build system.

What is it? Reapp is everything you need to build amazing apps with React: a collection of packages that work together, our UI kit, and a CLI that sca

reapp 3.4k Nov 20, 2022
Muhammad Bilal 0 Jan 6, 2022
Solid - A CLI that tries to cover a dry-run phase for liquibase database change management

solid a CLI that tries to cover a dry-run phase for liquibase database change ma

Giovanni Panice (mos_) 1 Jan 28, 2022
The Klutter CLI tool gives access to all tasks to create and manage a Klutter project.

Klutter CLI The Klutter CLI tool gives access to all tasks to create and manage a Klutter project. Gettings started Download the tool. Unzip the file.

Gillian 2 Mar 31, 2022
A personal project made using Jetpack Compose, Clean-MVVM architecture and other jetpack libraries

A basic CRUD for recording your personal credit and debit transactions. Made using Jetpack Compose, Clean-MVVM and other Jetpack libraries, incorporated with Unit Tests.

Shoaib Ahmed 3 Dec 6, 2022
A CLI tool to convert multi-module Jetpack Compose compiler metrics into beautiful HTML reports

A CLI tool to convert multi-module Jetpack Compose compiler metrics into beautiful HTML reports 1. What are Jetpack Compose compiler metrics? The Comp

Jaya Surya Thotapalli 116 Jan 3, 2023
A minimal notes application in Jetpack Compose with MVVM architecture. Built with components like DataStore, Coroutines, ViewModel, LiveData, Room, Navigation-Compose, Coil, koin etc.

Paper - A Minimal Notes App A minimal notes application in Jetpack Compose with MVVM architecture. Built with components like DataStore, Coroutines, V

Akshay Sharma 139 Jan 2, 2023
A beautiful Fashion Store like Android App Mock built on Jetpack Compose with compose navigation, hilt, dark theme support and google's app architecture found on uplabs Here

A beautiful Fashion Store like Android App Mock built on Jetpack Compose with compose navigation, hilt, dark theme support and google's app architecture found on uplabs Here

Puncz 87 Nov 30, 2022
Nike Store like App Ui, built on Jetcpack compose

Nike-Store, Design Credits: M Sajib A beautiful NIKE Store like Android App UI built on Jetpack Compose found on uplabs Here License Copyright 2021 Th

Puncz 42 Dec 18, 2022