ADDED bin/generate-css-snippet Index: bin/generate-css-snippet ================================================================== --- /dev/null +++ bin/generate-css-snippet @@ -0,0 +1,42 @@ +#! /usr/bin/env bash + +platforms=(x86_64-linux arm-linux arm-android x86_64-macos) + +function infoToStatusImageURL() { + local imageProvidingURL + local action status platform + local os + local url + + action="$1" + status="$2" + platform="$3" + + os="$(echo "${platform}" | cut -f 2 -d -)" + + imageProvidingURL='https://rkeene.org/images/icons/dynamic-status/' + url="${imageProvidingURL}/?os=${os}&status=${status}&action=${action}" + + echo "${url}" +} +for action in build tests; do + for status in pass fail; do + for platform in "${platforms[@]}"; do + tag="${action}-${status}-${platform}" +cat << _EOF_ +.timelineTableCell a[href*="/timeline?r=${tag}&"] { + background: url("$(infoToStatusImageURL "${action}" "${status}" "${platform}")"); + width: 120px; + height: 20px; + background-size: 120px 20px; + background-repeat: no-repeat; + color: rgba(0,0,0,0); + display: inline-block; + text-indent: -65536px; +} +_EOF_ + done + done +done +exit 0 +