Skip to content

Commit 2573b99

Browse files
authored
Add files via upload
1 parent dee7e3d commit 2573b99

14 files changed

+237
-27
lines changed

bootstrap/public/assets/css/sign-in.css

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ body {
1414
z-index: 2;
1515
}
1616

17-
.form-signin input[type="text"] {
17+
.form-signin input[type="email"] {
1818
margin-bottom: -1px;
1919
border-bottom-right-radius: 0;
2020
border-bottom-left-radius: 0;
@@ -41,3 +41,29 @@ body {
4141
.custom-input {
4242
height: 40px;
4343
}
44+
45+
46+
/* Password Show/Hide */
47+
48+
.form-signin input[type="text"] {
49+
margin-bottom: 10px;
50+
border-top-left-radius: 0;
51+
border-top-right-radius: 0;
52+
}
53+
54+
.password-toggle {
55+
position: absolute;
56+
top: 50%;
57+
right: 15px;
58+
transform: translateY(-50%);
59+
cursor: pointer;
60+
}
61+
62+
.eye-icon {
63+
vertical-align: middle;
64+
fill: currentColor;
65+
}
66+
67+
.form-floating.focus-within .eye-icon {
68+
color: #0d6efd;
69+
}

bootstrap/public/assets/css/sign-in.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 89 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,93 @@
1-
function CopyToClip(str) {
1+
/*!
2+
* SimpleSAMLphp Bootstrap Theme
3+
* Version 0.2.0
4+
*
5+
* SimpleSAMLphp Bootstrap Theme is a child theme for SimpleSAMLphp that outputs certain visitor facing
6+
* pages via Bootstrap front-end framework. Intended to deliver a seamless look and feel when the
7+
* visitor already comes from a project based on a Bootstrap layout.
8+
*
9+
* Documentation: https://github.com/disisto/simplesamlphp-bootstrap-theme
10+
*
11+
*
12+
* Licensed under MIT (https://github.com/disisto/simplesamlphp-bootstrap-theme/blob/main/LICENSE)
13+
*
14+
* Copyright (c) 2023 Roberto Di Sisto
15+
*
16+
* Permission is hereby granted, free of charge, to any person obtaining a copy
17+
* of this software and associated documentation files (the "Software"), to deal
18+
* in the Software without restriction, including without limitation the rights
19+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
20+
* copies of the Software, and to permit persons to whom the Software is
21+
* furnished to do so, subject to the following conditions:
22+
*
23+
* The above copyright notice and this permission notice shall be included in all
24+
* copies or substantial portions of the Software.
25+
*
26+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
27+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
29+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32+
* SOFTWARE.
33+
*/
34+
35+
document.addEventListener("DOMContentLoaded", function() {
36+
var copyButtons = document.querySelectorAll("[data-copy-text]");
37+
copyButtons.forEach(function(copyButton) {
38+
var tooltip = new bootstrap.Tooltip(copyButton, {
39+
placement: 'top',
40+
title: 'Copy to clipboard',
41+
trigger: 'hover',
42+
});
43+
44+
copyButton.addEventListener("click", function() {
45+
CopyToClip(copyButton);
46+
tooltip.hide(); // Verstecke das Tooltip, nachdem der Button geklickt wurde
47+
});
48+
});
49+
});
50+
51+
function CopyToClip(element) {
52+
var copyText = element.getAttribute("data-copy-text");
53+
54+
var listener = function(e) {
55+
e.clipboardData.setData("text/html", copyText);
56+
e.clipboardData.setData("text/plain", copyText);
57+
e.preventDefault();
58+
};
259

3-
function listener(e) {
4-
e.clipboardData.setData("text/html", str);
5-
e.clipboardData.setData("text/plain", str);
6-
e.preventDefault();
7-
}
860
document.addEventListener("copy", listener);
961
document.execCommand("copy");
1062
document.removeEventListener("copy", listener);
11-
};
63+
64+
// Show "copied" tooltip with fade for 3000ms
65+
var tooltip = new bootstrap.Tooltip(element, {
66+
placement: 'top',
67+
title: 'Copied!',
68+
animation: true, // Enable fade effect
69+
});
70+
tooltip.show();
71+
72+
// Replace icon with check2 SVG for 1200ms
73+
var copyIcon = document.getElementById("copyIcon");
74+
copyIcon.innerHTML = '<use href="#check2"></use>';
75+
76+
setTimeout(function() {
77+
// Restore original clipboard icon
78+
copyIcon.innerHTML = '<use href="#clipboard"></use>';
79+
80+
// Destroy the tooltip instance
81+
tooltip.dispose();
82+
83+
}, 1200);
84+
}
85+
86+
document.addEventListener("DOMContentLoaded", function() {
87+
var copyButtons = document.querySelectorAll("[data-copy-text]");
88+
copyButtons.forEach(function(copyButton) {
89+
copyButton.addEventListener("click", function() {
90+
CopyToClip(copyButton);
91+
});
92+
});
93+
});

bootstrap/public/assets/js/bootstrap.five.copyToClipboard.min.js

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*!
2+
* SimpleSAMLphp Bootstrap Theme
3+
* Version 0.2.0
4+
*
5+
* SimpleSAMLphp Bootstrap Theme is a child theme for SimpleSAMLphp that outputs certain visitor facing
6+
* pages via Bootstrap front-end framework. Intended to deliver a seamless look and feel when the
7+
* visitor already comes from a project based on a Bootstrap layout.
8+
*
9+
* Documentation: https://github.com/disisto/simplesamlphp-bootstrap-theme
10+
*
11+
*
12+
* Licensed under MIT (https://github.com/disisto/simplesamlphp-bootstrap-theme/blob/main/LICENSE)
13+
*
14+
* Copyright (c) 2023 Roberto Di Sisto
15+
*
16+
* Permission is hereby granted, free of charge, to any person obtaining a copy
17+
* of this software and associated documentation files (the "Software"), to deal
18+
* in the Software without restriction, including without limitation the rights
19+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
20+
* copies of the Software, and to permit persons to whom the Software is
21+
* furnished to do so, subject to the following conditions:
22+
*
23+
* The above copyright notice and this permission notice shall be included in all
24+
* copies or substantial portions of the Software.
25+
*
26+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
27+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
29+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32+
* SOFTWARE.
33+
*/
34+
35+
document.addEventListener("DOMContentLoaded", function () {
36+
const passwordInput = document.querySelector("#password");
37+
const eyeIcon = document.querySelector(".eye-icon");
38+
eyeIcon.addEventListener("click", function () {
39+
if (passwordInput.type === "password") {
40+
passwordInput.type = "text";
41+
eyeIcon.querySelector("use").setAttribute("href", "#eye-slash");
42+
} else {
43+
passwordInput.type = "password";
44+
eyeIcon.querySelector("use").setAttribute("href", "#eye");
45+
}
46+
});
47+
});
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/*!
2+
* SimpleSAMLphp Bootstrap Theme v0.2.0 (https://github.com/disisto/simplesamlphp-bootstrap-theme)
3+
* Copyright (c) 2023 Roberto Di Sisto
4+
+ Licensed under MIT (https://github.com/disisto/simplesamlphp-bootstrap-theme/blob/main/LICENSE)
5+
*/
6+
document.addEventListener("DOMContentLoaded",function(){let e=document.querySelector("#password"),t=document.querySelector(".eye-icon");t.addEventListener("click",function(){"password"===e.type?(e.type="text",t.querySelector("use").setAttribute("href","#eye-slash")):(e.type="password",t.querySelector("use").setAttribute("href","#eye"))})});
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Example starter JavaScript for disabling form submissions if there are invalid fields
2+
(() => {
3+
'use strict'
4+
5+
// Fetch all the forms we want to apply custom Bootstrap validation styles to
6+
const forms = document.querySelectorAll('.needs-validation')
7+
8+
// Loop over them and prevent submission
9+
Array.from(forms).forEach(form => {
10+
form.addEventListener('submit', event => {
11+
if (!form.checkValidity()) {
12+
event.preventDefault()
13+
event.stopPropagation()
14+
}
15+
16+
form.classList.add('was-validated')
17+
}, false)
18+
})
19+
})()

bootstrap/themes/5/core/errorreport.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{#
22
* SimpleSAMLphp Bootstrap Theme
3-
* Version 0.1.0
3+
* Version 0.2.0
44
*
55
* SimpleSAMLphp Bootstrap Theme is a child theme for SimpleSAMLphp that outputs certain visitor facing
66
* pages via Bootstrap front-end framework. Intended to deliver a seamless look and feel when the

bootstrap/themes/5/core/loginuserpass.twig

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{#
22
* SimpleSAMLphp Bootstrap Theme
3-
* Version 0.1.0
3+
* Version 0.2.0
44
*
55
* SimpleSAMLphp Bootstrap Theme is a child theme for SimpleSAMLphp that outputs certain visitor facing
66
* pages via Bootstrap front-end framework. Intended to deliver a seamless look and feel when the
@@ -33,6 +33,7 @@
3333
#}
3434

3535
{% set pagetitle = 'Enter your username and password'|trans %}
36+
{% block is_login %}true{% endblock %}
3637
{% extends "bootstrap.twig" %}
3738

3839
{% block postload %}
@@ -69,7 +70,7 @@
6970
{% endif %}
7071

7172
<div class="form-floating mt-4">
72-
<input id="username" {{ forceUsername ? 'disabled' }} placeholder="[email protected]" type="text" name="username" class="form-control"
73+
<input id="username" {{ forceUsername ? 'disabled' }} placeholder="[email protected]" type="email" name="username" class="form-control"
7374
{%- if not forceUsername %} tabindex="1" value="{{ username }}" autocomplete="username" {% endif %}
7475
{%- if not forceUsername and not username %} autofocus {% endif %} >
7576
<label for="username">{{ forceUsername ? username : 'Username'|trans }}</label>
@@ -88,6 +89,11 @@
8889
<input id="password" type="password" tabindex="2" name="password" class="form-control" autocomplete="current-password" placeholder="Password"
8990
{%- if forceUsername or username %} autofocus {% endif %} >
9091
<label for="password">{{ 'Password'|trans }}</label>
92+
<div class="password-toggle">
93+
<svg class="bi eye-icon opacity-50" width="1.75em" height="1.75em">
94+
<use href="#eye"></use>
95+
</svg>
96+
</div>
9197
</div>
9298

9399
{% if rememberMeEnabled -%}

bootstrap/themes/5/core/welcome.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{#
22
* SimpleSAMLphp Bootstrap Theme
3-
* Version 0.1.0
3+
* Version 0.2.0
44
*
55
* SimpleSAMLphp Bootstrap Theme is a child theme for SimpleSAMLphp that outputs certain visitor facing
66
* pages via Bootstrap front-end framework. Intended to deliver a seamless look and feel when the

0 commit comments

Comments
 (0)