Skip to content

Commit

Permalink
Merge pull request #39 from Skayo/gh-pages
Browse files Browse the repository at this point in the history
Closed #38
  • Loading branch information
cozyplanes committed Jul 8, 2018
2 parents 5f8000a + 992b177 commit cb085a1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
15 changes: 14 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,19 @@
<label for="subtext">Subtext :</label>
<input type="text" class="form-control clearable" name="subtext" id="subtext" placeholder="Enter your own subtext..." autocomplete="off" required>
</div>
<div class="form-row align-items-center mb-3">
<div class="col-sm-2 col-xs-3">
<label for="width">Width :</label>
</div>

<div class="col">
<input type="range" value="800" min="128" max="2048" class="form-control" name="width" id="width" required>
</div>

<div class="col-lg-2 col-md-2 col-sm-2 col-2 text-right">
<span id="widthText">800px</span>
</div>
</div>

<a id="downloadBtn" class="btn button-red float-right hidden-link disabled" download="banner.png" href="res/images/examplebanner.png">
<svg style="vertical-align: sub;" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24">
Expand All @@ -69,7 +82,7 @@
<div id="result">
<h2 class="text-center">Your Generated Banner</h2>
<div id="banner-container" class="animated zoomIn">
<img class="img-fluid rounded" id="banner" src="res/images/examplebanner.png">
<img width="800" height="192" class="img-fluid rounded" id="banner" src="res/images/examplebanner.png">
<div class="bannerOverlay errorOverlay rounded">
<p>
Couldn't generate banner.
Expand Down
2 changes: 1 addition & 1 deletion res/css/stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,4 @@ a.cc-btn.cc-dismiss:hover {
display: none;
width: 0;
height: 0;
}
}
8 changes: 7 additions & 1 deletion res/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ var generatorForm = $('#generator-form');
var downloadBtn = $('#downloadBtn');
var usernameInput = $('#username');
var subtextInput = $('#subtext');
var widthInput = $('#width');
var widthText = $('#widthText');

// Banner Elements
var banner = $('#banner');
Expand Down Expand Up @@ -70,6 +72,10 @@ banner.on('load', function () {
spinnerOverlay.fadeOut();
});

widthInput.on('input change', function () {
widthText.text(this.value + 'px');
});

$(document).ready(function () {
if ($.cookie('dB_username')) {
// If cookie exists set value of username-input to its value
Expand All @@ -93,4 +99,4 @@ $(document).on('input', '.clearable', function () {
}).on('touchstart click', '.onX', function (ev) {
ev.preventDefault();
$(this).removeClass('x onX').val('').change();
});
});

0 comments on commit cb085a1

Please sign in to comment.