imfreedom/docs.imfreedom.org
Clone
Add a landing page based off of the docs.gtk.org site
--- a/Dockerfile Sun Oct 10 04:00:33 2021 -0500
+++ b/Dockerfile Sun Oct 10 04:03:47 2021 -0500
@@ -1,4 +1,5 @@
+FROM docker.io/nginx:alpine +COPY static/ /usr/share/nginx/html/ COPY docs/ /usr/share/nginx/html/
Binary file static/assets/pidgin-earthday.png has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/static/fonts.css Sun Oct 10 04:03:47 2021 -0500
@@ -0,0 +1,181 @@
+ * SPDX-FileCopyrightText: 2021 GNOME Foundation + * SPDX-License-Identifier: Apache-2.0 OR GPL-3.0-or-later + * RedHat Fonts taken from https://github.com/RedHatOfficial/RedHatFont + * License: SIL Open Font License 1.1 http://scripts.sil.org/OFL + * License: SIL Open Font License 1.1 https://scripts.sil.org/OFL + font-family: "Red Hat Display"; + src: local('RedHatDisplayWeb'), + url("fonts/RedHatDisplay-Regular.woff2") format("woff2"), + url("fonts/RedHatDisplay-Regular.woff") format("woff"); + font-display: fallback; + font-family: "Red Hat Display"; + src: local('RedHatDisplayWeb'), + url("fonts/RedHatDisplay-RegularItalic.woff2") format("woff2"), + url("fonts/RedHatDisplay-RegularItalic.woff") format("woff"); + font-display: fallback; + font-family: "Red Hat Display"; + src: local('RedHatDisplayWeb'), + url("fonts/RedHatDisplay-Medium.woff2") format("woff2"), + url("fonts/RedHatDisplay-Medium.woff") format("woff"); + font-display: fallback; + font-family: "Red Hat Display"; + src: local('RedHatDisplayWeb'), + url("fonts/RedHatDisplay-MediumItalic.woff2") format("woff2"), + url("fonts/RedHatDisplay-MediumItalic.woff") format("woff"); + font-display: fallback; + font-family: "Red Hat Display"; + src: local('RedHatDisplayWeb'), + url("fonts/RedHatDisplay-Bold.woff2") format("woff2"), + url("fonts/RedHatDisplay-Bold.woff") format("woff"); + font-display: fallback; + font-family: "Red Hat Display"; + src: local('RedHatDisplayWeb'), + url("fonts/RedHatDisplay-BoldItalic.woff2") format("woff2"), + url("fonts/RedHatDisplay-BoldItalic.woff") format("woff"); + font-display: fallback; + font-family: "Red Hat Display"; + src: local('RedHatDisplayWeb'), + url("fonts/RedHatDisplay-Black.woff2") format("woff2"), + url("fonts/RedHatDisplay-Black.woff") format("woff"); + font-display: fallback; + font-family: "Red Hat Display"; + src: local('RedHatDisplayWeb'), + url("fonts/RedHatDisplay-BlackItalic.woff2") format("woff2"), + url("fonts/RedHatDisplay-BlackItalic.woff") format("woff"); + font-display: fallback; + font-family: "Red Hat Text"; + src: local('RedHatTextWeb'), + url("fonts/RedHatText-Regular.woff2") format("woff2"), + url("fonts/RedHatText-Regular.woff") format("woff"); + font-display: fallback; + font-family: "Red Hat Text"; + src: local('RedHatTextWeb'), + url("fonts/RedHatText-Italic.woff2") format("woff2"), + url("fonts/RedHatText-Italic.woff") format("woff"); + font-display: fallback; + font-family: "Red Hat Text"; + src: local('RedHatTextWeb'), + url("fonts/RedHatText-Medium.woff2") format("woff2"), + url("fonts/RedHatText-Medium.woff") format("woff"); + font-display: fallback; + font-family: "Red Hat Text"; + src: local('RedHatTextWeb'), + url("fonts/RedHatText-MediumItalic.woff2") format("woff2"), + url("fonts/RedHatText-MediumItalic.woff") format("woff"); + font-display: fallback; + font-family: "Red Hat Text"; + src: local('RedHatTextWeb'), + url("fonts/RedHatText-Bold.woff2") format("woff2"), + url("fonts/RedHatText-Bold.woff") format("woff"); + font-display: fallback; + font-family: "Red Hat Text"; + src: local('RedHatTextWeb'), + url("fonts/RedHatText-BoldItalic.woff2") format("woff2"), + url("fonts/RedHatText-BoldItalic.woff") format("woff"); + font-display: fallback; +/* Do not fall back to locally installed SourceCodePro, as there are + * known bad copies being distributed to this day + font-family: 'Source Code Pro'; + src: url("fonts/SourceCodePro-Regular.ttf.woff") format('woff'); + font-family: 'Source Code Pro'; + src: url("fonts/SourceCodePro-It.ttf.woff") format('woff'); + font-family: 'Source Code Pro'; + src: url("fonts/SourceCodePro-Semibold.ttf.woff") format('woff'); Binary file static/fonts/RedHatDisplay-Black.woff has changed
Binary file static/fonts/RedHatDisplay-Black.woff2 has changed
Binary file static/fonts/RedHatDisplay-BlackItalic.woff has changed
Binary file static/fonts/RedHatDisplay-BlackItalic.woff2 has changed
Binary file static/fonts/RedHatDisplay-Bold.woff has changed
Binary file static/fonts/RedHatDisplay-Bold.woff2 has changed
Binary file static/fonts/RedHatDisplay-BoldItalic.woff has changed
Binary file static/fonts/RedHatDisplay-BoldItalic.woff2 has changed
Binary file static/fonts/RedHatDisplay-Italic.woff has changed
Binary file static/fonts/RedHatDisplay-Italic.woff2 has changed
Binary file static/fonts/RedHatDisplay-Medium.woff has changed
Binary file static/fonts/RedHatDisplay-Medium.woff2 has changed
Binary file static/fonts/RedHatDisplay-MediumItalic.woff has changed
Binary file static/fonts/RedHatDisplay-MediumItalic.woff2 has changed
Binary file static/fonts/RedHatDisplay-Regular.woff has changed
Binary file static/fonts/RedHatDisplay-Regular.woff2 has changed
Binary file static/fonts/RedHatText-Bold.woff has changed
Binary file static/fonts/RedHatText-Bold.woff2 has changed
Binary file static/fonts/RedHatText-BoldItalic.woff has changed
Binary file static/fonts/RedHatText-BoldItalic.woff2 has changed
Binary file static/fonts/RedHatText-Italic.woff has changed
Binary file static/fonts/RedHatText-Italic.woff2 has changed
Binary file static/fonts/RedHatText-Medium.woff has changed
Binary file static/fonts/RedHatText-Medium.woff2 has changed
Binary file static/fonts/RedHatText-MediumItalic.woff has changed
Binary file static/fonts/RedHatText-MediumItalic.woff2 has changed
Binary file static/fonts/RedHatText-Regular.woff has changed
Binary file static/fonts/RedHatText-Regular.woff2 has changed
Binary file static/fonts/SourceCodePro-It.ttf.woff has changed
Binary file static/fonts/SourceCodePro-Regular.ttf.woff has changed
Binary file static/fonts/SourceCodePro-Semibold.ttf.woff has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/static/index.html Sun Oct 10 04:03:47 2021 -0500
@@ -0,0 +1,170 @@
+SPDX-FileCopyrightText: 2021 GNOME Foundation +SPDX-License-Identifier: LGPL-2.1-or-later + <title>IM Freedom Documentation</title> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta charset="utf-8" /> + <meta property="og:site_name" content="https://docs.imfreedom.org"/> + <meta property="og:title" content="IM Freedom Documentation"/> + <meta property="og:url" content="https://docs.imfreedom.org"/> + <meta property="og:type" content="website"/> + <meta property="og:description" content="API documentation for IM Freedom projects"/> + <meta name="twitter:title" content="API documentation for IM Freedom projects"/> + <meta name="twitter:url" content="https://docs.imfreedom.org"/> + <meta name="twitter:card" content="summary"/> + <link rel="canonical" href="https://docs.imfreedom.org"/> + <link rel="stylesheet" href="style.css" type="text/css" /> + <script src="main.js"></script> + <!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]--> + <div id="body-wrapper" tabindex="-1"> + <img src="assets/pidgin-earthday.png" class="logo"/> + <a href="#stable">Stable</a> + <a href="#development">Development</a> + <button id="btn-to-top" class="hidden"><span class="up-arrow"></span></button> + <section id="main" class="content"> + <h1>IM Freedom Documentation</h1> + <div class="toggle-wrapper"> + <a href="#stable" class="anchor"></a> + <h5 id="pidgin">Pidgin</h5> + <p>Pidgin is the current stable release of Pidgin Universal + Messenger which is a <a href="https://gtk.org/">GTK</a> based user + interface built on top of <a href="#purple">libpurple</a>.</p> + <p><a href="https://docs.imfreedom.org/pidgin2/group__pidgin.html"> + Pidgin API reference</a></p> + <h5 id="purple">libpurple</h5> + <p>libpurple is intended to be the core of an IM program. + <a href="#pidgin">Pidgin</a> is a <a href="https://gtk.org/">GTK</a> + frontend to libpurple, and <a href="#finch">Finch</a> is an ncurses + frontend built using <a href="#gnt">libgnt</a>.</p> + <p><a href="https://docs.imfreedom.org/pidgin2/group__core.html"> + libpurple API reference</a></p> + <h5 id="finch">Finch</h5> + <p>Finch is the current stable release of Finch Universal Messenger + which is a <a href="#gnt">libgnt</a> based user interface built on + top of <a href="#purple">libpurple</a>.</p> + <p><a href="https://docs.imfreedom.org/pidgin2/group__finch.html"> + Finch API reference</a></p> + <h5 id="gnt">libgnt</h5> + <p>GNT (GLib Ncurses Toolkit) is an ncurses toolkit for creating + text-mode graphical user interfaces in a fast and easy way. It is the + widget library for <a href="#finch">Finch</a>.</p> + <p><a href="https://docs.imfreedom.org/gnt2/"> + libgnt API reference</a></p> + <div class="toggle-wrapper"> + <h4 id="development" style="display:flex;"> + <a href="#development" class="anchor"></a> + <h5 id="pidgin3">Pidgin 3</h5> + <p>Pidgin 3 is the current development version of Pidgin Universal + Messenger which is a <a href="https://gtk.org/">GTK</a> based user + interface built on top of <a href="#purple3">purple 3</a>.</p> + <p><a href="https://docs.imfreedom.org/pidgin3/"> + Pidgin 3 API reference</a></p> + <h5 id="purple3">Purple 3</h5> + <p>libpurple 3 is the current development version of the libpurple + universal messenger library.</p> + <p><a href="https://docs.imfreedom.org/purple3/"> + libpurple 3 API reference</a></p> + <h5 id="finch3">Finch 3</h5> + <p>Finch 3 is the current development version of Finch Universal + <p><a href="https://docs.imfreedom.org/finch3/"> + Finch 3 API reference</a></p> + <h5 id="gnt3">GNT 3</h5> + <p>GNT 3 is the current development release of libgnt (GLib Ncurses + <p><a href="https://docs.imfreedom.org/gnt3/"> + libgnt 3 API reference</a></p> + <h5 id="gplugin">GPlugin</h5> + <p>GPlugin is a plugin library for GLib based applications. + <a href="#purple3">purple 3</a> uses it for all things plugins.</p> + <p><a href="https://docs.imfreedom.org/gplugin/"> + GPlugin API reference</a></p> + <h5 id="talkatu">Talkatu</h5> + <p>Talkatu is a set of <a href="https://gtk.org/">GTK</a> widgets for + messaging. <a href="#pidgin3">Pidgin 3</a> uses it to have a modular + user interface that can be used by other messengers.</p> + <p><a href="https://docs.imfreedom.org/talkatu/"> + Talkatu API reference</a></p> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/static/main.js Sun Oct 10 04:03:47 2021 -0500
@@ -0,0 +1,140 @@
+// SPDX-FileCopyrightText: 2021 GNOME Foundation +// SPDX-License-Identifier: LGPL-2.1-or-later +// eslint-disable-next-line no-unused-vars +function hasClass(elem, className) { + return elem && elem.classList && elem.classList.contains(className); +// eslint-disable-next-line no-unused-vars +function addClass(elem, className) { + if (!elem || !elem.classList) { + elem.classList.add(className); +// eslint-disable-next-line no-unused-vars +function removeClass(elem, className) { + if (!elem || !elem.classList) { + elem.classList.remove(className); +function insertAfter(newNode, referenceNode) { + referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling); +function onEach(arr, func, reversed) { + if (arr && arr.length > 0 && func) { + var length = arr.length; + if (reversed !== true) { + for (i = 0; i < length; ++i) { + if (func(arr[i]) === true) { + for (i = length - 1; i >= 0; --i) { + if (func(arr[i]) === true) { +function onEachLazy(lazyArray, func, reversed) { + Array.prototype.slice.call(lazyArray), +// eslint-disable-next-line no-unused-vars +function hasOwnProperty(obj, property) { + return Object.prototype.hasOwnProperty.call(obj, property); +window.addEventListener("load", function() { + var main = document.getElementById("main"); + var btnToTop = document.getElementById("btn-to-top"); + function labelForToggleButton(isCollapsed) { + function createToggle(isCollapsed) { + var toggle = document.createElement("a"); + toggle.href = "javascript:void(0)"; + toggle.className = "collapse-toggle"; + toggle.innerHTML = "[<span class=\"inner\">" + + labelForToggleButton(isCollapsed) + function toggleClicked() { + if (hasClass(this, "collapsed")) { + removeClass(this, "collapsed"); + this.innerHTML = "[<span class=\"inner\">" + + labelForToggleButton(false) + onEachLazy(this.parentNode.getElementsByClassName("docblock"), function(e) { + removeClass(e, "hidden"); + addClass(this, "collapsed"); + this.innerHTML = "[<span class=\"inner\">" + + labelForToggleButton(true) + onEachLazy(this.parentNode.getElementsByClassName("docblock"), function(e) { + onEachLazy(document.getElementsByClassName("toggle-wrapper"), function(e) { + let sectionHeader = e.querySelector(".section-header"); + let fragmentMatches = sectionHeader !== null && location.hash === "#" + sectionHeader.getAttribute('id'); + collapsedByDefault = hasClass(e, "default-hide") && !fragmentMatches; + var toggle = createToggle(collapsedByDefault); + toggle.onclick = toggleClicked; + e.insertBefore(toggle, e.firstChild); + if (collapsedByDefault) { + addClass(toggle, "collapsed"); + onEachLazy(e.getElementsByClassName("docblock"), function(d) { + function scrollBackTop(e) { + function toggleScrollButton() { + if (window.scrollY < 400) { + addClass(btnToTop, "hidden"); + removeClass(btnToTop, "hidden"); + window.onscroll = toggleScrollButton; + btnToTop.onclick = scrollBackTop; --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/static/style.css Sun Oct 10 04:03:47 2021 -0500
@@ -0,0 +1,747 @@
+ * SPDX-FileCopyrightText: 2021 GNOME Foundation + * SPDX-License-Identifier: LGPL-2.1-or-later +@import url("fonts.css"); +/********************************* + *********************************/ + --text-color-muted: #999; + --primary: rgb(28, 118, 228); + --sidebar-primary: rgb(144, 194, 255); + --sidebar-selected-bg: var(--primary); + --sidebar-text-color: #fafafa; + --sidebar-padding: 1.5em; + /* boxes, e.g. code blocks */ + --box-bg: rgba(135, 135, 135, 0.085); + --box-padding: 0.75rem; + --box-margin: 0.75rem 0; + --box-text-color: #111; + --body-font-family: "Noto Serif",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; + --body-font-scale: 0.95; + --body-font-size: calc(var(--body-font-scale) * clamp(16px, 1vw, 20px)); + --body-font-weight: normal; + --monospace-font-family: "Source Code Pro", monospace; + --monospace-font-size: calc(0.86 * var(--body-font-size)); /* Monospace fonts are very different in terms of font-sizes. Adjust this value to scale it */ + --heading-font-family: "Red Hat Display", var(--body-font-family); + --heading-font-scale: 1.05; + --heading-small-font-family: var(--heading-font-family); + --heading-small-weight: 600; + --heading-small-font-scale: 1; + --heading-table-font-family: var(--heading-font-family); + --heading-table-weight: 600; + --heading-docblock-color: #6d6d6d; /* docblocks have headings from source comments. we want them to differ.*/ + --heading-docblock-scale: 0.9; /* docblocks have headings from source comments. we want them to differ.*/ + --symbol-font-family: var(--heading-font-family); + --symbol-font-weight: 500; + --symbol-font-scale: 1; + --table-font-size: 0.92em; /* Tables often contain lots information. It's better to scale them down a big to get more sutff fitted inside */ + --prefered-content-width: 90ch; /* The preferred width for the readable content */ +/********************************* + * DARK THEME (overrides) + *********************************/ + @media (prefers-color-scheme: dark) { + --primary: rgb(144, 194, 255); + --text-color-muted: #686868; + --sidebar-primary: rgb(144, 194, 255); + --sidebar-selected-bg: rgb(17, 112, 228); + --sidebar-text-color: #fafafa; + --box-bg: rgba(135, 135, 135, 0.1); + --box-text-color: #fff; + --heading-docblock-color: #b7b7b7; + /* fix dark theme syntax highlighting with a filter (for now) */ +/********************************* + *********************************/ + box-sizing: border-box; + background: var(--primary); + background: var(--primary); +::-webkit-scrollbar-thumb { + background: rgba(128, 128, 128, 0.6); +::-webkit-scrollbar-thumb:hover { + background: rgba(128, 128, 128, 1); +::-webkit-scrollbar-track { + background: rgba(128, 128, 128, 0.15); + scrollbar-width: initial; + font: 16px/1.5 var(--body-font-family); + font-weight: var(--body-font-weight); + font-size: var(--body-font-size); + -webkit-font-feature-settings: "kern", "liga"; + -moz-font-feature-settings: "kern", "liga"; + font-feature-settings: "kern", "liga"; + color: var(--text-color); + background: var(--body-bg); +h1, h2, h3, h4, h5, h6 { + font-family: var(--heading-font-family); + font-weight: var(--heading-weight); + margin: 1.75em 0 0.75em 0; + font-size: calc(1.75em * var(--heading-font-scale)); + font-size: calc(1.4em * var(--heading-font-scale)); + font-size: calc(1.2em * var(--heading-font-scale)); + color: var(--text-color-muted); + font-size: calc(1em * var(--heading-font-scale)); + font-size: calc(1em * var(--heading-small-font-scale)); + font-family: var(--heading-small-font-family); + font-weight: var(--heading-small-weight); +ul ul, ol ul, ul ol, ol ol { + text-decoration: underline; + border-left: 3px solid var(--primary); + background: var(--box-bg); + padding: var(--box-padding); + border-radius: var(--box-radius); + margin: var(--box--margin); + font-family: var(--monospace-font-family); + font-size: var(--monospace-font-size); + color: var(--box-text-color); + background: var(--box-bg); + padding: var(--box-padding); + border-radius: var(--box-radius); + background: var(--box-bg); + border-radius: 0.35rem; + word-break: break-word; +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { +/* fix unwanted margins in tables, code, lists and blockquotes */ +li > *:first-child > *:first-child, +li > *:first-child > *:first-child > *:first-child, +td > *:first-child > *:first-child, +td > *:first-child > *:first-child > *:first-child, +pre > *:first-child > *:first-child, +pre > *:first-child > *:first-child > *:first-child, +blockquote > *:first-child, +blockquote > *:first-child > *:first-child, +blockquote > *:first-child > *:first-child > *:first-child { +li > *:last-child > *:last-child, +li > *:last-child > *:last-child > *:last-child, +td > *:last-child > *:last-child, +td > *:last-child > *:last-child > *:last-child, +pre > *:last-child > *:last-child, +pre > *:last-child > *:last-child > *:last-child, +blockquote > *:last-child, +blockquote > *:last-child > *:last-child, +blockquote > *:last-child > *:last-child > *:last-child { +/********************************* + *********************************/ + box-shadow: 0 0 134px rgba(0, 0, 0, 0.1); +/********************************* + *********************************/ + border: 1px solid var(--primary); + background: var(--box-bg); + color: var(--text-color); +#btn-to-top > .up-arrow:after { +/********************************* + *********************************/ + background: var(--sidebar-bg); + border-right: 1px solid var(--sidebar-bg); + padding: var(--sidebar-padding); + color: var(--sidebar-text-color); + margin: 2rem auto 0 auto; +.sidebar .section > ul > li { +.sidebar .section h3, .sidebar .section h5 { + font-weight: var(--heading-weight); +.sidebar .namespace > h3 { + text-transform: uppercase; +.sidebar .namespace > p { + text-overflow: ellipsis; + transition: background-color 150ms ease; + color: var(--sidebar-primary); + border-radius: var(--box-radius); + padding: 0.2rem 0.5rem; + margin-bottom: 0.15rem; +.sidebar .section a:hover { + background-color: rgba(127, 127, 127, 0.2); + color: var(--sidebar-text-color); +.sidebar .section a.current { + background-color: var(--sidebar-selected-bg); + box-sizing: border-box; +.sidebar .search input[type="text"] { + border-color: transparent; + border: 1px solid #ccc; + box-shadow: inset 0 1px 3px #ddd; + transition: border .3s linear; +/********************************* + *********************************/ + color: var(--text-color-muted); +.md-anchor:not([href]) { + content: var(--anchor-sign); /*'§'*/ +.collapse-toggle > .inner { + border-radius: calc(0.75 * var(--box-radius)); + justify-content: center; + vertical-align: middle; + color: var(--box-text-color); + font-family: monospace; + background: var(--box-bg); +/********************************* + *********************************/ + display: none !important; +/********************************* + *********************************/ + max-width: calc(var(--prefered-content-width) + 8em); +.content table:not(.table-display) { + border-spacing: 0 0.25rem; +.content td:first-child { +.content td p:first-child { +.content td h1, .content td h2 { +.content tr:first-child td { + vertical-align: middle; + box-shadow: inset 0 -1px 0; +.content tr:first-child { + border-bottom: 1px solid rgba(0, 0, 0, 0.35); +.content td:first-child { +.content td p:first-child { +.content td h4, .content td h5 { +.content tr:first-child td { + color: var(--text-color-muted); + font-weight: var(--body-font-weight); +.meta tr > td:not(:first-child) { +.meta tr > td:first-child { +/********************************* + *********************************/ + font-size: calc(1.3em * var(--heading-docblock-scale) * var(--heading-font-scale)); + font-size: calc(1.2em * var(--heading-docblock-scale) * var(--heading-font-scale)); + font-size: calc(1.1em * var(--heading-docblock-scale) * var(--heading-font-scale)); + font-size: calc(1.05em * var(--heading-docblock-scale) * var(--heading-font-scale)); + color: var(--heading-docblock-color) + font-size: var(--table-font-size); + font-family: var(--heading-table-font-family); + font-weight: var(--heading-table-weight); +.docblock table tr th:first-child, +.docblock table tr td:first-child { +.docblock table tr th:last-child, +.docblock table tr td:last-child { + border-radius: var(--box-radius); + border: 1px solid var(--text-color-muted); + border-spacing: 0 0 !important; +table.enum-members tr th, + border-top-color: var(--body-bg); + background-color: var(--box-bg); + border-bottom: 1px solid var(--text-color-muted); +table.enum-members tr th:first-child, +table.enum-members tr td:first-child { +table.results tr th:first-child, +table.results tr td:first-child { +table.enum-members tr th:last-child, +table.enum-members tr td:last-child, +table.results tr th:last-child, +table.results tr td:last-child { +table.results tr td code { + padding-bottom: 0.15rem; +.docblock ul.type li::before { + color: var(--text-color); +/************************** +**************************/ +@media (max-width: 700px) { + flex-direction: column;