-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
174 lines (159 loc) · 4.66 KB
/
index.html
File metadata and controls
174 lines (159 loc) · 4.66 KB
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta property="og:title" content="PS1 Classics on PS3" />
<meta property="og:description" content="Home of information about PS1 emulation on PS3." />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://ps3classics.github.io/ps1/index.html" />
<meta property="og:image" content="https://ps3classics.github.io/ps1/icon.png" />
<title>PS1 Classics on PS3</title>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
body {
margin: 0;
font-family: Arial, sans-serif;
color: #fff;
background: linear-gradient(-45deg, #440000, #532c00, #1b0707, #702121);
background-size: 600% 600%;
animation: gradientShift 20s ease infinite;
min-height: 100vh;
display: flex;
flex-direction: column;
}
@keyframes gradientShift {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
/* Navbar */
nav {
background-color: rgba(0, 0, 0, 0.6);
display: flex;
justify-content: left;
padding: 1rem;
position: sticky;
top: 0;
}
nav a {
color: #fff;
margin: 0 1rem;
text-decoration: none;
font-weight: bold;
}
nav a:hover {
text-decoration: underline;
}
/* Main container */
.container {
flex: 1;
text-align: center;
padding: 2rem;
}
h1 {
margin-bottom: 0.5rem;
font-size: 2rem;
text-shadow: 0 0 8px rgba(0,0,0,0.4);
}
p.lead {
max-width: 700px;
margin: 0 auto 2rem auto;
font-size: 1.1rem;
line-height: 1.5;
text-shadow: 0 0 4px rgba(0,0,0,0.5);
}
#last-updated {
margin-top: 1rem;
font-style: italic;
font-size: 0.9rem;
}
canvas {
max-width: 500px;
margin: 2rem auto;
}
footer {
background-color: rgba(0, 0, 0, 0.6);
text-align: center;
padding: 1rem;
font-size: 0.8rem;
}
</style>
</head>
<body>
<nav>
<a href="index.html">Home</a>
<a href="faq.html">FAQ</a>
<a href="compatibility.html">Compatibility</a>
<a href="https://ps3classics.github.io/ps2">PS2</a>
<a href="https://ps3classics.github.io/psp">PSP</a>
</nav>
<div class="container">
<h1>PS1 Classics on PS3</h1>
<p class="lead">
This project tracks the compatibility of PS1 titles when run on PS3 via software emulation.<br>
<br>For more info, see "FAQ". For compatibility details and charts, see "Compatibility".
</p>
<canvas id="compatChart"></canvas>
<div id="last-updated"></div>
</div>
<footer>
Part of the PS3 Classics Project · <a href="https://github.com/ps3classics" style="color:#fff">GitHub</a>
</footer>
<script>
async function loadData() {
try {
const response = await fetch("data.json");
const { stats, last_updated } = await response.json();
document.getElementById("last-updated").textContent =
"Last updated: " + last_updated;
const ctx = document.getElementById("compatChart").getContext("2d");
// Chart with legend white + drop shadow plugin
new Chart(ctx, {
type: "pie",
data: {
labels: Object.keys(stats),
datasets: [{
data: Object.values(stats),
backgroundColor: [
"rgb(0, 136, 238)", // PS1 Classic - blue
"rgb(153, 221, 153)", // Playable - green
"rgb(238, 238, 136)", // Minor Issues - yellow
"rgb(238, 153, 51)", // Major Issues - orange
"rgb(238, 68, 68)", // Unplayable - red
"rgb(187, 187, 187)" // Untested - gray
]
}]
},
options: {
plugins: {
legend: {
labels: {
color: "white"
}
}
}
},
plugins: [{
id: 'shadow',
beforeDraw: (chart) => {
const ctx = chart.ctx;
ctx.save();
ctx.shadowColor = "rgba(0,0,0,0.6)";
ctx.shadowBlur = 20;
ctx.shadowOffsetX = 4;
ctx.shadowOffsetY = 4;
ctx.restore();
}
}]
});
} catch (err) {
document.getElementById("last-updated").textContent =
"Data could not be loaded.";
console.error(err);
}
}
loadData();
</script>
</body>
</html>