You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
1.7 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Indian Translate</title>
<script src="https://d3js.org/d3.v7.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@turf/turf@7/turf.min.js" charset="utf-8"></script>
<style>
body {
background-color: #f4f4f4;
}
main {
display: flex;
align-items: flex-start;
justify-content: space-evenly;
}
svg {
border: 1px solid;
padding: 2em;
}
.state {
stroke: black;
fill: none;
stroke-width: 0.5;
}
.language {
stroke: red;
/* There has to be a fill, even if it's transparent, to allow
hover events to be recognized on the inside. */
fill: black;
fill-opacity: 0.0;
stroke-width: 1;
}
.languageText {
visibility: hidden;
font-family: sans-serif;
font-size:1.25em;
}
.language:hover ~ .languageText {
visibility: visible;
}
.district {
stroke: white;
stroke-width: 0.25;
transition: fill 0.3s;
}
.language:hover {
stroke-width: 2;
}
.districtText {
visibility: hidden;
}
/* .district:hover ~ .districtText {
visibility: visible;
}*/
</style>
</head>
<body>
<main>
<section id="textStuff">
<h1>Indian Translate</h1>
<form class="translateForm" action="/submit" method="get">
<label for="query">Enter text to translate:</label>
<input type="text" name="query" id="query" required/>
<input type="submit" value="Translate"/>
</section>
<svg id = "indiaMap" width="1000" height="1000"></svg>
</main>
<script src="index.js"></script>
</body>
</html>