Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
config
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Package registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jupyterjsc
k8s
config
Commits
7c0a0114
Commit
7c0a0114
authored
7 months ago
by
Maria Petrova-El Sayed
Browse files
Options
Downloads
Patches
Plain Diff
Add a second login button for workshops
parent
991aede0
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
static/js/login.js
+13
-6
13 additions, 6 deletions
static/js/login.js
templates/login.html
+21
-11
21 additions, 11 deletions
templates/login.html
with
34 additions
and
17 deletions
static/js/login.js
+
13
−
6
View file @
7c0a0114
...
@@ -34,12 +34,19 @@ function carouselNormalization() {
...
@@ -34,12 +34,19 @@ function carouselNormalization() {
});
});
}
}
function
toggleWorkshopLogin
(){
const
urlParams
=
new
URLSearchParams
(
window
.
location
.
search
);
const
nextParam
=
urlParams
.
get
(
'
next
'
);
if
(
nextParam
&&
nextParam
.
startsWith
(
'
/hub/workshop
'
))
{
$
(
'
#btn-login
'
).
hide
();
}
else
{
$
(
'
#btn-login
'
).
show
();
}
}
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
carouselNormalization
();
carouselNormalization
();
toggleWorkshopLogin
();
// Start cycling of carousel
// var carousel = new bootstrap.Carousel($('#login-carousel'), {
// interval: 5000,
// })
// carousel.cycle();
});
});
\ No newline at end of file
This diff is collapsed.
Click to expand it.
templates/login.html
+
21
−
11
View file @
7c0a0114
...
@@ -33,6 +33,12 @@
...
@@ -33,6 +33,12 @@
</li>
</li>
{%- endmacro -%}
{%- endmacro -%}
{%- if custom_config.get("workshop", {}).get("login", {}).get("enabled", True) %}
{%- set login_text = "Regular sign in" -%}
{%- else %}
{%- set login_text = "Sign in" -%}
{%- endif -%}
{%- block main -%}
{%- block main -%}
<div
class=
"row g-0 h-100 justify-content-center"
>
<div
class=
"row g-0 h-100 justify-content-center"
>
<div
id=
"login-background"
class=
"col-12 flex-column d-flex justify-content-center align-items-center h-100"
>
<div
id=
"login-background"
class=
"col-12 flex-column d-flex justify-content-center align-items-center h-100"
>
...
@@ -43,15 +49,6 @@
...
@@ -43,15 +49,6 @@
<div
class=
"row g-0 w-100 d-flex justify-content-center align-items-center"
>
<div
class=
"row g-0 w-100 d-flex justify-content-center align-items-center"
>
<p
class=
"fs-5 text-dark ps-3"
>
<p
class=
"fs-5 text-dark ps-3"
>
Sign in using one of the following accounts
Sign in using one of the following accounts
<!--
For more information click
<a href="https://docs.{{hostname}}/github/FZJ-JSC/jupyter-jsc-notebooks/blob/documentation/01-Introduction/03-Login-to-Jupyter-JSC.ipynb" target="_blank">
here.
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-question-circle-fill" viewBox="0 0 16 16">
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.496 6.033h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286a.237.237 0 0 0 .241.247zm2.325 6.443c.61 0 1.029-.394 1.029-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94 0 .533.425.927 1.01.927z"/>
</svg>
</a>
-->
<!-- Logos -->
<!-- Logos -->
<ul
class=
"list-group list-group-flush my-2"
>
<ul
class=
"list-group list-group-flush my-2"
>
{{list_item("jsc-login", "images/pages/login/Logo_FZ_Juelich_jsc.png", alt="JSC-Account")}}
{{list_item("jsc-login", "images/pages/login/Logo_FZ_Juelich_jsc.png", alt="JSC-Account")}}
...
@@ -69,10 +66,18 @@
...
@@ -69,10 +66,18 @@
<div
class=
"d-flex justify-content-center align-items-center pt-5"
>
<div
class=
"d-flex justify-content-center align-items-center pt-5"
>
<a
id=
"btn-login"
class=
"btn btn-primary shadow btn-lg p-4"
role=
"button"
>
<a
id=
"btn-login"
class=
"btn btn-primary shadow btn-lg p-4"
role=
"button"
>
<!-- <img src='{{static_url("images/pages/login/User.svg", include_version=False) }}'/> -->
<!-- <img src='{{static_url("images/pages/login/User.svg", include_version=False) }}'/> -->
Sign In
{{login_text}}
</a>
</a>
</div>
</div>
<p
class=
"fs-6 fw-light text-dark align-self-end text-center"
>
No account yet?
{%- if custom_config.get("workshop", {}).get("login", {}).get("enabled", True) %}
<div
class=
"d-flex justify-content-center align-items-center pt-2"
>
<a
id=
"btn-login-workshop"
class=
"btn btn-primary shadow btn-lg p-4"
role=
"button"
>
<!-- <img src='{{static_url("images/pages/login/User.svg", include_version=False) }}'/> -->
Workshop sign in
</a>
</div>
{%- endif -%}
<p
class=
"fs-6 fw-light text-dark align-self-end text-center pt-2"
>
No account yet?
<a
href=
"https://docs.{{hostname}}/github/FZJ-JSC/jupyter-jsc-notebooks/blob/documentation/01-Introduction/03-Login-to-Jupyter-JSC.ipynb"
target=
"_blank"
>
<a
href=
"https://docs.{{hostname}}/github/FZJ-JSC/jupyter-jsc-notebooks/blob/documentation/01-Introduction/03-Login-to-Jupyter-JSC.ipynb"
target=
"_blank"
>
Help
Help
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
fill=
"currentColor"
class=
"bi bi-question-circle-fill"
viewBox=
"0 0 16 16"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
fill=
"currentColor"
class=
"bi bi-question-circle-fill"
viewBox=
"0 0 16 16"
>
...
@@ -99,5 +104,10 @@ $("#btn-login").click(function () {
...
@@ -99,5 +104,10 @@ $("#btn-login").click(function () {
var
url
=
window
.
location
.
search
;
var
url
=
window
.
location
.
search
;
window
.
location
.
href
=
"
{{ base_url }}oauth_login
"
+
url
;
window
.
location
.
href
=
"
{{ base_url }}oauth_login
"
+
url
;
});
});
$
(
"
#btn-login-workshop
"
).
click
(
function
()
{
var
url
=
window
.
location
.
search
;
window
.
location
.
href
=
"
{{ base_url }}oauth_login
"
+
url
;
});
</script>
</script>
{%- endblock -%}
{%- endblock -%}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment