generated from layer5io/layer5-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Lee Calcote <[email protected]>
- Loading branch information
1 parent
90177fa
commit 1cc05e7
Showing
11 changed files
with
1,035 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* The markdown image container */ | ||
.md__image { | ||
cursor: pointer; | ||
} | ||
|
||
/* The Modal (background) */ | ||
.modal { | ||
display: none; | ||
position: fixed; | ||
z-index: 1; | ||
padding-top: 4em; | ||
left: 0; | ||
top: 0; | ||
width: 100%; | ||
height: 100%; | ||
overflow: auto; | ||
background-color: black; | ||
} | ||
|
||
/* Modal Content */ | ||
.modal-content { | ||
position: relative; | ||
background-color: black; | ||
margin: auto; | ||
padding: 0; | ||
width: 90%; | ||
max-width: 1400px; | ||
} | ||
|
||
.modal-pic { | ||
display: flex; | ||
align-content: center; | ||
cursor: pointer; | ||
} | ||
|
||
/* The Close Button */ | ||
/* Optimized for accessibility by using a button named close but | ||
shifting the close text out of the button and only showing x */ | ||
.modal-close { | ||
color: white; | ||
background-color: black; | ||
position: absolute; | ||
top: .5em; | ||
right: .5em; | ||
font-size: 2em; | ||
font-weight: bold; | ||
height: 1em; | ||
width: 1em; | ||
text-indent: 10em; | ||
overflow: hidden; | ||
border: 0; | ||
} | ||
|
||
.modal-close::after { | ||
position: absolute; | ||
line-height: 0.5; | ||
top: 0.2em; | ||
left: 0.1em; | ||
text-indent: 0; | ||
content: "\00D7" | ||
} | ||
|
||
.modal-close:hover, | ||
.modal-close:focus { | ||
color: #999; | ||
text-decoration: none; | ||
cursor: pointer; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
@import 'fonts'; | ||
@import 'content_project'; | ||
@import 'image-modal_project.scss'; | ||
|
||
.navbar-brand { | ||
margin: 1.5rem; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
883 changes: 883 additions & 0 deletions
883
content/en/cloud/security/images/role-provider-admin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!-- Images that use the standard image format for markdown will be displayed in a | ||
magnific modal popup. Use format ![alt text](/path/to/image.img) --> | ||
<!-- Place this file in layouts > _default > _markup > render-image.html --> | ||
<!-- Also place the image-modal.css and partial/image-modal.html appropriately. --> | ||
<!-- Id for the image on the page is set to a random 6 numbers, chosen from 1 to 500 --> | ||
<!-- Onclick opens the modal, and displays/overlays the the image that has the id for the | ||
clicked image. --> | ||
<!-- from: https://gist.github.com/zjeaton/0cdd7e4bed9d292ab6f3d76b0369f16d --> | ||
|
||
<div class="md__image"> | ||
<img id="{{ first 6 (shuffle (seq 1 500)) }}" src="{{ .Destination | safeURL }}" onclick="openModal(this.id)" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}"{{ end }} /> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!-- Place in layouts > partials > image-modal.html --> | ||
<!-- Use the partial at the bottom of any page in which you want magnific pop-up images, | ||
or simply place at the bottom of baseof.html --> | ||
<!-- Modal will open upon clicking the image. Modal will close with clicking the x or image. --> | ||
|
||
<!-- The Modal --> | ||
<div id="myModal" class="modal"> | ||
<button class="modal-close" onclick="closeModal()">close</button> | ||
<div class="modal-content"> | ||
<img class="modal-pic" id="modalPic" onclick="closeModal()" style="max-width: 100%; max-height: 80vh; margin: auto;"> | ||
</div> | ||
</div> | ||
|
||
<script> | ||
// Open the Modal | ||
function openModal(clicked_id) { | ||
var src = document.getElementById(clicked_id).src; | ||
if (src.includes("#")) { | ||
src = src.substring(0, src.indexOf( "#" )); | ||
}; | ||
document.getElementById("modalPic").src = src; | ||
document.getElementById("myModal").style.display = "block"; | ||
// Ensures the site footer is not shown if front of the modal. Remove if this is not an issue or | ||
// there is no footer. "site-footer" id can also be changed appropriately. | ||
document.getElementById("site-footer").style.display = "hidden"; | ||
} | ||
|
||
// Close the Modal | ||
function closeModal() { | ||
// prevents flashing last modal image while new id is loading on open | ||
document.getElementById("modalPic").src = ""; | ||
document.getElementById("myModal").style.display = "none"; | ||
// See note above regarding the footer | ||
document.getElementById("site-footer").style.display = "block"; | ||
} | ||
</script> |