-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
152 lines (137 loc) · 3.49 KB
/
index.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<!DOCTYPE html>
<html>
<head>
<title>SparkFun Product Documentation</title>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<style>
/* CSS styles for the page */
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 12px;
line-height: 1.42857143;
color: #333;
background-color:#fff
}
h1 {
text-align: left;
color: #333;
}
table {
width: 95%;
border-collapse: collapse;
border: 0px;
}
table.menu-table {
width: 30%;
padding:5;
border-width: 2px
}
td {
padding: 10px 15px;
text-align: left;
font-size: 18px;
}
th {
padding: 10px 15px;
text-align: left;
border: 0px;
font-size: 20px;
font-weight: bold;
}
a, a:visited, a:active {
color: #E0311D;
text-decoration: none;
font-weight: normal;
}
a:hover {
color: #9c2214;
text-decoration: underline;
}
hr {
border-color: red;
border-width: 1px;
}
.menu-entry {
background-color: #E3DCCD;
height: 25px;
vertical-align: top;
text-align: center;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
border-width: 2px;
}
a.menu-link, a.menu-link:visited, a.menu-link:active{
font-size: 16px;
font-weight: bold;
color: #000000;
}
.menu-entry:hover {
background-color: #E0311D;
}
.menu-entry:hover a{
color: #fff;
}
.menu-link:hover {
color: #FFFFFF;
text-decoration: none;
}
</style>
</head>
<body>
<table class="menu-table">
<tr>
<td width=10 rowspan="2"> </td>
<td rowspan="2">
<a href="https://www.sparkfun.com" target="_blank" title="www.sparkfun.com"><img src="resource/sparkfun-logo.png"></a>
</td>
<td> </td><td> </td><td> </td>
</tr>
<tr style="height:35%;">
<td align="center" class="menu-entry">
<a class="menu-link" href="https://www.sparkfun.com/categories" target="_blank">SHOP</a>
</td>
<td align="center" class="menu-entry">
<a class="menu-link" href="https://learn.sparkfun.com/" target="_blank">LEARN</a>
</td>
<td align="center" class="menu-entry">
<a class="menu-link" href="https://www.sparkfun.com/news" target="_blank">BLOG</a>
</td>
</tr>
</table>
<hr>
<img src="resource/studio-red-box-wall.jpg" width="100%">
<h1>SparkFun's Latest Product Documentation</h1>
<table id="data-table">
<thead>
<tr>
<th>GitHub Repo</th>
<th style="width:25%">Documentation</th>
<th>Description</th>
</tr>
</thead>
<tbody></tbody>
</table>
<!-- JavaScript code using jQuery -->
<script>
$(document).ready(function() {
// Retrieve JSON data from "jsonexdata.json" file
$.getJSON("gsg.json", function(data) {
var tableBody = $("#data-table tbody");
// Iterate over each person object in the JSON data
$.each(data, function(index, repo) {
var row = $("<tr></tr>"); // Create a new table row
// Repo
var $td_r = $("<td></td>").html('<a href="' + repo.url + '">' + repo.name + '</a>');
row.append($td_r);
// Documentation
var $td = $("<td></td>").html('<a href="' + repo.homepage + '">' + repo.name.replace(/_/g, ' ') + '</a>');
row.append($td);
// Description
row.append($("<td></td>").text(repo.description));
tableBody.append(row); // Add the row to the table body
});
});
});
</script>
</body>
</html>