added rule. added new bkg pic. CSS can change bkg pic.
This commit is contained in:
parent
55203c1092
commit
134ec10ab5
22
app.py
22
app.py
@ -11,7 +11,11 @@ def home():
|
||||
for line in u_file:
|
||||
u_list.append(line);
|
||||
|
||||
return render_template("index.html", u_list=u_list)
|
||||
return render_template("index.html", u_list=u_list, page_name="home")
|
||||
|
||||
|
||||
def rules():
|
||||
return render_template("rules.html")
|
||||
|
||||
def home2(name):
|
||||
# app.route('/home2/<name>')
|
||||
@ -41,8 +45,6 @@ def req():
|
||||
|
||||
rt = {
|
||||
"username": Widg("username", "input", None),
|
||||
"displayname": Widg("displayname", "input", None),
|
||||
"prefer display name?": Widg("default_disp", "check", None),
|
||||
"email for account lockout / registration confirmation (optional)": Widg("email", "input", None),
|
||||
"SSH public key": Widg("pub_key", "textarea", None),
|
||||
"shell of choice": Widg("shell", "choice", [("bash", "/bin/bash"), ("ksh", "/bin/ksh")]),
|
||||
@ -50,7 +52,17 @@ def req():
|
||||
};
|
||||
|
||||
# uhhh is this how you're supposed to do this?
|
||||
return render_template("req.html", req_tab = rt, widg_fun = widg_fun)
|
||||
return render_template("req.html", req_tab = rt, widg_fun = widg_fun, page_name="req")
|
||||
|
||||
def signup():
|
||||
username = request.form["username"]
|
||||
email = request.form["email"]
|
||||
shell = request.form["shell"]
|
||||
rule_read = request.form["rule_read"]
|
||||
|
||||
if(rule_read != "on"):
|
||||
print("some fail condition")
|
||||
|
||||
|
||||
def login():
|
||||
if request.method == "POST":
|
||||
@ -61,7 +73,9 @@ def login():
|
||||
|
||||
if __name__=="__main__":
|
||||
app.add_url_rule('/home2/<name>', 'home2', home2)
|
||||
app.add_url_rule('/rules', 'rules', rules)
|
||||
app.add_url_rule('/success/<name>', 'success', success)
|
||||
app.add_url_rule('/login', 'login', login, methods = ['POST', 'GET'])
|
||||
app.add_url_rule('/req', 'req', req, methods = ['POST', 'GET'])
|
||||
app.add_url_rule('/req/signup', 'req', req, methods = ['POST'])
|
||||
app.run(host="104.248.118.130",debug=True)
|
||||
|
@ -2,6 +2,15 @@ html {
|
||||
background: #000;
|
||||
}
|
||||
|
||||
h1{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
footer{
|
||||
width: 800px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
@ -28,17 +37,17 @@ header h1.logo {
|
||||
float: left;
|
||||
}
|
||||
|
||||
header h1.logo:hover {
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
}
|
||||
/* header h1.logo:hover { */
|
||||
/* color: #fff; */
|
||||
/* text-decoration: none; */
|
||||
/* } */
|
||||
|
||||
/*
|
||||
* Center the body content
|
||||
*/
|
||||
|
||||
.container {
|
||||
width: 1200px;
|
||||
width: 800px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
|
71
static/main_req.css
Normal file
71
static/main_req.css
Normal file
@ -0,0 +1,71 @@
|
||||
html {
|
||||
background: #000;
|
||||
background-image: url("req.png");
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
h1{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
footer{
|
||||
width: 800px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/*
|
||||
* Formatting the header area
|
||||
*/
|
||||
|
||||
header {
|
||||
height: 35px;
|
||||
width: 100%;
|
||||
opacity: .9;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
header h1.logo {
|
||||
margin: 0;
|
||||
font-size: 1.7em;
|
||||
color: #fff;
|
||||
text-transform: uppercase;
|
||||
float: left;
|
||||
}
|
||||
|
||||
/* header h1.logo:hover { */
|
||||
/* color: #fff; */
|
||||
/* text-decoration: none; */
|
||||
/* } */
|
||||
|
||||
/*
|
||||
* Center the body content
|
||||
*/
|
||||
|
||||
.container {
|
||||
width: 800px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 3em;
|
||||
margin-top: 40px;
|
||||
text-align: center;
|
||||
letter-spacing: -2px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.7em;
|
||||
font-weight: 100;
|
||||
margin-top: 30px;
|
||||
text-align: center;
|
||||
letter-spacing: -1px;
|
||||
color: #999;
|
||||
}
|
||||
|
BIN
static/req.png
Normal file
BIN
static/req.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
@ -4,10 +4,10 @@
|
||||
<div class="home_blurb">
|
||||
<p>lingy.in is a public unix / tilde instance for lainons</p>
|
||||
<p><b>current thread: </b><a href="https://lainchan.org/tech/res/34563.html">https://lainchan.org/tech/res/34563.html</a></p>
|
||||
<p>sign up</p>
|
||||
<p>rules</p>
|
||||
<p>git</p>
|
||||
<p>users</p>
|
||||
<p><a href="/req">sign up</a></p>
|
||||
<p><a href="/rules">rules</a></p>
|
||||
<p><a href="https://git.lain.church/gashapwn/lyadmin">git</a></p>
|
||||
<p><h3>users</h3></p>
|
||||
<ol>
|
||||
{% for user in u_list %}
|
||||
<li><a href="~{{user}}">{{user}}</a></li>
|
||||
|
@ -1,13 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<title>userreq</title>
|
||||
<title>LAINTILDE0</title>
|
||||
<link rel="stylesheet" href="{{url_for('static',filename='main.css')}}">
|
||||
</head>
|
||||
<h1>铃音</h1>
|
||||
<h1>lingy.in</h1>
|
||||
<body>
|
||||
<div class="container">
|
||||
{%block content%}
|
||||
{%endblock%}
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<footer>admin: <a href="email:gashapwn@protonmail.com">gashapwn@protonmail.com</a></footer>
|
||||
</html>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<title>LAINTILDE0</title>
|
||||
<link rel="stylesheet" href="{{url_for('static',filename='main_home.css')}}">
|
||||
<link rel="stylesheet" href="{{url_for('static',filename='main_' + page_name + '.css')}}">
|
||||
</head>
|
||||
<h1>lingy.in</h1>
|
||||
<body>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{%extends "layout.html"%}
|
||||
{%extends "main_layout.html"%}
|
||||
|
||||
{%block content%}
|
||||
<p>
|
||||
@ -26,14 +26,4 @@
|
||||
|
||||
<p>
|
||||
|
||||
<p>
|
||||
A requested feature is to have to allow users to have a unicode username since unicode allows for more interesting aesthics
|
||||
</br>
|
||||
If you enter a unicode display name, the system will try to display your unicode name when possbile. It will also be your default in terminal prompt, chat and your tilde path
|
||||
</br>
|
||||
the linux os only sees your true ascii username. so your ssh login, file permissions etc will user your true username
|
||||
</br>
|
||||
feedback on this feature welcome
|
||||
</p>
|
||||
|
||||
{%endblock%}
|
||||
|
23
templates/rules.html
Normal file
23
templates/rules.html
Normal file
@ -0,0 +1,23 @@
|
||||
{%extends "layout.html"%}
|
||||
|
||||
{%block content%}
|
||||
<p>
|
||||
<h3>Rules</h3>
|
||||
<ol>
|
||||
<li>you must 18 or older to use lingy.in</li>
|
||||
<li>since this is multiuser system, show good judgement with the server resources (ie dont start mining crypto)</li>
|
||||
<li>don't damage/delete others work</li>
|
||||
<li>don't upload child pornography to lingy.in</li>
|
||||
<li>don't use lingy.in to distribute malware</li>
|
||||
<li>be smart with your data (fwiw, when i use a shared system like this i assume all data i have on the box is effecitvely comprimised)</li>
|
||||
</ol>
|
||||
</br>
|
||||
<h3>some things to consider:</h3>
|
||||
<ol>
|
||||
<li>relax and try not to take the things others say too seriously.</li>
|
||||
<li>no implementation is perfect. so i encourage you to make your own tilde with different rules and designs</li>
|
||||
<li>On your first login throw something fun in your index.html even if its just placeholder.</li>
|
||||
</ol>
|
||||
<p>
|
||||
|
||||
{%endblock%}
|
Loading…
Reference in New Issue
Block a user