Skip to content

Commit

Permalink
html + bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
icecoldfire committed Jun 10, 2018
1 parent 0b3d6a2 commit cecf8cb
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 89 deletions.
2 changes: 1 addition & 1 deletion Banner.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def __init__(self, image, tekst):
self.set_waarde(tekst)

def reset(self, image):
self.img = Image.open(image)
self.img = Image.open(image).convert('RGB')
self.draw = ImageDraw.Draw(self.img, 'RGB')

def set_waarde(self, tekst):
Expand Down
76 changes: 32 additions & 44 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,52 +3,40 @@
<head>
<meta charset="UTF-8">
<title>Ik ga op kamp</title>
</head>
<body>
<h1>Ik ga op kamp</h1>
<p>Maak hier je ik ga op kamp banner.</p>
<style>
input, textarea, select {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
div {
border-radius: 5px;
background-color: #f2f2f2;
padding: 20px;
}
button {
background-color: #45a049;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha256-Md8eaeo67OiouuXAi8t/Xpd8t2+IaJezATVTWbZqSOw=" crossorigin="anonymous" />
<style>
body {
background-color: #cccccc;
background-color: #bdd732;
}
</style>
<form action="/cgi-bin/web.cgi" method="get">
<label>Template:</label>
<select name="image" required>
<option value="1.jpg" selected>1</option>
<option value="2.jpg">2</option>
<option value="3.jpg">3</option>
<option value="4.png">4</option>
<option value="5.png">5</option>
<option value="6.png">6</option>
<option value="7.png">7</option>
<option value="8.jpg">8</option>
<option value="9.jpg">9</option>
<option value="10.JPG">10</option>
<option value="11.jpg">11</option>
<option value="12.JPG">12</option>
</select>
<label>Tekst:</label>
<textarea name="tekst" placeholder="Jouw kamp adres" required></textarea>
<button type="submit">Submit</button>
<button type="reset">Reset</button>
</form>
</head>
<body class="container">
<h1>Ik ben op kamp</h1>
<p>Maak hier je "Ik ben op kamp banner"!</p>
<form action="/cgi-bin/web.cgi" method="get">
<div class="form-group">
<label>Template:</label>
<select class="form-control" name="image" required>
<option value="1.jpg" selected>Banner 1</option>
<option value="2.jpg">Banner 2</option>
<option value="3.jpg">Banner 3</option>
<option value="4.png">Banner 4</option>
<option value="5.png">Banner 5</option>
<option value="6.png">Banner 6</option>
<option value="7.png">Banner 7</option>
<option value="8.jpg">Banner 8</option>
<option value="9.jpg">Banner 9</option>
<option value="10.JPG">Banner 10</option>
<option value="11.jpg">Banner 11</option>
<option value="12.JPG">Banner 12</option>
</select>
</div>
<div class="form-group">
<label>Tekst:</label>
<textarea class="form-control" name="tekst" placeholder="Jouw kamp adres" required rows="5"></textarea>
</div>
<button class="btn btn-primary" type="submit">Maak!</button>
<button class="btn btn-secondary pull-right" type="reset">Reset</button>
</form>
</body>
</html>
76 changes: 32 additions & 44 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,52 +3,40 @@
<head>
<meta charset="UTF-8">
<title>Ik ga op kamp</title>
</head>
<body>
<h1>Ik ga op kamp</h1>
<p>Maak hier je ik ga op kamp banner.</p>
<style>
input, textarea, select {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
div {
border-radius: 5px;
background-color: #f2f2f2;
padding: 20px;
}
button {
background-color: #45a049;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha256-Md8eaeo67OiouuXAi8t/Xpd8t2+IaJezATVTWbZqSOw=" crossorigin="anonymous" />
<style>
body {
background-color: #cccccc;
background-color: #bdd732;
}
</style>
<form action="/generate" method="POST">
<label>Template:</label>
<select name="image" required>
<option value="1.jpg" selected>1</option>
<option value="2.jpg">2</option>
<option value="3.jpg">3</option>
<option value="4.png">4</option>
<option value="5.png">5</option>
<option value="6.png">6</option>
<option value="7.png">7</option>
<option value="8.jpg">8</option>
<option value="9.jpg">9</option>
<option value="10.JPG">10</option>
<option value="11.jpg">11</option>
<option value="12.JPG">12</option>
</select>
<label>Tekst:</label>
<textarea name="tekst" placeholder="Jouw kamp adres" required></textarea>
<button type="submit">Submit</button>
<button type="reset">Reset</button>
</form>
</head>
<body class="container">
<h1>Ik ben op kamp</h1>
<p>Maak hier je "Ik ben op kamp banner"!</p>
<form action="/generate" method="POST">
<div class="form-group">
<label>Template:</label>
<select class="form-control" name="image" required>
<option value="1.jpg" selected>Banner 1</option>
<option value="2.jpg">Banner 2</option>
<option value="3.jpg">Banner 3</option>
<option value="4.png">Banner 4</option>
<option value="5.png">Banner 5</option>
<option value="6.png">Banner 6</option>
<option value="7.png">Banner 7</option>
<option value="8.jpg">Banner 8</option>
<option value="9.jpg">Banner 9</option>
<option value="10.JPG">Banner 10</option>
<option value="11.jpg">Banner 11</option>
<option value="12.JPG">Banner 12</option>
</select>
</div>
<div class="form-group">
<label>Tekst:</label>
<textarea class="form-control" name="tekst" placeholder="Jouw kamp adres" required rows="5"></textarea>
</div>
<button class="btn btn-primary" type="submit">Maak!</button>
<button class="btn btn-secondary" type="reset">Reset</button>
</form>
</body>
</html>

0 comments on commit cecf8cb

Please sign in to comment.