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.

70 lines
1.4 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: 1;
}
.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: 2;
}
.district {
stroke: white;
stroke-width: 0.5;
transition: fill 0.3s;
}
.language:hover {
stroke-width: 3;
}
.districtText {
visibility: hidden;
}
/* .district:hover ~ .districtText {
visibility: visible;
}*/
</style>
</head>
<body>
<main>
<section id="textStuff">
<h1>Indian Translate</h1>
<label for="toTranslate">Enter text to translate:
<input type="text" name="toTranslate"/>
</label>
</section>
<svg id = "indiaMap" width="700" height="700"></svg>
</main>
<script src="index.js"></script>
</body>
</html>