forked from MarcelBostelaar/test.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e1fcd54
commit d010ef7
Showing
7 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<link rel="stylesheet" href="style/style.css"> | ||
<title>Image Editor</title> | ||
<link rel="preconnect" href="https://fonts.googleapis.com"> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
<link href="https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap" rel="stylesheet"> | ||
</head> | ||
<body> | ||
<main> | ||
<canvas id="canvas"></canvas> | ||
<div id="controls"> | ||
<p>Sleep het plaatje en de ondertitel om te verplaatsen.</p> | ||
<p>Laad het niet in? Vreemd lettertype? Herlaad de pagina/upload de file opnieuw, het werkt 90% of the time all the time.</p> | ||
<p class="blink_text">Zorg dat het plaatje dat je gebruikt rechtenvrij is! Anders kan dit de vereniging vele duizenden euros kosten!</p> | ||
<label name="imageInput">Upload plaatje</label> | ||
<input type="file" id="imageInput" accept="image/*"> | ||
<div class="labelInputPair"> | ||
<label name="imageSize">Grootte achtergrond:</label> | ||
<input type="range" id="imageSize" min="0" max="10" step="0.01" value="1"> | ||
</div> | ||
<div class="labelInputPair"> | ||
<label name="titelText">Titel:</label> | ||
<textarea id="titelText">Jouw titel hier</textarea> | ||
</div> | ||
<div class="labelInputPair"> | ||
<label name="titelSize">Grootte titel:</label> | ||
<input type="range" id="titelSize" min="50" max="500" step="1" value="150"> | ||
</div> | ||
<div class="labelInputPair"> | ||
<label name="ondertitel">Ondertitel:</label> | ||
<textarea type="text" id="ondertitel">datum – locatie – tijd</textarea> | ||
</div> | ||
<br> | ||
<button id="downloadButton" onclick="download('Evenement')">Download</button> | ||
</div> | ||
</main> | ||
|
||
<script src="js/shared.js"></script> | ||
<script src="js/abstractLayer.js"></script> | ||
<script src="js/text.js"></script> | ||
<script src="js/rect.js"></script> | ||
<script src="js/textbox.js"></script> | ||
<script src="js/resizable.js"></script> | ||
<script src="js/imgWrapper.js"></script> | ||
<script src="js/evenement.js"></script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
const templateWidth = 2000; | ||
const templateHeight = 2000; | ||
canvas.width = templateWidth; | ||
canvas.height = templateHeight; | ||
|
||
const backgroundImage = new DraggableResizableObject(canvas, "imageSize", document.createElement('img'), 0, 0, 0, 0); | ||
backgroundImage.makeDraggable(canvas); | ||
|
||
const topText = new TextBoxDrawable({ | ||
font: "Bebas Neue", | ||
linespacing: 0.4, | ||
color: "white", | ||
backgroundColor: "#C2000B", | ||
allCaps: true, | ||
context, | ||
xPosition: 50, | ||
yPosition: 1450, | ||
maxWidth: 1940, | ||
maxHeight: 400, | ||
inputID:"titelText", | ||
doCenter: true, | ||
doDynamicSize: false, | ||
fontSize: 120, | ||
shadowEnable: false | ||
}); | ||
topText.makeDraggable(); | ||
topText.lockXPosition(); | ||
|
||
const ondertitel = new TextDrawable({ | ||
font: "BebasNeueBook", | ||
linespacing: 0, | ||
color: "white", | ||
allCaps: true, | ||
context, | ||
textBaseline: "alphabetic", | ||
xPosition: templateWidth/2, | ||
yPosition: 1800, | ||
doDynamicSize: false, | ||
fontSize: 68, | ||
doCenter: true, | ||
inputID: "ondertitel", | ||
useDynamicLineHeight: false | ||
}); | ||
|
||
const topTextSizeSlider = document.getElementById("titelSize"); | ||
topText.setFont(size=topTextSizeSlider.value); | ||
topTextSizeSlider.addEventListener("input", _ => topText.setFont(topTextSizeSlider.value)); | ||
|
||
const logo = new ImgWrapper("templateImages/Evenement/logo140x140.png"); | ||
logo.setPosition(templateWidth/2 - 140/2, templateHeight - 180); | ||
|
||
const gradient = new ImgWrapper("templateImages/Evenement/gradient.png"); | ||
|
||
// Define layers here | ||
let layers = [ | ||
backgroundImage, | ||
gradient, | ||
logo, | ||
ondertitel, | ||
topText, | ||
]; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.