Okay/Spec: Difference between revisions

No edit summary
No edit summary
Line 79: Line 79:


==== linking to other spaces ====
==== linking to other spaces ====
A document <span class="may">may</span> direct clients to another document containing a space using an <code><a /></code> or <code><link /></code> element with the <code>rel="ok-space"</code> attribute. The client <span class="must">must</span> scan the linked document for valid <code>ok-space</code> markup, but it <span class="mustnt">must not</span> follow any further links or anchors with the <code>rel="ok-space"</code> attribute.
A document can direct clients to another document containing a space using an <code><a /></code> or <code><link /></code> element with the <code>rel="ok-space"</code> attribute. The client <span class="must">must</span> scan the linked document for valid <code>ok-space</code> markup, but it <span class="mustnt">must not</span> follow any further links or anchors with the <code>rel="ok-space"</code> attribute.


The URI provided <span class="may">may</span> include a fragment component to specify which element the client should treat as [[Okay#ok-space|ok-space]] markup (e.g., <code><nowiki>https://example.com/#my-elem</nowiki></code>). The linked element <span class="must">must</span> be valid <code>ok-space</code> markup. If the fragment is specified and the corresponding element is present in the linked document, the client <span class="mustnt">must not</span> scan any other part of the document for <code>ok-space</code> markup. <syntaxhighlight lang="html"><!-- link to a space with the id "space" -->
The URI provided <span class="may">may</span> include a fragment component to specify which element the client should treat as [[Okay#ok-space|ok-space]] markup (e.g., <code><nowiki>https://example.com/#my-elem</nowiki></code>). The linked element <span class="must">must</span> be valid <code>ok-space</code> markup. If the fragment is specified and the corresponding element is present in the linked document, the client <span class="mustnt">must not</span> scan any other part of the document for <code>ok-space</code> markup. <syntaxhighlight lang="html"><!-- link to a space with the id "space" -->
Line 90: Line 90:


==== metadata ====
==== metadata ====
Spaces <span class="may">may</span> provide metadata about themselves to help users identify them.<syntaxhighlight lang="html"><nav class="ok-space">
Spaces should provide metadata about themselves to help users identify them.<syntaxhighlight lang="html"><nav class="ok-space">
     <h1 class="title"></h1>
     <h1 class="title"></h1>
     <p class="subtitle"></p>
     <p class="subtitle"></p>
Line 113: Line 113:
The path to the space's room directory <span class="must">must</span> be defined in its [[Okay#the element thereof|discovery element]] with the <code>ok-rooms</code> rel value.
The path to the space's room directory <span class="must">must</span> be defined in its [[Okay#the element thereof|discovery element]] with the <code>ok-rooms</code> rel value.


Here's an example of what a room directory might look like:
Here's an example of what a room directory could look like:
<syntaxhighlight lang="html"><main class="ok-rooms">
<syntaxhighlight lang="html"><main class="ok-rooms">
   <h1>Rooms on This Server</h1>
   <h1>Rooms on This Server</h1>