Commit 4b1ef87
authored
feat: Mobile friendly (#86)
* Add prereqs to build vue app, resolve npm audit
* Many changes to make this a responsive page
* Revert "Add prereqs to build vue app, resolve npm audit"
This reverts commit bdfbc86.
* Cleanup to closer-match original
* Many changes - now in line w/discussion on PR #86
Shrank container min-width to allow more flexibility with content shrinking. Now set to 160px, but including padding the minimum page width before the browser just starts shrinking content is about 220px.
Allowed cards to grow to fit space, so now if one of the 4 little data points drops to the next line it'll show as centered and look nice. Also increased card min width and matched units to the font unit - so, essentially, the data points can show up to 8 or 9 large characters across before content will overflow.
Imported the Menu icon from vue-material-design so it can be used for the page view/event selector.
Added names to page and event in the router so the names can be displayed.
Modified the demo banner to work better at small screen widths. Components will not encroach on the close button. The close button and right side of the box are scooted away from the right wall a little. The github links can now flex to a top line and push the text down below when there's not enough room for both of them on one line.
The bar charts in view and events have overflow and width set on them as constraints. I'm honestly not sure why that makes them perform more consistently at smaller sizes in Firefox. The 300 px width is not a magic number - the important part is that it's smaller than expected chart width at screen widths larger than 700 px. This random fix only makes a difference at screen widths larger than 700 px... Tested in Firefox and Chromium.
Site selector and date selector are now in a flexbox just by themselves, so when the screen gets too small for both then they can split across two lines and take up the full line. Looks nice I think.
There's a new flexbox for the settings buttons and refresh button. Views/Event content setting is in there (when visible), refresh button, and theme settings (cog) button is in there. It's separate from the site/date selector so the site/date selectors flow nicer, and to allow this one to flow up in narrow mode.
700 pixels wide is the point at which the display switches mode.
The normal left side views/events bar becomes invisible when the screen is narrower than 700 px now.
The views/event "Content" selector hamburger button becomes visible when the screen is narrower than 700 px. This has an el-drawer implementing the popout window. The worst part about this is that this code is similar across two files now, instead of just being implemented in one place: views/stats/index.vue and vies/app.vue
The settings button flexbox (content, refresh, cog button) moves up a line, above the site/date selector, and takes up the whole width, when screen is narrower than 700px.
The map now pushes down below the location stats listing so they can both take the full width. I think the map is a really cool feature, and easy enough to scroll past if you don't want to see it.
* Fix prettier output
* Improve vis of page views chart at smaller size
* Revert scroll overflow to hidden.
* Change top/bottom/side padding back to 15px
I rejiggered how this padding layout worked... I believe the goal with the original large screen layout was to have 15px on top, bottom, and sides, and good space between elements sideways. With the flexbox layout, and the possibility of multiple rows of stats, just putting 15px on the cards makes 30px between cards vertically. I think that looks slightly less balanced than intended. So - now the gap (flexbox thing) manages space between elements at only 15px, and the padding is applied to the outer element (totals) to handle the top/bottom/sides padding.
* Put gap between settings rows at any screen size
* Alignment fixes on settings bar - also moves gear
Vertically centers the page/event button, refresh, and gear buttons, and slightly changes how separator is calculated to reflect local size instead of root (rem to em) so it'll hopefully stay centered better in future changes.
Also moves the gear right to the edge... Not sure if you'll like this @rehanvdm, when I was aligning the hamburger button I realized there's no reason it shouldn't go all the way left to the edge, there's padding to keep it away from the screen edge... Then I realized the gear should work the same on the other side.
* Time on page column slightly wider
* Shift to element plus hiding/page break scheme
Also - make the page break on the map simpler by just changing to one flex column, instead of switching layout mode to flex.
* Fix text vert align in Firefox
* Fix JS error about num/vs/string & fix 'else' typo
* Site/date sel back to orig sizes when widescreen
To do this without negatively affecting responsiveness, I added an additional media break at 900px. When the screen is less wide than 900px (max-width 899px) then the site and date selector are allowed to take up the full width and flex their sizes more, so they can take a good view size regardless of width.
* Fix backlight on gear & page/event setting buttons1 parent cdbe8ce commit 4b1ef87
File tree
14 files changed
+208
-78
lines changed- application/src/frontend/src
- assets
- components
- router
- views
- stats
- event
- components
- page
- components
14 files changed
+208
-78
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
82 | 92 | | |
83 | 93 | | |
84 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| 87 | + | |
| 88 | + | |
86 | 89 | | |
87 | 90 | | |
88 | 91 | | |
| 92 | + | |
89 | 93 | | |
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
93 | | - | |
94 | | - | |
95 | | - | |
| 97 | + | |
96 | 98 | | |
97 | 99 | | |
98 | 100 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | 60 | | |
64 | 61 | | |
65 | 62 | | |
| |||
Lines changed: 29 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
144 | 143 | | |
145 | 144 | | |
146 | | - | |
147 | 145 | | |
148 | 146 | | |
149 | 147 | | |
150 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
151 | 174 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
207 | 208 | | |
208 | 209 | | |
209 | 210 | | |
| |||
242 | 243 | | |
243 | 244 | | |
244 | 245 | | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | 246 | | |
253 | 247 | | |
0 commit comments