mirror of
https://github.com/cupcakearmy/canihazusername.git
synced 2025-09-05 23:00:40 +00:00
website
This commit is contained in:
@@ -1,7 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="./main.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="main" class="w-100 h-100">
|
||||
<div>
|
||||
<h2 class="title is-2"><span>can</span>i<span>haz</span>username</h2>
|
||||
<input id="format" class="input is-rounded" type="text" placeholder="format" value="{character}_{english}">
|
||||
<br /><br />
|
||||
<button id="button" class="button is-link is-rounded">👇 Generate 👇</button>
|
||||
<br /><br />
|
||||
<input id="username" class="input is-rounded" type="text" placeholder="" readonly>
|
||||
<br /><br />
|
||||
<div class="content">
|
||||
<a target="blank" href="https://github.com/cupcakearmy/canihazusername">
|
||||
<button id="button" class="button is-link is-rounded">🔗 Github & Docs 🔗</button>
|
||||
</a>
|
||||
<br /><br />
|
||||
<pre>yarn add canihazusername</pre>
|
||||
<pre>import { generate } from 'canihazusername'
|
||||
generate('{character}_{english}')</pre>
|
||||
</div>
|
||||
<div class="content">
|
||||
<h5 class="title is-5">Available lists</h5>
|
||||
<p id="lists"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="./main.ts"></script>
|
||||
</body>
|
||||
|
||||
|
34
website/main.css
Normal file
34
website/main.css
Normal file
@@ -0,0 +1,34 @@
|
||||
* {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||
}
|
||||
|
||||
body {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
#main {
|
||||
text-align: center;
|
||||
padding: 1em;
|
||||
display: flex;
|
||||
/* justify-content: center;
|
||||
align-items: center; */
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#main > div {
|
||||
max-width: 35em;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
pre {
|
||||
text-align: left;
|
||||
padding: 1em .5em;
|
||||
border-radius: 1.5em;
|
||||
}
|
||||
|
||||
h2 span{
|
||||
color: #3273dc
|
||||
}
|
@@ -1,3 +1,17 @@
|
||||
import cihu from '../'
|
||||
import 'bulma/css/bulma'
|
||||
import { showAvailableLists, generate } from '../'
|
||||
|
||||
console.log(cihu())
|
||||
const input = window.document.getElementById('format') as HTMLInputElement
|
||||
const output = window.document.getElementById('username') as HTMLInputElement
|
||||
const list = window.document.getElementById('lists')
|
||||
const button = window.document.getElementById('button')
|
||||
|
||||
const gen = () => {
|
||||
output.value = generate(input.value)
|
||||
}
|
||||
|
||||
button.addEventListener('click', gen)
|
||||
button.addEventListener('touchstart', gen)
|
||||
|
||||
gen()
|
||||
list.innerHTML = showAvailableLists().join(', ')
|
||||
|
Reference in New Issue
Block a user