added users and onboarding

This commit is contained in:
q 2024-11-17 19:38:38 -05:00
parent 0b00bef7d8
commit 4523db7159
13 changed files with 155 additions and 40 deletions

View file

@ -34,5 +34,24 @@ EOF
# Create the style.css file
echo "/* Put custom styles here */" > "$path/$name/_werc/style.css"
# Update index.html
index_file="$path/index.html"
if [ -f "$index_file" ]; then
awk -v name="$name" '
{
print
if ($0 ~ /<!-- BUTTONS -->/) {
print " <div class=\"grid-item\">"
print " <a href=\"/" name "/\"><img src=\"/_werc/pub/img/but/" name ".gif\" alt=\"" name "\" /></a>"
print " </div>"
print ""
}
}' "$index_file" > "${index_file}.tmp" && mv "${index_file}.tmp" "$index_file"
echo "Updated index.html with new user entry"
else
echo "Warning: index.html not found at $index_file"
fi
# Output a success message
echo "Folder structure created successfully at $path/$name"