Skip to content

Commit

Permalink
(chore) Removed prettier from page tamplates. GH-234
Browse files Browse the repository at this point in the history
  • Loading branch information
Daveiano committed Nov 23, 2024
1 parent acb52ef commit f557320
Show file tree
Hide file tree
Showing 17 changed files with 21 additions and 109 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -942,3 +942,4 @@ index 465d4ad..aa8bad6 100644
- Add Moon phases and planet name translations GH-264
- Added option to only color the text in the colored temperatur stat tile GH-243
- Simplified adding of user defined modals GH-255
- (chore) Remove prettier from *.inc and *html.tmpl files GH-234
4 changes: 0 additions & 4 deletions skins/weewx-wdc/about.html.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<!--prettier-ignore-->
#errorCatcher Echo
#encoding UTF-8

Expand Down Expand Up @@ -169,7 +168,6 @@
aria-labelledby="tab-code"
hidden
>
<!--prettier-ignore-->
<bx-code-snippet type="multi">&lt;h4 class=&quot;bx--type-productive-heading-03&quot;&gt;<br/> Heading<br/>&lt;/h4&gt;<br/>&lt;h5 class=&quot;bx--type-productive-heading-02&quot;&gt;<br/> Subheading<br/>&lt;/h5&gt;<br/>&lt;p class=&quot;bx--type-body-long-02&quot;&gt;<br/> Paragraph text<br/>&lt;/p&gt;<br/>&lt;p class=&quot;bx--type-helper-text-01&quot;&gt;<br/> Some helper text<br/>&lt;/p&gt;
</bx-code-snippet>
</div>
Expand Down Expand Up @@ -236,7 +234,6 @@
By default, this page is disabled in the skin.conf, simply
uncomment if you want to enable it:
</p>
<!--prettier-ignore-->
<bx-code-snippet type="multi"># Static pages, add as many as you want.
[[Static]]
[[[about]]]
Expand All @@ -246,7 +243,6 @@
<p class="bx--type-body-long-02">
You can add an unlimited amount of pages:
</p>
<!--prettier-ignore-->
<bx-code-snippet type="multi"># Static pages, add as many as you want.
[[Static]]
[[[about]]]
Expand Down
6 changes: 0 additions & 6 deletions skins/weewx-wdc/celestial.html.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<!--prettier-ignore-->
#errorCatcher Echo
#encoding UTF-8
#from datetime import datetime
Expand All @@ -25,32 +24,27 @@
<h2>$now</h2>
</header>
</div>
<!--prettier-ignore-->
#if $almanac.hasExtras
<div class="bx--row">
<!--prettier-ignore-->
#attr $labels_almanac = ["Sun", "Moon"]
#for $label in $labels_almanac
#set global $label_almanac = $label
#include "includes/almanac-tile.inc"
#end for
</div>
<div class="bx--row">
<!--prettier-ignore-->
#attr $labels_almanac2 = ["Venus", "Mars", "Jupiter", "Saturn"]
#for $label in $labels_almanac2
#set global $label_almanac = $label
#include "includes/almanac-tile.inc"
#end for
</div>
<div class="bx--row">
<!--prettier-ignore-->
#include "includes/almanac-sun-detail-tile.inc"
#include "includes/almanac-moon-detail-tile.inc"
</div>
#else
<div class="bx--row">
<!--prettier-ignore-->
#set global $label_almanac = $gettext("Sun")
#include "includes/almanac-tile-simple.inc"
</div>
Expand Down
1 change: 0 additions & 1 deletion skins/weewx-wdc/computer-monitor.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@
#set global $context = 'day'

<div class="bx--row">
<!--prettier-ignore-->
#for $obs in $computer_monitor_stat_tile_observations
#set $binding = $get_data_binding($obs)
#set $alltime_tag = $alltime($data_binding=$binding) if $context == 'alltime' else None
Expand Down
4 changes: 0 additions & 4 deletions skins/weewx-wdc/day-archive/day-%Y-%m-%d.html.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<!--prettier-ignore-->
#errorCatcher Echo
#encoding UTF-8
#import datetime
Expand Down Expand Up @@ -29,9 +28,7 @@
</header>
</div>

