Browse Source

👨‍👨‍👦🎭 Updated with Glitch

master
Glitch (steady-sundial) 3 weeks ago
parent
commit
75da432a08
7 changed files with 147 additions and 6 deletions
  1. +20
    -0
      public/client.js
  2. +7
    -0
      public/style.css
  3. +5
    -1
      server.js
  4. +2
    -2
      views/dashboard.hbs
  5. +18
    -2
      views/index.hbs
  6. +1
    -1
      views/layouts/main.hbs
  7. +94
    -0
      views/terms.hbs

+ 20
- 0
public/client.js View File

@@ -0,0 +1,20 @@
/* add https:// to URL fields on blur or when enter is pressed.
* thanks aaronpk https://aaronparecki.com/2018/06/03/4/url-form-field */
document.addEventListener('DOMContentLoaded', function() {
function addDefaultScheme(target) {
if(target.value.match(/^(?!https?:).+\..+/)) {
target.value = "https://"+target.value;
}
}
var elements = document.querySelectorAll("input[type=url]");
Array.prototype.forEach.call(elements, function(el, i){
el.addEventListener("blur", function(e){
addDefaultScheme(e.target);
});
el.addEventListener("keydown", function(e){
if(e.keyCode == 13) {
addDefaultScheme(e.target);
}
});
});
});

+ 7
- 0
public/style.css View File

