update content, fix nav
This commit is contained in:
1 parent
7b602d562c
commit
fdd7407368
13 files changed
+274
-77
No files matched your search
@@ -2,17 +2,38 @@
|
||||
|
||||
This is the help docs site for [webOSArchive.org](http://www.webosarchive.org)
|
||||
|
||||
Its loaded into the main URL using URL re-writing in nginx where individual docs are handled as a query
|
||||
## Building and deploying
|
||||
|
||||
Build the site with mkdocs (`mkdocs build`)
|
||||
Build the site with mkdocs (`mkdocs build`), then copy the generated `site/`
|
||||
directory up to the docs host. The host needs PHP enabled (for `menu.php`) and
|
||||
`index.html` in its DirectoryIndex. There is no longer a manual "copy index.php"
|
||||
step -- the homepage (`index.html`), `menu.php`, and the menu CSS/JS are all
|
||||
emitted into `site/` by the build.
|
||||
|
||||
Copy the index.php into the built directory
|
||||
## The shared top nav
|
||||
|
||||
URL rewrite from the main domain config looks like:
|
||||
Each page pulls the shared webOS Archive top nav from the main site and injects
|
||||
it client-side (`docs/js/wosa-menu.js` + `docs/css/wosa-menu.css`). To avoid
|
||||
CORS, the page fetches a same-origin proxy, `docs/menu.php`, which requests the
|
||||
real menu over whichever protocol the client arrived on -- so legacy http-only
|
||||
devices stay on http and modern devices get https (no mixed content).
|
||||
|
||||
## Serving under the main domain
|
||||
|
||||
Pages are served directly at their real paths and reverse-proxied under
|
||||
`/docs/`. Path-preserving proxy rule (nginx):
|
||||
```
|
||||
location /docs/ {
|
||||
proxy_pass http://DOCUMENTHOST/; # trailing slash strips /docs/
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto $scheme; # so menu.php sees the real protocol
|
||||
}
|
||||
```
|
||||
Apache equivalent:
|
||||
```
|
||||
RewriteEngine on
|
||||
RewriteCond %{DOCUMENT_ROOT}/$1 !-f
|
||||
RewriteRule ^(/docs/?)(.*)/?$ http://DOCUMENTHOST.com/\?$2/ [P]
|
||||
RewriteRule ^/docs/(.*)$ http://DOCUMENTHOST/$1 [P]
|
||||
ProxyPassReverse /docs/ http://DOCUMENTHOST/
|
||||
```
|
||||
|
||||
You probably want to do the same in the HTTPS site config
|
||||
You probably want to do the same in the HTTPS site config.
|
||||
@@ -6,7 +6,7 @@ Many apps are still missing from the Museum! If you have a device with apps that
|
||||
|
||||
<img src="../images/appscanner.png" align="right" style="padding-left: 8px;">Once you have [Preware](appstores.md) on your device, you can install an App that will automatically inventory your device, and compare your installed apps to the list of missing apps.
|
||||
|
||||
If you have the App Museum installed, search for:
|
||||
If you have the App Catalog or App Museum II installed, search for:
|
||||
`App Scanner`
|
||||
|
||||
If you only have Preware installed, you can the Museum in the built-in web-browser and click Direct Link under Download:
|
||||
|
||||
+7
-6
@@ -1,6 +1,6 @@
|
||||
# Installing Apps on your webOS Device
|
||||
|
||||
There's a vibrant community rescuing, archiving, restoring and even building apps for webOS. Since the actual HP App Catalog is gone, you'll need your computer one more time to "side-load" one app that gives you access to the rest of this "after-life" ecosystem.
|
||||
There's a vibrant community rescuing, archiving, restoring and even building apps for webOS. Since the original HP App Catalog is broken, you'll need your computer one more time to "side-load" one app that gives you access to the rest of this "after-life" ecosystem.
|
||||
|
||||
## Prepare Your Device
|
||||
|
||||
@@ -48,7 +48,7 @@ If WOSQI doesn't work, the most likely issue is that the novacom driver isn't wo
|
||||
The Preware app is the original Homebrew App Stores for webOS, and contains many useful apps, hacks, tweaks from the glory days of webOS. It provides critical infrastructure for installing apps from other sources -- so you don't need to plug your Device into your computer!
|
||||
|
||||
* [Download Preware 1.9.17 from webOS Archive](http://www.webosarchive.org/activation/org.webosinternals.preware_1.9.17_arm.ipk) to your computer.
|
||||
* Drag the Preware IPK you just downloaded onto the WOSQI window (or hit the + button and browse for it)
|
||||
* Drag the Preware IPK you just downloaded onto the WOSQI window (or hit the + button and find it)
|
||||
* Press the Install button to install Preware on your device
|
||||
|
||||

|
||||
@@ -62,10 +62,11 @@ The Preware app is the original Homebrew App Stores for webOS, and contains many
|
||||
|
||||
## Install an App Store
|
||||
|
||||
The original webOS **App Catalog** has been restored for webOS 2.2.4 (newer phones) and 3.0.x (tablets) -- this is the best way to find apps for your devices! <br>
|
||||
You can download the installable App Catalog packages at <a href="https://appcatalog.webosarchive.org/?latest" target="_blank">appcatalog.webosarchive.org</a>.
|
||||
The original webOS **App Catalog** has been restored for webOS 2.2.4 (newer phones) and 3.0.x (tablets) -- this is the best way to find apps for your devices!
|
||||
|
||||
On any Enyo-capable device, you can use **App Museum II**. <a href="https://appcatalog.webosarchive.org/?latest" target="_blank">Download the latest here</a>.
|
||||
- You can download the installable App Catalog packages at <a href="https://appcatalog.webosarchive.org/?latest" target="_blank">appcatalog.webosarchive.org</a>.
|
||||
|
||||
An alternative for LuneOS, or any Enyo-capable device, is to use **App Museum II**. <a href="https://appcatalog.webosarchive.org/?latest" target="_blank">Download the latest here</a>.
|
||||
|
||||
> Enyo was built-in to webOS 2.2.4 and later by default, and is available in Preware for earlier webOS 2.x versions. Depending your device, you may be able to run a [Super Doctor](doctor.md) that upgrades your device to a later, unofficial, version of the OS.
|
||||
|
||||
@@ -78,7 +79,7 @@ Alternatively, community member Nomad84 provides a <a href="https://github.com/h
|
||||
You can use WOSI to Install webOS App Stores, just like you did with Preware:
|
||||
|
||||
* **<a href="http://appcatalog.webosarchive.org/" target="_blank">Download an App Store</a> to your computer**
|
||||
* Drag the IPK you just downloaded onto the WOSQI window (or hit the + button and browse for it)
|
||||
* Drag the IPK you just downloaded onto the WOSQI window (or hit the + button and find it)
|
||||
* Press the Install button to install on your device
|
||||
|
||||
## Use Your Device to Install Apps
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Font fix for the vendored theme.css.
|
||||
*
|
||||
* theme.css lists "Roboto Slab" (headings) and "Lato" (body) in its font
|
||||
* stacks, but its @font-face rules point at ../fonts/RobotoSlab/... and
|
||||
* ../fonts/Lato/... -- paths/filenames that MkDocs's readthedocs theme does
|
||||
* not ship. The actual font files live in css/fonts/ under different names,
|
||||
* so the web fonts 404 and text falls back to a serif (Georgia) / Arial.
|
||||
*
|
||||
* Re-declare the faces here against the files that ARE present. This file is
|
||||
* loaded after theme.css (via extra_css), so these working sources win.
|
||||
* Paths are relative to this file at css/wosa-fonts.css -> css/fonts/...
|
||||
*/
|
||||
|
||||
/* Headings */
|
||||
@font-face {
|
||||
font-family: "Roboto Slab";
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
src: url("fonts/Roboto-Slab-Regular.woff2") format("woff2"),
|
||||
url("fonts/Roboto-Slab-Regular.woff") format("woff");
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Roboto Slab";
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
src: url("fonts/Roboto-Slab-Bold.woff2") format("woff2"),
|
||||
url("fonts/Roboto-Slab-Bold.woff") format("woff");
|
||||
}
|
||||
|
||||
/* Body */
|
||||
@font-face {
|
||||
font-family: "Lato";
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
src: url("fonts/lato-normal.woff2") format("woff2"),
|
||||
url("fonts/lato-normal.woff") format("woff");
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Lato";
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
src: url("fonts/lato-bold.woff2") format("woff2"),
|
||||
url("fonts/lato-bold.woff") format("woff");
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Lato";
|
||||
font-weight: 400;
|
||||
font-style: italic;
|
||||
font-display: swap;
|
||||
src: url("fonts/lato-normal-italic.woff2") format("woff2"),
|
||||
url("fonts/lato-normal-italic.woff") format("woff");
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Lato";
|
||||
font-weight: 700;
|
||||
font-style: italic;
|
||||
font-display: swap;
|
||||
src: url("fonts/lato-bold-italic.woff2") format("woff2"),
|
||||
url("fonts/lato-bold-italic.woff") format("woff");
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Placement for the injected webOS Archive top-nav bar (see js/wosa-menu.js).
|
||||
*
|
||||
* The bar is fixed to the top of the viewport at 45px tall (matching the
|
||||
* upstream .menu-wrapper height). The ReadTheDocs theme uses a fixed left
|
||||
* sidebar and a content wrapper, so both are pushed down by 45px -- but only
|
||||
* once the menu has actually loaded (the .wosa-has-menu class is added on
|
||||
* success), so a device that can't load the menu shows no empty gap.
|
||||
*/
|
||||
#wosa-menu-mount {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
min-height: 45px;
|
||||
z-index: 500; /* above the RTD sidebar (z-index 200) */
|
||||
background: #2d2d2d; /* fallback fill until menu.css paints */
|
||||
}
|
||||
|
||||
/* Allow the menu's hover dropdowns to spill below the 45px bar. */
|
||||
#wosa-menu-mount .menu-wrapper,
|
||||
#wosa-menu-mount .wosaMenu {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/* Reserve space for the bar only after a successful load. */
|
||||
.wosa-has-menu .wy-nav-side {
|
||||
top: 45px;
|
||||
/* The theme sets min-height:100%, which would force the sidebar to a full
|
||||
viewport height starting 45px down -- overflowing the bottom and giving
|
||||
the side nav its own scrollbar. Cancel it so top:45px + the theme's
|
||||
bottom:0 size the sidebar to exactly (viewport - 45px). */
|
||||
min-height: 0;
|
||||
}
|
||||
.wosa-has-menu .wy-nav-content-wrap {
|
||||
/* Padding (not margin) clears the fixed bar; with box-sizing:border-box and
|
||||
the theme's min-height:100%, this adds no extra page scroll. The mobile
|
||||
.wy-nav-top bar lives inside this wrapper, so it's cleared here too. */
|
||||
padding-top: 45px;
|
||||
}
|
||||
File renamed without changes.
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
* Injects the shared webOS Archive top-nav bar into every docs page.
|
||||
*
|
||||
* Written in plain ES5 (no fetch/arrow/const) and wrapped in try/catch so
|
||||
* that a legacy webOS browser which can't run it simply shows the docs
|
||||
* without the menu bar -- the documentation itself is always readable.
|
||||
*
|
||||
* The menu is pulled from a SAME-ORIGIN endpoint (menu.php), which proxies
|
||||
* the real menu over whichever protocol the client arrived on. That keeps
|
||||
* http-only devices on http and avoids any CORS requirement.
|
||||
*/
|
||||
(function () {
|
||||
// Only inject when we are the top-level document. When the page is loaded
|
||||
// inside the legacy index.php wrapper (an iframe), that wrapper already
|
||||
// renders the menu, so injecting here would double it up.
|
||||
try {
|
||||
if (window.top !== window.self) return;
|
||||
} catch (e) {
|
||||
// Cross-origin framing threw on access -- assume framed, do nothing.
|
||||
return;
|
||||
}
|
||||
|
||||
// Work out where menu.php lives. In production the docs are reverse-proxied
|
||||
// under /docs/; on the standalone docs host (and locally) they sit at the
|
||||
// root. Handle both so the request stays same-origin either way.
|
||||
function menuRoot() {
|
||||
var path = window.location.pathname || "/";
|
||||
var marker = path.indexOf("/docs/");
|
||||
if (marker !== -1) return path.substring(0, marker) + "/docs/";
|
||||
return "/";
|
||||
}
|
||||
|
||||
// Re-create <script> tags copied in via innerHTML so they actually execute
|
||||
// (menu.js for the mobile toggle, analytics, notifications).
|
||||
function activateScripts(container) {
|
||||
var found = container.getElementsByTagName("script");
|
||||
var list = [];
|
||||
for (var i = 0; i < found.length; i++) list.push(found[i]);
|
||||
for (var j = 0; j < list.length; j++) {
|
||||
var old = list[j];
|
||||
var fresh = document.createElement("script");
|
||||
if (old.src) {
|
||||
fresh.src = old.src;
|
||||
} else {
|
||||
fresh.text = old.text || old.textContent || old.innerHTML || "";
|
||||
}
|
||||
if (old.parentNode) old.parentNode.replaceChild(fresh, old);
|
||||
}
|
||||
}
|
||||
|
||||
function run() {
|
||||
var xhr;
|
||||
try {
|
||||
xhr = new XMLHttpRequest();
|
||||
} catch (e) {
|
||||
return;
|
||||
}
|
||||
xhr.open("GET", menuRoot() + "menu.php?content=docs", true);
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState !== 4) return;
|
||||
if (xhr.status >= 200 && xhr.status < 300 && xhr.responseText) {
|
||||
var mount = document.createElement("div");
|
||||
mount.id = "wosa-menu-mount";
|
||||
if (document.body.firstChild) {
|
||||
document.body.insertBefore(mount, document.body.firstChild);
|
||||
} else {
|
||||
document.body.appendChild(mount);
|
||||
}
|
||||
mount.innerHTML = xhr.responseText;
|
||||
activateScripts(mount);
|
||||
// Only now reserve space for the bar, so a failed load leaves no gap.
|
||||
var root = document.documentElement;
|
||||
root.className += (root.className ? " " : "") + "wosa-has-menu";
|
||||
}
|
||||
// Any non-2xx / network failure: leave the docs menu-less but readable.
|
||||
};
|
||||
try {
|
||||
xhr.send();
|
||||
} catch (e) {
|
||||
/* offline or blocked -- ignore, docs remain usable */
|
||||
}
|
||||
}
|
||||
|
||||
if (document.readyState === "interactive" || document.readyState === "complete") {
|
||||
run();
|
||||
} else if (document.addEventListener) {
|
||||
document.addEventListener("DOMContentLoaded", run, false);
|
||||
} else if (window.attachEvent) {
|
||||
window.attachEvent("onload", run);
|
||||
}
|
||||
})();
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/*
|
||||
* Same-origin proxy for the shared webOS Archive top navigation.
|
||||
*
|
||||
* The docs pages fetch this endpoint client-side and inline the result,
|
||||
* so the menu (including its hover dropdowns) lives in the page DOM.
|
||||
* Because it's served from the same origin as the docs, no CORS is needed.
|
||||
*
|
||||
* We fetch the upstream menu over the SAME protocol the client used, so
|
||||
* legacy devices on http stay on http (no HTTPS work-around required) and
|
||||
* modern devices on https get https resources (no mixed-content blocking).
|
||||
* This mirrors the protocol logic in the site's index.php.
|
||||
*/
|
||||
// Honor X-Forwarded-Proto too, so protocol detection stays correct when the
|
||||
// docs host sits behind a TLS-terminating reverse proxy.
|
||||
if ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') ||
|
||||
(isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) === 'https')) {
|
||||
$protocol = "https://";
|
||||
} else {
|
||||
$protocol = "http://";
|
||||
}
|
||||
|
||||
// Which section to highlight in the menu (defaults to docs). Sanitised.
|
||||
$content = isset($_GET['content']) ? preg_replace('/[^a-zA-Z0-9_-]/', '', $_GET['content']) : 'docs';
|
||||
|
||||
header('Content-Type: text/html; charset=UTF-8');
|
||||
echo file_get_contents($protocol . "www.webosarchive.org/menu.php?content=" . urlencode($content));
|
||||
+1
-1
@@ -45,7 +45,7 @@ While the details will be slightly different, these steps are usually required.
|
||||

