Skip to content

Commit

Permalink
responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
Edit-Mr committed Oct 6, 2023
1 parent 4a334b1 commit 43697ba
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions map/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,13 @@
position: relative;
display: inline-block;
padding: 1em;
margin: 2em 0;
margin: 2em;
color: #03e9f4;
text-decoration: none;
text-transform: uppercase;
transition: 0.5s;
letter-spacing: 4px;
overflow: hidden;
margin-left: 50px;
font-size: 1rem;
background: transparent;
outline: transparent;
Expand Down Expand Up @@ -199,6 +198,12 @@
bottom: 100%;
}
}
@media (max-width: 600px) {
img{
width: 100%;
}

}
</style>
</head>

Expand Down Expand Up @@ -271,27 +276,18 @@ <h3>迎曦樓2F傾斜圖</h3>
2023 西苑資訊志工隊<br>毛哥EM繪製
</footer>
<script>
async function dl(
imageSrc
) {
async function dl(imageSrc) {
const response = await fetch('https://raw.githubusercontent.com/SYSH-Tech-Volunteer/map/main/' + imageSrc);

const blobImage = await response.blob();

const href = URL.createObjectURL(blobImage);

const anchorElement = document.createElement('a');
anchorElement.href = href;
anchorElement.download = imageSrc;

document.body.appendChild(anchorElement);
anchorElement.click();

document.body.removeChild(anchorElement);
window.URL.revokeObjectURL(href);
}


</script>
</body>

Expand Down

0 comments on commit 43697ba

Please sign in to comment.