collage-maker/web/index.html

122 lines
3.5 KiB
HTML
Raw Normal View History

2023-08-01 19:16:46 -04:00
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="croppie.css" />
<link rel="icon" href="data:;base64,iVBORw0KGgo=" />
2023-08-07 21:27:38 -04:00
<script src="http://localhost:35729/livereload.js"></script>
2023-08-01 19:16:46 -04:00
<script src="croppie.js"></script>
2023-08-27 19:37:05 -04:00
<script src="index.js"></script>
2023-08-03 19:33:05 -04:00
<!--
2023-08-07 21:27:38 -04:00
width: 3264px;
height: 4224px;
width: 8.5in;
height: 11in;
2023-08-03 19:33:05 -04:00
-->
2023-08-01 19:16:46 -04:00
<style>
2023-08-07 21:27:38 -04:00
.container {
display: flex;
background-color: lightyellow;
height: calc(100vh - 20px);
}
.controls {
background-color: lightgrey;
display: flex;
align-items: center;
justify-content: center;
flex: 30%;
}
2023-09-01 23:12:52 -04:00
.imagebox {
padding: 2rem;
flex: 70%;
}
.image-surface {
overflow: hidden;
margin: auto;
border: 2px solid;
height: 100%;
width: 100%;
}
2023-08-07 21:27:38 -04:00
.showbuton {
font-size: 2rem;
2023-08-01 19:16:46 -04:00
}
2023-09-01 23:12:52 -04:00
// paper sizes
2023-08-07 21:27:38 -04:00
.letter-portrait {
aspect-ratio: 85 / 110;
}
2023-09-01 23:12:52 -04:00
.letter-landscape {
aspect-ratio: 110 / 85;
}
.fiveseven-portrait {
aspect-ratio: 5 / 7;
}
.fiveseven-landscape {
aspect-ratio: 7 / 5;
}
.foursix-portrait {
aspect-ratio: 4 / 6;
}
.foursix-landscape {
aspect-ratio: 6 / 4;
}
.half-landscape {
display:flex;
}
.half-landscape .collage-img {
flex: 50%;
}
.one-two {
display: grid;
grid-template-areas:
"one two"
"one three";
}
.one-two .img1{
grid-area: one;
}
2023-08-27 19:37:05 -04:00
.letter-portrait .collage-img {
2023-08-01 19:16:46 -04:00
height: 50%;
}
2023-08-07 21:27:38 -04:00
.letter-landscape-2 {
display:flex;
// width: 80vh;
height: 100%;
// margin: auto;
2023-08-27 22:22:17 -04:00
aspect-ratio: 110 / 85;
// aspect-ratio: 7 / 5;
gap: 1rem;
2023-08-07 21:27:38 -04:00
}
.letter-landscape-2 .img1 {
flex: 60%;
}
.letter-landscape-2 .img2 {
flex: 40%;
}
2023-08-01 19:16:46 -04:00
</style>
</head>
<body onload="main()">
<div class="container">
2023-08-07 21:27:38 -04:00
<div class="controls">
<div>
<button class="showbuton" onClick="snap()">Snap Collage</button>
<p><a href="" target="_blank" id="collage-url"></a></p>
</div>
2023-08-07 21:27:38 -04:00
</div>
<div class="imagebox">
2023-09-01 23:12:52 -04:00
<div id="collage" class="image-surface fiveseven-landscape one-two">
<div class="collage-img img1" data-collage-image-url="images/img1.jpg">
</div>
<div class="collage-img img2" data-collage-image-url="images/img2.jpg">
</div>
<div class="collage-img img3" data-collage-image-url="images/img3.jpg">
</div>
2023-08-07 21:27:38 -04:00
</div>
2023-08-01 19:16:46 -04:00
</div>
</div>
</body>
</html>