-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests for SVG tide charts, closes #44
- Loading branch information
Showing
7 changed files
with
411 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{% if tide_times_svg.svg_points %}<div class="day-alone"> | ||
<div class="shift-view"> | ||
<div class="day-view" style=" | ||
background: linear-gradient(90deg, | ||
#176AB8 0%, | ||
#97bcdf {{ tide_times_svg.astral.dawn_pct }}%, | ||
#d1e1f1 {{ tide_times_svg.astral.sunrise_pct }}%, | ||
#FFFFFF {{ tide_times_svg.astral.noon_pct }}%, | ||
#d1e1f1 {{ tide_times_svg.astral.sunset_pct }}%, | ||
#97bcdf {{ tide_times_svg.astral.dusk_pct }}%, | ||
#176AB8 100% | ||
); | ||
"> | ||
{% if tide_times_svg.shift %} | ||
<div class="shift-window" style="left:{{ tide_times_svg.shift_start_pct }}%; width: {{ tide_times_svg.shift_width_pct }}%;"> | ||
<span class="start-time">{{ tide_times_svg.shift.shift_start|date:"g:iA"|lower }}</span> | ||
<span class="end-time">{{ tide_times_svg.shift.shift_end|date:"g:iA"|lower }}</span> | ||
</div> | ||
{% endif %} | ||
<svg style="width: 100%; height: 60px; opacity: 0.5" viewBox="0 -2 240 104" preserveAspectRatio="none"> | ||
<polyline fill="none" stroke="#176AB8" stroke-width="2" points="{{ tide_times_svg.svg_points }}"></polyline> | ||
</svg> | ||
{% if tide_times_svg.low_tide_time %} | ||
<span class="minima" style="left: {{ tide_times_svg.low_tide_time_pct }}%"> | ||
<span class="time">{{ tide_times_svg.low_tide_time|date:"g:iA"|lower }}</span> | ||
</span> | ||
{% endif %} | ||
</div> | ||
</div> | ||
</div> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.