summaryrefslogtreecommitdiff
path: root/doc.txt
blob: a9cf8c052b09c54e263260e7d0dcd04a2b03cd2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
GEORGE documentation
last updated 2023-10-02

GET https://george.gh0.pw/data.cgi 
returns a json array of current GEORGE members.
the order of members in the array is the order used for calculating NEXT and PREV links.
each item in the array is an object with name, link, colour, and is_council fields. the meaning of these should be obvious.

---

GET https://george.gh0.pw/embed.cgi?membername
GET https://george.gh0.pw/embed.cgi?membername&key1=val1[&...]
returns the GEORGE navigation widget, suitable for being embedded as an iframe on the page of the GEORGE member with name membername.
addional options may be provided as key-value pairs. currently these are used for changing some style values. the presently supported options are:
key		default		description
c_bg		white		background colour of the widget
c_george	#3d3db8		text colour of the word "GEORGE"
c_links		blue		text colour of the NEXT and PREV links
c_underline	blue		underline colour of the word "GEORGE"
c_fg		black		text colour of all other text
c_border	black		border colour for the entire embed

it is recommended that you embed the widget using an iframe tag like this:
<iframe height="50" src="https://george.gh0.pw/embed.cgi?membername" style="border:none;width:100%" sandbox="allow-top-navigation"></iframe>
the sandbox attribute is strictly speaking not required, since we set a CSP header with the same value on the server as well. it probably doesn't hurt to include it anyway, though.

on the serverside we check the http Referer header, if one is present, to ensure that the embed widget for a given member can only be embedded on that member's site. we also set a CSP frame-ancestors directive, with a similar effect.

the pulsating animation on the word "GEORGE" is disabled if the CSS prefers-reduced-motion media query is active.

---

GET https://george.gh0.pw/link.cgi?from=membername&dir=next|prev 
redirects to the page of the GEORGE member in the selected direction from the given member.
this can be used if you want to construct your own GEORGE widget, for whatever reason.
for example, if your member name is 'example', you could do something like
<a href="https//george.gh0.pw/link.cgi?from=example&dir=next">NEXT</a>
<a href="https//george.gh0.pw/link.cgi?from=example&dir=prev">PREV</a>
and these links will always go to the right place relative to your current position in the webring.

---

GET https://coral.shoes/george-status/george-status-json
returns current status information about the GEORGE webring, including which members currently haven't correctly embedded the GEORGE widget onto their page.

===

the GEORGE source code is at https://g.gh0.pw/george.site/
the GEORGE status source code is at https://github.com/loovjo/shoe-router/tree/master/george-status