109 lines
2.6 KiB
HTML
109 lines
2.6 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Screenshot Editor</title>
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
padding: 20px;
|
|
background: #f0f0f0;
|
|
font-family: Arial, sans-serif;
|
|
}
|
|
.editor-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 20px;
|
|
max-width: 100%;
|
|
margin: 0 auto;
|
|
}
|
|
.toolbar {
|
|
display: flex;
|
|
gap: 10px;
|
|
padding: 10px;
|
|
background: white;
|
|
border-radius: 8px;
|
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
}
|
|
.tool-button {
|
|
padding: 8px 16px;
|
|
border: none;
|
|
border-radius: 4px;
|
|
background: #f5f5f5;
|
|
cursor: pointer;
|
|
transition: background 0.2s;
|
|
}
|
|
.tool-button:hover {
|
|
background: #e0e0e0;
|
|
}
|
|
.tool-button.active {
|
|
background: #2196F3;
|
|
color: white;
|
|
}
|
|
.canvas-container {
|
|
position: relative;
|
|
overflow: hidden;
|
|
background: white;
|
|
border-radius: 8px;
|
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
}
|
|
#editor-canvas {
|
|
display: block;
|
|
margin: 0 auto;
|
|
touch-action: none;
|
|
}
|
|
.color-line-controls {
|
|
display: flex;
|
|
gap: 20px;
|
|
align-items: center;
|
|
}
|
|
.button-container {
|
|
display: flex;
|
|
gap: 10px;
|
|
justify-content: flex-end;
|
|
}
|
|
.action-button {
|
|
padding: 10px 20px;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-weight: bold;
|
|
}
|
|
#save-btn {
|
|
background: #4CAF50;
|
|
color: white;
|
|
}
|
|
#cancel-btn {
|
|
background: #f44336;
|
|
color: white;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="editor-container">
|
|
<div class="toolbar">
|
|
<button id="pen-tool" class="tool-button" title="Pen (P)">Pen</button>
|
|
<button id="rectangle-tool" class="tool-button" title="Rectangle (R)">Rectangle</button>
|
|
<button id="arrow-tool" class="tool-button" title="Arrow (A)">Arrow</button>
|
|
<div class="color-line-controls">
|
|
<input type="color" id="color-picker" value="#ff0000">
|
|
<input type="range" id="line-width" min="1" max="20" value="2">
|
|
</div>
|
|
<button id="undo-btn" title="Undo (Ctrl+Z)">Undo</button>
|
|
<button id="redo-btn" title="Redo (Ctrl+Y)">Redo</button>
|
|
</div>
|
|
|
|
<div class="canvas-container">
|
|
<canvas id="editor-canvas"></canvas>
|
|
</div>
|
|
|
|
<div class="button-container">
|
|
<button id="cancel-btn" class="action-button">Cancel</button>
|
|
<button id="save-btn" class="action-button">Save</button>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="screenshot-editor.js"></script>
|
|
<script src="editor-init.js"></script>
|
|
</body>
|
|
</html>
|