Skip to content

Commit 1c0c06c

Browse files
committed
Deploying to gh-pages from @ f4a2f67 🚀
0 parents  commit 1c0c06c

File tree

12 files changed

+1359
-0
lines changed

12 files changed

+1359
-0
lines changed

artifacts.js

+245
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
/* Code modified from the blender website
2+
* https://www.blender.org/wp-content/themes/bthree/assets/js/get_os.js?x82196
3+
*/
4+
5+
let options = {
6+
windows64: "x86_64-pc-windows",
7+
windows32: "i686-pc-windows",
8+
windowsArm: "aarch64-pc-windows",
9+
10+
mac64: "x86_64-apple",
11+
mac32: "i686-apple",
12+
macSilicon: "aarch64-apple",
13+
14+
linux64: "x86_64-unknown-linux",
15+
linux32: "i686-unknown-linux",
16+
linuxArm: "aarch64-unknown-linux",
17+
18+
// ios: "ios",
19+
// android: "linux-android",
20+
// freebsd: "freebsd",
21+
};
22+
23+
function isAppleSilicon() {
24+
try {
25+
var glcontext = document.createElement("canvas").getContext("webgl");
26+
var debugrenderer = glcontext
27+
? glcontext.getExtension("WEBGL_debug_renderer_info")
28+
: null;
29+
var renderername =
30+
(debugrenderer &&
31+
glcontext.getParameter(debugrenderer.UNMASKED_RENDERER_WEBGL)) ||
32+
"";
33+
if (renderername.match(/Apple M/) || renderername.match(/Apple GPU/)) {
34+
return true;
35+
}
36+
37+
return false;
38+
} catch (e) {}
39+
}
40+
41+
function getOS() {
42+
var OS = options.windows64.default;
43+
var userAgent = navigator.userAgent;
44+
var platform = navigator.platform;
45+
46+
if (navigator.appVersion.includes("Win")) {
47+
if (
48+
!userAgent.includes("Windows NT 5.0") &&
49+
!userAgent.includes("Windows NT 5.1") &&
50+
(userAgent.indexOf("Win64") > -1 ||
51+
platform == "Win64" ||
52+
userAgent.indexOf("x86_64") > -1 ||
53+
userAgent.indexOf("x86_64") > -1 ||
54+
userAgent.indexOf("amd64") > -1 ||
55+
userAgent.indexOf("AMD64") > -1 ||
56+
userAgent.indexOf("WOW64") > -1)
57+
) {
58+
OS = options.windows64;
59+
} else {
60+
if (
61+
window.external &&
62+
window.external.getHostEnvironmentValue &&
63+
window.external
64+
.getHostEnvironmentValue("os-architecture")
65+
.includes("ARM64")
66+
) {
67+
OS = options.windowsArm;
68+
} else {
69+
try {
70+
var canvas = document.createElement("canvas");
71+
var gl = canvas.getContext("webgl");
72+
73+
var debugInfo = gl.getExtension("WEBGL_debug_renderer_info");
74+
var renderer = gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL);
75+
if (renderer.includes("Qualcomm")) OS = options.windowsArm;
76+
} catch (e) {}
77+
}
78+
}
79+
}
80+
81+
//MacOS, MacOS X, macOS
82+
if (navigator.appVersion.includes("Mac")) {
83+
if (
84+
navigator.userAgent.includes("OS X 10.5") ||
85+
navigator.userAgent.includes("OS X 10.6")
86+
) {
87+
OS = options.mac32;
88+
} else {
89+
OS = options.mac64;
90+
91+
const isSilicon = isAppleSilicon();
92+
if (isSilicon) {
93+
OS = options.macSilicon;
94+
}
95+
}
96+
}
97+
98+
// linux
99+
if (platform.includes("Linux")) {
100+
OS = options.linux64;
101+
// FIXME: Can we find out whether linux 32-bit or ARM are used?
102+
}
103+
104+
// if (
105+
// userAgent.includes("iPad") ||
106+
// userAgent.includes("iPhone") ||
107+
// userAgent.includes("iPod")
108+
// ) {
109+
// OS = options.ios;
110+
// }
111+
// if (platform.toLocaleLowerCase().includes("freebsd")) {
112+
// OS = options.freebsd;
113+
// }
114+
115+
return OS;
116+
}
117+
118+
let os = getOS();
119+
window.os = os;
120+
121+
// Unhide and hydrate selector with events
122+
const archSelect = document.querySelector(".arch-select");
123+
if (archSelect) {
124+
archSelect.classList.remove("hidden");
125+
const selector = document.querySelector("#install-arch-select");
126+
if (selector) {
127+
selector.addEventListener("change", onArchChange);
128+
}
129+
}
130+
131+
// Hydrate tab buttons with events
132+
Array.from(document.querySelectorAll(".install-tab[data-id]")).forEach((tab) => {
133+
tab.addEventListener("click", onTabClick);
134+
});
135+
136+
function onArchChange(evt) {
137+
// Get target
138+
const target = evt.currentTarget.value;
139+
// Find corresponding installer lists
140+
const newContentEl = document.querySelector(`.arch[data-arch=${target}]`);
141+
const oldContentEl = document.querySelector(`.arch[data-arch]:not(.hidden)`);
142+
// Hide old content element (if applicable)
143+
if (oldContentEl) {
144+
oldContentEl.classList.add("hidden");
145+
}
146+
// Show new content element
147+
newContentEl.classList.remove("hidden");
148+
// Show the first tab's content if nothing was selected before
149+
if (newContentEl.querySelectorAll(".install-tab.selected").length === 0) {
150+
const firstContentChild = newContentEl.querySelector(".install-content:first-of-type");
151+
const firstTabChild = newContentEl.querySelector(".install-tab:first-of-type");
152+
firstContentChild.classList.remove("hidden");
153+
if (firstTabChild) {
154+
firstTabChild.classList.add("selected");
155+
}
156+
}
157+
// Hide "no OS detected" message
158+
const noDetectEl = document.querySelector(".no-autodetect");
159+
noDetectEl.classList.add("hidden");
160+
// Hide Mac hint
161+
document.querySelector(".mac-switch").classList.add("hidden");
162+
}
163+
164+
function onTabClick(evt) {
165+
// Get target and ID
166+
const {triple, id} = evt.currentTarget.dataset;
167+
if (triple) {
168+
// Find corresponding content elements
169+
const newContentEl = document.querySelector(`.install-content[data-id="${String(id)}"][data-triple=${triple}]`);
170+
const oldContentEl = document.querySelector(`.install-content[data-triple=${triple}][data-id]:not(.hidden)`);
171+
// Find old tab to unselect
172+
const oldTabEl = document.querySelector(`.install-tab[data-triple=${triple}].selected`);
173+
// Hide old content element
174+
if (oldContentEl && oldTabEl) {
175+
oldContentEl.classList.add("hidden");
176+
oldTabEl.classList.remove("selected");
177+
}
178+
179+
// Unhide new content element
180+
newContentEl.classList.remove("hidden");
181+
// Select new tab element
182+
evt.currentTarget.classList.add("selected");
183+
}
184+
}
185+
186+
const allPlatforms = Array.from(document.querySelectorAll(`.arch[data-arch]`));
187+
let hit = allPlatforms.find(
188+
(a) => {
189+
// Show Intel Mac downloads if no M1 Mac downloads are available
190+
if (
191+
a.attributes["data-arch"].value.includes(options.mac64) &&
192+
os.includes(options.macSilicon) &&
193+
!allPlatforms.find(p => p.attributes["data-arch"].value.includes(options.macSilicon))) {
194+
// Unhide hint
195+
document.querySelector(".mac-switch").classList.remove("hidden");
196+
return true;
197+
}
198+
return a.attributes["data-arch"].value.includes(os);
199+
}
200+
);
201+
202+
if (hit) {
203+
hit.classList.remove("hidden");
204+
const selectEl = document.querySelector("#install-arch-select");
205+
selectEl.value = hit.dataset.arch;
206+
const firstContentChild = hit.querySelector(".install-content:first-of-type");
207+
const firstTabChild = hit.querySelector(".install-tab:first-of-type");
208+
firstContentChild.classList.remove("hidden");
209+
if (firstTabChild) {
210+
firstTabChild.classList.add("selected");
211+
}
212+
} else {
213+
const noDetectEl = document.querySelector(".no-autodetect");
214+
if (noDetectEl) {
215+
const noDetectElDetails = document.querySelector(".no-autodetect-details");
216+
if (noDetectElDetails) {
217+
noDetectElDetails.innerHTML = `We detected you're on ${os} but there don't seem to be installers for that. `
218+
}
219+
noDetectEl.classList.remove("hidden");
220+
}
221+
}
222+
223+
let copyButtons = Array.from(document.querySelectorAll("[data-copy]"));
224+
if (copyButtons.length) {
225+
copyButtons.forEach(function (element) {
226+
element.addEventListener("click", () => {
227+
navigator.clipboard.writeText(element.attributes["data-copy"].value);
228+
});
229+
});
230+
}
231+
232+
// Toggle for pre releases
233+
const checkbox = document.getElementById("show-prereleases");
234+
235+
if (checkbox) {
236+
checkbox.addEventListener("click", () => {
237+
const all = document.getElementsByClassName("pre-release");
238+
239+
if (all) {
240+
for (var item of all) {
241+
item.classList.toggle("hidden");
242+
}
243+
}
244+
});
245+
}

