proxitok/views/home.latte

51 lines
1.4 KiB
Plaintext
Raw Normal View History

2022-01-01 14:14:57 -05:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://unpkg.com/bulmaswatch/superhero/bulmaswatch.min.css">
<title>Tiktok Viewer</title>
</head>
<body>
2022-01-03 07:43:22 -05:00
{include 'navbar.latte'}
<section class="hero is-fullheight-with-navbar">
2022-01-01 14:14:57 -05:00
<div class="hero-body">
<div class="container has-text-centered">
<p class="title">Welcome to TikTok Viewer!</p>
<p class="subtitle">Alternative TikTok Frontend</p>
2022-01-01 18:42:03 -05:00
<p>Search user:</p>
2022-01-01 18:06:00 -05:00
<form id="username_form">
<div class="field has-addons has-addons-centered">
<div class="control">
<input name="username" class="input" placeholder="Type username" required />
</div>
<div class="control">
<button class="button is-success" type="submit">Go</button>
</div>
2022-01-01 14:14:57 -05:00
</div>
2022-01-01 18:06:00 -05:00
</form>
2022-01-01 18:42:03 -05:00
<hr />
<p>Trending:</p>
<a class="button is-success" href="./trending">Go</a>
2022-01-01 14:14:57 -05:00
</div>
</div>
<div class="hero-foot">
2022-01-03 07:43:22 -05:00
{include 'footer.latte'}
</div>
2022-01-01 14:14:57 -05:00
</section>
2022-01-03 07:43:22 -05:00
<script n:syntax=off>
2022-01-01 18:06:00 -05:00
const goToUser = (e) => {
e.preventDefault()
const formData = new FormData(e.target)
const username = formData.get('username')
window.location.href = `./@${username}`
}
document.getElementById('username_form').addEventListener('submit', goToUser, false)
2022-01-01 14:14:57 -05:00
</script>
</body>
</html>