Commit df9081e1 authored by Scott Zeid's avatar Scott Zeid

Combine all dependencies into index.php and settings.yaml.dist; Remove IE9.js

parent f8f59ce7
Portal
Copyright (C) 2006-2015 Scott Zeid
Copyright (C) 2006-2018 Scott Zeid
https://code.s.zeid.me/portal
Permission is hereby granted, free of charge, to any person obtaining a copy
......
main := src/portal.php
out := index.php
all: ${out}
${out}: ${main} $(wildcard lib/*) $(filter-out ${main},$(wildcard src/*))
@echo deps: $^
$(foreach f,$^,php -l $(f);)
printf '<?php' > $@
for f in $(filter-out ${main},$^) ${main}; do \
cat $$f | sed -e '1s/<?php//g' | sed -e '$$s/?>//g' >> $@; \
done
printf '?>\n' >> $@
sed -i -e 's!require(['"'"'"]\(\.\.\?//*\)\?[^.]\+\.php['"'"'"]);!!g' $@
.PHONY: clean
clean:
rm -f ${main}
Portal
======
Copyright (C) 2006-2015 Scott Zeid
Copyright (C) 2006-2018 Scott Zeid
<https://code.s.zeid.me/portal>
Introduction
------------
Portal is a PHP script that displays a list of Web sites. It can be used as
......@@ -23,6 +24,7 @@ To see a live example of Portal, go to <https://more.s.zeid.me/>.
You may also [look at its configuration
file](https://more.s.zeid.me/portal-data/settings.yaml).
Installation
------------
To install Portal:
......@@ -42,6 +44,14 @@ To install Portal:
If you want to change the name or location of portal-data, you will also need
to update the `$CONFIG_DIR` variable in index.php accordingly.
Building from source
--------------------
A pre-compiled script exists at `index.php`. If you wish to modify Portal,
you will need to change `src/portal.php` and then re-compile by running `make`
from the root of the repository. GNU make is required for this.
Query string parameters
-----------------------
Portal supports the following query string parameters:
......@@ -60,43 +70,6 @@ Portal supports the following query string parameters:
* `403`, `404` - causes Portal to render a 403 or 404 error page
* `json` - output a JSON object instead of HTML
OpenID support
--------------
If you use OpenID and your provider allows you to, you can use your Portal's
URL as an alias for your OpenID. To set this up, you would look in your OpenID
provider's help pages for something that looks like "Use your own URL", and
then look for some HTML code that looks something like this:
<link rel="openid.server" href="http://www.myopenid.com/server" />
<link rel="openid.delegate" href="http://youraccount.myopenid.com/" />
<link rel="openid2.local_id" href="http://youraccount.myopenid.com" />
<link rel="openid2.provider" href="http://www.myopenid.com/server" />
<meta http-equiv="X-XRDS-Location"
content="http://www.myopenid.com/xrds?username=youraccount.myopenid.com" />
Then you would copy the URLs from that code and paste them into the respective
keys in `settings.yaml` > `openid`. You can omit either `provider` and
`local_id` or `server` and `delegate` if your provider does not give you those
URLs. However, `server` and `provider` are often the same, as are `delegate`
and `local_id`.
For example:
openid:
# OpenID server URL
server: http://www.myopenid.com/server
# OpenID provider URL
provider: http://www.myopenid.com/server
# Delegate URL
delegate: http://youraccount.myopenid.com/
# Local ID URL
local_id: http://youraccount.myopenid.com
# XRDS URL
xrds: http://www.myopenid.com/xrds?username=youraccount.myopenid.com
Note that Portal sends the `X-XRDS-Location` URL as an actual HTTP header, and
not a meta tag, because the latter would prevent Portal from validating as
HTML5.
Minibar
-------
......@@ -147,3 +120,42 @@ If you want the site to appear in the minibar but not the main page, add this:
You can also add both lines if you want to completely hide the site from your
Portal. If the URL is not set, then the site will automatically be hidden from
the minibar.
OpenID support
--------------
If you use OpenID and your provider allows you to, you can use your Portal's
URL as an alias for your OpenID. To set this up, you would look in your OpenID
provider's help pages for something that looks like "Use your own URL", and
then look for some HTML code that looks something like this:
<link rel="openid.server" href="http://www.myopenid.com/server" />
<link rel="openid.delegate" href="http://youraccount.myopenid.com/" />
<link rel="openid2.local_id" href="http://youraccount.myopenid.com" />
<link rel="openid2.provider" href="http://www.myopenid.com/server" />
<meta http-equiv="X-XRDS-Location"
content="http://www.myopenid.com/xrds?username=youraccount.myopenid.com" />
Then you would copy the URLs from that code and paste them into the respective
keys in `settings.yaml` > `openid`. You can omit either `provider` and
`local_id` or `server` and `delegate` if your provider does not give you those
URLs. However, `server` and `provider` are often the same, as are `delegate`
and `local_id`.
For example:
openid:
# OpenID server URL
server: http://www.myopenid.com/server
# OpenID provider URL
provider: http://www.myopenid.com/server
# Delegate URL
delegate: http://youraccount.myopenid.com/
# Local ID URL
local_id: http://youraccount.myopenid.com
# XRDS URL
xrds: http://www.myopenid.com/xrds?username=youraccount.myopenid.com
Note that Portal sends the `X-XRDS-Location` URL as an actual HTTP header, and
not a meta tag, because the latter would prevent Portal from validating as
HTML5.
This diff is collapsed.
This diff is collapsed.
/* ---------------------------------------------------------------------
Squish some IE bugs!
Some of these bug fixes may have adverse effects so they are
not included in the standard library. Add your own if you want.
--------------------------------------------------------------------- */
// NOTE: IE7.Layout.boxSizing is the same as the "Holly Hack"
if (IE7.loaded && IE7.appVersion < 7) {
// "doubled margin" bug
// http://www.positioniseverything.net/explorer/doubled-margin.html
IE7.CSS.addFix(/(float\s*:\s*(left|right))/, "display:inline;$1");
// "peekaboo" bug
// http://www.positioniseverything.net/explorer/peekaboo.html
if (IE7.appVersion >= 6) IE7.CSS.addRecalc("float", "(left|right)", function(element) {
IE7.Layout.boxSizing(element.parentElement);
// "doubled margin" bug
element.style.display = "inline";
});
// "unscrollable content" bug
// http://www.positioniseverything.net/explorer/unscrollable.html
IE7.CSS.addRecalc("position", "absolute|fixed", function(element) {
if (element.offsetParent && element.offsetParent.currentStyle.position === "relative")
IE7.Layout.boxSizing(element.offsetParent);
});
}
//# // get rid of Microsoft's pesky image toolbar
//# document.write('<meta http-equiv="imagetoolbar" content="no">');
img {
behavior: url("pngbehavior/pngbehavior.htc");
}
\ No newline at end of file
......@@ -110,7 +110,7 @@ openid:
# all of the other settings for the theme.
themes:
red:
bg: '#636363 url("{{$CONFIG_DIR}}/theme-files/red/background.png") repeat-x fixed'
bg: '#636363 url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAACWCAMAAAAoqBJAAAACEFBMVEVKSkpKSktKS0pKS0tLSkpLSktLS0pLS0tLS0xLTEtLTExMS0tMS0xMTEtMTExMTE1MTUxMTU1NTExNTE1NTUxNTU1NTU5NTk1NTk5OTU1OTU5OTk1OTk5OTk9OT05OT09PTk5PTk9PT05PT09PT1BPUE9PUFBQT09QT1BQUE9QUFBQUFFQUVBQUVFRUFBRUFFRUVBRUVFRUVJRUlFRUlJSUVFSUVJSUlFSUlJSUlNSU1JSU1NTUlJTUlNTU1JTU1NTU1RTVFNTVFRUU1NUU1RUVFNUVFRUVFVUVVRUVVVVVFRVVFVVVVRVVVVVVVZVVlVVVlZWVVVWVVZWVlVWVlZWVldWV1ZWV1dXVlZXVldXV1ZXV1dXV1hXWFdXWFhYV1dYV1hYWFdYWFhYWFlYWVhYWVlZWFhZWFlZWVhZWVlZWVpZWllZWlpaWVlaWVpaWllaWlpaWltaW1paW1tbWlpbWltbW1pbW1tbW1xbXFtbXFxcW1tcW1xcXFtcXFxcXF1cXVxcXV1dXFxdXF1dXVxdXV1dXV5dXl1dXl5eXV1eXV5eXl1eXl5eXl9eX15eX19fXl5fXl9fX15fX19fX2BfYF9fYGBgX19gX2BgYF9gYGBgYGFgYWBgYWFhYGBhYGFhYWBhYWFhYWJhYmFhYmJiYWFiYWJiYmFiYmJiYmNiY2JiY2NjYmJjYmNjY2JjY2N4wovhAAAAW0lEQVQY07XNyRGDQBQDUf03W/7p2pjxAYoMKF27W0kGTnQ/DFvTRXRNoTSxfJQhGEpD3dSJ6dAwfU0xbZR9OxfXdByPtWz97lxfdFEipoglOk9vCU5TPT95f39fWxLYueOzkQAAAABJRU5ErkJggg==") repeat-x fixed'
fg: ['#FFF', '#EEE', '#DDD', '#CCC']
logo_bg: '#700'
logo_border: '#300'
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment