-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathabout.html
More file actions
160 lines (158 loc) · 4.74 KB
/
about.html
File metadata and controls
160 lines (158 loc) · 4.74 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="color-scheme" content="light dark">
<title>About</title>
<style>
:root {
color-scheme: light dark;
--bg: #ffffff;
--fg: #111111;
--muted: #555555;
--border: #dddddd;
--button-bg: #f3f4f6;
--button-fg: #111111;
--accent: #1a73e8;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #1e1f21;
--fg: #e8eaed;
--muted: #a0a4ab;
--border: #3a3b3e;
--button-bg: #2a2b2e;
--button-fg: #e8eaed;
--accent: #8ab4f8;
}
}
html, body {
margin: 0;
padding: 0;
background: var(--bg);
color: var(--fg);
font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
height: 100vh;
width: 100vw;
}
.container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 8px;
text-align: center;
min-height: 100vh;
}
h1 {
margin: 0;
font-size: 32px;
font-weight: 600;
}
p {
margin: 0;
font-size: 26px;
color: var(--muted);
}
a {
color: var(--accent);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.actions {
margin-top: 37px;
display: flex;
justify-content: flex-end;
gap: 8px;
}
button {
padding: 6px 10px;
border-radius: 6px;
border: 1px solid var(--border);
background: var(--button-bg);
color: var(--button-fg);
cursor: pointer;
}
button:hover {
filter: brightness(1.05);
}
.small {
font-size: 24px;
}
</style>
<script>
(function() {
function getParam(name, fallback) {
try {
const params = new URLSearchParams(location.search);
return params.get(name) || fallback;
} catch (_) {
return fallback;
}
}
window.addEventListener('DOMContentLoaded', function() {
const name = getParam('name', 'Grok Desktop');
const version = getParam('version', '0.0.0');
const repo = getParam('repo', 'https://github.com/AnRkey/Grok-Desktop');
const developer = getParam('developer', '');
const contact = getParam('contact', '');
document.getElementById('appName').textContent = name;
document.getElementById('version').textContent = 'Version: ' + version;
(function() {
const devEl = document.getElementById('developerLink');
let devName = developer;
if (!devName) {
try {
const m = repo.match(/^https?:\/\/github\.com\/([^/]+)/i);
if (m && m[1]) devName = m[1];
} catch (_) {}
}
if (devEl) {
if (devName) devEl.textContent = devName;
const href = devName ? ('https://github.com/' + devName) : 'https://github.com';
devEl.href = href;
devEl.setAttribute('target', '_blank');
devEl.setAttribute('rel', 'noopener');
}
})();
const link = document.getElementById('repoLink');
link.href = repo;
// The main process intercepts navigation/window open and opens the URL externally
// Setting target=_blank helps trigger that handler for best compatibility
link.setAttribute('target', '_blank');
link.setAttribute('rel', 'noopener');
const contactLink = document.getElementById('contactLink');
let contactHref = contact;
if (!contactHref) {
// Derive contact from repo owner
try {
const m = repo.match(/^https?:\/\/github\.com\/([^/]+)/i);
if (m && m[1]) contactHref = 'https://github.com/' + m[1];
} catch (_) {}
}
if (contactHref) {
contactLink.href = contactHref;
contactLink.setAttribute('target', '_blank');
contactLink.setAttribute('rel', 'noopener');
}
});
})();
</script>
<!-- Keep styles/scripts light; page should render fast as a modal -->
<!-- This page adapts to OS theme via prefers-color-scheme and color-scheme -->
</head>
<body>
<div class="container">
<h1 id="appName">Grok Desktop</h1>
<p class="small" id="version">Version: 0.0.0</p>
<p class="small" id="developerLine">Developer: <a id="developerLink" href="#">AnRkey</a></p>
<p><a id="repoLink" href="#">GitHub Repository</a></p>
<p><a id="contactLink" href="#">Discussion Forums</a></p>
</div>
<!-- No external resources to keep it robust offline -->
<!-- End -->
</body>
</html>