Bootstrap 4.0 addon ...

28 views
Skip to first unread message

Yves Martin

unread,
Jul 13, 2023, 2:50:51 PM7/13/23
to weewx-user
Hi,

With the heat and UV issues for health, I've added this on my page ...
I've added some lines with Bootstrap 4.0 for the UV sensor, here are the lines :

file /etc/weewx/skins/Boutstrap/livegauge.html.inc

(...)

            <tr>
                <td>$gettext("RecommendationsUV")</td>
                        #if $current.UV.raw > 11
                         <td>$gettext("RiskUV5")</td>
                        #elif $current.UV.raw >= 8
                         <td>$gettext("RiskUV4")</td>
                        #elif $current.UV.raw >= 6
                         <td>$gettext("RiskUV3")</td>
                        #elif $current.UV.raw >= 3
                         <td>$gettext("RiskUV2")</td>
                        #elif $current.UV.raw >= 1
                         <td>$gettext("RiskUV1")</td>
                        #else:
                         <td>$gettext("RiskUV0")</td>
                        #end if
            </tr>

(...)

And the languages 

/etc/weewx/skins/Boutstrap/lang/fr.conf

    "UV" = "Indice UV"
    "RecommendationsUV" = "Recommandations (UV)"
    "RiskUV5" = "Risque extrême et dangereux"
    "RiskUV4" = "Risque très élevé (Indice 50+)"
    "RiskUV3" = "Risque élevé (Indice 30 à 50)"
    "RiskUV2" = "Risque modéré (Indice 15 à 29)"
    "RiskUV1" = "Risque faible"
    "RiskUV0" = "Risque nul"
    "Cumulative rain" = "Cumul de pluie"
    "Equinox" = "Équinoxe"
    "Solstice" = "Solstice"

/etc/weewx/skins/Boutstrap/lang/en.conf

    "UV" = "UV Indice"
    "RecommendationsUV" = "Recommendations (UV)"
    "RiskUV5" = "Extreme and dangerous risk"
    "RiskUV4" = "Very high risk (Index 50+)"
    "RiskUV3" = "High risk (Index 30 to 50)"
    "RiskUV2" = "Moderate risk (Index 15 to 29)"
    "RiskUV1" = "Low risk"
    "RiskUV0" = "Zero risk"
    "Cumulative rain" = "Cumulative Rain"
    "Equinox" = "Equinox"
    "Solstice" = "Solstice"

(...)

Have fun

Yves,
YMartin.com/meteo
Reply all
Reply to author
Forward
0 new messages