mirror of
https://github.com/Justuser3310/ss14_chemistry_site.git
synced 2025-02-08 09:07:38 +00:00
Compare commits
No commits in common. "609c21245fc89a4d454315923cd04b73693405ed" and "2ad1536f77cfa9ea84b7c3ec23e09398feb4a2e2" have entirely different histories.
609c21245f
...
2ad1536f77
Binary file not shown.
Before Width: | Height: | Size: 149 KiB |
@ -1,88 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="ru" data-bs-theme="dark">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>SS14Tools</title>
|
||||
<link rel="icon" type="image/x-icon" href="./assets/favicon.ico">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous">
|
||||
</head>
|
||||
<body>
|
||||
<style>
|
||||
.mx-10 {
|
||||
margin-left: 10rem;
|
||||
margin-right: 10rem;
|
||||
}
|
||||
.gxr-- {
|
||||
margin-right: 18rem;
|
||||
}
|
||||
.gxl-- {
|
||||
margin-left: 18rem;
|
||||
}
|
||||
</style>
|
||||
<nav class="navbar bg-body-tertiary">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="#"><i class="bi bi-tools"></i> SS14Tools</a>
|
||||
<div class="btn-group" role="group" aria-label="Простой пример">
|
||||
<button type="button" class="btn btn-primary"><i class="bi bi-discord"></i></button>
|
||||
<button type="button" class="btn btn-primary"><i class="bi bi-telegram"></i></button>
|
||||
<button type="button" class="btn btn-primary"><i class="bi bi-github"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<center>
|
||||
<div class="container">
|
||||
<div class="row py-5">
|
||||
<div class="col-xl-9">
|
||||
<select class="form-select" aria-label="Реакция">
|
||||
<option selected><p class="gx-5">💊 Дермалин</p></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="container-fluid col">
|
||||
<div class="btn-group" role="group" aria-label="Базовая группа переключателей радио">
|
||||
<input type="radio" class="btn-check" name="btnradio" id="30" autocomplete="off">
|
||||
<label class="btn btn-outline-primary" for="30">30</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="btnradio" id="50" autocomplete="off">
|
||||
<label class="btn btn-outline-primary" for="50">50</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="btnradio" id="100" autocomplete="off" checked>
|
||||
<label class="btn btn-outline-primary" for="100">100</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="btnradio" id="300" autocomplete="off">
|
||||
<label class="btn btn-outline-primary" for="300">300</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="btnradio" id="1000" autocomplete="off">
|
||||
<label class="btn btn-outline-primary" for="1000">1000</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" aria-current="page" href="#">Рецепт</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link disabled">Эффекты и дебафы</a>
|
||||
</li>
|
||||
</ul>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Составляющее</th>
|
||||
<th scope="col">Количество</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td>Кислород</td><td>100</td></tr>
|
||||
<tr><td>Фосфор</td><td>100</td></tr>
|
||||
<tr><td>Келотан</td><td>100</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</center>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" crossorigin="anonymous"></script>
|
||||
</body>
|
||||
</html>
|
@ -1,6 +1,5 @@
|
||||
from requests import get
|
||||
from yaml import load, SafeLoader
|
||||
from reag__ import reag__
|
||||
|
||||
def parse_yml(url = 'https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/Resources/Prototypes/Recipes/Reactions/medicine.yml'):
|
||||
yml = load(get(url).content.decode('utf-8'), Loader=SafeLoader)
|
||||
@ -16,16 +15,3 @@ def parse_ftl(url = 'https://raw.githubusercontent.com/SerbiaStrong-220/space-st
|
||||
locale = splitted[2]
|
||||
locales[name] = locale
|
||||
return locales
|
||||
|
||||
def load_recipes(url = 'https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/Resources/Prototypes/Recipes/Reactions/medicine.yml', category = '-'):
|
||||
yml = parse_yml(url)
|
||||
recipes = {}
|
||||
for element in yml:
|
||||
product = element["id"]
|
||||
comps = {}
|
||||
for elem in element["reactants"]:
|
||||
comps[elem] = element["reactants"][elem]["amount"]
|
||||
for id, value in element["products"].items():
|
||||
out = value
|
||||
recipes[product] = reag__(category=category, comps=comps, out=out)
|
||||
return recipes
|
||||
|
@ -1,11 +1,8 @@
|
||||
class reag__:
|
||||
def __init__(self, category: str = '-', comps = {}, out: int = 0):
|
||||
def __init__(category = '-', comps, out):
|
||||
# medicine
|
||||
self.category = category
|
||||
# {'инапровалин': 1, 'углерод': 1}
|
||||
self.comps = comps
|
||||
# 2
|
||||
self.out = out
|
||||
def get_all(self):
|
||||
return [self.category, self.comps, self.out]
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
from flask import Flask, render_template, request
|
||||
from flask import Flask, render_template
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route("/")
|
||||
@ -7,8 +7,3 @@ def main():
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=False, port = 5001)
|
||||
|
||||
@app.route("/submit", methods=['POST'])
|
||||
def calculate():
|
||||
selectedval = request.form["getrecept"]
|
||||
return f"{selectedval}"
|
@ -4,7 +4,6 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>SS14Tools</title>
|
||||
<link rel="icon" type="image/x-icon" href="../assets/favicon.ico">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous">
|
||||
</head>
|
||||
@ -33,34 +32,31 @@
|
||||
</nav>
|
||||
<center>
|
||||
<div class="container">
|
||||
<div class="row py-5">
|
||||
<div class="col-xl-9">
|
||||
<form action="/submit" method="post">
|
||||
<select class="form-select" name="getrecept" aria-label="Реакция">
|
||||
<option selected><p class="gx-5">Выберите (бля а что мы конкретно выбираем)</p></option>
|
||||
<option value="1">Пример 1</option>
|
||||
<option value="2">Пример 2</option>
|
||||
<option value="3">Пример 3</option>
|
||||
</select>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
<div class="row">
|
||||
<div class="col p-5 gxl--">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false" py-5>
|
||||
<span class="mx-10">Реакция</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" href="#">Пример 1</a></li>
|
||||
<li><a class="dropdown-item" href="#">Пример 2</a></li>
|
||||
<li><a class="dropdown-item" href="#">Пример 3</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="container-fluid col">
|
||||
<div class="btn-group" role="group" aria-label="Базовая группа переключателей радио">
|
||||
<input type="radio" class="btn-check" name="btnradio" id="30" autocomplete="off">
|
||||
<label class="btn btn-outline-primary" for="30">30</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="btnradio" id="50" autocomplete="off">
|
||||
<label class="btn btn-outline-primary" for="50">50</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="btnradio" id="100" autocomplete="off" checked>
|
||||
<label class="btn btn-outline-primary" for="100">100</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="btnradio" id="300" autocomplete="off">
|
||||
<label class="btn btn-outline-primary" for="300">300</label>
|
||||
|
||||
<input type="radio" class="btn-check" name="btnradio" id="1000" autocomplete="off">
|
||||
<label class="btn btn-outline-primary" for="1000">1000</label>
|
||||
</div>
|
||||
<div class="col p-5 gxr--">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Сколько?
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" href="#">30</a></li>
|
||||
<li><a class="dropdown-item" href="#">50</a></li>
|
||||
<li><a class="dropdown-item" href="#">100</a></li>
|
||||
<li><a class="dropdown-item" href="#">300</a></li>
|
||||
<li><a class="dropdown-item" href="#">1000</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user