Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lessons
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Statistics
lessons
Commits
756d9010
Commit
756d9010
authored
Apr 06, 2020
by
ROBERT PATRICK CAREY III
🗿
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for sidebar_second + updated build routine
parent
037cfa57
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
4668 additions
and
5785 deletions
+4668
-5785
modules/user_preferences/css/user-preferences.min.css
modules/user_preferences/css/user-preferences.min.css
+1
-1
modules/user_preferences/js/dist/user-preferences.js
modules/user_preferences/js/dist/user-preferences.js
+1
-1
modules/user_preferences/js/src/user-preferences.js
modules/user_preferences/js/src/user-preferences.js
+36
-13
modules/user_preferences/package-lock.json
modules/user_preferences/package-lock.json
+4599
-5740
modules/user_preferences/package.json
modules/user_preferences/package.json
+24
-24
modules/user_preferences/webpack.config.js
modules/user_preferences/webpack.config.js
+7
-6
No files found.
modules/user_preferences/css/user-preferences.min.css
View file @
756d9010
:root
{
--font-family-sans-serif
:
"Open Sans"
,
-apple-system
,
system-ui
,
BlinkMacSystemFont
,
"Segoe UI"
,
Roboto
,
"Helvetica Neue"
,
Arial
,
sans-serif
;
--font-family-serif
:
"Apple Garamond"
,
Garamond
,
Georgia
,
"Times New Roman"
,
Times
,
serif
;
--font-family-dyslexic
:
"Open Dyslexic"
,
"Lexia Readable"
,
"Dyslexie"
,
sans-serif
}
@font-face
{
font-family
:
Open
Dyslexic
;
src
:
url(https://cdn.jsdelivr.net/gh/antijingoist/open-dyslexic@20160623-Stable/woff/OpenDyslexic-Regular.woff)
format
(
"woff"
)}
#sidebar_first
{
transition
:
all
.3s
ease
}
#font-sans
{
font-size
:
20px
;
padding
:
0
1rem
}
#font-dyslexic
{
font-size
:
20px
;
padding
:
3px
1rem
0
}
.sidebar.collapsed
{
display
:
none
}
.links
.nav-link
{
padding
:
0
}
.links
.nav-link
a
{
padding
:
0
.75rem
}
.links
.nav-link
:first-child
a
{
padding-left
:
0
}
.links
.nav-link
:last-child
a
{
padding-right
:
0
}
.modal-content
{
background-color
:
#f5f5f3
}
.modal-content
dt
{
margin-bottom
:
.25rem
}
.modal-content
kbd
{
cursor
:
help
}
.dark-mode
{
opacity
:
.75
}
.dark-mode
.modal-content
{
color
:
#becbda
;
background-color
:
#1e2631
!important
}
.dark-mode
.modal-header
{
border-bottom
:
1px
solid
#283340
}
.dark-mode
.modal-footer
{
border-top
:
1px
solid
#283340
}
.dark-mode
.breadcrumb
{
box-shadow
:
none
}
.dark-mode
.breadcrumb
,
.dark-mode
.card
,
.dark-mode
.jumbotron
{
background-color
:
#283340
}
.dark-mode
.paragraph-title
{
color
:
#99adc5
!important
;
border-bottom
:
1px
solid
rgba
(
190
,
203
,
218
,
.45
)
!important
}
.dark-mode
svg
.svg-inline--fa
path
{
fill
:
#99adc5
!important
}
.dark-mode
.glossary-term
{
color
:
#99adc5
}
.dark-mode
.nav-item
a
,
.dark-mode
.nav-link
,
.dark-mode
a
{
color
:
#48b1ce
}
.dark-mode
.nav-pills
.nav-link
:active
,
.dark-mode
.nav-pills
.nav-link
:focus
,
.dark-mode
.nav-pills
.nav-link
:hover
{
background-color
:
#3b444f
}
.dark-mode
.btn-secondary
{
color
:
#becbda
}
.dark-mode
.btn-outline-secondary
:hover
,
.dark-mode
.btn-secondary
{
background-color
:
#3b4c60
;
border-color
:
#3b4c60
}
.dark-mode.reading-mode
.card
{
color
:
#becbda
;
background-color
:
transparent
}
.dark-mode.reading-mode
.breadcrumb
{
background-color
:
transparent
;
padding-left
:
0
}
.dark-mode
body
{
color
:
#becbda
;
background-color
:
#1e2631
!important
}
.reading-mode
body
{
background-color
:
#fff
}
.reading-mode
.breadcrumb
{
box-shadow
:
none
;
background-color
:
transparent
;
padding
:
.75rem
1rem
.75rem
0
}
.reading-mode
.card
{
box-shadow
:
none
;
border-radius
:
0
;
background-color
:
transparent
}
.reading-mode
.paragraph
{
border
:
none
!important
}
.reading-mode
.paragraph
,
.reading-mode
.paragraph-title
{
background-color
:
transparent
!important
}
.reading-mode
.card-block
,
.reading-mode
.card-body
,
.reading-mode
.field__item
>
.card-block
{
padding
:
1rem
0
}
.reading-mode
.jumbotron
{
box-shadow
:
none
;
border-radius
:
0
;
padding
:
0
;
background-color
:
transparent
}
.reading-mode
iframe
{
border-radius
:
0
}
.reading-mode
.paragraph--type-minitab-example
.thumbnail
{
margin
:
0
.65rem
0
0
}
.font-sans
,
.font-sans
body
{
font-family
:
Open
Sans
,
-apple-system
,
system-ui
,
BlinkMacSystemFont
,
Segoe
UI
,
Roboto
,
Oxygen
,
Ubuntu
,
Cantarell
,
Droid
Sans
,
Helvetica
Neue
,
Arial
,
sans-serif
;
font-family
:
var
(
--font-family-sans-serif
)}
.font-serif
,
.font-serif
body
{
font-family
:
Apple
Garamond
,
Garamond
,
Georgia
,
Times
New
Roman
,
Times
,
serif
;
font-family
:
var
(
--font-family-serif
)}
.font-dyslexic
,
.font-dyslexic
body
{
font-family
:
Open
Dyslexic
,
Lexia
Readable
,
Dyslexie
,
sans-serif
;
font-family
:
var
(
--font-family-dyslexic
)}
.col-form-label
{
display
:
block
;
font-size
:
80%
}
.btn-outline-secondary
{
color
:
#adb5bd
;
background-color
:
transparent
;
background-image
:
none
;
border-color
:
#adb5bd
}
.btn-outline-secondary
:hover
{
color
:
#fff
;
background-color
:
#adb5bd
;
border-color
:
#adb5bd
}
@media
(
min-width
:
768px
){
.sidebar.collapsed
{
display
:
block
;
opacity
:
0
;
margin-left
:
-25%
}}
@media
(
max-width
:
768px
){
.togglesidebar
{
margin-left
:
-.75rem
}}
\ No newline at end of file
:root
{
--font-family-sans-serif
:
"Open Sans"
,
-apple-system
,
system-ui
,
BlinkMacSystemFont
,
"Segoe UI"
,
Roboto
,
"Helvetica Neue"
,
Arial
,
sans-serif
;
--font-family-serif
:
"Apple Garamond"
,
Garamond
,
Georgia
,
"Times New Roman"
,
Times
,
serif
;
--font-family-dyslexic
:
"Open Dyslexic"
,
"Lexia Readable"
,
"Dyslexie"
,
sans-serif
}
@font-face
{
font-family
:
Open
Dyslexic
;
src
:
url(https://cdn.jsdelivr.net/gh/antijingoist/open-dyslexic@20160623-Stable/woff/OpenDyslexic-Regular.woff)
format
(
"woff"
)}
#sidebar_first
{
transition
:
all
.3s
ease
}
#font-sans
{
font-size
:
20px
;
padding
:
0
1rem
}
#font-dyslexic
{
font-size
:
20px
;
padding
:
3px
1rem
0
}
.sidebar.collapsed
{
display
:
none
}
.links
.nav-link
{
padding
:
0
}
.links
.nav-link
a
{
padding
:
0
.75rem
}
.links
.nav-link
:first-child
a
{
padding-left
:
0
}
.links
.nav-link
:last-child
a
{
padding-right
:
0
}
.modal-content
{
background-color
:
#f5f5f3
}
.modal-content
dt
{
margin-bottom
:
.25rem
}
.modal-content
kbd
{
cursor
:
help
}
.dark-mode
{
opacity
:
.75
}
.dark-mode
.modal-content
{
color
:
#becbda
;
background-color
:
#1e2631
!important
}
.dark-mode
.modal-header
{
border-bottom
:
1px
solid
#283340
}
.dark-mode
.modal-footer
{
border-top
:
1px
solid
#283340
}
.dark-mode
.breadcrumb
{
box-shadow
:
none
}
.dark-mode
.breadcrumb
,
.dark-mode
.card
,
.dark-mode
.jumbotron
{
background-color
:
#283340
}
.dark-mode
.paragraph-title
{
color
:
#99adc5
!important
;
border-bottom
:
1px
solid
rgba
(
190
,
203
,
218
,
.45
)
!important
}
.dark-mode
svg
.svg-inline--fa
path
{
fill
:
#99adc5
!important
}
.dark-mode
.glossary-term
{
color
:
#99adc5
}
.dark-mode
.nav-item
a
,
.dark-mode
.nav-link
,
.dark-mode
a
{
color
:
#48b1ce
}
.dark-mode
.nav-pills
.nav-link
:active
,
.dark-mode
.nav-pills
.nav-link
:focus
,
.dark-mode
.nav-pills
.nav-link
:hover
{
background-color
:
#3b444f
}
.dark-mode
.btn-secondary
{
color
:
#becbda
}
.dark-mode
.btn-outline-secondary
:hover
,
.dark-mode
.btn-secondary
{
background-color
:
#3b4c60
;
border-color
:
#3b4c60
}
.dark-mode.reading-mode
.card
{
color
:
#becbda
;
background-color
:
transparent
}
.dark-mode.reading-mode
.breadcrumb
{
background-color
:
transparent
;
padding-left
:
0
}
.dark-mode
body
{
color
:
#becbda
;
background-color
:
#1e2631
!important
}
.reading-mode
body
{
background-color
:
#fff
}
.reading-mode
.breadcrumb
{
box-shadow
:
none
;
background-color
:
transparent
;
padding
:
.75rem
1rem
.75rem
0
}
.reading-mode
.card
{
box-shadow
:
none
;
border-radius
:
0
;
background-color
:
transparent
}
.reading-mode
.paragraph
{
border
:
none
!important
}
.reading-mode
.paragraph
,
.reading-mode
.paragraph-title
{
background-color
:
transparent
!important
}
.reading-mode
.card-block
,
.reading-mode
.card-body
,
.reading-mode
.field__item
>
.card-block
{
padding
:
1rem
0
}
.reading-mode
.jumbotron
{
box-shadow
:
none
;
border-radius
:
0
;
padding
:
0
;
background-color
:
transparent
}
.reading-mode
iframe
{
border-radius
:
0
}
.reading-mode
.paragraph--type-minitab-example
.thumbnail
{
margin
:
0
.65rem
0
0
}
.font-sans
,
.font-sans
body
{
font-family
:
Open
Sans
,
-apple-system
,
system-ui
,
BlinkMacSystemFont
,
Segoe
UI
,
Roboto
,
Helvetica
Neue
,
Arial
,
sans-serif
;
font-family
:
var
(
--font-family-sans-serif
)}
.font-serif
,
.font-serif
body
{
font-family
:
Apple
Garamond
,
Garamond
,
Georgia
,
Times
New
Roman
,
Times
,
serif
;
font-family
:
var
(
--font-family-serif
)}
.font-dyslexic
,
.font-dyslexic
body
{
font-family
:
Open
Dyslexic
,
Lexia
Readable
,
Dyslexie
,
sans-serif
;
font-family
:
var
(
--font-family-dyslexic
)}
.col-form-label
{
display
:
block
;
font-size
:
80%
}
.btn-outline-secondary
{
color
:
#adb5bd
;
background-color
:
transparent
;
background-image
:
none
;
border-color
:
#adb5bd
}
.btn-outline-secondary
:hover
{
color
:
#fff
;
background-color
:
#adb5bd
;
border-color
:
#adb5bd
}
@media
(
min-width
:
768px
){
.sidebar.collapsed
{
display
:
block
;
opacity
:
0
;
margin-left
:
-25%
}}
@media
(
max-width
:
768px
){
.togglesidebar
{
margin-left
:
-.75rem
}}
\ No newline at end of file
modules/user_preferences/js/dist/user-preferences.js
View file @
756d9010
This diff is collapsed.
Click to expand it.
modules/user_preferences/js/src/user-preferences.js
View file @
756d9010
...
...
@@ -201,18 +201,26 @@ document.addEventListener("DOMContentLoaded", function(event) {
}
preferences
.
setSelected
();
window
.
addEventListener
(
"
resize
"
,
debounce
(
function
(){
if
(
window
.
innerWidth
<=
767
){
set_sidebar_visibility
(
true
);
}
},
100
));
let
main_content
=
document
.
querySelector
(
'
.main-content
'
);
let
sidebar_collapse
=
document
.
getElementById
(
'
sidebar_collapse
'
);
let
sidebar_first
=
document
.
getElementById
(
'
sidebar_first
'
);
let
sidebar_second
=
document
.
getElementById
(
'
sidebar_second
'
);
if
(
sidebar_collapse
!==
null
)
{
sidebar_collapse
.
onclick
=
function
()
{
set_sidebar_visibility
(
document
.
getElementById
(
'
sidebar_first
'
).
classList
.
contains
(
'
collapsed
'
));
if
(
sidebar_first
){
set_sidebar_visibility
(
sidebar_first
.
classList
.
contains
(
'
collapsed
'
));
}
if
(
sidebar_second
){
set_sidebar_visibility
(
sidebar_second
.
classList
.
contains
(
'
collapsed
'
));
}
}
}
...
...
@@ -228,22 +236,37 @@ document.addEventListener("DOMContentLoaded", function(event) {
}
});
collapseObserver
.
observe
(
document
.
getElementById
(
"
sidebar_first
"
),
{
attributes
:
true
,
attributeFilter
:
[
"
class
"
],
childList
:
false
,
characterData
:
false
});
if
(
sidebar_first
||
sidebar_second
){
let
obj
=
sidebar_first
?
sidebar_first
:
sidebar_second
;
if
(
obj
)
{
collapseObserver
.
observe
(
obj
,
{
attributes
:
true
,
attributeFilter
:
[
"
class
"
],
childList
:
false
,
characterData
:
false
});
}
}
function
set_sidebar_visibility
(
visible
=
true
){
if
(
visible
){
document
.
getElementById
(
'
sidebar_first
'
).
classList
.
remove
(
'
collapsed
'
);
setTimeout
(
function
(){
document
.
querySelector
(
'
.main-content
'
).
classList
.
add
(
'
col-md-9
'
);
if
(
sidebar_first
)
{
sidebar_first
.
classList
.
remove
(
'
collapsed
'
);
}
if
(
sidebar_second
)
{
sidebar_second
.
classList
.
remove
(
'
collapsed
'
);
}
setTimeout
(
function
()
{
main_content
.
classList
.
add
(
'
col-md-9
'
);
},
500
);
}
else
{
document
.
querySelector
(
'
.main-content
'
).
classList
.
remove
(
'
col-md-9
'
);
document
.
getElementById
(
'
sidebar_first
'
).
classList
.
add
(
'
collapsed
'
);
main_content
.
classList
.
remove
(
'
col-md-9
'
);
if
(
sidebar_first
){
sidebar_first
.
classList
.
add
(
'
collapsed
'
);
}
if
(
sidebar_second
){
sidebar_second
.
classList
.
add
(
'
collapsed
'
);
}
}
}
...
...
modules/user_preferences/package-lock.json
View file @
756d9010
This diff is collapsed.
Click to expand it.
modules/user_preferences/package.json
View file @
756d9010
...
...
@@ -18,37 +18,37 @@
"email"
:
"rpc5102@psu.edu"
,
"license"
:
"ISC"
,
"devDependencies"
:
{
"@babel/cli"
:
"^7.2.0"
,
"@babel/core"
:
"^7.2.0"
,
"@babel/preset-env"
:
"^7.2.0"
,
"@fortawesome/fontawesome-pro"
:
"^5.7.2"
,
"babel-loader"
:
"^8.0.4"
,
"css-loader"
:
"^0.28.11"
,
"@babel/cli"
:
"^7.8.4"
,
"@babel/core"
:
"^7.8.7"
,
"@babel/preset-env"
:
"^7.8.7"
,
"babel-loader"
:
"^8.0.6"
,
"css-loader"
:
"^3.4.2"
,
"css-mqpacker"
:
"^7.0.0"
,
"cssnano"
:
"^4.1.
7
"
,
"eslint"
:
"^
5.10
.0"
,
"eslint-loader"
:
"^
2.1.1
"
,
"mini-css-extract-plugin"
:
"^0.
4.5
"
,
"optimize-css-assets-webpack-plugin"
:
"^5.0.
1
"
,
"postcss"
:
"^
6.0.23
"
,
"postcss-calc"
:
"^
6
.0.2"
,
"postcss-cli"
:
"^
5.0.1
"
,
"postcss-combine-duplicated-selectors"
:
"^
6
.1.0"
,
"postcss-css-variables"
:
"^0.
9
.0"
,
"postcss-custom-selectors"
:
"^
4.0.1
"
,
"cssnano"
:
"^4.1.
10
"
,
"eslint"
:
"^
6.8
.0"
,
"eslint-loader"
:
"^
3.0.3
"
,
"mini-css-extract-plugin"
:
"^0.
9.0
"
,
"optimize-css-assets-webpack-plugin"
:
"^5.0.
3
"
,
"postcss"
:
"^
7.0.27
"
,
"postcss-calc"
:
"^
7
.0.2"
,
"postcss-cli"
:
"^
7.1.0
"
,
"postcss-combine-duplicated-selectors"
:
"^
8
.1.0"
,
"postcss-css-variables"
:
"^0.
14
.0"
,
"postcss-custom-selectors"
:
"^
5.1.2
"
,
"postcss-discard-duplicates"
:
"^4.0.2"
,
"postcss-import"
:
"^12.0.1"
,
"postcss-loader"
:
"^3.0.0"
,
"postcss-preset-env"
:
"^
3.5
.0"
,
"precss"
:
"^
3.1.2
"
,
"style-loader"
:
"^
0.20
.3"
,
"uglifyjs-webpack-plugin"
:
"^
1.3
.0"
,
"webpack"
:
"^4.
27.1
"
,
"webpack-command"
:
"^0.
4.2
"
,
"postcss-preset-env"
:
"^
6.7
.0"
,
"precss"
:
"^
4.0.0
"
,
"style-loader"
:
"^
1.1
.3"
,
"uglifyjs-webpack-plugin"
:
"^
2.2
.0"
,
"webpack"
:
"^4.
42.0
"
,
"webpack-command"
:
"^0.
5.0
"
,
"webpack-glob-entries"
:
"^1.0.1"
},
"dependencies"
:
{
"@babel/polyfill"
:
"^7.0.0"
,
"@babel/polyfill"
:
"^7.8.7"
,
"core-js"
:
"^3.6.4"
,
"fontfaceobserver"
:
"^2.1.0"
}
}
modules/user_preferences/webpack.config.js
View file @
756d9010
...
...
@@ -21,16 +21,17 @@ const config = {
[
"
@babel/env
"
,
{
"
targets
"
:
{
"
browsers
"
:
[
"
Chrome >= 52
"
,
"
FireFox >= 44
"
,
"
Safari >= 7
"
,
"
Explorer 11
"
,
"
last 4 Edge versions
"
"
Chrome >= 78
"
,
"
FireFox >= 71
"
,
"
Safari >= 12
"
,
"
Edge >= 79
"
]
},
useBuiltIns
:
"
usage
"
useBuiltIns
:
"
usage
"
,
corejs
:
3
}],
],
"
sourceType
"
:
"
script
"
}
}
}
...
...
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