idiotbox-c

youtube web application in C
git clone git://git.codemadness.org/idiotbox-c
Log | Files | Refs | README | LICENSE

commit 7c0debf13e9ac877866e8dc0fb9db4c59f12c669
parent 8d8ff0f6a30ed8edcaf2130ba5131b1a62cc5ce4
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Thu, 28 Jun 2018 20:10:54 +0200

documentation and add CSS

Diffstat:
LICENSE_jsmn | 1-
README | 27++++++++++++++++++++++++---
css/dark.css | 47+++++++++++++++++++++++++++++++++++++++++++++++
css/light.css | 47+++++++++++++++++++++++++++++++++++++++++++++++
css/pink.css | 47+++++++++++++++++++++++++++++++++++++++++++++++
css/templeos.css | 50++++++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 215 insertions(+), 4 deletions(-)

diff --git a/LICENSE_jsmn b/LICENSE_jsmn @@ -17,4 +17,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/README b/README @@ -1,12 +1,33 @@ Dependencies: ------------- + - C compiler. - LibreSSL + libtls. +Compile +------- + +- Define GOOGLE_API_KEY +- make +- doas make install + + Install ------- -TODO: nginx config -explain to make sure to copy etc/resolv.conf and etc/ssl/cert.pem when using -a chroot. +Nginx + slowcgi example: + + location /idiotbox/css/.* { + root /home/www/domains/www.codemadness.org/htdocs/idiotbox/css; + } + + location ~ ^/idiotbox(/|/\?.*)$ { + include /etc/nginx/fastcgi_params; + fastcgi_pass unix:/run/slowcgi.sock; + fastcgi_param SCRIPT_FILENAME /cgi-bin/idiotbox; + fastcgi_param SCRIPT_NAME /cgi-bin/idiotbox; + fastcgi_param REQUEST_URI /cgi-bin/idiotbox; + } + +When using a chroot make sure to copy /etc/resolv.conf and /etc/ssl/cert.pem. diff --git a/css/dark.css b/css/dark.css @@ -0,0 +1,47 @@ +body { + background-color: #000; + color: #eee; + max-width: 80ex; + margin: 0 auto; + padding: 3px; +} +form { + margin: 0; +} +.nowrap { + whitespace: no-wrap; +} +.a-r { + text-align: right; +} +table.videos, +table.search, +table.search .input, +input.search { + width: 100%; +} +table.videos { + border-collapse: collapse; +} +table.videos tr td { + vertical-align: top; + padding: 0 3px; +} +table.videos tr.v:hover td { + background-color: #333; +} +td.thumb { + width: 120px; + text-align: center; +} +td.thumb img { + height: 90px; +} +a { + color: #fff; +} +hr { + height: 1px; + border: 0; + border-bottom: 1px solid #333; +} diff --git a/css/light.css b/css/light.css @@ -0,0 +1,47 @@ +body { + background-color: #fff; + color: #000; + max-width: 80ex; + margin: 0 auto; + padding: 3px; +} +form { + margin: 0; +} +.nowrap { + whitespace: no-wrap; +} +.a-r { + text-align: right; +} +table.videos, +table.search, +table.search .input, +input.search { + width: 100%; +} +table.videos { + border-collapse: collapse; +} +table.videos tr td { + vertical-align: top; + padding: 0 3px; +} +table.videos tr.v:hover td { + background-color: #eee; +} +td.thumb { + width: 120px; + text-align: center; +} +td.thumb img { + height: 90px; +} +a { + color: #000; +} +hr { + height: 1px; + border: 0; + border-bottom: 1px solid #777; +} diff --git a/css/pink.css b/css/pink.css @@ -0,0 +1,47 @@ +body { + background-color: pink; + color: #000; + max-width: 80ex; + margin: 0 auto; + padding: 3px; +} +form { + margin: 0; +} +.nowrap { + whitespace: no-wrap; +} +.a-r { + text-align: right; +} +table.videos, +table.search, +table.search .input, +input.search { + width: 100%; +} +table.videos { + border-collapse: collapse; +} +table.videos tr td { + vertical-align: top; + padding: 0 3px; +} +table.videos tr.v:hover td { + background-color: #fff; +} +td.thumb { + width: 120px; + text-align: center; +} +td.thumb img { + height: 90px; +} +a { + color: #000; +} +hr { + height: 1px; + border: 0; + border-bottom: 1px solid #777; +} diff --git a/css/templeos.css b/css/templeos.css @@ -0,0 +1,50 @@ +body { + background-color: #55ffff; + color: #aa00aa; + color: #000; + max-width: 80ex; + margin: 0 auto; + padding: 3px; +} +form { + margin: 0; +} +.nowrap { + whitespace: no-wrap; +} +.a-r { + text-align: right; +} +table.videos, +table.search, +table.search .input, +input.search { + width: 100%; +} +table.videos { + border-collapse: collapse; +} +table.videos tr td { + vertical-align: top; + padding: 0 3px; +} +td.thumb { + width: 120px; + text-align: center; +} +td.thumb img { + height: 90px; +} +a { + text-decoration: none; + color: #aa0000; + border-bottom: 1px solid #0000aa; +} +td.thumb a { + border: 0; +} +hr { + height: 1px; + border: 0; + border-bottom: 1px solid #777; +}