Skip to content

Commit 24c90a0

Browse files
authored
docs: switch theme and style refresh (#209)
* add furo theme * switch theme to furo * css for custom sidebar * remove unnecessary images * removed unnecessary fonts * fix logo background * hide package name * add favico, tweak colors * copyright 2023 * update copyright years * update hover colors * fix title tab
1 parent 7fb3797 commit 24c90a0

13 files changed

+1316
-23
lines changed

Diff for: docs/requirements.txt

+13-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ alabaster==0.7.13
88
# via sphinx
99
babel==2.11.0
1010
# via sphinx
11+
beautifulsoup4==4.11.2
12+
# via furo
1113
certifi==2022.12.7
1214
# via
1315
# -r requirements/build.in
@@ -18,6 +20,8 @@ docutils==0.18.1
1820
# via
1921
# sphinx
2022
# sphinx-rtd-theme
23+
furo==2022.12.7
24+
# via -r requirements/build.in
2125
idna==3.4
2226
# via requests
2327
imagesize==1.4.1
@@ -31,17 +35,25 @@ markupsafe==2.1.2
3135
packaging==23.0
3236
# via sphinx
3337
pygments==2.14.0
34-
# via sphinx
38+
# via
39+
# furo
40+
# sphinx
3541
pytz==2022.7.1
3642
# via babel
3743
requests==2.28.2
3844
# via sphinx
3945
snowballstemmer==2.2.0
4046
# via sphinx
47+
soupsieve==2.3.2.post1
48+
# via beautifulsoup4
4149
sphinx==6.1.3
4250
# via
4351
# -r requirements/build.in
52+
# furo
53+
# sphinx-basic-ng
4454
# sphinx-rtd-theme
55+
sphinx-basic-ng==1.0.0b1
56+
# via furo
4557
sphinx-rtd-theme==1.2.0rc3
4658
# via -r requirements/build.in
4759
sphinxcontrib-applehelp==1.0.4

Diff for: docs/source/_static/images/logo-dark-mode.svg

+43
Loading

Diff for: docs/source/_static/images/logo-light-mode.svg

+44
Loading

Diff for: docs/source/_static/images/unstructured_small.png

94.3 KB
Loading

Diff for: docs/source/_static/js/githubStargazers.js

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
document.addEventListener("DOMContentLoaded", function () {
2+
const githubStarsComponents = document.getElementsByClassName("github-stars"),
3+
url = "https://api.github.com/repos/unstructured-io/unstructured";
4+
5+
const createNode = (element) => {
6+
return document.createElement(element);
7+
};
8+
const append = (parent, el) => {
9+
return parent.appendChild(el);
10+
};
11+
12+
fetch(url)
13+
.then((response) => {
14+
return response.json();
15+
})
16+
.then((data) => {
17+
let leftLink = createNode("a");
18+
let rightLink = createNode("a");
19+
leftLink.classList.add("--left");
20+
rightLink.classList.add("--right");
21+
leftLink.target = "_blank";
22+
leftLink.href = `${data.html_url}`;
23+
leftLink.innerHTML = `<svg width="19" height="19" viewBox="0 0 19 19" fill="none" xmlns="http://www.w3.org/2000/svg">
24+
<path d="M8.43359 0.0678272C4.05472 0.5578 0.532587 4.1836 0.0566223 8.59336C-0.419342 13.1991 2.15086 17.3149 6.05377 18.8828C6.33935 18.9808 6.62493 18.7848 6.62493 18.3928V16.8249C6.62493 16.8249 6.24416 16.9229 5.76819 16.9229C4.43549 16.9229 3.86434 15.747 3.76914 15.061C3.67395 14.669 3.48357 14.375 3.19799 14.081C2.91241 13.9831 2.81721 13.9831 2.81721 13.8851C2.81721 13.6891 3.10279 13.6891 3.19799 13.6891C3.76914 13.6891 4.24511 14.375 4.43549 14.669C4.91146 15.453 5.48261 15.649 5.76819 15.649C6.14896 15.649 6.43454 15.551 6.62493 15.453C6.72012 14.767 7.0057 14.081 7.57686 13.6891C5.38742 13.1991 3.76914 11.9252 3.76914 9.76929C3.76914 8.69135 4.24511 7.61341 4.91146 6.82945C4.81626 6.63346 4.72107 6.14349 4.72107 5.45753C4.72107 5.06555 4.72107 4.47758 5.00665 3.88962C5.00665 3.88962 6.33935 3.88962 7.67205 5.16355C8.14802 4.96756 8.81437 4.86956 9.48071 4.86956C10.1471 4.86956 10.8134 4.96756 11.3846 5.16355C12.6221 3.88962 14.05 3.88962 14.05 3.88962C14.2404 4.47758 14.2404 5.06555 14.2404 5.45753C14.2404 6.24149 14.1452 6.63346 14.05 6.82945C14.7163 7.61341 15.1923 8.59335 15.1923 9.76929C15.1923 11.9252 13.574 13.1991 11.3846 13.6891C11.9557 14.179 12.3365 15.061 12.3365 15.9429V18.4908C12.3365 18.7848 12.6221 19.0788 13.0029 18.9808C16.525 17.5109 19 13.9831 19 9.86728C19 3.98761 14.1452 -0.618135 8.43359 0.0678272Z" fill="white"/>
25+
</svg> Star`;
26+
rightLink.target = "_blank";
27+
rightLink.href = `${data.html_url}/stargazers`;
28+
rightLink.innerHTML = data.stargazers_count.toLocaleString('en-US');
29+
Array.from(githubStarsComponents).forEach((component, index) => {
30+
append(component, leftLink.cloneNode(true));
31+
append(component, rightLink.cloneNode(true));
32+
});
33+
})
34+
.catch((error) => {
35+
console.log(error);
36+
});
37+
});

0 commit comments

Comments
 (0)