Skip to content

Commit

Permalink
bug reporting form submission toast placement is fixed
Browse files Browse the repository at this point in the history
This fix is with reference to the issue : Form submission and Include screenshot - functionality needs fixing #13 (link - virtual-labs/svc-bug-report#13)
  • Loading branch information
shraddha committed Aug 26, 2024
1 parent 59ddd9d commit d67c81d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
16 changes: 16 additions & 0 deletions assets/css/toast.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* assets/css/toast.css */
.custom-toast-popup {
border-radius: 10px; /* Rounded corners */
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); /* Custom shadow */
display: flex;
justify-content: center;
align-items: center;
position: fixed; /* Fixed positioning */
top: 50%; /* Center vertically */
left: 50%; /* Center horizontally */
transform: translate(-50%, -50%); /* Adjust for exact centering */
z-index: 1000; /* Ensure it appears above other elements */
padding: 10px;
color: #fff;
font-size: 1rem;
}
2 changes: 1 addition & 1 deletion assets/js/event-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ window.dataLayer = window.dataLayer || [];

const Toast = Swal.mixin({
toast: true,
position: 'bottom-end',
position: 'center',
showConfirmButton: false,
timer: 3000,
timerProgressBar: true,
Expand Down
1 change: 1 addition & 0 deletions exp_build/templates/partials/commons.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/>
<link rel="stylesheet" href="{{assets_path}}/assets/css/github-markdown.min.css" />
<link rel="stylesheet" href="{{assets_path}}/assets/css/vlabs-style.css" />
<link rel="stylesheet" href="{{assets_path}}/assets/css/toast.css" />
<link rel="stylesheet" href="{{assets_path}}/assets/katex_assets/katex.min.css" />

<script src="{{assets_path}}/assets/js/jquery-3.4.1.slim.min.js"></script>
Expand Down
1 change: 1 addition & 0 deletions lab_build/skeleton.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<link rel="stylesheet" href="fonts/font-awesome-4.7.0/css/font-awesome.min.css" />
<link href="https://fonts.googleapis.com/css2?family=Open+Sans&family=Raleway&display=swap" rel="stylesheet" />
<link href="css/vlabs-style.css" rel="stylesheet" />
<link href="css/toast.css" rel="stylesheet" />
<script src="js/jquery-3.4.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"
integrity="sha384-q2kxQ16AaE6UbzuKqyBE9/u/KzioAlnx2maXQHiDX9d4/zp8Ok3f+M7DPm+Ib6IU"
Expand Down

0 comments on commit d67c81d

Please sign in to comment.