Skip to content

Commit

Permalink
Make website mobile friendlier
Browse files Browse the repository at this point in the history
  • Loading branch information
Pawka committed Jul 7, 2024
1 parent 9722596 commit 252b3f7
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ set -euo pipefail
readonly PROJECT_URL="https://github.com/ntacamp/404.notrollsallowed.com"

build_html() {
sed '1s/^/\<pre\>\n/'
echo '</pre>'
readonly replace_keyword="_CONTENT_"
readonly template_file="bin/index.tpl"

# Load stdin into variable.
feed=$(cat <&0)
template=$(cat < "$template_file")
echo "${template/$replace_keyword/$feed}"
}

add_pr_links() {
Expand Down
23 changes: 23 additions & 0 deletions bin/index.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>404</title>
<style>
pre {
word-wrap: break-word;
padding: 10px;
border-radius: 5px;
max-width: 100%;
box-sizing: border-box;
overflow-x: auto;
}
</style>
</head>
<body>
<pre>
_CONTENT_
</pre>
</body>
</html>

0 comments on commit 252b3f7

Please sign in to comment.