Browse Source

use tildeverse/wiki

pull/18/head
Ben Harris 2 years ago
parent
commit
d15fccb3ab
Signed by untrusted user: ben GPG Key ID: 4E0AF802FFF7960C
  1. 2
      .editorconfig
  2. 2
      blacklist.example
  3. 11
      composer.json
  4. 113
      composer.lock
  5. 47
      discord/index.php
  6. 16
      footer.php
  7. 1024
      jasny-bootstrap.js
  8. 7
      js/bootstrap.min.js
  9. 4
      js/jquery.min.js
  10. 16
      navbar.php
  11. 20
      wiki/index.php

2
.editorconfig

@ -1,4 +1,4 @@
# EdeitorConfig to make ben's editor stop defaulting to spaces
# EditorConfig to make ben's editor stop defaulting to spaces
root = true # yes, this is the root editorconfig for this project

2
blacklist.example

@ -1,2 +0,0 @@
#mysecrets
#dontlookhere

11
composer.json

@ -1,6 +1,11 @@
{
"require": {
"michelf/php-markdown": "^1.8",
"mnapoli/front-yaml": "^1.6"
}
"tildeverse/wiki": "dev-master"
},
"repositories": [
{
"type": "vcs",
"url": "https://tildegit.org/ben/tildewiki"
}
]
}

113
composer.lock

@ -4,23 +4,24 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "d6a1ecb21bac8642fb0b75ee1e70eced",
"content-hash": "3ab3df15c4e40417f427b37691e83088",
"packages": [
{
"name": "erusev/parsedown",
"version": "1.7.0",
"version": "1.7.3",
"source": {
"type": "git",
"url": "https://github.com/erusev/parsedown.git",
"reference": "6678d59be48c4be64eaca6ce70bea48a09488cc2"
"reference": "6d893938171a817f4e9bc9e86f2da1e370b7bcd7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/erusev/parsedown/zipball/6678d59be48c4be64eaca6ce70bea48a09488cc2",
"reference": "6678d59be48c4be64eaca6ce70bea48a09488cc2",
"url": "https://api.github.com/repos/erusev/parsedown/zipball/6d893938171a817f4e9bc9e86f2da1e370b7bcd7",
"reference": "6d893938171a817f4e9bc9e86f2da1e370b7bcd7",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"php": ">=5.3.0"
},
"require-dev": {
@ -49,53 +50,51 @@
"markdown",
"parser"
],
"time": "2018-02-28T11:41:37+00:00"
"time": "2019-03-17T18:48:37+00:00"
},
{
"name": "michelf/php-markdown",
"version": "1.8.0",
"name": "erusev/parsedown-extra",
"version": "0.7.1",
"source": {
"type": "git",
"url": "https://github.com/michelf/php-markdown.git",
"reference": "01ab082b355bf188d907b9929cd99b2923053495"
"url": "https://github.com/erusev/parsedown-extra.git",
"reference": "0db5cce7354e4b76f155d092ab5eb3981c21258c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/michelf/php-markdown/zipball/01ab082b355bf188d907b9929cd99b2923053495",
"reference": "01ab082b355bf188d907b9929cd99b2923053495",
"url": "https://api.github.com/repos/erusev/parsedown-extra/zipball/0db5cce7354e4b76f155d092ab5eb3981c21258c",
"reference": "0db5cce7354e4b76f155d092ab5eb3981c21258c",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
"erusev/parsedown": "~1.4"
},
"type": "library",
"autoload": {
"psr-4": {
"Michelf\\": "Michelf/"
"psr-0": {
"ParsedownExtra": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
"MIT"
],
"authors": [
{
"name": "Michel Fortin",
"email": "michel.fortin@michelf.ca",
"homepage": "https://michelf.ca/",
"role": "Developer"
},
{
"name": "John Gruber",
"homepage": "https://daringfireball.net/"
"name": "Emanuil Rusev",
"email": "hello@erusev.com",
"homepage": "http://erusev.com"
}
],
"description": "PHP Markdown",
"homepage": "https://michelf.ca/projects/php-markdown/",
"description": "An extension of Parsedown that adds support for Markdown Extra.",
"homepage": "https://github.com/erusev/parsedown-extra",
"keywords": [
"markdown"
"markdown",
"markdown extra",
"parsedown",
"parser"
],
"time": "2018-01-15T00:49:33+00:00"
"time": "2015-11-01T10:19:22+00:00"
},
{
"name": "mnapoli/front-yaml",
@ -134,16 +133,16 @@
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.9.0",
"version": "v1.11.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "e3d826245268269cd66f8326bd8bc066687b4a19"
"reference": "82ebae02209c21113908c229e9883c419720738a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19",
"reference": "e3d826245268269cd66f8326bd8bc066687b4a19",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a",
"reference": "82ebae02209c21113908c229e9883c419720738a",
"shasum": ""
},
"require": {
@ -155,7 +154,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.9-dev"
"dev-master": "1.11-dev"
}
},
"autoload": {
@ -188,20 +187,20 @@
"polyfill",
"portable"
],
"time": "2018-08-06T14:22:27+00:00"
"time": "2019-02-06T07:57:58+00:00"
},
{
"name": "symfony/yaml",
"version": "v4.1.4",
"version": "v4.3.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "b832cc289608b6d305f62149df91529a2ab3c314"
"reference": "c60ecf5ba842324433b46f58dc7afc4487dbab99"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/b832cc289608b6d305f62149df91529a2ab3c314",
"reference": "b832cc289608b6d305f62149df91529a2ab3c314",
"url": "https://api.github.com/repos/symfony/yaml/zipball/c60ecf5ba842324433b46f58dc7afc4487dbab99",
"reference": "c60ecf5ba842324433b46f58dc7afc4487dbab99",
"shasum": ""
},
"require": {
@ -220,7 +219,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.1-dev"
"dev-master": "4.3-dev"
}
},
"autoload": {
@ -247,13 +246,45 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"time": "2018-08-18T16:52:46+00:00"
"time": "2019-04-06T14:04:46+00:00"
},
{
"name": "tildeverse/wiki",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://tildegit.org/ben/tildewiki",
"reference": "751eb64c383cb7c6ec643eaf683b88aa1de351ea"
},
"require": {
"erusev/parsedown-extra": "^0.7.1",
"mnapoli/front-yaml": "^1.6"
},
"type": "library",
"autoload": {
"psr-4": {
"Tildeverse\\Wiki\\": "src/"
}
},
"license": [
"GPLv3"
],
"authors": [
{
"name": "Ben Harris",
"email": "ben@tilde.team"
}
],
"description": "parsedown extensions for tilde wikis",
"time": "2019-07-03T05:06:34+00:00"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {
"tildeverse/wiki": 20
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],

