@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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rileybathurst/paddle",
3
3
  "private": false,
4
- "version": "0.0.102",
4
+ "version": "0.0.104",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -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
- <HourMin time={opening_time} />
38
- {opening_time ? " - : " : null}
39
- <HourMin time={closing_time} />
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
- <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>
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
- <Season
112
- season_start={season_start}
113
- season_end={season_end}
114
- opening_time={opening_time}
115
- closing_time={closing_time}
116
- name={name}
117
- />
118
- <br />
119
- <Markdown className="react-markdown" >
120
- {description.data.description}
121
- </Markdown>
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) => (
@@ -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);
@@ -245,6 +245,10 @@ header {
245
245
  p {
246
246
  margin-block-end: 0; /* reset to the gap */
247
247
  }
248
+
249
+ ul {
250
+ padding-inline-start: 0;
251
+ }
248
252
  }
249
253
 
250
254
  .location.false:not(:last-child) {
@@ -246,4 +246,8 @@ select {
246
246
  .react-markdown {
247
247
  white-space: pre-wrap;
248
248
  line-height: 1.5;
249
+
250
+ ul {
251
+ white-space: collapse;
252
+ }
249
253
  }