Fork me on GitHub

PrismJS Darcula Theme

GitHub: LucaScorpion/prismjs-darcula-theme

Examples

JavaScript

class Circle {
    constructor(radius) {
        this.radius = radius;
    }

    /**
     * Calculate the circumference of the circle.
     *
     * @return {number}
     */
    circumference() {
        return 2 * Math.PI * this.radius;
    }
}

const c = new Circle(0.5);
console.log(c.circumference()); // 3.1415...

HTML

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Example</title>
        <link rel="stylesheet" href="style.css"/>
    </head>
    <body id="home">
        <!-- Todo: write actual content -->
        <div>Lorem ipsum dolor sit amet</div>
    </body>
</html>

Java

import java.util.ArrayList;
import java.util.List;

public class Program {
    public static void main(String[] args) {
        List<String> valid = new ArrayList<>();

        for (int i = 0; i < args.length; i++) {
            String arg = args[i];

            if (isValid(arg)) {
                valid.add(arg);
            }
        }
    }

    /**
     * Check if an argument is valid.
     *
     * @param arg The argument to check.
     * @return Whether the argument is valid.
     */
    private static boolean isValid(String arg) {
        return true; // Todo: Do actual check.
    }
}

CSS

.row {
    display: flex;
    flex-direction: row;
}

/* Small screen rules */
@media screen and (max-width: 800px){
    .row {
        flex-direction: column !important;
    }
}

JSON

{
  "ok": true,
  "list": [
    1,
    2,
    3
  ],
  "string": "This is JSON"
}

YAML

version: '3.7'
services:
  rabbitmq:
    image: rabbitmq:3.7-management
    ports:
      - 15672:15672
      - 5672:5672