Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yanorei32/jquery-practice

It's a joke repository
https://github.com/yanorei32/jquery-practice

ansi c console css jquery

Last synced: about 2 months ago
JSON representation

It's a joke repository

Awesome Lists containing this project

README

        

# jQuery Practice

jQuery like ANSI terminal formatter.

**written-in-C** (joke project)

## quick start

```bash
git clone https://github.com/yanorei32/jquery-practice
cd jquery-practice
gcc main.c
./a.out
```

## example

```c
$(
"

",
(json){ text: "Hello World" }
).css("background-color", "white")
.css("color", "black")
.appendTo("body");

$(
"

",
(json){ text: "Italic + Red" }
).css("font-style", "italic")
.css("color", "red")
.appendTo("body");

$(
"

",
(json){ text: "Strike + Underline" }
).css("text-decoration", "line-through underline")
.appendTo("body");

/* Hex color (must support 24-bit color) */
$(
"

",
(json){ text: "Hex Color" }
).css("background-color", "#e34234")
.css("color", "#ee6")
.appendTo("body");

/* Hex color with opacity emulation
(must support 24-bit color)
TERMINAL_COLOR macro is required.
ex) #define TERMINAL_COLOR 0x1d, 0x1f, 0x21 */
$(
"

",
(json){ text: "Hex Color (opacity-emulation)" }
).css("background-color", "#e3423511")
.css("color", "#ee61")
.appendTo("body");

$(
"",
(json){ text: "Without \\n" }
).css("background-color", "#fff")
.css("color", "#000")
.appendTo("body");

puts();
```