@@ -139,4 +139,11 @@ footer {
.directory .profile {
background-color: cyan;
padding: 1rem;
}

dt {
border-top: 1px dotted black;
font-weight: bold;
font-style: italic;
padding: 2em 0 0;
}

+ 5
- 1
server.js View File

@@ -87,7 +87,11 @@ function profileFromHCard(site, card) {

// http://expressjs.com/en/starter/basic-routing.html
app.get("/", function (request, response) {
response.render('index', response.locals.context)
response.render('index', response.locals.context);
});

app.get("/terms", function (request, response) {
response.render('terms', response.locals.context);
});

app.get('/dashboard', requireLogin, function(request, response) {

+ 2
- 2
views/dashboard.hbs View File

@@ -33,8 +33,8 @@
</form>
</section>

<section>
<h2>Your Site's Status</h2>
<section id="webring-links">
<h2>Your Webring Links</h2>
<div class="status {{#if site.active}}active{{else}}inactive{{/if}}">
Your site is currently: {{#unless site.active }}NOT {{/unless}} ACTIVE
</div>

+ 18
- 2
views/index.hbs View File

@@ -1,9 +1,25 @@
<p>Get started by signing in.</p>
<h2>What is This?</h2>

<p>
This proof-of-concept <a href="https://en.wikipedia.org/wiki/Webring">webring</a> is a way for folks adding <a href="https://indieweb.org/building-blocks">IndieWeb building blocks</a> to their personal websites to find (and be found by) other folks with IndieWeb building blocks on their sites!
</p>

<h2>Sign In</h2>

<p>
Ready to join or already a member? Get started by signing in. The webring works with sites that support <a href="https://indieweb.org/IndieAuth">IndieAuth</a> or <a href="https://indieweb.org/RelMeAuth">RelMeAuth</a>.
</p>

{{> sign-in-form }}

<h2>Other Questions?</h2>

<p>
Check our <a href="/terms">Terms of Use and Frequently Asked Questions</a>!
</p>

<div class="h-feed">
<h3 class="p-name">Recent Changes</h3>
<h2 class="p-name">Recent Changes</h2>
<ul>
<li class="h-entry"><strong class="dt-published">2019-01-19</strong> – <em class="p-name">An IndieWebring Directory!</em> <span class="e-content">Active sites who opt-in can now appear on the <a href="/directory">Directory</a> page! <a class="u-url" href="https://martymcgui.re/2019/01/19/an-indiewebring-directory/">[Details and comments]</a></span></li>
<li class="h-entry"><strong class="dt-published">2018-09-29</strong> – <em class="p-name">Webrings without borders!</em> <span class="e-content">New emoji IDs will no longer have country flag emoji. <a class="u-url" href="https://martymcgui.re/2018/09/29/114553/">[Details and comments]</a></span></li>

+ 1
- 1
views/layouts/main.hbs View File

@@ -29,6 +29,6 @@
Having trouble? Find schmarty in the <a href="https://indieweb.org/discuss">IndieWeb chat</a>!
</p>
</footer>
<script src="/client.js"></script>
</body>
</html>

+ 94
- 0
views/terms.hbs View File

@@ -0,0 +1,94 @@
<h2>Terms of Use and Frequently Asked Questions</h2>

<dl>

<dt>What is this?</dt>
<dd><p>
This proof-of-concept <a href="https://en.wikipedia.org/wiki/Webring">webring</a> is a way for folks adding <a href="https://indieweb.org/building-blocks">IndieWeb building blocks</a> to their personal websites to find (and be found by) other folks with IndieWeb building blocks on their sites!
</p></dd>

<dt>Should I add my website to the webring?</dt>
<dd><p>
Maybe! If you have a personal website, are adding <a href="https://indieweb.org/">IndieWeb</a> features to it, and are interested in finding and being found by folks who are doing the same, you should join!
</p>
<p>
By joining this webring, you agree to follow the <a href="https://indieweb.org/code-of-conduct">IndieWeb Code of Conduct</a>.
</p>
</dd>
<dt>How do I add my website to the webring?</dt>
<dd>
<p>
Joining the webring is a two-part process.
<ol>
<li>Sign in using your personal site's domain as your identity. The webring works with sites that support <a href="https://indieweb.org/IndieAuth">IndieAuth</a> or <a href="https://indieweb.org/RelMeAuth">RelMeAuth</a>.</li>
<li>Add your site's unique <strong>webring links</strong> to your homepage. You can always find your links in the <a href="/dashboard#webring-links">Your Webring Links section</a> of the <a href="/dashboard">Dashboard page</a>.</li>
</ol>
</p>
</dd>

<dt>What are <strong>webring links</strong>?</dt>
<dd><p>
These links appear on the home page of each member of the webring, and allow visitors of member sites to continue exploring other sites in the webring. These links are <em>how the webring works</em>.
</p>
<p>
In order to prevent "breaking the ring", member sites are checked periodically to make sure the webring links are still on their homepage. If the links are missing, your site will be marked as inactive.
</p>
<p>
Members can re-scan their home page for webring links at any time from the <a href="/dashboard">Dashboard page</a>.
</p></dd>

<dt>What data do you collect about webring members?</dt>
<dd>
<p>The webring collects public information from the URL you enter when signing in.</p>
<ul>
<li>Periodically, or whenever you request it, the webring will check for the presence of your site's unique <strong>webring links</strong>.</li>
<li>When you join, and whenever you request it, the webring will check for a <a href="http://microformats.org/wiki/representative-h-card-authoring">representative h-card</a> containing profile info such as your name, photo, and short bio.</li>
</ul>
<p>
You can view all information the webring has stored about you on the <a href="/dashboard">Dashboard page</a>. You can remove your profile information from the webring from the dashboard page.
</p>
</dd>

<dt>What data do you display about webring members?</dt>
<dd>
<p>
As an ACTIVE member of the webring:
</p>
<ul>
<li>A webring visitor following the <strong>webring links</strong> on another member's page may be directed to your page.</li>
<li>Public profile information from your home page such as your name, photo, and short bio may be shown on the <a href="/directory">Directory page</a> You can delete this information at any time to be removed from the Directory page.</li>
</ul>
<p>
You can view all information the webring has stored about you on the <a href="/dashboard">Dashboard page</a>. You can remove your profile information from the webring from the dashboard page.
</p>
</dd>

<dt>What data do you collect about webring visitors?</dt>
<dd><p>
In order to ensure the site's functionality, some information may be temporarily logged when a visitors follows any <strong>webring link</strong>, including which webring link they visited, the page they were on when they clicked the link, and the page the webring directed them to next. No identifying information like IP address is collected. The logs are only collected when the site is actively being developed, and are only kept for a few minutes before being cleared.
</p></dd>

<dt>How do I remove myself from the webring?</dt>
<dd><p>
You can remove yourself from the webring entirely from the <a href="/dashboard">Dashboard page</a>.
</p><p>
To ensure that webring visitors are not directed to your site, remove the <strong>webring links</strong> from your home page, and use the "Check links now!" button on your dashboard to ensure that your site is now INACTIVE. This will also remove your profile from the <a href="/directory">Directory page</a>.
</p>
<p>
To remove your profile information entirely, use the "Remove my profile" button on your dashboard page. This will remove your site from the Directory page, but webring visitors may be directed to your site if it is still listed as ACTIVE.
</p></dd>

<dt>Can you remove all information about me from the webring?</dt>
<dd><p>
Sure! Webring members can request to be entirely removed from the webring by contacting Marty. He can be reached via the contact links on <a href="https://martymcgui.re/">his website</a>, or directing a message to <code>schmarty</code> in the <a href="https://indieweb.org/discuss">IndieWeb chat</a>.
</p></dd>

<dt>Anything else?</dt>
<dd><p>
Sure! We ask that members adhere to the <a href="https://indieweb.org/">IndieWeb Code of Conduct</a>. However, we do not control the content of any webring member site and viewing them is at your own risk. If you believe you have found a member site that should not be included in the webring for any reason, please contact us using the links in the footer.
</p>
<p>
ACTIVE/INACTIVE status, profile information, and membership in the webring are provided on a best-effort basis and at our sole discretion!
</p></dd>
</dl>

Loading…
Cancel
Save