Skip to content

Commit

Permalink
[refactor] contentMD 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Sniij committed Feb 26, 2024
1 parent 945b4ae commit c8b72cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
18 changes: 6 additions & 12 deletions deploy/assets/js/contentMD.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,30 @@ $(document).ready(function() {


$(document).ready(function() {
document.addEventListener("DOMContentLoaded", function() {

if (window.location.hash === "#modal_portfolio") {
const modalPortfolio = document.querySelector("#modal_portfolio");
const modalPortfolio = document.getElementById("modal_portfolio");
const bootstrapModal = new bootstrap.Modal(modalPortfolio);
bootstrapModal.show();
} else if(window.location.hash === "#modal_dowajoyak"){
const modalDowajoyak = document.querySelector("#modal_dowajoyak");
const modalDowajoyak = document.getElementById("modal_dowajoyak");
const bootstrapModal = new bootstrap.Modal(modalDowajoyak);
bootstrapModal.show();
} else if(window.location.hash === "#modal_petching"){
const modalPetching = document.querySelector("#modal_petching");
const modalPetching = document.getElementById("modal_petching");
const bootstrapModal = new bootstrap.Modal(modalPetching);
bootstrapModal.show();
} else if(window.location.hash === "#modal_parking"){
const modalParking = document.querySelector("#modal_parking");
const modalParking = document.getElementById("modal_parking");
const bootstrapModal = new bootstrap.Modal(modalParking);
bootstrapModal.show();
}
else if(window.location.hash === "#modal_blog"){
const modalBlog = document.querySelector("#modal_blog");
const modalBlog = document.getElementById("modal_blog");
const bootstrapModal = new bootstrap.Modal(modalBlog);
bootstrapModal.show();
}

});
document.getElementById("modalPortfolio").addEventListener("click", function(){
window.location.hash = "#modal_portfolio";
});
Expand All @@ -68,22 +67,17 @@ $(document).ready(function() {

document.getElementById("modalDowajoyakClose").addEventListener("click", function () {
history.replaceState(null,null,'generic.html');
bootstrapModal.showdown();
});
document.getElementById("modalPortfolioClose").addEventListener("click", function () {
history.replaceState(null,null,'generic.html');
bootstrapModal.showdown();
});
document.getElementById("modalPetchingClose").addEventListener("click", function () {
history.replaceState(null,null,'generic.html');
bootstrapModal.showdown();
});
document.getElementById("modalParkingClose").addEventListener("click", function () {
history.replaceState(null,null,'generic.html');
bootstrapModal.showdown();
});
document.getElementById("modalBlogClose").addEventListener("click", function () {
history.replaceState(null,null,'generic.html');
bootstrapModal.showdown();
});
});
1 change: 0 additions & 1 deletion deploy/generic.html
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ <h3>Social</h3>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/marked.min.js"></script>
<script src="assets/js/contentMD.js"></script>
<script src="assets/js/vanta.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r121/three.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.birds.min.js"></script>
</body>
Expand Down

0 comments on commit c8b72cd

Please sign in to comment.