-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathindex.html
More file actions
300 lines (277 loc) · 14.2 KB
/
Copy pathindex.html
File metadata and controls
300 lines (277 loc) · 14.2 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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
---
title: Sunshine
subtitle: A LizardByte project
layout: page
full-width: true
after-content:
- donate.html
- support.html
cover-img:
- /Sunshine/assets/img/banners/AdobeStock_305732536_1920x1280.jpg
- /Sunshine/assets/img/banners/AdobeStock_231616343_1920x1280.jpg
- /Sunshine/assets/img/banners/AdobeStock_303330124_1920x1280.jpg
---
<!-- About section-->
<section class="py-5" id="About">
<div class="container px-auto">
<p class="lead text-center mx-auto mt-0 mb-5">
Sunshine is a self-hosted game stream host for Moonlight. Offering low latency, cloud gaming
server capabilities with support for AMD, Intel, and Nvidia GPUs for hardware encoding. Software
encoding is also available. You can connect to Sunshine from any Moonlight client on a variety
of devices. A web UI is provided to allow configuration, and client pairing, from your favorite
web browser. Pair from the local server or any mobile device.
</p>
</div>
</section>
<!-- Features section-->
<section class="py-5" id="Features">
<div class="container px-auto">
<h2 class="text-center fw-bolder my-5">Features</h2>
<div class="row gx-5">
{% for feature in site.data.features %}
<div class="col-md-6 col-lg-4 mb-5">
<div class="card-custom h-100 shadow border-0 rounded-0">
<div class="card-body p-4">
<div class="d-flex align-items-center">
<div class="icon">
{% if feature.icon_fa %}
<i class="fa-fw fa-2x {{ feature.icon_fa }}"></i>
{% elsif feature.icon_img %}
<img {% if feature.icon_img_invert %}class="invert"{% endif %} src="{{ feature.icon_img }}" alt="{{ feature.icon_img_alt | default: feature.title }}"/>
{% endif %}
</div>
<div class="ms-3">
<h5 class="fw-bolder mb-0">{{ feature.title }}</h5>
<p class="mb-0">{{ feature.description }}</p>
</div>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</section>
<!-- Clients section-->
<section class="py-5" id="Clients">
<div class="container px-auto">
<h2 class="text-center fw-bolder my-5">Clients</h2>
<div class="row gx-5" id="clients-container">
<!-- Dynamically populated from sunshine.json -->
</div>
</div>
</section>
<!-- More cards -->
<div class="container py-5 px-auto">
<div class="container col-md-10">
<!-- Docs section -->
<section class="py-4" id="Docs">
<div class="card-custom shadow border-0 rounded-0">
<div class="card-body p-4">
<div class="d-flex align-items-center">
<i class="fa-fw fa-2x fas fa-book"></i>
<div class="ms-3">
<h2 class="fw-bolder mb-0">Documentation</h2>
<p class="mb-0">
Read the documentation to learn how to install, use, and configure Sunshine.
</p>
</div>
</div>
</div>
<div class="card-footer p-3 px-4">
<a class="btn btn-outline-theme me-3 mb-3" href="https://docs.lizardbyte.dev/projects/sunshine" target="_blank">
<img class="icon-sm invert" src="https://cdn.jsdelivr.net/npm/simple-icons@16/icons/readthedocs.svg" alt="ReadTheDocs"/>
Read the Docs
</a>
</div>
</div>
</section>
<!-- Download section -->
<section class="py-4" id="Download">
<div class="card-custom shadow border-0 rounded-0">
<div class="card-body p-4">
<div class="d-flex align-items-center">
<i class="fa-fw fa-2x fas fa-download"></i>
<div class="ms-3">
<h2 class="fw-bolder mb-0">Download</h2>
<p class="mb-0">
Download Sunshine for your platform.
</p>
</div>
</div>
</div>
<div class="card-footer p-3 px-4">
<a class="latest-button btn btn-outline-theme me-3 mb-3 d-none" href="https://github.com/LizardByte/Sunshine/releases/latest" target="_blank">
<img class="icon-sm invert" src="https://cdn.jsdelivr.net/npm/simple-icons@16/icons/github.svg" alt="GitHub"/>
<img class="icon-sm invert" src="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/icons/windows.svg" alt="Windows"/>
<img class="icon-sm invert" src="https://cdn.jsdelivr.net/npm/simple-icons@16/icons/debian.svg" alt="Debian"/>
<img class="icon-sm invert" src="https://cdn.jsdelivr.net/npm/simple-icons@16/icons/ubuntu.svg" alt="Ubuntu"/>
<img class="icon-sm invert" src="https://cdn.jsdelivr.net/npm/simple-icons@16/icons/flatpak.svg" alt="Flatpak"/>
<img class="icon-sm invert" src="https://cdn.jsdelivr.net/npm/simple-icons@16/icons/linux.svg" alt="AppImage"/>
Latest: <span id="latest-version" class="crowdin-ignore"></span>
</a>
<a class="beta-button btn btn-outline-theme me-3 mb-3 d-none" href="#" target="_blank">
<i class="fa-fw fa-lg fas fa-flask"></i>
<img class="icon-sm invert" src="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/icons/windows.svg" alt="Windows"/>
<img class="icon-sm invert" src="https://cdn.jsdelivr.net/npm/simple-icons@16/icons/debian.svg" alt="Debian"/>
<img class="icon-sm invert" src="https://cdn.jsdelivr.net/npm/simple-icons@16/icons/ubuntu.svg" alt="Ubuntu"/>
<img class="icon-sm invert" src="https://cdn.jsdelivr.net/npm/simple-icons@16/icons/flatpak.svg" alt="Flatpak"/>
<img class="icon-sm invert" src="https://cdn.jsdelivr.net/npm/simple-icons@16/icons/linux.svg" alt="AppImage"/>
Beta: <span id="beta-version" class="crowdin-ignore"></span>
</a>
<a class="btn btn-outline-theme me-3 mb-3" href="https://github.com/LizardByte/pacman-repo" target="_blank">
<img class="icon-sm invert" src="https://cdn.jsdelivr.net/npm/simple-icons@16/icons/archlinux.svg" alt="Arch Linux"/>
Arch Linux
</a>
<a class="btn btn-outline-theme me-3 mb-3" href="https://hub.docker.com/r/lizardbyte/sunshine" target="_blank">
<img class="icon-sm invert" src="https://cdn.jsdelivr.net/npm/simple-icons@16/icons/docker.svg" alt="Docker"/>
Docker
</a>
<a class="btn btn-outline-theme me-3 mb-3" href="https://flathub.org/apps/dev.lizardbyte.app.Sunshine" target="_blank">
<img class="icon-sm invert" src="https://cdn.jsdelivr.net/npm/simple-icons@16/icons/flathub.svg" alt="Flathub"/>
Flathub
</a>
<a class="btn btn-outline-theme me-3 mb-3" href="https://github.com/LizardByte/homebrew-homebrew" target="_blank">
<img class="icon-sm invert" src="https://cdn.jsdelivr.net/npm/simple-icons@16/icons/homebrew.svg" alt="Homebrew"/>
Homebrew
</a>
</div>
</div>
</section>
</div>
</div>
<!-- TODO: Move this to website repo, and make it accept arguments for the repo name -->
<script>
// Fetch the releases from the GitHub API
fetch('https://api.github.com/repos/LizardByte/Sunshine/releases')
.then(response => response.json())
.then(data => {
// Filter the releases to get only the pre-releases
const preReleases = data.filter(release => release.prerelease);
// Filter the releases to get only the stable releases
const stableReleases = data.filter(release => !release.prerelease);
const latestButton = document.querySelector('.latest-button');
const latestVersion = document.querySelector('#latest-version');
const betaButton = document.querySelector('.beta-button');
const betaVersion = document.querySelector('#beta-version');
// If there are no stable releases, hide the latest download button
if (stableReleases.length === 0) {
latestButton.classList.add('d-none');
} else {
// Show the latest download button
latestButton.classList.remove('d-none');
// Get the latest stable release
const latestStableRelease = stableReleases[0];
latestVersion.textContent = latestStableRelease.tag_name;
// If there is a pre-release, update the href attribute of the anchor tag
if (preReleases.length > 0) {
const latestPreRelease = preReleases[0];
// Compare the date of the latest pre-release with the date of the latest stable release
const preReleaseDate = new Date(latestPreRelease.published_at);
const stableReleaseDate = new Date(latestStableRelease.published_at);
// If the pre-release is newer, update the href attribute of the anchor tag
if (preReleaseDate > stableReleaseDate) {
betaButton.href = latestPreRelease.html_url;
betaVersion.textContent = latestPreRelease.tag_name;
betaButton.classList.remove('d-none');
} else {
// If the pre-release is older, hide the button
betaButton.classList.add('d-none');
}
} else {
// If there is no pre-release, hide the button
betaButton.classList.add('d-none');
}
}
});
// Fetch clients from app directory
fetch('https://app.lizardbyte.dev/app-directory/sunshine.json')
.then(response => response.json())
.then(data => {
const clientsContainer = document.getElementById('clients-container');
if (!clientsContainer) return;
const apps = data.apps || [];
apps.forEach(app => {
let iconsHtml = '';
// Dynamic generation from JSON icons array
if (app.icons && Array.isArray(app.icons)) {
app.icons.forEach(icon => {
iconsHtml += `<img ${icon.invert ? 'class="invert"' : ''} src="${icon.src}" alt="${icon.alt}"/>`;
});
}
const typeBadge = app.official
? '<span class="badge text-bg-info rounded-pill">Official</span>'
: '<span class="badge text-bg-warning rounded-pill">Community</span>';
let downloadsHtml = '';
// Dynamic generation from JSON downloads array
if (app.downloads && Array.isArray(app.downloads)) {
app.downloads.forEach((download, index) => {
const isLast = index === app.downloads.length - 1;
const pbClass = isLast ? '' : ' pb-3';
if (download.img) {
let styleAttr = '';
let heightAttr = '40';
if (download.img.includes('play.google.com') || download.img.includes('amazon-appstore') || download.img.includes('fdroid')) {
heightAttr = '60';
}
if (download.img.includes('amazon-appstore')) {
styleAttr = 'style="padding: 10px;"';
}
downloadsHtml += `
<div class="${pbClass.trim()}">
<a href="${download.url}" target="_blank">
<img alt="${download.label}"
src="${download.img}"
height="${heightAttr}"
${styleAttr}/>
</a>
</div>
`;
} else {
let btnClass = 'btn btn-info';
let iconHtml = '<i class="fas fa-download"></i> ';
if (download.url && download.url.includes('github.com')) {
iconHtml = '<i class="fab fa-github"></i> ';
}
downloadsHtml += `
<div class="${pbClass.trim()}">
<a href="${download.url}" target="_blank" class="${btnClass}">
${iconHtml}${download.label}
</a>
</div>
`;
}
});
}
const projectLink = (app.links && app.links.github) || (app.links && app.links.website) || '#';
const clientHtml = `
<div class="col-md-6 col-lg-4 mb-5">
<div class="card-custom h-100 shadow border-0 rounded-0 d-flex flex-column">
<div class="card-body p-4">
<div class="d-flex align-items-center">
<div class="icon">
${iconsHtml}
</div>
<div class="ms-3">
<h5 class="fw-bolder mb-0">
<a href="${projectLink}" target="_blank" class="text-decoration-none project-card-link crowdin-ignore">
${app.name}
</a>
</h5>
</div>
<div class="ms-auto">
${typeBadge}
</div>
</div>
</div>
${downloadsHtml ? \`
<div class="card-footer p-3 px-4">
\${downloadsHtml}
</div>\` : ''}
</div>
</div>
`;
clientsContainer.innerHTML += clientHtml;
});
});
</script>