Color change

Change `emphasize_stuff_in_headers()` to use olive and bold olive rather than brown and yellow. This matches what `aha` creates and appears similar to what is displayed in the terminal on a Mac. Also, yellow text is very difficult to read.
This commit is contained in:
David Cooper 2017-02-10 15:05:43 -05:00 committed by GitHub
parent 2652362ce0
commit f633ce67d6

View File

@ -1830,86 +1830,86 @@ emphasize_stuff_in_headers(){
while [[ $len -gt 0 ]]; do
if [[ -z "$(tr -d '0-9' <<< "${text:0:1}")" ]]; then
out_term "$brown${text:0:1}$off"
out_html "<span style=\"color:chocolate;\">${text:0:1}</span>"
out_html "<span style=\"color:olive;\">${text:0:1}</span>"
text="${text:1}"
len=$len-1
elif [[ $len -ge 31 ]] && [[ "${text:0:31}" == "MicrosoftSharePointTeamServices" ]]; then
out_term "$yellow${text:0:31}$off"
out_html "<span style=\"color:yellow;\">${text:0:31}</span>"
out_html "<span style=\"color:olive;font-weight:bold;\">${text:0:31}</span>"
text="${text:31}"
len=$len-31
elif [[ $len -ge 24 ]] && [[ "${text:0:24}" == "Red Hat Enterprise Linux" ]]; then
out_term "$yellow${text:0:24}$off"
out_html "<span style=\"color:yellow;\">${text:0:24}</span>"
out_html "<span style=\"color:olive;font-weight:bold;\">${text:0:24}</span>"
text="${text:24}"
len=$len-24
elif [[ $len -ge 16 ]] && [[ "${text:0:16}" == "X-AspNet-Version" ]]; then
out_term "$yellow${text:0:16}$off"
out_html "<span style=\"color:yellow;\">${text:0:16}</span>"
out_html "<span style=\"color:olive;font-weight:bold;\">${text:0:16}</span>"
text="${text:16}"
len=$len-16
elif [[ $len -ge 15 ]] && [[ "${text:0:15}" == "X-UA-Compatible" ]]; then
out_term "$yellow${text:0:15}$off"
out_html "<span style=\"color:yellow;\">${text:0:15}</span>"
out_html "<span style=\"color:olive;font-weight:bold;\">${text:0:15}</span>"
text="${text:15}"
len=$len-15
elif [[ $len -ge 14 ]] && ( [[ "${text:0:14}" == "Liferay-Portal" ]] || [[ "${text:0:14}" == "X-Cache-Lookup" ]] || \
[[ "${text:0:14}" == "X-Cache-Status" ]] ) ; then
out_term "$yellow${text:0:14}$off"
out_html "<span style=\"color:yellow;\">${text:0:14}</span>"
out_html "<span style=\"color:olive;font-weight:bold;\">${text:0:14}</span>"
text="${text:14}"
len=$len-14
elif [[ $len -ge 13 ]] && [[ "${text:0:13}" == "X-OWA-Version" ]]; then
out_term "$yellow${text:0:13}$off"
out_html "<span style=\"color:yellow;\">${text:0:13}</span>"
out_html "<span style=\"color:olive;font-weight:bold;\">${text:0:13}</span>"
text="${text:13}"
len=$len-13
elif [[ $len -ge 12 ]] && [[ "${text:0:12}" == "X-Powered-By" ]]; then
out_term "$yellow${text:0:12}$off"
out_html "<span style=\"color:yellow;\">${text:0:12}</span>"
out_html "<span style=\"color:olive;font-weight:bold;\">${text:0:12}</span>"
text="${text:12}"
len=$len-12
elif [[ $len -ge 11 ]] && [[ "${text:0:11}" == "X-Forwarded" ]]; then
out_term "$yellow${text:0:11}$off"
out_html "<span style=\"color:yellow;\">${text:0:11}</span>"
out_html "<span style=\"color:olive;font-weight:bold;\">${text:0:11}</span>"
text="${text:11}"
len=$len-11
elif [[ $len -ge 9 ]] && ( [[ "${text:0:9}" == "X-Varnish" ]] || [[ "${text:0:9}" == "X-Version" ]] ); then
out_term "$yellow${text:0:9}$off"
out_html "<span style=\"color:yellow;\">${text:0:9}</span>"
out_html "<span style=\"color:olive;font-weight:bold;\">${text:0:9}</span>"
text="${text:9}"
len=$len-9
elif [[ $len -ge 8 ]] && [[ "${text:0:8}" == "X-Server" ]]; then
out_term "$yellow${text:0:8}$off"
out_html "<span style=\"color:yellow;\">${text:0:8}</span>"
out_html "<span style=\"color:olive;font-weight:bold;\">${text:0:8}</span>"
text="${text:8}"
len=$len-8
elif [[ $len -ge 7 ]] && ( [[ "${text:0:7}" == "squeeze" ]] || [[ "${text:0:7}" == "Red Hat" ]] || \
[[ "${text:0:7}" == "X-Cache" ]] || [[ "${text:0:7}" == "X-Squid" ]] ) ; then
out_term "$yellow${text:0:7}$off"
out_html "<span style=\"color:yellow;\">${text:0:7}</span>"
out_html "<span style=\"color:olive;font-weight:bold;\">${text:0:7}</span>"
text="${text:7}"
len=$len-7
elif [[ $len -ge 6 ]] && ( [[ "${text:0:6}" == "Debian" ]] || [[ "${text:0:6}" == "Ubuntu" ]] || \
[[ "${text:0:6}" == "ubuntu" ]] || [[ "${text:0:6}" == "jessie" ]] || \
[[ "${text:0:6}" == "wheezy" ]] || [[ "${text:0:6}" == "CentOS" ]] ) ; then
out_term "$yellow${text:0:6}$off"
out_html "<span style=\"color:yellow;\">${text:0:6}</span>"
out_html "<span style=\"color:olive;font-weight:bold;\">${text:0:6}</span>"
text="${text:6}"
len=$len-6
elif [[ $len -ge 5 ]] && ( [[ "${text:0:5}" == "Win32" ]] || [[ "${text:0:5}" == "Win64" ]] || [[ "${text:0:5}" == "lenny" ]] ); then
out_term "$yellow${text:0:5}$off"
out_html "<span style=\"color:yellow;\">${text:0:5}</span>"
out_html "<span style=\"color:olive;font-weight:bold;\">${text:0:5}</span>"
text="${text:5}"
len=$len-5
elif [[ $len -ge 4 ]] && [[ "${text:0:4}" == "SUSE" ]]; then
out_term "$yellow${text:0:4}$off"
out_html "<span style=\"color:yellow;\">${text:0:4}</span>"
out_html "<span style=\"color:olive;font-weight:bold;\">${text:0:4}</span>"
text="${text:4}"
len=$len-4
elif [[ $len -ge 3 ]] && [[ "${text:0:3}" == "Via" ]]; then
out_term "$yellow${text:0:3}$off"
out_html "<span style=\"color:yellow;\">${text:0:3}</span>"
out_html "<span style=\"color:olive;font-weight:bold;\">${text:0:3}</span>"
text="${text:3}"
len=$len-3
else