47
discord/index.php

@ -1,47 +0,0 @@
<?php
$title = 'tilde.chat discord bridge';
include __DIR__.'/../header.php';
?>
<h1>tilde.chat discord</h1>
<pre>
khuxkm Today at 1:39 AM
ATTENTION @everyone:
Due to recent events in the Discord server, we have decided to lock this Discord and accompanying IRC bridge until
further notice. On Monday, the IRC to Discord bridge will be shut down and all channels in this Discord will be set
to READ-ONLY. This decision will only be reversed when a full discussion has been held on moderation requirements,
rules, and certain members of our moderation team who appear to be missing.
How this affects you:
- If you primarily use Discord, you will have to use IRC from now on. tilde.team users can use our TheLounge instance at
https://irc.tilde.team/ for a Discord-like experience (or any other client of their choosing), whereas members of
other tildes can continue using their tilde's node in the tilde.chat network.
- If you primarily use IRC, all that changes is that you will not be able to use this Discord.
The behavior of some users in this Discord has been unacceptable and does not comply with our code of conduct.
Upon further review, we have decided that managing this Discord server is a bit more than we can handle without discussing
moderation in-depth. As such, ben and I (khuxkm) have decided to make this Discord READ-ONLY until we have come to a more
permanent decision (which may be to close this server permanently).
If you have any thoughts/ideas for the future of the discord bridge, please drop a line to ben or myself on IRC or by email
(@tilde.team). We can be found in the #sudoers channel.
Thanks for being a member of the tildeverse and working with us to figure out a chat solution that works for everyone!
</pre>
<!-- See above, but here are the links if you want 'em anyways:
<strong>which tilde are you part of?</strong>
<hr>
<p>
<a href="https://discord.gg/BH4Bs5U" class="btn btn-default">tilde.team</a>
<a href="https://discord.gg/GhmGb3x" class="btn btn-default">tilde.town</a>
<a href="https://discord.gg/sfhzHBc" class="btn btn-default">yourtilde.com</a>
</p>->
<?php
include __DIR__.'/../footer.php';

