Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #90 from 0xPolygonID/pop-up
Browse files Browse the repository at this point in the history
adds pop-up
  • Loading branch information
cerberushades authored Oct 26, 2023
2 parents 6e6739c + 85b5262 commit 5cafc08
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 1 deletion.
38 changes: 38 additions & 0 deletions mkdocs/docs/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.popup {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.5);
z-index: 1000;
}

.popup-content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
padding: 20px;
background-color: #fff;
box-shadow: 0px 0px 10px rgba(0,0,0,0.2);
}

.close-btn {
position: absolute;
top: 5px;
right: 10px;
font-size: 25px;
cursor: pointer;
}

.visit-btn {
display: inline-block;
padding: 10px 20px;
background-color: #007BFF;
color: #fff;
text-decoration: none;
border-radius: 5px;
margin-top: 20px;
}
10 changes: 10 additions & 0 deletions mkdocs/docs/js/custom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
window.onload = function() {
setTimeout(function() {
document.getElementById('newVersionPopup').style.display = 'block';
}, 5000); // Show popup after 5 seconds. Adjust the time as needed.
}

function closePopup() {
document.getElementById('newVersionPopup').style.display = 'none';
}

8 changes: 8 additions & 0 deletions mkdocs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,11 @@ extra:
analytics:
provider: custom
property: GTM-5TKTB44

extra_css:
- css/custom.css

extra_javascript:
- js/custom.js


2 changes: 1 addition & 1 deletion mkdocs/overrides/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
{% endblock %}

{% block announce %}
<p>This Documentation website is currently <b>being revamped</b>. New docs are in the making and will be released soon! </p>
<p>This Documentation website is <b>outdated</b>. Check the current docs <a href="https://devs.polygonid.com/">here</a>.</p>
{% endblock %}
7 changes: 7 additions & 0 deletions mkdocs/overrides/partials/comments.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div id="newVersionPopup" class="popup">
<div class="popup-content">
<span class="close-btn" onclick="closePopup()">&times;</span>
<h2>New Polygon ID Documentation Website Available!</h2>
<p>We've released a new version of our documention. Head to <a href="https://devs.polygonid.com/">devs.polygonid.com</a> to check it out.</p>
</div>
</div>
Empty file added mkdocs/py
Empty file.

0 comments on commit 5cafc08

Please sign in to comment.