Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
gndclouds committed Jan 14, 2021
0 parents commit c7bb837
Show file tree
Hide file tree
Showing 22 changed files with 563 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/name-of-website.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: name.of.website
about: Describe this issue template's purpose here.

---

```
Position of webring icon on site: ex: footer, header
```
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.now
node_modules

# Environment Variables
.env
.env.build
2 changes: 2 additions & 0 deletions .nowignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
README.md
yarn.lock
18 changes: 18 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
permalink: /404.html
---
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Loading..</title>
</head>
<body style='background:black'>
<script>
const parts = window.location.pathname.split("/")
const target = parts.slice(-1);
parts.splice(-1)
document.location.href = parts.join("/")+"/#"+target
</script>
</body>
</html>
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
garden.tinyfactories.space
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 Devine Lu Linvega

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Garden
64 changes: 64 additions & 0 deletions README_old.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Webring

This [webring](https://wiki.xxiivv.com/webring) is an attempt to inspire artists & developers to create and maintain their own website and share traffic among each other. The webring's aim is to share hand-crafted websites such as **diaries, wikis & portfolios**. To add yourself to the ring, submit an [edit](https://github.com/XXIIVV/webring/edit/master/scripts/sites.js) to this repository.

## Join the webring

```
<a href='https://webring.xxiivv.com/#random' target='_blank'><img src='https://webring.xxiivv.com/icon.black.svg'/></a>
```

- Add the webring icon to your website html.
- Add your website information to the [sites.js](https://github.com/XXIIVV/webring/edit/master/scripts/sites.js) file. The `url` key is required, but you can also include `title`, `type`, `author`, `contact`, `rss`, and `feed`.
- Submit a Pull Request with **the location of the webring icon** on your site.

Alternatively, if you your website has a dark background, use `icon.white.svg`. If your website is complaining about *https*, go ahead and host the icon yourself. **Single page websites, and websites acting only as portals to other social platforms, will be rejected**.

### Circular Linking

Instead of linking to the directory, you can also link to the next link in the ring by adding parts of your site or domain in the hash of the request url:

```
<a href='https://webring.xxiivv.com/#wiki.xxiivv' target='_blank' rel="noopener noreferrer"><img src='https://webring.xxiivv.com/icon.black.svg'/></a>
```

### Joining the hallway

[The Hallway](https://webring.xxiivv.com/hallway.html) is a decentralized forum using [twtxt](https://twtxt.readthedocs.io/en/stable/user/twtxtfile.html) feeds.

To join, create a `.txt` file on your site, and add its URL to [your webring entry](https://github.com/XXIIVV/Webring/blob/master/scripts/sites.js) as `feed:`. The content of the file should be a dateISO string, a tab(or 3 spaces) and a message:

```
2016-02-04T13:30:00+01:00 You can really go crazy here! ┐(゚∀゚)┌
2016-02-03T23:05:00+01:00 @<example http://example.org/twtxt.txt> welcome to twtxt!
2016-02-01T11:00:00+01:00 This is just another example.
2015-12-12T12:00:00+01:00 Fiat lux!
```

This file needs to be accessible via CORS, so if you're self-hosting, please make sure to allow the `webring.xxiivv.com` origin.
Here's an example of how to do so with Nginx:

```
location / {
index index.html;
if ($request_method = 'GET') {
add_header 'Access-Control-Allow-Origin' 'https://webring.xxiivv.com';
add_header 'Access-Control-Allow-Methods' 'GET';
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
}
}
```

You don't need to allow all origins nor allow any other methods rather than GET, doing so can harm the security of your website, please read about [Cross-Origin Resource Sharing](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) if you intend to do anything more complicated.

## API

This repository does not contain mature API capabilities, but there are a couple ways to request a list of sites and other information currently in the webring.

- Request [sites.js on xxiivv](https://webring.xxiivv.com/scripts/sites.js) or [sites.js on github](https://raw.githubusercontent.com/XXIIVV/webring/master/scripts/sites.js) and parse it. An example can be seen [here](https://gist.github.com/ckipp01/2ab7ac42e2837b4359efeb76eb49bb54).
- If you'd like a already parsed list, [webring-checker.now.sh/sites](https://webring-checker.now.sh/sites) will return an json array of the site objects in the webring. See [webring-checker.now.sh](https://webring-checker.now.sh) for more info on what else is available.

## Need Help?

The ring is managed by [@neauoire](https://twitter.com/neauoire), but any member of the network is also welcome to join this repository as a collaborator to help manage new links and Pull Requests. Read more [here](https://wiki.xxiivv.com/webring).
19 changes: 19 additions & 0 deletions hallway.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="links/fonts.css"/>
<link rel="stylesheet" type="text/css" href="links/main.css"/>
<script src="scripts/hallway.js"></script>
<script src="scripts/sites.js"></script>
<title>Hallway</title>
</head>
<body>
<script>
const hallway = new Hallway(sites);
hallway.install(document.body);
hallway.start();
</script>
</body>
</html>
13 changes: 13 additions & 0 deletions icon.black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions icon.white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="links/fonts.css"/>
<link rel="stylesheet" type="text/css" href="links/main.css"/>
<script src="scripts/portal.js"></script>
<script src="scripts/sites.js"></script>
<script src="scripts/opml.js"></script>
<title>garden</title>
</head>
<body>
<script>
const portal = new Portal(sites);
portal.install(document.body);
portal.start();
</script>
</body>
</html>
15 changes: 15 additions & 0 deletions links/fonts.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* Input Mono */

@font-face {
font-family: 'input_mono_regular';
src: url('../media/fonts/input_mono_regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}

@font-face {
font-family: 'input_mono_medium';
src: url('../media/fonts/input_mono_medium.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
63 changes: 63 additions & 0 deletions links/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
* { margin:0;padding:0;border:0;outline:0;text-decoration:none;font-weight:inherit;font-style:inherit;color:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;list-style:none;border-collapse:collapse;border-spacing:0; -webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;}

body { background:#f4f4f4; padding:0px; margin:0px; }
body div { display:block; background: #111;min-height: calc(100vh - 60px);width: calc(100vw - 60px);margin: 15px;color: #333;padding: 15px;font-family:'input_mono_regular', 'Monospaced','Courier New',courier;font-size:11px; position: relative; border-radius: 2px; color:white;}
body div ul { max-width: 800px; border-bottom: 2px solid white;padding-bottom: 15px;margin-bottom:15px; overflow: hidden;}
body div p { display:block; padding:0px 5px; line-height: 20px; max-width: 600px}
body div p a { text-decoration: underline;}
body div p a:hover { text-decoration: underline; }
body div p b { font-weight: normal; font-family: 'input_mono_medium' }
body div p.readme { max-width:500px; }

/* Hallway */

body #hallway #entries { width: calc(100vw - 300px) !important; }
body #hallway #sidebar { position: absolute;top: 0px;right: 0px;padding: 0px 15px;width: 200px; }

body #hallway #sidebar > * { border-bottom: 0px; line-height: 16px; padding-bottom: 0px }
body #hallway #sidebar > * li { text-transform: lowercase; }
body #hallway #sidebar > * li.selected { background: white; color:black; }
body #hallway #sidebar > * li:hover { cursor: pointer; }
body #hallway #sidebar > * li span.right { color:#555; float:right; }
body #hallway #sidebar > * li span.right:after { content: " msgs"; }
body #hallway #sidebar #channels li:before { content:'/'; }
body #hallway #sidebar #users li:before { content:'@'; }

body #hallway .entry { line-height: 16px; display: block; position: relative; padding-left:100px; }
body #hallway .entry .date { color: #555;display: block;float:right; margin-left:20px; padding-bottom: 16px;}
body #hallway .entry .author { font-family: 'input_mono_medium'; position: absolute;left: 0px; }
body #hallway .entry .body { display: block;border-bottom: 1px solid #333;padding-bottom: 10px;margin-bottom: 10px; }
body #hallway .entry .body a { text-decoration: underline; }
body #hallway .entry .body .channel { display: inline-block;border-radius: 1px;font-family: 'input_mono_medium';color: #777; }
body #hallway .entry .body .user { display: inline-block;border-radius: 1px;font-family: 'input_mono_medium';color: #777; }
body #hallway .entry .body .tag { display: inline-block;border-radius: 1px;font-family: 'input_mono_medium';color: #777; }
body #hallway .entry.highlight .author { color:#555; }
body #hallway .entry:hover .author { color:#ccc; }
body #hallway .entry:hover .date { color:#ccc; }
body #hallway .entry:hover .body { color:#ccc; border-bottom-color: #555 }
body #hallway p { padding-left: 60px;background-image: url(../icon.white.svg);background-size: 40px;background-repeat: no-repeat;background-position: 0px 0px; }
body #hallway ul { max-width: 100%; }
body #hallway ul li:last-child { border-bottom:0px; }

/* Portal */

body #portal #icon { display: block;width: 30px;height: 30px;background-image: url(../icon.white.svg);background-size: cover;background-repeat: no-repeat;position: absolute;bottom: 15px;right:15px;background-position: center;padding:0px }
body #portal ul { columns:3; }
body #portal ul li { display:block; padding-left:5px; text-overflow: ellipsis; text-transform: lowercase;}
body #portal ul li.wiki::after { content:"<wiki>"; color:#555; }
body #portal ul li.blog::after { content:"<blog>"; color:#555; }
body #portal ul li a { line-height: 20px; padding:0px 5px; text-decoration: none;}
body #portal ul li a:visited { color:#ccc; text-decoration: none;}
body #portal ul li a:hover { text-decoration: underline; }

@media (max-width: 730px) {
body #portal ul li span.counter { display: none }
}
@media (max-width: 630px) {
body #portal ul { columns: 2 !important; }
body #portal ul li span.counter { display: none }
}
@media (max-width: 530px) {
body #portal ul { columns: 1 !important; }
body #portal ul li span.counter { display: inline }
}
Binary file added media/fonts/input_mono_medium.ttf
Binary file not shown.
Binary file added media/fonts/input_mono_regular.ttf
Binary file not shown.
3 changes: 3 additions & 0 deletions now.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name":"garden"
}
Loading

1 comment on commit c7bb837

@vercel
Copy link

@vercel vercel bot commented on c7bb837 Jan 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.