changelog.rss

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>ellama Changelog</title><link>http://127.0.0.1:7979/changelog</link><description>Changelog information for ellama</description><category domain="https://github.com/zeozeozeo/ellama">ellama Changelog</category><atom:link href="http://127.0.0.1:7979/changelog.rss" rel="self"/><item><title>0.4.0</title><link>http://127.0.0.1:7979/changelog/0.4.0</link><category domain="https://github.com/zeozeozeo/ellama">ellama Changelog</category><guid>http://127.0.0.1:7979/changelog/0.4.0</guid><content:encoded><![CDATA[]]></content:encoded></item><item><title>0.3.1</title><link>http://127.0.0.1:7979/changelog/0.3.1</link><category domain="https://github.com/zeozeozeo/ellama">ellama Changelog</category><guid>http://127.0.0.1:7979/changelog/0.3.1</guid><content:encoded><![CDATA[]]></content:encoded></item><item><title>0.3.0</title><link>http://127.0.0.1:7979/changelog/0.3.0</link><category domain="https://github.com/zeozeozeo/ellama">ellama Changelog</category><guid>http://127.0.0.1:7979/changelog/0.3.0</guid><content:encoded><![CDATA[]]></content:encoded></item><item><title>0.2.0</title><link>http://127.0.0.1:7979/changelog/0.2.0</link><category domain="https://github.com/zeozeozeo/ellama">ellama Changelog</category><guid>http://127.0.0.1:7979/changelog/0.2.0</guid><content:encoded><![CDATA[]]></content:encoded></item><item><title>0.1.1</title><link>http://127.0.0.1:7979/changelog/0.1.1</link><category domain="https://github.com/zeozeozeo/ellama">ellama Changelog</category><guid>http://127.0.0.1:7979/changelog/0.1.1</guid><content:encoded><![CDATA[]]></content:encoded></item><item><title>0.1.0</title><link>http://127.0.0.1:7979/changelog/0.1.0</link><category domain="https://github.com/zeozeozeo/ellama">ellama Changelog</category><guid>http://127.0.0.1:7979/changelog/0.1.0</guid><content:encoded><![CDATA[]]></content:encoded></item></channel></rss>

