diff --git a/hello-web/app.js b/hello-web/app.js new file mode 100644 index 0000000..3f97354 --- /dev/null +++ b/hello-web/app.js @@ -0,0 +1,6 @@ +(function initHello() { + const el = document.getElementById("hello-text"); + if (el && !el.textContent.includes("Hello World")) { + el.textContent = "Hello World"; + } +})(); diff --git a/hello-web/index.html b/hello-web/index.html new file mode 100644 index 0000000..75506ce --- /dev/null +++ b/hello-web/index.html @@ -0,0 +1,15 @@ + + + + + + Hello Web + + + +
+

Hello World

+
+ + + diff --git a/hello-web/styles.css b/hello-web/styles.css new file mode 100644 index 0000000..8c40a29 --- /dev/null +++ b/hello-web/styles.css @@ -0,0 +1,22 @@ +:root { + --bg: #f5f7fb; + --text: #1f2937; +} + +* { + box-sizing: border-box; +} + +body { + margin: 0; + min-height: 100vh; + display: grid; + place-items: center; + background: var(--bg); + color: var(--text); + font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; +} + +.container { + text-align: center; +} diff --git a/scripts/verify-hello.sh b/scripts/verify-hello.sh new file mode 100755 index 0000000..20a2070 --- /dev/null +++ b/scripts/verify-hello.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +set -euo pipefail + +required_files=( + "hello-web/index.html" + "hello-web/styles.css" + "hello-web/app.js" +) + +for file in "${required_files[@]}"; do + if [[ ! -f "$file" ]]; then + echo "Missing required file: $file" >&2 + exit 1 + fi +done + +if ! rg -q "Hello World" hello-web/index.html hello-web/app.js; then + echo "Hello World text not found in expected files" >&2 + exit 1 +fi + +echo "Verification passed: required files exist and Hello World text is present."