Skip to content
View dedicatedcloud's full-sized avatar
🤣
🤣

Block or report dedicatedcloud

Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
dedicatedcloud/README.md

Hi there 👋

Conference Room Schedule.

Dynamic SVG Editor.

Dynamic SVG Editor 2 Lines.

Dynamic SVG Editor Pro +.

Bookmarklet Maker.

Tree To Shell.

bookmarklet.html.

conference-room-schedule.html.

dynamic-svg-editor-pro.html.

dynamic-svg-editor-two-lines.html.

dynamic-svg-editor.html.

generate-save-to-repo-form.sh.

index.html.

neon-custom-text.html.

neon.html.

test.html.

tree-to-shell.html.

ybgr-screenshot.html.

ybgr.html

Index Dir

#!/usr/bin/env bash
set -euo pipefail

OUTPUT_FILE="index.htm"
TITLE="Index"

html_escape() {
    local s="${1:-}"
    s="${s//&/&}"
    s="${s//</&lt;}"
    s="${s//>/&gt;}"
    s="${s//\"/&quot;}"
    s="${s//\'/&#39;}"
    printf '%s' "$s"
}

{
    printf '%s\n' '<!doctype html>'
    printf '%s\n' '<html lang="en">'
    printf '%s\n' '<head>'
    printf '%s\n' '  <meta charset="utf-8">'
    printf '%s\n' '  <meta name="viewport" content="width=device-width, initial-scale=1">'
    printf '  <title>%s</title>\n' "$(html_escape "$TITLE")"
    printf '%s\n' '  <style>'
    printf '%s\n' '    body { font-family: Arial, sans-serif; margin: 40px; line-height: 1.5; }'
    printf '%s\n' '    h1 { margin-bottom: 20px; }'
    printf '%s\n' '    ul { padding-left: 20px; }'
    printf '%s\n' '    li { margin-bottom: 8px; }'
    printf '%s\n' '    a { color: #0645ad; text-decoration: none; }'
    printf '%s\n' '    a:hover { text-decoration: underline; }'
    printf '%s\n' '  </style>'
    printf '%s\n' '</head>'
    printf '%s\n' '<body>'
    printf '  <h1>%s</h1>\n' "$(html_escape "$TITLE")"
    printf '%s\n' '  <ul>'

    find . -maxdepth 1 -type f \( -iname '*.html' -o -iname '*.htm' \) ! -iname 'index.html' ! -iname 'index.htm' -printf '%f\n' \
        | LC_ALL=C sort \
        | while IFS= read -r file; do
            escaped_file="$(html_escape "$file")"
            printf '    <li><a href="%s">%s</a></li>\n' "$escaped_file" "$escaped_file"
        done

    printf '%s\n' '  </ul>'
    printf '%s\n' '</body>'
    printf '%s\n' '</html>'
} > "$OUTPUT_FILE"

printf 'Created %s\n' "$OUTPUT_FILE"

Pinned Loading

  1. Commands_Scripts_Snippets Commands_Scripts_Snippets Public

    Click to Copy Commands

    PHP

  2. WW_Snippets WW_Snippets Public

    PHP 1

  3. html html Public

    HTML

  4. dedicatedcloud dedicatedcloud Public

    HTML 1

  5. dropin-minimal-css dropin-minimal-css Public

    Forked from dohliam/dropin-minimal-css

    Drop-in switcher for previewing minimal CSS frameworks

    CSS