Commit fa549489 authored by Kannan V M's avatar Kannan V M
Browse files

Add language selection option to landing page

parent ef7057b9
......@@ -9,7 +9,17 @@
</head>
<body>
<svg id="tree" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="100%" height="100%" viewBox="0 0 3508 2481" version="1.1" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;" id="svg405" sodipodi:docname="tree_white_bg.svg" inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
<div class="dropdown">
<button id="lang-select" onclick="myFunction()" class="dropbtn">Select Language</button>
<div id="myDropdown" class="dropdown-content">
<a href="/en">English</a>
<a href="/hi">Hindi</a>
<a href="/ma">Marathi</a>
<a href="/ml">Malayalam</a>
</div>
</div>
<svg id="tree" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="100%" height="100%" viewBox="0 0 3508 2481" version="1.1" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;" id="svg405" sodipodi:docname="tree_white_bg.svg" inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
<metadata id="metadata411">
<rdf:RDF>
<cc:Work rdf:about="">
......@@ -323,9 +333,25 @@
<path d="m 398.322,407.792 13.026,1.491 14.178,-2.073 14.595,2.975 -13.631,-8.303 -9.18,3.412 z" style="fill:#3c3c3c" id="path401" />
</g>
</svg>
<div id="knowledge"></div>
<div id="close-button">
<button onclick="closeLeaf()">Close</button>
</div>
<script>
function myFunction() {
document.getElementById("myDropdown").classList.toggle("show");
}
// Close the dropdown if the user clicks outside of it
window.onclick = function(event) {
if (!event.target.matches('.dropbtn')) {
var dropdowns = document.getElementsByClassName("dropdown-content");
var i;
for (i = 0; i < dropdowns.length; i++) {
var openDropdown = dropdowns[i];
if (openDropdown.classList.contains('show')) {
openDropdown.classList.remove('show');
}
}
}
}
</script>
</body>
</html>
......@@ -108,7 +108,7 @@ input[type="submit"], button {
text-align: center;
}
#knowledge-input, #user-name, #knowledge-submit, #user-submit, #knowledge-edit {
#knowledge-input, #user-name, #knowledge-submit, #user-submit, #lang-select, #knowledge-edit {
margin: 10px auto;
}
......@@ -119,7 +119,38 @@ input[type="submit"], button {
padding: 10px;
}
#knowledge-submit, #user-submit {
.dropbtn:hover, .dropbtn:focus {
background-color: #2980B9;
}
.dropdown {
position: relative;
display: inline-block;
margin-left: 10px;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f1f1f1;
min-width: 160px;
overflow: auto;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown a:hover {background-color: #ddd;}
.show {display: block;}
#knowledge-submit, #user-submit, #lang-select {
background: #008CBA;
font-size: 14px;
color: white;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment