skinswitcher/html/partials/change.html

58 lines
2.2 KiB
HTML

<h1 class="title">Change skin</h1>
<div class="columns is-mobile">
<div class="column">
<img src="" class="skin" id="flat" alt="Current Skin" style="display: none;">
<div id="mesh" style="display: inline;"></div>
<button class="button" id="switch" style="display: none;">Switch to 2D</button>
</div>
<div class="column">
<article class="message is-info">
<div class="message-body">
Your existing skin will be overwritten, be sure to make a backup
</div>
</article>
<div class="buttons has-addons">
<button class="button" id="remote">Fetch from URL</button>
<button class="button" id="local">Upload file</button>
</div>
<form action="#" id="remote" style="display: none;">
<div class="field">
<input class="input" type="text" id="url" placeholder="URL">
</div>
<div class="field">
<button class="button" type="submit">Submit</button>
</div>
</form>
<form action="#" id="local" style="display: none;">
<div class="field">
<div class="file has-name">
<label class="file-label">
<input class="file-input" type="file" name="resume">
<span class="file-cta">
<span class="file-icon">
<i class="fas fa-upload"></i>
</span>
<span class="file-label">
Choose a file…
</span>
</span>
<span class="file-name"></span>
</label>
</div>
</div>
<div class="field">
<button class="button" type="submit">Submit</button>
</div>
</form>
</div>
</div>
<script>
$("button#remote, button#local").on("click", (e) => {
const id = e.target.id;
$("button#remote, button#local").css("display", "none");
$(`form#${id}`).css("display", "initial");
});
</script>