From 6aedbbc9429ed4ee0d778885a10156c58931770a Mon Sep 17 00:00:00 2001 From: Aadhavan Srinivasan Date: Sat, 12 Apr 2025 11:55:40 -0400 Subject: [PATCH] Styling changes mostly done --- index.html | 19 ++++++++++++++----- index.js | 2 +- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index 4dd128c..873b970 100644 --- a/index.html +++ b/index.html @@ -27,7 +27,6 @@ visibility: hidden; opacity: 0; transition: opacity 1s, visibility 2s; - border: 2px solid; } svg.show { @@ -58,7 +57,7 @@ .translationText, .romanizationText { visibility: hidden; font-family: "Noto Sans"; - font-size:1.25em; + font-size:1.2em; } .romanizationText { @@ -68,7 +67,7 @@ .languageText { pointer-events: none; font-weight: bold; - font-size: 1.15em; + font-size: 1em; font-family: sans-serif; visibility: hidden; } @@ -181,9 +180,19 @@ } @media only screen and (max-width: 768px) { main { - flex-direction: column; - align-items: stretch; + flex-direction: column; + align-items: stretch; } + .district { + stroke-width: 0.1; + } + .translationText, .romanizationText { + font-size: 0.7em; + } + .languageText { + font-size: 0.6em; + } + } diff --git a/index.js b/index.js index ec3bc7a..15f7af4 100644 --- a/index.js +++ b/index.js @@ -215,7 +215,7 @@ function stateOrDistrictOrLanguage(d) { // const mapHeight = document.getElementById("indiaMap").getAttribute("height") const mapWidth = /*window.innerWidth - */document.querySelector("#svgContainer").offsetWidth * 0.85; // const mapHeight = document.querySelector("#svgContainer").offsetHeight; -const mapHeight = (window.innerHeight - document.querySelector("#svgContainer").getBoundingClientRect().top) * 0.92; +const mapHeight = (window.innerHeight - document.querySelector("#svgContainer").getBoundingClientRect().top); const svg = d3.select("#svgContainer") .append('svg')