@ -0,0 +1,19 @@ | |||
### Python ### | |||
# Byte-compiled / optimized / DLL files | |||
__pycache__/ | |||
*.py[cod] | |||
*$py.class | |||
# Environments | |||
.env | |||
.venv | |||
env/ | |||
venv/ | |||
ENV/ | |||
env.bak/ | |||
venv.bak/ | |||
dashboard-env/ | |||
.envrc | |||
.DS_Store | |||
.vscode/ |
@ -0,0 +1,31 @@ | |||
from flask import Flask, g, request, session, redirect, url_for, render_template | |||
from flask_bootstrap import Bootstrap | |||
import os | |||
app = Flask(__name__) | |||
Bootstrap(app) | |||
app.secret_key = 'asdf' | |||
app.debug = True | |||
@app.route('/') | |||
def index(): | |||
search = {'active': True, 'search_url': 'https://searx.info/?q='} | |||
account_url = 'https://account.technicalincompetence.club' | |||
apps = [ | |||
{'name': 'Gitea', 'description': 'It\'s git', 'link': 'https://git.tia.moe'}, | |||
{'name': 'Gitea', 'description': 'It\'s git', 'link': 'https://git.tia.moe'}, | |||
{'name': 'Gitea', 'description': 'It\'s git', 'link': 'https://git.tia.moe'}, | |||
{'name': 'Gitea', 'description': 'It\'s git', 'link': 'https://git.tia.moe'}, | |||
{'name': 'Gitea', 'description': 'It\'s git', 'link': 'https://git.tia.moe'}, | |||
{'name': 'Gitea', 'description': 'It\'s git', 'link': 'https://git.tia.moe'}, | |||
{'name': 'Gitea', 'description': 'It\'s git', 'link': 'https://git.tia.moe'}, | |||
{'name': 'Gitea', 'description': 'It\'s git', 'link': 'https://git.tia.moe'}, | |||
{'name': 'Gitea', 'description': 'It\'s git', 'link': 'https://git.tia.moe'}, | |||
] | |||
return render_template('index.j2', apps = apps, search = search, account_url = account_url) | |||
if __name__ == '__main__': | |||
app.run() |
@ -0,0 +1,3 @@ | |||
Flask==1.1.2 | |||
Flask-Bootstrap4==4.0.2 | |||
PyYAML==5.3.1 |
@ -0,0 +1,131 @@ | |||
@media (max-width: 991.98px) { | |||
#userNameRow, | |||
#firstNameRow { | |||
margin-bottom: 20px; | |||
} | |||
#passwordButton { | |||
margin-bottom: 50px; | |||
} | |||
} | |||
.card-hover { | |||
background-color: #f8f9fa!important; | |||
} | |||
@media (prefers-color-scheme: dark) { | |||
body { | |||
background-color: #111 !important; | |||
color: #eee; | |||
} | |||
.jumbotron { | |||
background-color: #333 !important; | |||
} | |||
.modal-content { | |||
background-color: #111 !important; | |||
color: #eee; | |||
} | |||
.modal-header { | |||
border-bottom: 1px solid #555 !important; | |||
} | |||
.modal-header .close { | |||
color: #eee !important; | |||
text-shadow: 0 1px 0 #555 !important; | |||
} | |||
.modal-footer { | |||
border-top: 1px solid #555 !important; | |||
} | |||
.bg-light { | |||
background-color: #333 !important; | |||
} | |||
.bg-white { | |||
background-color: #000 !important; | |||
} | |||
.bg-black { | |||
background-color: #eee !important; | |||
} | |||
.form-control { | |||
display: block; | |||
width: 100%; | |||
height: calc(1.5em + 0.75rem + 2px); | |||
padding: 0.375rem 0.75rem; | |||
font-size: 1rem; | |||
font-weight: 400; | |||
line-height: 1.5; | |||
color: #dee2e6; | |||
background-color: #000; | |||
background-clip: padding-box; | |||
border: 1px solid #6c757d; | |||
border-radius: 0.25rem; | |||
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; | |||
} | |||
.card { | |||
background-color: #000; | |||
border: 1px solid #6c757d; | |||
} | |||
.card-hover { | |||
background-color: #343a40!important; | |||
color: white !important; | |||
} | |||
@media (prefers-reduced-motion: reduce) { | |||
.form-control { | |||
transition: none; | |||
} | |||
} | |||
.form-control::-ms-expand { | |||
background-color: transparent; | |||
border: 0; | |||
} | |||
.form-control:-moz-focusring { | |||
color: transparent; | |||
text-shadow: 0 0 0 #dee2e6; | |||
} | |||
.form-control:focus { | |||
color: #dee2e6; | |||
background-color: #191d21; | |||
border-color: #b3d7ff; | |||
outline: 0; | |||
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); | |||
} | |||
.form-control::-webkit-input-placeholder { | |||
color: #6c757d; | |||
opacity: 1; | |||
} | |||
.form-control::-moz-placeholder { | |||
color: #6c757d; | |||
opacity: 1; | |||
} | |||
.form-control::-ms-input-placeholder { | |||
color: #6c757d; | |||
opacity: 1; | |||
} | |||
.form-control::placeholder { | |||
color: #6c757d; | |||
opacity: 1; | |||
} | |||
.form-control:disabled, | |||
.form-control[readonly] { | |||
background-color: #343a40; | |||
opacity: 1; | |||
} | |||
} |
@ -0,0 +1,9 @@ | |||
<div class="col-xs-12 col-sm-6 col-md-4 mb-4"> | |||
<div class="card"> | |||
<div class="card-body"> | |||
<h5 class="card-title">{{ app['name'] }}</h5> | |||
<p class="card-text">{{ app['description'] }}</p> | |||
<a href="#" class="btn btn-primary">{{ app['link'] }}</a> | |||
</div> | |||
</div> | |||
</div> |
@ -0,0 +1,54 @@ | |||
{% extends "bootstrap/base.html" %} | |||
{% block title %}Technical Incompetence - Home{% endblock %} | |||
{% block styles %} | |||
{{super()}} | |||
<link rel="stylesheet" href="{{url_for('.static', filename='style.css')}}"> | |||
{% endblock %} | |||
{% block navbar %} | |||
<nav class="navbar navbar-expand-lg sticky-top navbar-dark bg-dark"> | |||
<div class="navbar-brand">Technical Incompetence</div> | |||
<form class="form-inline ml-auto"> | |||
{% if account_url is defined and account_url != '' %} | |||
<a class="btn btn-primary" href="{{ account_url }}" role="button">My Account</a> | |||
{% endif %} | |||
</form> | |||
</nav> | |||
{% endblock %} | |||
{% block content %} | |||
<div class="container" style="margin-top: 15px"> | |||
{% if search['active'] == True %} | |||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12"> | |||
<input type="text" class="form-control" id="search-box" placeholder="Search"> | |||
</div> | |||
<br><br> | |||
{% endif %} | |||
<div class="row"> | |||
{% for app in apps %} | |||
{% include "card.j2" %} | |||
{% endfor %} | |||
</div> | |||
</div> | |||
{% endblock %} | |||
{% block scripts %} | |||
{{ super () }} | |||
<script> | |||
$("#search-box").keyup(function(event) { | |||
if (event.keyCode === 13) { | |||
window.location = '{{ search['search_url'] }}' + $('#search-box').val(); | |||
} | |||
}); | |||
$( ".card" ).hover( | |||
function() { | |||
$(this).addClass('shadow-lg').css('cursor', 'pointer'); | |||
$(this).addClass('card-hover'); | |||
}, function() { | |||
$(this).removeClass('shadow-lg'); | |||
$(this).removeClass('card-hover'); | |||
}); | |||
</script> | |||
{% endblock %} |