Okay/Spec: Difference between revisions
No edit summary |
No edit summary |
||
| Line 15: | Line 15: | ||
}} | }} | ||
''' | '''Okay''' dares to ask the big questions. What if group chat was hypertext? What if discord let you write arbitrary HTML? What if protocols were bad? | ||
== in summary == | == in summary == | ||
| Line 64: | Line 62: | ||
<pre> | <pre> | ||
<nav class=“ok-discover”> | <nav class=“ok-discover”> | ||
<a href=“/rooms/” rel=“ok-rooms”>Rooms</a> | |||
<a href=“/register/” rel=“ok-register”>Registration</a> | |||
<a href=“/prefs/” rel=“ok-prefs”>Preferences</a> | |||
</nav> | </nav> | ||
</pre> | </pre> | ||
The discovery element is defined as any element with the | The discovery element is defined as any element with the <code>ok-discover</code> class. Any non-void element can be the discovery element, but it really should be a <code>nav</code> if you can help it. The discovery element must contain a number of anchor (<code>a</code>) elements with valid <code>rel</code> and <code>href</code> attributes. Any invalid anchors should be ignored by the client. The inner text of the anchor elements is not significant and must be ignored by clients. | ||
A list of valid anchor rel attributes and their purposes is described below: | A list of valid anchor <code>rel</code> attributes and their purposes is described below: | ||
Key: <span class="required">◈ Required</span>, <span class="optional>◇ Optional</span>, <span class="multiple">❖ Can be specified multiple times<span> | Key: <span class="required">◈ Required</span>, <span class="optional>◇ Optional</span>, <span class="multiple">❖ Can be specified multiple times | ||
{| class="wikitable" | |||
<span class="required"> | |+ | ||
|<span class="required">◈</span> | |||
<span class="required">◈ ok-register</span> | |<span class="required">'''ok-rooms'''</span> | ||
|Points to the server's [[Okay#the directory|room directory]]. | |||
<span class="required">◈ ok-prefs</span> | |- | ||
|<span class="required">◈</span> | |||
|<span class="required">'''ok-register'''</span> | |||
|Points to the server’s registration endpoint. | |||
|- | |||
|<span class="required">◈</span> | |||
|<span class="required">'''ok-prefs'''</span> | |||
|Points to the server’s preferences endpoint. | |||
|} | |||
== initiation == | == initiation == | ||
| Line 92: | Line 98: | ||
== profiles == | == profiles == | ||
== subscriptions == | == subscriptions == | ||
== settings == | |||