<!--prettier-ignore-->
#if $get_day_archive_enabled()
<!--prettier-ignore-->
<div class="bx--row" style="margin-bottom: 2rem;">
<div class="bx--col-sm-4 bx--col-md-8 bx--col-lg-12 bx--col-xlg-6 bx--col-max-6">
#set $archive_days = $get_archive_days_array($alltime.dateTime.raw, $latest.dateTime.raw, $get_time_format_dict['daily_archive'])
Expand All @@ -47,7 +44,6 @@
</div>
#end if

<!--prettier-ignore-->
#if $DisplayOptions.get('layout', 'alternative') == 'alternative'
#include 'includes/body-alternative.inc'
#else
Expand Down
20 changes: 0 additions & 20 deletions skins/weewx-wdc/dwd.html.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<!--prettier-ignore-->
#errorCatcher Echo
#encoding UTF-8
#import datetime
Expand Down Expand Up @@ -34,13 +33,11 @@
</header>
</div>

<!--prettier-ignore-->
#if $to_bool($Extras['weewx-DWD']['show_text_forecast'])
#set $VHDL = $Extras['weewx-DWD']['text_forecast_VHDL']
#set $dwd_link = $Extras['weewx-DWD']['dwd_link']
<div class="bx--row" style="margin-bottom: 1.5rem">
<div class="bx--col">
<!--prettier-ignore-->
<div class="bx--tile">
#set $today = datetime.date.today()
#set $headings = {54: $pgettext("DWD", "Current Weather Conditions"), 50: $pgettext("DWD", "Today"), 51: $pgettext("DWD", "Tomorrow"), 52: $pgettext("DWD", ($today + datetime.timedelta(days=2)).strftime("%A")), 53: $pgettext("DWD", ($today + datetime.timedelta(days=3)).strftime("%A"))}
Expand Down Expand Up @@ -69,7 +66,6 @@
</div>
#end if

<!--prettier-ignore-->
#if $to_bool($Extras['weewx-DWD']['show_forecast']) and os.path.exists("dwd/forecast-" + $Extras['weewx-DWD']['mosmix_id'] + ".json")
<div class="bx--row" style="margin-bottom: 1.5rem">
<div class="bx--col">
Expand All @@ -84,10 +80,8 @@
</div>
#end if

<!--prettier-ignore-->
#if $DisplayOptions.get("diagrams", {}).get("combined_observations", {}).get('dwd_meteogram_1', None) is not None
<div class="bx--row">
<!--prettier-ignore-->
#attr $context = 'custom'
#set global $context_start_ts = $time.time()
#set $end_dt = $datetime.date.today() + $datetime.timedelta(days=14)
Expand All @@ -101,10 +95,8 @@
</div>
#end if

<!--prettier-ignore-->
#if $DisplayOptions.get("diagrams", {}).get("combined_observations", {}).get('dwd_meteogram_2', None) is not None
<div class="bx--row">
<!--prettier-ignore-->
#attr $context = 'custom'
#set global $context_start_ts = $time.time()
#set $end_dt = $datetime.date.today() + $datetime.timedelta(days=14)
Expand All @@ -118,10 +110,8 @@
</div>
#end if

<!--prettier-ignore-->
#if $DisplayOptions.get("diagrams", {}).get("combined_observations", {}).get('dwd_meteogram_3', None) is not None
<div class="bx--row">
<!--prettier-ignore-->
#attr $context = 'custom'
#set global $context_start_ts = $time.time()
#set $end_dt = $datetime.date.today() + $datetime.timedelta(days=14)
Expand All @@ -135,7 +125,6 @@
</div>
#end if

<!--prettier-ignore-->
#if $to_bool($Extras['weewx-DWD']['show_pressure_map']) or $to_bool($Extras['weewx-DWD']['show_warning_map'])
<div class="bx--row" style="margin-bottom: 1.5rem">
<div
Expand All @@ -145,7 +134,6 @@
<h2>$gettext("Aktuelle Bodendruck- und Warnkarte")</h2>
</header>
</div>
<!--prettier-ignore-->
#if $to_bool($Extras['weewx-DWD']['show_pressure_map'])
<div
class="bx--col-sm-4 bx--col-md-8 bx--col-lg-6 bx--col-xlg-6 bx--col-max-6"
Expand All @@ -168,7 +156,6 @@
</div>
#end if

<!--prettier-ignore-->
#if $to_bool($Extras['weewx-DWD']['show_warning_map'])
<div
class="bx--col-sm-4 bx--col-md-8 bx--col-lg-6 bx--col-xlg-6 bx--col-max-6"
Expand All @@ -193,7 +180,6 @@
</div>
#end if

