-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnasa1.html
116 lines (109 loc) · 3.53 KB
/
nasa1.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My School - Welcome to Our Website</title>
<link rel="stylesheet" href="styles.css"> <!-- Link to your CSS file for styling -->
</head>
<body>
<header>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About Us</a></li>
<li><a href="programs.html">Programs</a></li>
<li><a href="faculty.html">Faculty</a></li>
<li><a href="contact.html">Contact Us</a></li>
</ul>
</nav>
<h1>Welcome to My School</h1>
</header>
<main>
<section id="welcome">
<h2>Welcome to Our School</h2>
<p id="overview"></p>
</section>
<section id="highlights">
<h2>School Highlights</h2>
<ul id="highlightsList"></ul>
</section>
</main>
<footer>
<p>© 2023 My School</p>
</footer>
<script>
// Mock JSON data (replace with your actual JSON data)
const jsonData =
{
"schoolName": "My School",
"schoolMotto": "Learning for a Bright Future",
"about": {
"overview": "My School is a place of excellence in education...",
"mission": "Our mission is to provide quality education...",
"vision": "Our vision is to inspire and empower..."
},
"programs": [
{
"programName": "Science Program",
"description": "Explore the world of science and innovation."
},
{
"programName": "Arts Program",
"description": "Nurture creativity and artistic talent."
},
{
"programName": "Sports Program",
"description": "Foster physical fitness and sportsmanship."
}
],
"faculty": [
{
"name": "John Smith",
"position": "Principal",
"email": "john.smith@example.com",
"phone": "+1234567890"
},
{
"name": "Jane Doe",
"position": "Science Teacher",
"email": "jane.doe@example.com",
"phone": "+9876543210"
}
],
"contact": {
"address": "123 School Street, Cityville",
"email": "info@myschool.com",
"phone": "+1234567890"
},
"facilities": [
{
"name": "Science Lab",
"description": "State-of-the-art science laboratory."
},
{
"name": "Library",
"description": "A vast collection of books and resources."
}
],
"extracurricularActivities": [
"Chess Club",
"Drama Club",
"Soccer Team"
]
}
// Function to populate HTML elements with JSON data
function populateHTML() {
document.getElementById('overview').textContent = jsonData.about.overview;
const highlightsList = document.getElementById('highlightsList');
jsonData.programs.forEach(program => {
const listItem = document.createElement('li');
listItem.textContent = `${program.programName}: ${program.description}`;
highlightsList.appendChild(listItem);
});
}
// Call the function to populate HTML elements with data
populateHTML();
</script>
</body>
</html>