16
footer.php

@ -1,10 +1,10 @@
<br><br>
</div>
<footer class="text-center">
<a href="https://tildegit.org/tildeverse/tilde.chat">site source</a> ~ official ircnet of the <a href="https://tildeverse.org">tildeverse</a>
</footer>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script src="./jasny-bootstrap.js"></script>
<br><br>
</div>
<footer class="text-center">
<a href="https://tildegit.org/tildeverse/tilde.chat">site source</a>
~ official ircnet of the <a href="https://tildeverse.org">tildeverse</a>
</footer>
<script src="/js/jquery.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
</body>
</html>

1024
jasny-bootstrap.js

File diff suppressed because it is too large

7
js/bootstrap.min.js

File diff suppressed because one or more lines are too long

4
js/jquery.min.js

File diff suppressed because one or more lines are too long

16
navbar.php

@ -11,17 +11,11 @@
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="/">home</a></li>
<li><a href="/wiki/">wiki</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">~chat pages <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="https://quotes.tilde.chat/"><i class="fa fa-comment"></i> ~chat qdb</a></li>
<li><a href="https://web.tilde.chat/"><i class="fa fa-comments-o"></i> ~webchat</a></li>
<li><a href="https://tilde.chat/stats/"><i class="fa fa-bar-chart"></i> network stats</a></li>
<li><a href="https://tilde.chat/badges/"><i class="fa fa-shield"></i> status badges</a></li>
</ul>
</li>
<li><a href="/wiki/"><i class="fa fa-edit"></i> wiki</a></li>
<li><a href="https://quotes.tilde.chat/"><i class="fa fa-comment"></i> qdb</a></li>
<li><a href="https://web.tilde.chat/"><i class="fa fa-comments-o"></i> webchat</a></li>
<li><a href="/stats/"><i class="fa fa-bar-chart"></i> stats</a></li>
<li><a href="/badges/"><i class="fa fa-shield"></i> badges</a></li>
</ul>
</div>
</div>

20
wiki/index.php

@ -1,6 +1,8 @@
<?php
require __DIR__.'/../vendor/autoload.php';
use Tildeverse\Wiki\Parser;
$additional_head = "
<style>
:target:before {
@ -14,21 +16,7 @@ $additional_head = "
<meta property='og:site_name' content='tilde.chat wiki'>
";
class MDParser implements Mni\FrontYAML\Markdown\MarkdownParser {
public function __construct() {
$this->mdparser = new Michelf\MarkdownExtra();
$this->mdparser->header_id_func = function ($header) {
return preg_replace('/[^a-z0-9]/', '-', strtolower($header));
};
}
public function parse($markdown) {
return $this->mdparser->transform($markdown);
}
}
$parser = new Mni\FrontYAML\Parser(null, new MDParser());
$parser = Parser::factory();
if (!isset($_GET["page"]) || !file_exists("pages/{$_GET['page']}.md")) {
@ -76,7 +64,7 @@ if (!isset($_GET["page"]) || !file_exists("pages/{$_GET['page']}.md")) {
<a href=".">&lt; ~wiki</a>
<hr>
<?=str_replace("<table", '<table class="table table-striped"', $pg->getContent())?>
<?=$pg->getContent()?>
<hr>
<a href="https://tildegit.org/tildeverse/tilde.chat/src/branch/master/wiki/pages/<?=$_GET["page"]?>.md">
<i class="fa fa-edit"></i> source

Loading…
Cancel
Save