Files
chrome-extensions-samples/apps/samples/image-edit/index.html
Sam Thorogood 8af19b8ca9 move
2020-12-04 09:18:01 +11:00

108 lines
2.0 KiB
HTML

<html>
<head>
<style>
body {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
display: -webkit-flex;
-webkit-flex-direction: column;
-webkit-align-items: stretch;
}
.dropping {
background: #ffcc00;
}
nav {
display: -webkit-flex;
-webkit-justify-content: center;
-webkit-align-items: center;
}
video {
width: 640px;
height: 480px;
background: rgba(0,0,0,0.25);
}
button {
display: inline-block;
background: -webkit-linear-gradient(#F9F9F9 40%, #E3E3E3 70%);
background: linear-gradient(#F9F9F9 40%, #E3E3E3 70%);
border: 1px solid #999;
-webkit-border-radius: 3px;
border-radius: 3px;
padding: 5px 8px;
outline: none;
white-space: nowrap;
-webkit-user-select: none;
user-select: none;
cursor: pointer;
text-shadow: 1px 1px #fff;
font-weight: 700;
font-size: 10pt;
}
button:not(:disabled):hover {
border-color: black;
}
button:not(:disabled):active {
background: -webkit-linear-gradient(#E3E3E3 40%, #F9F9F9 70%);
background: linear-gradient(#E3E3E3 40%, #F9F9F9 70%);
}
input, textarea {
box-shadow: 1px 1px 5px #ccc inset;
border: none;
padding: .5em;
}
[readonly] {
background: #eee;
}
[hidden] {
display: none;
}
textarea {
width: 100%;
height: 200px;
outline: none;
padding: 1px;
font-size: 20px;
padding: 1em;
}
output {
text-align: center;
padding: 1em;
display: block;
}
#image_display {
-webkit-flex: 1;
display: -webkit-flex;
-webkit-align-items: stretch;
}
canvas {
-webkit-flex: 1;
min-width: 0;
min-height: 0;
border: 1px #aaa solid;
box-shadow: 0px 2px 10px rgba(0,0,0,0.5) inset;
background-image: url('assets/work_area_background.png');
background-repeat: repeat;
}
</style>
</head>
<body>
<nav>
<button id="choose_file">Choose File</button>
<button id="crop" disabled>Apply Crop</button>
<button id="save_file" disabled>Save As</button>
</nav>
<output>Load a file.</output>
<div id="image_display">
<canvas></canvas>
</div>
<script src="dnd.js"></script>
<script src="app.js"></script>
</body>
</html>