changelog/0.1.0/index.html

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
<!DOCTYPE html>
2+
<html lang="en" id="oranda" class="dark">
3+
<head>
4+
<title>ellama</title>
5+
6+
<meta property="og:url" content="https://github.com/zeozeozeo/ellama" />
7+
8+
9+
<link rel="icon" href="/favicon.ico" />
10+
11+
<meta charset="utf-8" />
12+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
13+
14+
<meta name="description" content="Friendly interface to chat with an Ollama instance." />
15+
<meta property="og:description" content="Friendly interface to chat with an Ollama instance." />
16+
17+
<meta property="og:type" content="website" />
18+
<meta property="og:title" content="ellama" />
19+
20+
21+
22+
<meta http-equiv="Permissions-Policy" content="interest-cohort=()" />
23+
<link rel="stylesheet" href="/oranda-v0.6.1.css" />
24+
25+
26+
</head>
27+
<body>
28+
<div class="container">
29+
<div class="page-body">
30+
31+
<div class="repo_banner">
32+
<a href="https://github.com/zeozeozeo/ellama">
33+
<div class="github-icon" aria-hidden="true"></div>
34+
Check out our GitHub!
35+
</a>
36+
</div>
37+
38+
39+
<main>
40+
<header>
41+
42+
<h1 class="title">ellama</h1>
43+
44+
<nav class="nav">
45+
<ul>
46+
<li><a href="/">Home</a></li>
47+
48+
49+
50+
51+
52+
53+
54+
55+
56+
57+
<li><a href="/changelog/">Changelog</a></li>
58+
59+
</ul>
60+
</nav>
61+
62+
</header>
63+
64+
65+
<div>
66+
<h1>0.1.0</h1>
67+
<div class="releases-body">
68+
69+
70+
<section class="release ">
71+
72+
<div class="release-info">
73+
<span class="flex items-center gap-2">
74+
<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='currentColor' class='w-6 h-6'>
75+
<path stroke-linecap='round' stroke-linejoin='round' d='M9.568 3H5.25A2.25 2.25 0 003 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.699.699 1.78.872 2.607.33a18.095 18.095 0 005.223-5.223c.542-.827.369-1.908-.33-2.607L11.16 3.66A2.25 2.25 0 009.568 3z' />
76+
<path stroke-linecap='round' stroke-linejoin='round' d='M6 6h.008v.008H6V6z' /></svg>
77+
0.1.0
78+
</span>
79+
<span class="flex items-center gap-2">
80+
81+
<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='currentColor' class='w-6 h-6'><path stroke-linecap='round' stroke-linejoin='round' d='M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5' /></svg>
82+
May 1 2024 at 16:36 UTC
83+
84+
</span>
85+
</div>
86+
<div class="release-body">
87+
88+
</div>
89+
</section>
90+
</div>
91+
</div>
92+
93+
</main>
94+
</div>
95+
96+
<footer>
97+
98+
<a href="https://github.com/zeozeozeo/ellama"><div class="github-icon" aria-hidden="true"></div></a>
99+
100+
<span>
101+
ellama, MIT OR Apache-2.0
102+
</span>
103+
</footer>
104+
</div>
105+
106+
107+
108+
109+
110+
</body>
111+
</html>

0 commit comments

Comments
 (0)