|
||||
|
||||
If you're using webOS 2.2.4 or higher, The easiest way to get started is with the NEW **webOS Archive Proxy** app.
|
||||
To download, install [webOS App Museum II](appstores.md#install-webos-app-museum-ii) and search for "Proxy".
|
||||
To download, install an [App Store](appstores.md) and search for "Proxy".
|
||||
|
||||
Or use the <a href="http://appcatalog.webosarchive.org/showMuseumDetails.php?app=1005768" target="_top">direct download</a> and install it yourself.
|
||||
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ More and more websites are moving to newer encryption over HTTPS as the only way
|
||||
|
||||
## Apps
|
||||
|
||||
All of the Apps listed below can be found on [App Museum II](appstores.md#install-webos-app-museum-ii), but there's direct download links as well.
|
||||
All of the Apps listed below can be found in the [App Catalog](appstores.md), but there's direct download links as well.
|
||||
|
||||
### Watch (Some) Videos
|
||||
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
<?php
|
||||
//Figure out what protocol the client wanted
|
||||
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on')
|
||||
$protocol = "https://";
|
||||
else
|
||||
$protocol = "http://";
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>webOS Archive - Docs</title>
|
||||
<style>
|
||||
body, html {width: 100%; height: 100%; margin: 0; padding: 0}
|
||||
.menu-wrapper {position: absolute;top: 0; left: 0; right: 0; height: 45px; }
|
||||
.second-row {position: absolute; top: 45px; left: 0; right: 0; bottom: 0; }
|
||||
.second-row iframe {display: block; width: 100%; height: 100%; border: none;}
|
||||
</style>
|
||||
<link rel="shortcut icon" href="<?php echo $protocol ?>www.webosarchive.org/favicon.ico">
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
//Handle reverse proxy redirects
|
||||
$uri = $_SERVER['REQUEST_URI'];
|
||||
$usePath = "home/";
|
||||
if (!isset($_GET["redir"])) {
|
||||
if (strpos($uri, '?') !== false) {
|
||||
$uriParts = explode("?", $uri);
|
||||
$uri = end($uriParts);
|
||||
$uri = str_replace("/docs/", "", $uri);
|
||||
if (!isset($uri) || $uri == "" || $uri == "/") {
|
||||
$uri = "home";
|
||||
}
|
||||
$uri = str_replace("//", "/", $uri);
|
||||
$usePath = $protocol . $_SERVER['HTTP_HOST'] . "/" . urldecode($uri);
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if ($uri == "community") {
|
||||
echo file_get_contents($protocol . "www.webosarchive.org/menu.php?content=community");
|
||||
} else {
|
||||
echo file_get_contents($protocol . "www.webosarchive.org/menu.php?content=docs");
|
||||
}
|
||||
?>
|
||||
<div class="second-row">
|
||||
<iframe src="<?PHP echo $usePath ?>" width="100%" height="100%" />
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+8
-3
@@ -1,6 +1,6 @@
|
||||
site_name: webOS Docs
|
||||
nav:
|
||||
- Home: home.md
|
||||
- Home: index.md
|
||||
- Getting Started:
|
||||
- Activating a webOS Device: activate.md
|
||||
- Installing Apps on your webOS Device: appstores.md
|
||||
@@ -33,6 +33,11 @@ nav:
|
||||
theme:
|
||||
name: readthedocs
|
||||
favicon: images/icon.ico
|
||||
icon:
|
||||
icon:
|
||||
logo: material/book-check
|
||||
custom_dir: overrides
|
||||
custom_dir: overrides
|
||||
extra_css:
|
||||
- css/wosa-fonts.css
|
||||
- css/wosa-menu.css
|
||||
extra_javascript:
|
||||
- js/wosa-menu.js
|
||||
+5
-10
@@ -24,19 +24,14 @@
|
||||
|
||||
<small><a href="https://github.com/webosarchive/webos-docs" target="_blank">webOS Docs</a> is an open source project of <a href="http://www.webosarchive.org" target="_top">webOS Archive</a></small>
|
||||
<script>
|
||||
//Support reverse proxy links
|
||||
// When the page is served over https, upgrade any absolute http:// links
|
||||
// so we don't trigger mixed-content or needless redirects. (Pages are now
|
||||
// served directly at their real paths, so no reverse-proxy link rewriting
|
||||
// is needed -- MkDocs's relative links resolve natively.)
|
||||
var myURL = document.getElementsByTagName('a');
|
||||
for(var i=0; i<myURL.length; i++) {
|
||||
var currLink = (myURL[i].getAttribute('href'));
|
||||
if (currLink.indexOf("..") != -1) {
|
||||
newUrl = location.protocol + "//www.webosarchive.org/docs" + myURL[i].getAttribute('href');
|
||||
newUrl = newUrl.replace("..", "");
|
||||
if (window.location.host.indexOf("localhost") == -1) {
|
||||
myURL[i].setAttribute('href', newUrl);
|
||||
myURL[i].setAttribute('target', "_top");
|
||||
}
|
||||
}
|
||||
if (location.protocol == "https:" && currLink.indexOf("http://") != -1) {
|
||||
if (currLink && location.protocol == "https:" && currLink.indexOf("http://") != -1) {
|
||||
newUrl = currLink.replace("http://", "https://");
|
||||
if (window.location.host.indexOf("localhost") == -1) {
|
||||
myURL[i].setAttribute('href', newUrl);
|
||||
|
||||
Reference in new issue
Block a user