Skip to content

Commit

Permalink
validTimePeriod
Browse files Browse the repository at this point in the history
  • Loading branch information
simon04 committed Apr 11, 2024
1 parent 0715bba commit 0100b64
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,10 @@ function formatBulletin(
.join("..");

bulletin.dangerRatings?.forEach((r) => {
result.appendChild(document.createElement("dt")).innerHTML =
dangerRatingLink(r.mainValue);
result.appendChild(document.createElement("dt")).innerHTML = [
dangerRatingLink(r.mainValue),
r.validTimePeriod || "",
].join(" ");
result.appendChild(document.createElement("dd")).innerText =
formatElevation(r.elevation);
});
Expand All @@ -352,8 +354,10 @@ function formatBulletin(
"extremely large",
];
bulletin.avalancheProblems?.forEach((p) => {
result.appendChild(document.createElement("dt")).innerHTML =
avalancheProblemLink(p.problemType || "");
result.appendChild(document.createElement("dt")).innerHTML = [
avalancheProblemLink(p.problemType || ""),
p.validTimePeriod || "",
].join(" ");
result.appendChild(document.createElement("dd")).innerHTML = [
formatElevation(p.elevation),
formatAspects(p.aspects),
Expand Down
3 changes: 3 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ a {
a:hover {
color: #535bf2;
}
dt > a {
font-weight: unset;
}

body {
margin: 0;
Expand Down

0 comments on commit 0100b64

Please sign in to comment.