Skip to content

Commit

Permalink
Add Evenement template
Browse files Browse the repository at this point in the history
  • Loading branch information
splintersuidman committed Jun 27, 2024
1 parent e1fcd54 commit d010ef7
Show file tree
Hide file tree
Showing 7 changed files with 114 additions and 0 deletions.
52 changes: 52 additions & 0 deletions Evenement.html
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&#13;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>
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<body>
<h1 id="indextitel">Kies je template</h1>
<div id="indexmain">
<a href="Evenement.html"><img src="media/Evenement.jpg"></a>
<a href="AankondigingNieuw.html"><img src="media/AankondigingNieuw.jpg"></a>
<a href="Aankondiging.html"><img src="media/Aankondiging.jpg"></a>
<a href="Tekstbericht.html"><img src="media/Tekstbericht.jpg"></a>
Expand Down
61 changes: 61 additions & 0 deletions js/evenement.js
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,
];
Binary file added media/Evenement.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added templateImages/Evenement/gradient.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added templateImages/Evenement/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added templateImages/Evenement/logo140x140.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d010ef7

Please sign in to comment.