feat: add editable company details page and nav link
This commit is contained in:
15
app.py
15
app.py
@@ -27,6 +27,15 @@ DEFAULT_SETTINGS = {
|
|||||||
"telegram_chat_id": "",
|
"telegram_chat_id": "",
|
||||||
"geo_primary": "Казань и Татарстан — выезд в день запроса",
|
"geo_primary": "Казань и Татарстан — выезд в день запроса",
|
||||||
"geo_secondary": "Россия — удалённая поддержка",
|
"geo_secondary": "Россия — удалённая поддержка",
|
||||||
|
"company_legal_name": "ООО «ИнфраИТ»",
|
||||||
|
"company_inn": "",
|
||||||
|
"company_kpp": "",
|
||||||
|
"company_ogrn": "",
|
||||||
|
"company_bank_name": "",
|
||||||
|
"company_bik": "",
|
||||||
|
"company_account": "",
|
||||||
|
"company_correspondent_account": "",
|
||||||
|
"company_legal_address": "",
|
||||||
}
|
}
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
@@ -204,6 +213,12 @@ def index():
|
|||||||
return render_template("index.html", success=success, error=error, settings=settings)
|
return render_template("index.html", success=success, error=error, settings=settings)
|
||||||
|
|
||||||
|
|
||||||
|
@app.route("/company-details")
|
||||||
|
def company_details():
|
||||||
|
settings = get_settings()
|
||||||
|
return render_template("company_details.html", settings=settings)
|
||||||
|
|
||||||
|
|
||||||
@app.route("/admin/login", methods=["GET", "POST"])
|
@app.route("/admin/login", methods=["GET", "POST"])
|
||||||
def admin_login():
|
def admin_login():
|
||||||
error = None
|
error = None
|
||||||
|
|||||||
@@ -72,6 +72,45 @@
|
|||||||
<input type="text" name="geo_secondary" value="{{ settings.geo_secondary }}">
|
<input type="text" name="geo_secondary" value="{{ settings.geo_secondary }}">
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
<hr style="border:0;border-top:1px solid #d6e0ea;margin:6px 0 2px;">
|
||||||
|
<h3 style="margin:4px 0 2px;">Реквизиты компании</h3>
|
||||||
|
|
||||||
|
<label>Юридическое наименование
|
||||||
|
<input type="text" name="company_legal_name" value="{{ settings.company_legal_name }}">
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label>ИНН
|
||||||
|
<input type="text" name="company_inn" value="{{ settings.company_inn }}">
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label>КПП
|
||||||
|
<input type="text" name="company_kpp" value="{{ settings.company_kpp }}">
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label>ОГРН / ОГРНИП
|
||||||
|
<input type="text" name="company_ogrn" value="{{ settings.company_ogrn }}">
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label>Банк
|
||||||
|
<input type="text" name="company_bank_name" value="{{ settings.company_bank_name }}">
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label>БИК
|
||||||
|
<input type="text" name="company_bik" value="{{ settings.company_bik }}">
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label>Расчётный счёт
|
||||||
|
<input type="text" name="company_account" value="{{ settings.company_account }}">
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label>Корреспондентский счёт
|
||||||
|
<input type="text" name="company_correspondent_account" value="{{ settings.company_correspondent_account }}">
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label>Юридический адрес
|
||||||
|
<textarea name="company_legal_address" rows="3">{{ settings.company_legal_address }}</textarea>
|
||||||
|
</label>
|
||||||
|
|
||||||
<button type="submit" class="btn btn-primary">Сохранить настройки</button>
|
<button type="submit" class="btn btn-primary">Сохранить настройки</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
77
templates/company_details.html
Normal file
77
templates/company_details.html
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block title %}{{ settings.company_name }} — Реквизиты компании{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<header class="hero" id="top">
|
||||||
|
<div class="container">
|
||||||
|
<div class="topbar">
|
||||||
|
<a class="brand" href="{{ url_for('index') }}" aria-label="{{ settings.company_name }}">
|
||||||
|
<img src="{{ url_for('static', filename='img/infrait-logo.png') }}" alt="{{ settings.company_name }} logo" onerror="this.style.display='none'; this.nextElementSibling.style.display='inline-flex';">
|
||||||
|
<span class="brand-fallback">{{ settings.company_name }}</span>
|
||||||
|
</a>
|
||||||
|
<nav class="nav">
|
||||||
|
<a href="{{ url_for('index') }}#services">Услуги</a>
|
||||||
|
<a href="{{ url_for('index') }}#pricing">Тарифы</a>
|
||||||
|
<a href="{{ url_for('index') }}#faq">FAQ</a>
|
||||||
|
<a href="{{ url_for('index') }}#contact">Контакты</a>
|
||||||
|
<a href="{{ url_for('company_details') }}">Реквизиты</a>
|
||||||
|
</nav>
|
||||||
|
<a href="tel:{{ settings.phone_link }}" class="phone">{{ settings.phone_display }}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<section class="section">
|
||||||
|
<div class="container two-col">
|
||||||
|
<article class="panel">
|
||||||
|
<h1>Реквизиты компании</h1>
|
||||||
|
<p class="section-subtitle">Актуальные данные для договоров и бухгалтерских документов.</p>
|
||||||
|
<ul class="contacts">
|
||||||
|
<li><strong>Юридическое наименование:</strong> {{ settings.company_legal_name or "-" }}</li>
|
||||||
|
<li><strong>ИНН:</strong> {{ settings.company_inn or "-" }}</li>
|
||||||
|
<li><strong>КПП:</strong> {{ settings.company_kpp or "-" }}</li>
|
||||||
|
<li><strong>ОГРН / ОГРНИП:</strong> {{ settings.company_ogrn or "-" }}</li>
|
||||||
|
<li><strong>Банк:</strong> {{ settings.company_bank_name or "-" }}</li>
|
||||||
|
<li><strong>БИК:</strong> {{ settings.company_bik or "-" }}</li>
|
||||||
|
<li><strong>Расчётный счёт:</strong> {{ settings.company_account or "-" }}</li>
|
||||||
|
<li><strong>Корреспондентский счёт:</strong> {{ settings.company_correspondent_account or "-" }}</li>
|
||||||
|
<li><strong>Юридический адрес:</strong> {{ settings.company_legal_address or "-" }}</li>
|
||||||
|
</ul>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<article class="panel">
|
||||||
|
<h2>Контакты</h2>
|
||||||
|
<ul class="contacts">
|
||||||
|
<li><strong>Компания:</strong> {{ settings.company_name }}</li>
|
||||||
|
<li><strong>Телефон:</strong> <a href="tel:{{ settings.phone_link }}">{{ settings.phone_display }}</a></li>
|
||||||
|
<li><strong>Email:</strong> <a href="mailto:{{ settings.email }}">{{ settings.email }}</a></li>
|
||||||
|
<li><strong>Выезды:</strong> {{ settings.geo_primary }}</li>
|
||||||
|
<li><strong>По России:</strong> {{ settings.geo_secondary }}</li>
|
||||||
|
</ul>
|
||||||
|
<div class="cta-row">
|
||||||
|
<a href="{{ url_for('index') }}#contact" class="btn btn-primary">Оставить заявку</a>
|
||||||
|
<a href="{{ url_for('index') }}" class="btn btn-secondary">На главную</a>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer class="footer">
|
||||||
|
<div class="container footer-inner">
|
||||||
|
<div>
|
||||||
|
<a class="footer-logo" href="{{ url_for('index') }}" aria-label="{{ settings.company_name }}">
|
||||||
|
<img src="{{ url_for('static', filename='img/infrait-logo.png') }}" alt="{{ settings.company_name }} logo" onerror="this.style.display='none'; this.nextElementSibling.style.display='inline-flex';">
|
||||||
|
<span class="brand-fallback">{{ settings.company_name }}</span>
|
||||||
|
</a>
|
||||||
|
<p>Комплексное IT-обслуживание бизнеса: компьютеры, серверы и сети.</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<p><a href="tel:{{ settings.phone_link }}">{{ settings.phone_display }}</a></p>
|
||||||
|
<p><a href="mailto:{{ settings.email }}">{{ settings.email }}</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
{% endblock %}
|
||||||
@@ -69,6 +69,7 @@
|
|||||||
<a href="#process">Как работаем</a>
|
<a href="#process">Как работаем</a>
|
||||||
<a href="#faq">FAQ</a>
|
<a href="#faq">FAQ</a>
|
||||||
<a href="#contact">Контакты</a>
|
<a href="#contact">Контакты</a>
|
||||||
|
<a href="{{ url_for('company_details') }}">Реквизиты</a>
|
||||||
</nav>
|
</nav>
|
||||||
<a href="tel:{{ settings.phone_link }}" class="phone">{{ settings.phone_display }}</a>
|
<a href="tel:{{ settings.phone_link }}" class="phone">{{ settings.phone_display }}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user