Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
whats-open-web
Commits
94dc7a13
Commit
94dc7a13
authored
Dec 23, 2017
by
Mattias J Duffy
Browse files
adding scrolling to sidebar so it works with more screen resolutions
parent
b4e02b97
Pipeline
#1876
passed with stage
in 1 minute and 45 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/components/Sidebar.js
View file @
94dc7a13
...
...
@@ -47,6 +47,7 @@ const Sidebar = ({facility, isSidebarOpen, isSidebarMapOpen, toggleSidebarMap, f
<
/div
>
<
/div
>
<
Divider
className
=
{
'
sidebar-divider
'
}
/
>
<
div
className
=
{
'
sidebar-scroll
'
}
>
<
div
className
=
{
'
sidebar-label-holder
'
}
>
<
TextwTitle
label
=
"
Building
"
content
=
"
The Johnson Center
"
/>
<
TextwTitle
label
=
"
Address
"
content
=
"
https://amenufromaplace.com
"
/>
...
...
@@ -55,6 +56,7 @@ const Sidebar = ({facility, isSidebarOpen, isSidebarMapOpen, toggleSidebarMap, f
<
TextwTitle
label
=
"
Hours
"
content
=
{
<
WeekHours
facility
=
{
facility
}
/>}/
>
<
/div
>
<
/div
>
<
div
className
=
{
'
sidebar-row2
'
}
>
<
FacilitiesMap
isMapOpen
=
{
isSidebarMapOpen
}
facilities
=
{
facilities
}
facility
=
{
facility
}
/
>
...
...
src/styles/components/sidebar.scss
View file @
94dc7a13
...
...
@@ -60,6 +60,10 @@
.sidebar-toggle-map-btn
{
width
:
100%
;
}
.sidebar-scroll
{
height
:calc
(
100
%
-
220px
-
116px
-
32px
)
;
overflow-y
:
scroll
;
}
@media
screen
and
(
max-width
:
map-get
(
$breakpoints
,
lg
)
-
1px
)
{
.sidebar-root
{
...
...
src/utils/facilityUtils.js
View file @
94dc7a13
...
...
@@ -295,7 +295,17 @@ const getHoursByDay = (facility, dayOfWeek) => {
allDayOrClosed
:
false
})
}
hours
=
[{
text
:
"
11am - 2pm
"
,
start
:
"
11:00:00
"
,
end
:
"
14:00:00
"
,
allDayOrClosed
:
false
},{
text
:
"
4pm - 5pm
"
,
start
:
"
16:00:00
"
,
end
:
"
17:00:00
"
,
allDayOrClosed
:
false
}];
return
hours
.
sort
((
a
,
b
)
=>
{
return
parseInt
(
a
.
start
)
-
parseInt
(
b
.
start
)
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment