diff --git a/.prettierignore b/.prettierignore index 780b455..b656b39 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,3 @@ # Ignore artifacts: -dist \ No newline at end of file +dist +skins/weewx-wdc/includes/stat-tile.inc \ No newline at end of file diff --git a/changelog.md b/changelog.md index b0f8c4f..e458430 100644 --- a/changelog.md +++ b/changelog.md @@ -734,3 +734,4 @@ See https://github.com/Daveiano/weewx-wdc/compare/v3.2.0...11eed6b3#diff-ba225fb - Make icon/logo user configurable GH-205 - Enhancement to the All Time Statistics: Show climatological days per month and per year. GH-196 - Added NL translation, thanks to user @dystechnic +- Added configurable 'Clickable' tiles GH-211 diff --git a/skins/weewx-wdc/includes/stat-tile.inc b/skins/weewx-wdc/includes/stat-tile.inc index dcc8d23..3fa2e1a 100644 --- a/skins/weewx-wdc/includes/stat-tile.inc +++ b/skins/weewx-wdc/includes/stat-tile.inc @@ -24,6 +24,10 @@
+ #if "stat_tile_links" in $DisplayOptions and $partial_obs in $DisplayOptions["stat_tile_links"] + #set $open_new_tab = "_blank" if $to_bool($DisplayOptions["stat_tile_links"][$partial_obs]["open_new_tab"]) else "_self" + + #end if
+ + #if "stat_tile_links" in $DisplayOptions and $partial_obs in $DisplayOptions["stat_tile_links"] + + + + + #end if +

$obs.label[$partial_obs]

@@ -347,4 +371,7 @@
#end if
+ #if "stat_tile_links" in $DisplayOptions and $partial_obs in $DisplayOptions["stat_tile_links"] +
+ #end if
diff --git a/skins/weewx-wdc/src/scss/index.scss b/skins/weewx-wdc/src/scss/index.scss index 4d6dd95..0e85d7c 100644 --- a/skins/weewx-wdc/src/scss/index.scss +++ b/skins/weewx-wdc/src/scss/index.scss @@ -97,6 +97,11 @@ html.dark { fill: $text-02; } + .stat-tile svg.icon-link { + @include carbon--theme($carbon--theme--g90, true); + fill: $text-02; + } + .bx-ce-demo-devenv--tab-panels { background: $ui-01; } @@ -492,6 +497,12 @@ header.section-header { } } +a.stat-tile-link, +a.stat-tile-link * { + text-decoration: none; + color: inherit; +} + .stat-tile { margin-bottom: $spacing-05; height: calc(100% - #{$spacing-05}); @@ -499,6 +510,13 @@ header.section-header { padding-bottom: $spacing-01; } > .bx--row { + position: relative; + svg.icon-link { + position: absolute; + right: 0; + top: 0; + width: 24px; + } align-items: center; .label { @include carbon--type-style("expressive-heading-02");