info beginnings, still gotta style this
This commit is contained in:
parent
4af5fbbd9a
commit
8c4989c37b
8 changed files with 180 additions and 0 deletions
|
@ -1 +1,3 @@
|
||||||
|
# Code of Conduct
|
||||||
|
|
||||||
p:
|
p:
|
||||||
|
|
3
docs/site/privacy.md
Normal file
3
docs/site/privacy.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Privacy Policy
|
||||||
|
|
||||||
|
Remind me to write this.
|
66
docs/site/rules.md
Normal file
66
docs/site/rules.md
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
# Rules
|
||||||
|
|
||||||
|
## Global Rules
|
||||||
|
All of these rules are in effect on any place on the site unless explicitly stated otherwise.
|
||||||
|
|
||||||
|
1. **Spamming/flooding is not allowed unless otherwise stated.**
|
||||||
|
One-off jokes are fine, don't overdo it.
|
||||||
|
|
||||||
|
1. **Be decent towards each other.**
|
||||||
|
Respect is not a given but that does not make for an excuse for baseless antagonisation.
|
||||||
|
|
||||||
|
1. **If you have a problem with someone, point it out.**
|
||||||
|
Don't be passive aggressive.
|
||||||
|
|
||||||
|
1. **NSFW content is disallowed unless otherwise stated.**
|
||||||
|
This includes anything sexually suggestive.
|
||||||
|
|
||||||
|
1. **Content considered illegal in the United States and/or the Netherlands is never allowed.**
|
||||||
|
The server is hosted in the Netherlands and the majority user base is in the United States.
|
||||||
|
There will never be exceptions to this.
|
||||||
|
|
||||||
|
1. **Users may only have a single account.**
|
||||||
|
Flashii provides a number of services where having multiple accounts could grant unfair advantages.
|
||||||
|
Exceptions may be granted for bot accounts.
|
||||||
|
|
||||||
|
1. **Keep political discussions to an absolute minimum.**
|
||||||
|
There is a time and place for it, but Flashii is intended to be a footloose and fancy-free community.
|
||||||
|
Moderator intervention will be used for petty shouting matches.
|
||||||
|
|
||||||
|
1. **You must be at least 13 years of age on the Gregorian calendar.**
|
||||||
|
When validating this a staff member will always ask this in a direct message, never in public channels.
|
||||||
|
|
||||||
|
1. **Link shorteners are not allowed.**
|
||||||
|
Harmless links will result in a warning, malicious links will result in a ban.
|
||||||
|
|
||||||
|
1. **Self promotion is not allowed.**
|
||||||
|
You CAN show off your creations, however blatant advertising _not relevant to a conversation/channel topic_ is not allowed.
|
||||||
|
|
||||||
|
## Forum Rules
|
||||||
|
1. **Defacing posts is not allowed.**
|
||||||
|
If you blank one of your posts, it will be restored and you will be warned.
|
||||||
|
If you have a legitimate reason for this, talk to a staff member.
|
||||||
|
|
||||||
|
1. **Abusing post formatting tools is not allowed.**
|
||||||
|
This includes using a persistent font colour as an "avatar", but excludes making a flashy opening post to your topic.
|
||||||
|
|
||||||
|
1. **Don't make trivial posts.**
|
||||||
|
Replying with `same` isn't constructive.
|
||||||
|
|
||||||
|
## Chat Rules
|
||||||
|
1. **Persistent typing quirks are not allowed.**
|
||||||
|
This applies where Global Rule 1 applies.
|
||||||
|
|
||||||
|
1. **Try to keep topics to their own channels**
|
||||||
|
If a lengthy discussion shifts to a topic that has its own channel, try to move the discussion to that channel. Action will be taken only for repeated, flagrant offences.
|
||||||
|
|
||||||
|
## Game Service Rules
|
||||||
|
1. **Play fairly.**
|
||||||
|
Do not use exploits to gain unfair advantages.
|
||||||
|
|
||||||
|
## What happens if I break rules?
|
||||||
|
Major offenses will result in a ban.
|
||||||
|
Minor offenses will result in warnings; however, after five warnings you will be banned.
|
||||||
|
A warning is retained for ninety (90) days.
|
||||||
|
Depending on moderator discretion, you may be banned prior to five warnings, and this warning threshold may change at any time.
|
||||||
|
Permanent bans are reserved for serious or blatantly repetitious violations, and will be issued by administrators.
|
5
docs/site/terms.md
Normal file
5
docs/site/terms.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Terms of Service
|
||||||
|
|
||||||
|
Remind me to write this too.
|
||||||
|
Don't expect cool legalspeak, I'm a human being.
|
||||||
|
Refer to the regular rules for now.
|
64
public/info.php
Normal file
64
public/info.php
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
<?php
|
||||||
|
use Misuzu\Database;
|
||||||
|
|
||||||
|
require_once __DIR__ . '/../misuzu.php';
|
||||||
|
|
||||||
|
$pathInfo = $_SERVER['PATH_INFO'] ?? '';
|
||||||
|
|
||||||
|
if (empty($pathInfo) || $pathInfo === '/') {
|
||||||
|
echo tpl_render('info.index');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$document = [
|
||||||
|
'content' => '',
|
||||||
|
'title' => '',
|
||||||
|
];
|
||||||
|
|
||||||
|
$isMisuzuDoc = $pathInfo === '/misuzu' || starts_with($pathInfo, '/misuzu/');
|
||||||
|
|
||||||
|
if ($isMisuzuDoc) {
|
||||||
|
$filename = substr($pathInfo, 8);
|
||||||
|
$filename = empty($filename) ? 'README' : strtoupper($filename);
|
||||||
|
|
||||||
|
if ($filename !== 'README') {
|
||||||
|
$titleSuffix = ' - Misuzu Project';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$filename = strtolower(substr($pathInfo, 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!preg_match('#^([A-Za-z0-9_]+)$#', $filename)) {
|
||||||
|
echo render_error(404);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($filename !== 'LICENSE') {
|
||||||
|
$filename .= '.md';
|
||||||
|
}
|
||||||
|
|
||||||
|
$filename = __DIR__ . '/../' . ($isMisuzuDoc ? '' : 'docs/site/') . $filename;
|
||||||
|
$document['content'] = is_file($filename) ? file_get_contents($filename) : '';
|
||||||
|
|
||||||
|
if (empty($document['content'])) {
|
||||||
|
echo render_error(404);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($document['title'])) {
|
||||||
|
if (starts_with($document['content'], '# ')) {
|
||||||
|
$titleOffset = strpos($document['content'], "\n");
|
||||||
|
$document['title'] = trim(substr($document['content'], 2, $titleOffset - 1));
|
||||||
|
$document['content'] = substr($document['content'], $titleOffset);
|
||||||
|
} else {
|
||||||
|
$document['title'] = ucfirst(basename($filename));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($titleSuffix)) {
|
||||||
|
$document['title'] .= $titleSuffix;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo tpl_render('info.view', [
|
||||||
|
'document' => $document,
|
||||||
|
]);
|
25
templates/info/index.twig
Normal file
25
templates/info/index.twig
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{% extends 'info/master.twig' %}
|
||||||
|
|
||||||
|
{% set title = 'Info' %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="container">
|
||||||
|
<div class="container__title">
|
||||||
|
Flashii Informational Pages
|
||||||
|
</div>
|
||||||
|
<div class="container__content">
|
||||||
|
<p>Here's a listing of a few informational pages that'll probably come in handy during your Flashii Experience™.</p>
|
||||||
|
<ul>
|
||||||
|
<li>Flashii</li>
|
||||||
|
<li><a href="/info.php/rules">Rules</a></li>
|
||||||
|
<li><a href="/info.php/terms">Terms of Service</a></li>
|
||||||
|
<li><a href="/info.php/privacy">Privacy Policy</a></li>
|
||||||
|
|
||||||
|
<li>Misuzu Project</li>
|
||||||
|
<li><a href="/info.php/misuzu">Read me</a></li>
|
||||||
|
<li><a href="/info.php/misuzu/license">License</a></li>
|
||||||
|
<li><a href="/info.php/misuzu/code_of_conduct">Code of Conduct</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
1
templates/info/master.twig
Normal file
1
templates/info/master.twig
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{% extends 'master.twig' %}
|
14
templates/info/view.twig
Normal file
14
templates/info/view.twig
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{% extends 'info/master.twig' %}
|
||||||
|
|
||||||
|
{% set title = document.title %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="container">
|
||||||
|
<div class="container__title">
|
||||||
|
{{ document.title }}
|
||||||
|
</div>
|
||||||
|
<div class="container__content">
|
||||||
|
{{ document.content|parse_text('md')|raw }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
Loading…
Add table
Reference in a new issue