@rileybathurst/paddle 0.0.102 → 0.0.104
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -5,6 +5,7 @@ import { Link } from 'gatsby';
|
|
|
5
5
|
import Markdown from "react-markdown";
|
|
6
6
|
import type { LocationCardTypes } from "./types/location-card-types";
|
|
7
7
|
import HourMin from "./hour-min";
|
|
8
|
+
import Phone from "./phone";
|
|
8
9
|
|
|
9
10
|
interface SeasonTypes {
|
|
10
11
|
season_start?: string;
|
|
@@ -23,20 +24,17 @@ function Season({ name, season_start, season_end, opening_time, closing_time }:
|
|
|
23
24
|
|
|
24
25
|
if (season_start && season_end) {
|
|
25
26
|
const currentDay = new Date();
|
|
26
|
-
console.log(`currentDay ${currentDay}`);
|
|
27
27
|
const seasonStartDate = new Date(season_start);
|
|
28
|
-
console.log(`season_start ${season_start}`);
|
|
29
28
|
const seasonEndDate = new Date(season_end);
|
|
30
|
-
console.log(`season_end ${season_end}`);
|
|
31
|
-
|
|
32
29
|
|
|
33
30
|
if (currentDay > seasonStartDate || currentDay < seasonEndDate) {
|
|
34
31
|
return (
|
|
35
32
|
<p>
|
|
36
|
-
{opening_time ? "Open Daily: " : null}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
{opening_time ? "Open Daily: " : null}<br />
|
|
34
|
+
{opening_time && closing_time ? (
|
|
35
|
+
<span><HourMin time={opening_time} /> - <HourMin time={closing_time} /></span>
|
|
36
|
+
)
|
|
37
|
+
: null}
|
|
40
38
|
</p>
|
|
41
39
|
)
|
|
42
40
|
}
|
|
@@ -89,13 +87,18 @@ function Content({ svg, name, address, description, opening_time, closing_time,
|
|
|
89
87
|
<div>
|
|
90
88
|
|
|
91
89
|
{streetAddress || addressLocality || addressRegion || postalCode || commonName ? (
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
90
|
+
<>
|
|
91
|
+
<h3 className="elbrus">{name}</h3>
|
|
92
|
+
<address>
|
|
93
|
+
{commonName ? <span>{commonName}<br /></span> : null}
|
|
94
|
+
{streetAddress ? <span>{streetAddress}<br /></span> : null}
|
|
95
|
+
{addressLocality ? <span>{addressLocality}, </span> : null}
|
|
96
|
+
{addressRegion ? <span>{addressRegion} </span> : null}
|
|
97
|
+
{postalCode ? <span>{postalCode}<br /></span> : null}
|
|
98
|
+
</address>
|
|
99
|
+
|
|
100
|
+
{name === "On Water Rental" ? <Phone /> : null}
|
|
101
|
+
</>
|
|
99
102
|
) :
|
|
100
103
|
|
|
101
104
|
(<>
|
|
@@ -108,17 +111,20 @@ function Content({ svg, name, address, description, opening_time, closing_time,
|
|
|
108
111
|
</div>
|
|
109
112
|
|
|
110
113
|
<div>
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
114
|
+
|
|
115
|
+
{opening_time && closing_time ? (
|
|
116
|
+
<Season
|
|
117
|
+
season_start={season_start}
|
|
118
|
+
season_end={season_end}
|
|
119
|
+
opening_time={opening_time}
|
|
120
|
+
closing_time={closing_time}
|
|
121
|
+
name={name}
|
|
122
|
+
/>
|
|
123
|
+
) : (
|
|
124
|
+
<Markdown className="react-markdown" >
|
|
125
|
+
{description.data.description}
|
|
126
|
+
</Markdown>
|
|
127
|
+
)}
|
|
122
128
|
{/* // TODO: add phone but dont break the link on link rule {name === "On Water Rental" ? <Phone /> : null} */}
|
|
123
129
|
</div>
|
|
124
130
|
</>
|
|
@@ -127,13 +133,6 @@ function Content({ svg, name, address, description, opening_time, closing_time,
|
|
|
127
133
|
|
|
128
134
|
export function PaddleLocationCard({ svg, name, link, address, description, opening_time, closing_time, background, streetAddress, addressLocality, addressRegion, postalCode, commonName, season_start, season_end }: LocationCardTypes) {
|
|
129
135
|
|
|
130
|
-
Object.entries({ svg, name, link, address, description, opening_time, closing_time, background, streetAddress, addressLocality, addressRegion, postalCode, commonName, season_start, season_end }).map(([key, value]) => {
|
|
131
|
-
console.log(key, value);
|
|
132
|
-
}
|
|
133
|
-
);
|
|
134
|
-
|
|
135
|
-
console.log(`PaddleLocationCard season_start ${season_start}`);
|
|
136
|
-
|
|
137
136
|
if (link.includes('http')) {
|
|
138
137
|
return (
|
|
139
138
|
<a href={link}
|
|
@@ -10,10 +10,6 @@ interface LocationDeckTypes {
|
|
|
10
10
|
}
|
|
11
11
|
export function PaddleLocationDeck({ nodes, season_start, season_end, background }: LocationDeckTypes) {
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
console.log('🦄');
|
|
15
|
-
console.log(season_start);
|
|
16
|
-
|
|
17
13
|
return (
|
|
18
14
|
<section className="location-deck">
|
|
19
15
|
{nodes.map((location: LocationCardTypes) => (
|
package/src/styles/cards.css
CHANGED
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
.deck {
|
|
6
6
|
margin-block-end: var(--aconcagua);
|
|
7
|
+
|
|
8
|
+
display: grid;
|
|
9
|
+
grid-template-columns: repeat(auto-fill, minmax(var(--condor), 1fr));
|
|
7
10
|
}
|
|
8
11
|
|
|
9
12
|
/* TODO: needs sub-grid */
|
|
@@ -77,6 +80,10 @@
|
|
|
77
80
|
margin-inline: var(--kosciuszko);
|
|
78
81
|
}
|
|
79
82
|
|
|
83
|
+
img {
|
|
84
|
+
max-width: 100%;
|
|
85
|
+
}
|
|
86
|
+
|
|
80
87
|
.card__details {
|
|
81
88
|
display: flex;
|
|
82
89
|
gap: var(--vinson);
|
package/src/styles/layout.css
CHANGED