better style placement in web files
This commit is contained in:
parent
4f929a798b
commit
2c77c2fa14
13
bin/web
13
bin/web
|
@ -24,10 +24,10 @@ entry_index () {
|
|||
entry_html="${html_dir}${loghtml}.html"
|
||||
mkdir -p "${html_dir}${logdir}"
|
||||
cat "$web_header_html" > "${entry_html}"
|
||||
cat "$web_styles_html" >> "${entry_html}"
|
||||
{
|
||||
printf " <title>%s</title>\\n" "$title"
|
||||
printf " <link rel=\"canonical\" href=\"https://cosmic.voyage%s.html\">\\n" "$loghtml"
|
||||
cat "$web_styles_html"
|
||||
printf "</head>\\n<body>\\n<div class=\"page-wrapper\"><pre class=\"inner-wrapper\">\\n"
|
||||
printf "<a href=\"/log\"><< BACK TO RELAY ONE LOG</a>\\n\\n\\n"
|
||||
sed 's/&/\&/g; s/</\</g; s/>/\>/g; s/"/\"/g; s/'"'"'/\'/g' "${gopher_dir}${log}"
|
||||
|
@ -63,14 +63,13 @@ if [ "$run_user" -eq 0 ]; then
|
|||
|
||||
# Add standard header
|
||||
cat "$web_header_html" > "${root_index_html}"
|
||||
cat "$web_styles_html" >> "${root_index_html}"
|
||||
|
||||
# Custom header elements and body start
|
||||
{
|
||||
printf "<title>Cosmic Voyage</title>"
|
||||
printf "<link rel=\"canonical\" href=\"https://cosmic.voyage\">"
|
||||
printf "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"Cosmic Voyage\" href=\"/rss.xml\">"
|
||||
printf "<meta name=\"description\" content=\"Cosmic Voyage is a public-access unix system and 'tilde' community based around a collaborative science-fiction universe. Users write stories as the people aboard ships, colonies, and outposts, using the only remaining free, interconnected network that unites the dispersed peoples of the stars.\">"
|
||||
cat "$web_styles_html"
|
||||
printf "</head>"
|
||||
printf "<body>"
|
||||
printf "<div class=\"page-wrapper\">"
|
||||
|
@ -91,11 +90,11 @@ if [ "$run_user" -eq 0 ]; then
|
|||
local_log_html="/var/www/html/log/index-${i}.html"
|
||||
fi
|
||||
cat "$web_header_html" > "${local_log_html}"
|
||||
cat "$web_styles_html" >> "${local_log_html}"
|
||||
# Custom header elements and body start
|
||||
{
|
||||
printf "<title>Cosmic Voyage - Transmission Log</title>"
|
||||
printf "<link rel=\"canonical\" href=\"https://cosmic.voyage/log\">"
|
||||
cat "$web_styles_html"
|
||||
printf "</head>"
|
||||
printf "<body>"
|
||||
printf "<div class=\"page-wrapper\">"
|
||||
|
@ -154,11 +153,11 @@ if [ "$run_user" -eq 0 ]; then
|
|||
mkdir -p "${html_dir}/ships"
|
||||
# Add header info to html output
|
||||
cat "$web_header_html" > "${ships_html}"
|
||||
cat "$web_styles_html" >> "${ships_html}"
|
||||
# Custom header elements and body start
|
||||
{
|
||||
printf "<title>Cosmic Voyage - Ships</title>"
|
||||
printf "<link rel=\"canonical\" href=\"https://cosmic.voyage/ships\">"
|
||||
cat "$web_styles_html"
|
||||
printf "</head>"
|
||||
printf "<body>"
|
||||
printf "<div class=\"page-wrapper\">"
|
||||
|
@ -181,11 +180,11 @@ if [ "$run_user" -eq 0 ]; then
|
|||
mkdir -p "${html_dir}/ships/${ship}"
|
||||
# Add header info to html output
|
||||
cat "$web_header_html" > "${ship_html}"
|
||||
cat "$web_styles_html" >> "${ship_html}"
|
||||
# Custom header elements and body start
|
||||
{
|
||||
printf "<title>Cosmic Voyage - %s</title>" "$ship"
|
||||
printf "<link rel=\"canonical\" href=\"https://cosmic.voyage/ships/%s\">" "$ship"
|
||||
cat "$web_styles_html"
|
||||
printf "</head>"
|
||||
printf "<body>"
|
||||
printf "<div class=\"page-wrapper\">"
|
||||
|
@ -212,8 +211,8 @@ if [ "$run_user" -eq 0 ]; then
|
|||
|
||||
# Print error page
|
||||
cat "$web_header_html" > "${error_html}"
|
||||
cat "$web_styles_html" >> "${error_html}"
|
||||
{
|
||||
cat "$web_styles_html"
|
||||
printf "</head><body><div class=\"page-wrapper\"><pre class=\"inner-wrapper\"><a href=\"/\"><< BACK TO RELAY ONE</a>"
|
||||
printf "\\n\\n\\nERROR. TRANSMISSION NOT FOUND.</pre></div></body></html>"
|
||||
} >> "${error_html}"
|
||||
|
|
Loading…
Reference in New Issue