Mojolicious Site
parent
f28ba72d0a
commit
f5bdcdda82
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/unix.dog.iml" filepath="$PROJECT_DIR$/.idea/unix.dog.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Perl5LocalSettings">
|
||||
<option name="perlInterpreter" value="Local, System: Perl 5.30.3" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Perl5Settings">
|
||||
<option name="targetPerlVersion">
|
||||
<PerlVersion>
|
||||
<option name="major" value="30" />
|
||||
<option name="revision" value="5" />
|
||||
</PerlVersion>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,24 @@
|
|||
package unix_dog;
|
||||
use Mojo::Base 'Mojolicious', -signatures;
|
||||
|
||||
# This method will run once at server start
|
||||
sub startup ($self) {
|
||||
|
||||
# Load configuration from config file
|
||||
my $config = $self->plugin('NotYAMLConfig');
|
||||
|
||||
# Configure the application
|
||||
$self->secrets($config->{secrets});
|
||||
|
||||
$self->defaults(title => 'UNIX.dog');
|
||||
|
||||
# Router
|
||||
my $r = $self->routes;
|
||||
|
||||
# Normal route to controller
|
||||
$r->get('/')->to('Main#index');
|
||||
$r->get('/index.xhtml')->to('Main#index');
|
||||
$r->get('/rules')->to('Main#rules');
|
||||
}
|
||||
|
||||
1;
|
|
@ -0,0 +1,11 @@
|
|||
package unix_dog::Controller::Example;
|
||||
use Mojo::Base 'Mojolicious::Controller', -signatures;
|
||||
|
||||
# This action will render a template
|
||||
sub welcome ($self) {
|
||||
|
||||
# Render template "example/welcome.html.ep" with message
|
||||
$self->render(msg => 'Welcome to the Mojolicious real-time web framework!');
|
||||
}
|
||||
|
||||
1;
|
|
@ -0,0 +1,12 @@
|
|||
package unix_dog::Controller::Main;
|
||||
use Mojo::Base 'Mojolicious::Controller', -signatures;
|
||||
|
||||
sub index ($self) {
|
||||
$self->render();
|
||||
}
|
||||
|
||||
sub rules ($self) {
|
||||
$self->render();
|
||||
}
|
||||
|
||||
1;
|
|
@ -0,0 +1,12 @@
|
|||
use strict;
|
||||
use warnings FATAL => 'all';
|
||||
use Mojolicious::Lite -signatures;
|
||||
|
||||
app->start;
|
||||
__DATA__
|
||||
|
||||
@@ magic.html.ep
|
||||
<html>
|
||||
<body>
|
||||
|
||||
|
|
@ -0,0 +1,114 @@
|
|||
body {
|
||||
font-family: monospace;
|
||||
margin: 0;
|
||||
background: #080e08;
|
||||
color: #f6f6f6;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
h1, h2 {
|
||||
color: #4af626;
|
||||
}
|
||||
|
||||
footer {
|
||||
padding: 10px;
|
||||
max-width: 800px;
|
||||
width: 100%;
|
||||
background: #3a7920;
|
||||
color: #f6f6f6;
|
||||
|
||||
margin: auto auto 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
a:link {
|
||||
color: #2cacb0;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: #b4778f;
|
||||
}
|
||||
@media (prefers-color-scheme: light) {
|
||||
body {
|
||||
background: #fcfffc;
|
||||
color: #211c1b;
|
||||
}
|
||||
|
||||
h1, h2 {
|
||||
color: #4c982a;
|
||||
}
|
||||
|
||||
a:link {
|
||||
color: #1f7b7e;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: #7c5263;
|
||||
}
|
||||
}
|
||||
|
||||
header {
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
rgba(255, 0, 0, 1) 0%,
|
||||
rgba(255, 154, 0, 1) 10%,
|
||||
rgba(208, 222, 33, 1) 20%,
|
||||
rgba(79, 220, 74, 1) 30%,
|
||||
rgba(63, 218, 216, 1) 40%,
|
||||
rgba(47, 201, 226, 1) 50%,
|
||||
rgba(28, 127, 238, 1) 60%,
|
||||
rgba(95, 21, 242, 1) 70%,
|
||||
rgba(186, 12, 248, 1) 80%,
|
||||
rgba(251, 7, 217, 1) 90%,
|
||||
rgba(255, 0, 0, 1) 100%
|
||||
);
|
||||
min-height: 50px;
|
||||
display: flex;
|
||||
color: black;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#header-content {
|
||||
max-width: 800px;
|
||||
margin: auto;
|
||||
width: 100%;
|
||||
align-content: center;
|
||||
flex-direction: row;
|
||||
display: flex;
|
||||
padding: 10px;
|
||||
}
|
||||
#header-content h1 {
|
||||
color: black;
|
||||
margin: auto auto auto 1rem;
|
||||
}
|
||||
|
||||
#header-content img {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
main {
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
padding: 10px;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
span.copyleft {
|
||||
display: inline-block;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
footer a:link, footer a:visited {
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
}
|
||||
|
||||
footer a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 168 KiB |
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Mojo::File qw(curfile);
|
||||
use lib curfile->dirname->sibling('lib')->to_string;
|
||||
use Mojolicious::Commands;
|
||||
|
||||
# Start command line interface for application
|
||||
Mojolicious::Commands->start_app('unix_dog');
|
|
@ -0,0 +1,9 @@
|
|||
use Mojo::Base -strict;
|
||||
|
||||
use Test::More;
|
||||
use Test::Mojo;
|
||||
|
||||
my $t = Test::Mojo->new('unix_dog');
|
||||
$t->get_ok('/')->status_is(200)->content_like(qr/Mojolicious/i);
|
||||
|
||||
done_testing();
|
|
@ -0,0 +1,9 @@
|
|||
% layout 'default';
|
||||
% title 'Welcome';
|
||||
<h2><%= $msg %></h2>
|
||||
<p>
|
||||
This page was generated from the template "templates/example/welcome.html.ep"
|
||||
and the layout "templates/layouts/default.html.ep",
|
||||
<%= link_to 'click here' => url_for %> to reload the page or
|
||||
<%= link_to 'here' => '/index.html' %> to move forward to a static page.
|
||||
</p>
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title><%= title %></title>
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
|
||||
<meta property="og:title" content="<%= title %>">
|
||||
<meta property="og:type" content="webpage">
|
||||
<meta property="og:url" content="https://unix.dog/">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<div id="header-content">
|
||||
<img src="favicon.ico" width="32" height="32" alt="UNIX.dog"/>
|
||||
<h1>UNIX.dog</h1>
|
||||
</div>
|
||||
</header>
|
||||
<main>
|
||||
<%= content %>
|
||||
</main>
|
||||
<footer>
|
||||
<span class="copyleft">©</span> Copyleft UNIX.dog, 2022. All pages licensed under CC-BY-NC-SA.
|
||||
<br>
|
||||
Please follow <a href="/rules">all rules</a> while using these services.
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -0,0 +1,59 @@
|
|||
% layout 'default';
|
||||
<article>
|
||||
<h1>Welcome to UNIX.dog!</h1>
|
||||
<p>
|
||||
UNIX.dog is a public UNIX server for dogs and by dogs.
|
||||
We aim to provide a welcoming space for furries,
|
||||
queer folks, and their allies to hang out, create, and communicate!
|
||||
|
||||
Registration will open soon!
|
||||
</p>
|
||||
|
||||
<section>
|
||||
<h2>Pubnix</h2>
|
||||
<p>
|
||||
We provide a public server running Gentoo Linux for use by our members.
|
||||
You get a webpage under unix.dog you can fully customize, and a working
|
||||
email you can send and receive from.
|
||||
Server specifications:
|
||||
</p>
|
||||
<ul>
|
||||
<li>Contabo VPS</li>
|
||||
<li>6 cores</li>
|
||||
<li>16GB RAM</li>
|
||||
<li>400GB Storage</li>
|
||||
<li>IPv6 Connectivity</li>
|
||||
</ul>
|
||||
<p>
|
||||
Of course, all resources are shared between users.
|
||||
Be courteous and respectful of everyone's experience :)
|
||||
</p>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Services</h2>
|
||||
<p>
|
||||
UNIX.dog provides many useful services to promote a healthy
|
||||
federated sphere. XMPP, EMail, and Akkoma are provided to all
|
||||
registered users. If you have a suggestion for a service, please
|
||||
email alpha at this domain; we're interesting in hosting more
|
||||
useful services for everyone!
|
||||
</p>
|
||||
</section>
|
||||
<section>
|
||||
<h2>More</h2>
|
||||
<p>
|
||||
UNIX.dog is created by Kayden (nullobsi) with help from ~keith.
|
||||
We're funded entirely out of pocket, but if you like these services,
|
||||
pay it forward! Donate to your favorite charity and support the causes
|
||||
you believe in.
|
||||
</p>
|
||||
<p>
|
||||
Made with love <3 (and fur) by
|
||||
<br/>
|
||||
<a href="https://nullob.si/">Kayden Tebau (nullobsi)</a>
|
||||
<br/>
|
||||
<a href="https://keithhacks.cyou/">~keith</a>
|
||||
</p>
|
||||
</section>
|
||||
|
||||
</article>
|
|
@ -0,0 +1,97 @@
|
|||
% layout 'default';
|
||||
<article>
|
||||
<h1>UNIX.dog Rules</h1>
|
||||
<p>
|
||||
To provide a welcoming space, UNIX.dog needs some rules. (tl;dr don't be an asshole).
|
||||
</p>
|
||||
<p>
|
||||
Please keep in mind that final intepretation of these rules are up to UNIX.dog admins.
|
||||
As the server is hosted in Nuremberg, Germany, by Contabo, all use of UNIX.dog services
|
||||
must follow federal law of Germany and the
|
||||
<a href="https://contabo.com/en/legal/terms-and-conditions/">Contabo terms of service.</a>
|
||||
</p>
|
||||
|
||||
<section>
|
||||
<h2>Network Conduct</h2>
|
||||
<ol>
|
||||
<li>
|
||||
Do not impersonate or otherwise deceptively claim yourself as a UNIX.dog admin.
|
||||
All official communications will be from alpha at unix dot dog or this website.
|
||||
</li>
|
||||
<li>Do not collect UNIX.dog user data without express permission.</li>
|
||||
<li>Do not use UNIX.dog services for commercial reasons.</li>
|
||||
<li>Do not attack, compromise, or disrupt UNIX.dog services with malicious intent.</li>
|
||||
<li>Be courteous of the shared resources provided, and be mindful of your time using them.</li>
|
||||
</ol>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Personal Conduct</h2>
|
||||
<ol>
|
||||
<li>Treat every individual with respect and kindness.</li>
|
||||
<li>
|
||||
Do not use profanity, slurs, or offensive language
|
||||
in a way directed maliciously at an individual.
|
||||
</li>
|
||||
<li>
|
||||
Do not discriminate against individuals because of race, religion, nationality,
|
||||
membership in a particular social group, or political opinion.
|
||||
</li>
|
||||
<li>
|
||||
Do not bully, harass, or otherwise intimidate or cause emotional harm to
|
||||
any individual with malicious intent.
|
||||
</li>
|
||||
</ol>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Content Rules</h2>
|
||||
<ol>
|
||||
<li>When uploading NSFW, please tag it accordingly.</li>
|
||||
<li>Do not upload content that is illegal in Germany.</li>
|
||||
<li>Sexual depictions of children, including artistic depictions, are not allowed.</li>
|
||||
</ol>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Moderation Conduct</h2>
|
||||
<p>
|
||||
Please note that this should apply to both UNIX.dog admins
|
||||
and moderators along with moderators of user-created MUCs
|
||||
or other groups on UNIX.dog services.
|
||||
</p>
|
||||
<ol>
|
||||
<li>You must not give cruel, unusual, or vindictive punishments to users.</li>
|
||||
<li>
|
||||
You must give an explicit, unambiguous warning to users before performing
|
||||
a privileged action on them, unless it is reasonably determined that they
|
||||
are automated.
|
||||
</li>
|
||||
<li>
|
||||
You must also provide an explicit, unambiguous reason and duration
|
||||
to the privileged action.
|
||||
</li>
|
||||
<li>
|
||||
You must provide a banned user, after a reasonable cool-down period,
|
||||
the ability to exchange external contacts with their peers.
|
||||
</li>
|
||||
<li>
|
||||
No "ex post facto" judgements.
|
||||
</li>
|
||||
<li>
|
||||
Burden of proof is laid on the accuser, not the accusee. Please keep this in mind
|
||||
when submitting reports.
|
||||
</li>
|
||||
</ol>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Legal Disclaimer</h2>
|
||||
<p>
|
||||
THESE SERVICES ARE 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
|
||||
ADMINISTRATORS OR COPYRIGHT 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 THESE SERVICES OR THE USE OR OTHER DEALINGS IN THESE
|
||||
SERVICES.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
</article>
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
secrets:
|
||||
- 888a581283ecac6c1ca08a476f559726da1c0e83
|
Loading…
Reference in New Issue