<!--prettier-ignore-->
#if $to_bool($Extras['weewx-DWD']['show_text_warnings'])
<div class="bx--row" style="margin-bottom: 1.5rem">
<div
Expand All @@ -205,38 +191,32 @@
</div>

#set $warning_index = 0
<!--prettier-ignore-->
<div
class="bx--col-sm-4 bx--col-md-8 bx--col-lg-6 bx--col-xlg-6 bx--col-max-6"
>
#for $region, $region_key in $get_dwd_warnings.items()
#if os.path.exists("dwd/warn-" + $region_key + ".json") and ($warning_index % 2) == 0

<!--prettier-ignore-->
#set global $region = $region
#set global $region_key = $region_key
#include "includes/dwd-warning.inc"

<!--prettier-ignore-->
#end if
#set $warning_index = $warning_index + 1
#end for
</div>

#set $warning_index = 0
<!--prettier-ignore-->
<div
class="bx--col-sm-4 bx--col-md-8 bx--col-lg-6 bx--col-xlg-6 bx--col-max-6"
>
#for $region, $region_key in $get_dwd_warnings.items()
#if os.path.exists("dwd/warn-" + $region_key + ".json") and ($warning_index % 2) != 0

<!--prettier-ignore-->
#set global $region = $region
#set global $region_key = $region_key
#include "includes/dwd-warning.inc"

<!--prettier-ignore-->
#end if
#set $warning_index = $warning_index + 1
#end for
Expand Down
5 changes: 0 additions & 5 deletions skins/weewx-wdc/externals.html.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<!--prettier-ignore-->
#errorCatcher Echo
#encoding UTF-8

Expand Down Expand Up @@ -48,11 +47,8 @@
</div>
#end if

<!--prettier-ignore-->
#if 'externals' in $Extras
<!--prettier-ignore-->
<div class="bx--row">
<!--prettier-ignore-->
#for $external in $Extras['externals']
#if $external == 'description'
#continue
Expand All @@ -62,7 +58,6 @@
class="bx--col-sm-4 bx--col-md-8 bx--col-lg-12 bx--col-xlg-6"
style="margin-bottom: 1.25rem"
>
<!--prettier-ignore-->
<div class="bx--tile webcam-tile">
<h5 class="bx--type-caption-01" style="margin-bottom: 0">
#if 'title_long' in $Extras['externals'][$external]
Expand Down
1 change: 0 additions & 1 deletion skins/weewx-wdc/includes/icons/wind-direction.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<!--prettier-ignore-->
#errorCatcher Echo
#encoding UTF-8

Expand Down
3 changes: 0 additions & 3 deletions skins/weewx-wdc/month-%Y-%m.html.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<!--prettier-ignore-->
#errorCatcher Echo
#encoding UTF-8
#from time import strftime, localtime
Expand All @@ -23,7 +22,6 @@
<div class="bx--row">
<header class="bx--col page-header">
<h1>$gettext("Monthly Weather Conditions")</h1>
<!-- prettier-ignore -->
<h2>$month.start - $strftime($get_time_format_dict['month'], $localtime($month.end.raw - 1))</h2>
<h3>
<a
Expand All @@ -37,7 +35,6 @@
</header>
</div>

<!--prettier-ignore-->
#if $DisplayOptions.get('layout', 'alternative') == 'alternative'
#include 'includes/body-alternative.inc'
#else
Expand Down
3 changes: 0 additions & 3 deletions skins/weewx-wdc/month.html.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<!--prettier-ignore-->
#errorCatcher Echo
#encoding UTF-8
#from datetime import datetime, timedelta
Expand All @@ -24,13 +23,11 @@
<header class="bx--col page-header">
<h1>$gettext("Monthly Weather Conditions")</h1>
<h2>
<!--prettier-ignore-->
$month.start - $strftime($get_time_format_dict['month'], $localtime($month.end.raw - 1))
</h2>
</header>
</div>

<!--prettier-ignore-->
#if $DisplayOptions.get('layout', 'alternative') == 'alternative'
#include 'includes/body-alternative.inc'
#else
Expand Down
1 change: 0 additions & 1 deletion skins/weewx-wdc/offline.html.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<!--prettier-ignore-->
#errorCatcher Echo
#encoding UTF-8

Expand Down
Loading

0 comments on commit f557320

Please sign in to comment.