Files seperated
This commit is contained in:
11
css.css
11
css.css
@@ -139,3 +139,14 @@
|
|||||||
padding: 3px 6px;
|
padding: 3px 6px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.segment-label{
|
||||||
|
position:absolute;
|
||||||
|
font-weight:bold;
|
||||||
|
font-size:18px;
|
||||||
|
color:#facc15;
|
||||||
|
transform:translate(-50%,-50%);
|
||||||
|
background:rgba(0,0,0,0.35);
|
||||||
|
padding:6px 10px;
|
||||||
|
border-radius:6px;
|
||||||
|
border:1px solid rgba(255,255,255,0.2);
|
||||||
|
}
|
||||||
|
|||||||
73
index.php
73
index.php
@@ -9,31 +9,36 @@
|
|||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
<link href="css.css" rel="stylesheet">
|
<link href="css.css" rel="stylesheet">
|
||||||
|
|
||||||
<style>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="container py-5">
|
<div class="container py-5">
|
||||||
|
|
||||||
<div class="text-center mb-5">
|
<div class="text-center mb-5">
|
||||||
<h1 class="fw-bold text-warning">Prajwal's Astro Analysis</h1>
|
<h1 class="fw-bold text-warning">Prajwal's Astro Analysis</h1>
|
||||||
<p class="text-light">Analyze planetary positioning, nakshatra, and horoscope from selected date, time, and location.</p>
|
<p class="text-light">
|
||||||
|
Analyze planetary positioning, nakshatra, and horoscope from selected date, time, and location.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="main-card p-4 p-md-5">
|
<div class="main-card p-4 p-md-5">
|
||||||
<div class="row g-4 align-items-start">
|
|
||||||
|
<div class="row g-4">
|
||||||
|
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<div class="row">
|
<div class="row g-3">
|
||||||
|
|
||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
<label class="form-label">Select Date</label>
|
<label class="form-label">Select Date</label>
|
||||||
<input type="date" class="form-control" id="datePicker">
|
<input type="date" class="form-control" id="datePicker">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
<label class="form-label">Select Time</label>
|
<label class="form-label">Select Time</label>
|
||||||
<input type="time" class="form-control" id="timePicker">
|
<input type="time" class="form-control" id="timePicker">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
<label class="form-label">Select Location</label>
|
<label class="form-label">Select Location</label>
|
||||||
<select class="form-select" id="locationSelector">
|
<select class="form-select" id="locationSelector">
|
||||||
@@ -48,62 +53,44 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
<div class="col-lg-12">
|
||||||
|
<button class="btn btn-custom w-100 mt-2">Analyze</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<button class="btn btn-custom w-100 mt-2">Analyze</button>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<div class="row g-3 mb-4">
|
|
||||||
<div class="info-box">
|
|
||||||
<div class="section-title">Geocentric Positioning of Planets</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
<div class="info-box">
|
||||||
|
|
||||||
|
<div class="section-title">
|
||||||
|
Geocentric Positioning of Planets, Nakshatra, and Horoscope
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="chart-wrapper">
|
<div class="chart-wrapper">
|
||||||
|
|
||||||
<div class="astro-circle" id="astroCircle">
|
<div class="astro-circle" id="astroCircle">
|
||||||
|
|
||||||
<div class="earth-center">
|
<div class="earth-center">
|
||||||
<img src="https://upload.wikimedia.org/wikipedia/commons/9/97/The_Earth_seen_from_Apollo_17.jpg" alt="Earth">
|
<img src="https://upload.wikimedia.org/wikipedia/commons/9/97/The_Earth_seen_from_Apollo_17.jpg">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
</div>
|
||||||
const astroCircle = document.getElementById("astroCircle");
|
<script src="js.js"></script>
|
||||||
|
|
||||||
const centerX = 260;
|
|
||||||
const centerY = 260;
|
|
||||||
const radius = 220;
|
|
||||||
|
|
||||||
for (let i = 0; i < 12; i++) {
|
|
||||||
const angleDeg = i * 30;
|
|
||||||
const angleRad = (angleDeg - 90) * Math.PI / 180;
|
|
||||||
|
|
||||||
// segment lines
|
|
||||||
const line = document.createElement("div");
|
|
||||||
line.classList.add("segment-line");
|
|
||||||
line.style.transform = `translateX(-50%) rotate(${angleDeg}deg)`;
|
|
||||||
astroCircle.appendChild(line);
|
|
||||||
|
|
||||||
// segment number positions
|
|
||||||
const number = document.createElement("div");
|
|
||||||
number.classList.add("segment-number");
|
|
||||||
number.innerText = i + 1;
|
|
||||||
|
|
||||||
const numberRadius = radius - 25;
|
|
||||||
const x = centerX + numberRadius * Math.cos(angleRad);
|
|
||||||
const y = centerY + numberRadius * Math.sin(angleRad);
|
|
||||||
|
|
||||||
number.style.left = `${x}px`;
|
|
||||||
number.style.top = `${y}px`;
|
|
||||||
|
|
||||||
astroCircle.appendChild(number);
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
47
js.js
Normal file
47
js.js
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
|
|
||||||
|
const astroCircle = document.getElementById("astroCircle");
|
||||||
|
|
||||||
|
const labels = [
|
||||||
|
"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"
|
||||||
|
];
|
||||||
|
|
||||||
|
const circleSize = astroCircle.offsetWidth;
|
||||||
|
const centerX = circleSize / 2;
|
||||||
|
const centerY = circleSize / 2;
|
||||||
|
|
||||||
|
const radius = circleSize / 2;
|
||||||
|
|
||||||
|
// numbers will be placed OUTSIDE the circle
|
||||||
|
const numberRadius = radius + 25;
|
||||||
|
|
||||||
|
for (let i = 0; i < 12; i++) {
|
||||||
|
|
||||||
|
const angleDeg = i * 30;
|
||||||
|
const angleRad = (angleDeg - 90) * Math.PI / 180;
|
||||||
|
|
||||||
|
// draw segment divider
|
||||||
|
const line = document.createElement("div");
|
||||||
|
line.classList.add("segment-line");
|
||||||
|
line.style.transform = `translateX(-50%) rotate(${angleDeg}deg)`;
|
||||||
|
astroCircle.appendChild(line);
|
||||||
|
|
||||||
|
// place number in center of segment
|
||||||
|
const midAngle = angleDeg + 15;
|
||||||
|
const midRad = (midAngle - 90) * Math.PI / 180;
|
||||||
|
|
||||||
|
const x = centerX + numberRadius * Math.cos(midRad);
|
||||||
|
const y = centerY + numberRadius * Math.sin(midRad);
|
||||||
|
|
||||||
|
const number = document.createElement("div");
|
||||||
|
number.classList.add("segment-number");
|
||||||
|
number.innerText = labels[i];
|
||||||
|
|
||||||
|
number.style.left = `${x}px`;
|
||||||
|
number.style.top = `${y}px`;
|
||||||
|
|
||||||
|
astroCircle.appendChild(number);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user