Skip to content

Commit

Permalink
Merge pull request #13 from haruyan-hopemucci/feat/add_lgtm
Browse files Browse the repository at this point in the history
LGTMの生成も行う
  • Loading branch information
haruyan-hopemucci authored Nov 20, 2023
2 parents 9e42155 + 3d1769a commit 54c72e7
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
Binary file added docs/img/lgtm.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 modified docs/img/lgtn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,18 @@ <h1>LGTN Generator <small>v0.1.0</small></h1>
<div id="paste-area" contenteditable="true">
ここをクリックした後画像をペーストしてください。
</div>
<div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="chooseOverlay" id="inlineRadio1" value="lgtm" checked>
<label class="form-check-label" for="inlineRadio1">LGTM</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="chooseOverlay" id="inlineRadio2" value="lgtn">
<label class="form-check-label" for="inlineRadio2">LGTN</label>
</div>
</div>
<img id="pasted-image" hidden />
<img id="img__lgtm" src="./img/lgtm.png" hidden />
<img id="img__lgtn" src="./img/lgtn.png" hidden />
<canvas id="output-image" width="400" height="400"></canvas>
<div class="alert alert-warning" role="alert">
Expand Down
3 changes: 2 additions & 1 deletion docs/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ $(function (){

const drawCanvas = function() {
const imgEl = document.querySelector("#pasted-image")
const lgtnEl = document.querySelector("#img__lgtn")
const selectedImageId = document.querySelector('input[name="chooseOverlay"]:checked').value
const lgtnEl = document.querySelector(`#img__${selectedImageId}`)
const canvas = document.querySelector('#output-image')
const context = canvas.getContext('2d')

Expand Down
Binary file modified resources/lgtn.afdesign
Binary file not shown.

0 comments on commit 54c72e7

Please sign in to comment.