Compare commits

..

1 Commits

Author SHA1 Message Date
4833b4ba28 18/08/25 2025-10-18 00:08:36 +09:00
5 changed files with 421 additions and 0 deletions

26
app.py Normal file
View File

@@ -0,0 +1,26 @@
from flask import Flask, render_template, request
app = Flask(__name__)
@app.route("/")
def ind():
return render_template('index.html')
@app.route("/process", methods=['GET', 'POST'])
def prcs():
if request.method == 'POST':
tel = request.form['tel']
tg = request.form['tg']
i = request.form.get('radio12')
if i == 'link':
urlOrText = request.form.get('linkI')
elif i == 'text':
urlOrText = request.form.get('textI')
else:
urlOrText = '0'
print(tel, tg, urlOrText)
return render_template('index.html')
if __name__ == '__main__':
app.run(debug=True)

247
static/css/style.css Normal file
View File

@@ -0,0 +1,247 @@
*{
margin: 0;
padding: 0;
background-color: var(--baseBlue);
}
a, h1, h2, h3, h4, h5, h6, label{
text-decoration: none;
color: inherit;
margin: 0 !important;
padding: 0;
}
label{
padding: 0 0 1% 2%;
}
li{
list-style: none;
}
.flex{
display: flex;
}
:root{
--baseBlue: #242430;
--blue: #4D54BA;
--lightBlue: #54AAFF;
--white: #fff;
}
.baseBlue{
color: var(--baseBlue);
}
.blue{
color: var(--blue);
}
.white{
color: var(--white);
}
.lightBlue{
color: var(--lightBlue);
}
.container{
padding: 0 7%;
}
.arial-regular{
font-family: Arial, Helvetica, sans-serif;
font-weight: 400;
}
.arial-bald{
font-family: Arial, Helvetica, sans-serif;
font-weight: 600;
}
.f14{
/* font-size: 14px; */
font-size: 0.9rem;
}
.colms{
flex-direction: column;
margin: 0 !important
}
.between{
justify-content: space-between;
}
.w100{
width: 100%;
}
/* ---------- */
.header-inner{
margin: 1% 0 0;
}
/* ----------- main ----------- */
.main{
text-align: center;
}
.inputText{
display: none;
}
.inputLink{
display: none;
}
.form1{
flex-direction: column;
text-align: center;
align-items: center;
align-self: center;
}
.radio1Div{
flex-direction: row;
margin: 0 !important;
text-align: center;
align-items: center;
width: 100%;
}
.inputZ{
border-style: solid;
border-color: var(--blue);
}
.zayavkaH1{
font-size: 24px;
padding: 2% 0 4%;
}
.input1Width{
/* width: 325px; */
width: 23vw;
min-height: 25px;
box-sizing: border-box;
padding-left: 3%;
color: var(--white);
}
.w1{
/* align-content: flex-start;
*/ display: flex;
}
.input1Width:focus, .inpt2:focus{
border-color: var(--lightBlue);
outline: var(--lightBlue);
color: var(--white);
padding-left: 2%;
}
.inpt2{
color: var(--white);
padding-left: 3%;
}
.e1{
flex-direction: row;
justify-content: space-between;
width: 70%;
text-align: start;
float: left;
margin: 0 !important;
padding: 0 0 4%;
}
.e2{
flex-direction: column;
justify-content: space-between;
width: 70%;
margin: 0 !important;
text-align: start;
float: left;
}
.e3{
flex-direction: row;
justify-content: space-between;
width: 70%;
margin: 0 !important;
text-align: start;
float: left;
padding: 0 0 1%;
}
input[type="radio"] {
accent-color: var(--blue);
margin: 0 2% 0 0;
}
#l1{
padding-left: 1%;
}
#linkTao{
width: 100%;
min-height: 25px;
/* display: none; */
}
#linkItem{
width: 100%;
overflow-wrap: break-word;
box-sizing: border-box;
min-height: 250px;
/* display: none; */
}
.btn{
padding: 0.8% 2%;
border-radius: 10px;
border-color: var(--lightBlue);
color: var(--white);
margin: 4% 0 0 0;
}
.btn:hover{
background-color: var(--lightBlue);
color: var(--baseBlue);
transition: .7s;
}
/* ---------------------------------- @media ---------------------------------- */
/* Small Mobile: 320px - 425px (for older or compact smartphones)*/
/* Modern Mobile: 375px - 575px (for modern smartphones)*/
/* Landscape Phones / Small Tablets: 576px - 767px*/
/* Tablets (Portrait): 768px - 991px*/
/* Laptops / Small Desktops: 992px - 1199px*/
/* Desktops: 1200px - 1400px (or higher)*/
/* Large Desktops / High-Resolution Screens: 1401px and above */
@media (min-width: 1921px) {
.container{
padding: 0 calc(100%/4);
}
.input1Width {
width: 15vw;
}
}
@media (max-width: 1400px) and (min-width: 1200px) {
.container{
padding: 0 6%;
}
/* .input1Width {
width: 15vw;
} */
}

4
static/imgs/logo.svg Normal file
View File

@@ -0,0 +1,4 @@
<svg width="121" height="43" viewBox="0 0 121 43" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14.0273 31.2578V34H2.88281V13.8555L14.0273 13.8203V16.3516H5.55469V20.7109H14.0273V23.2422H5.55469V31.2578H14.0273ZM28.3008 16.457H22.6055V31.4688H30.6562V34H19.793V13.8555H30.9375V19.5859H28.3008V16.457ZM39.375 31.2578H45.0352V16.3867H39.375V31.2578ZM36.7031 34V13.8555H47.8477V34H36.7031ZM63.442 22.288L64.018 25.456V34H61.618V22.288H63.442ZM63.658 26.44L63.082 26.176V24.424L63.298 24.16C63.458 23.872 63.706 23.568 64.042 23.248C64.394 22.912 64.802 22.632 65.266 22.408C65.73 22.168 66.202 22.048 66.682 22.048C66.922 22.048 67.146 22.064 67.354 22.096C67.578 22.128 67.746 22.184 67.858 22.264V24.424H67.114C66.026 24.424 65.234 24.592 64.738 24.928C64.242 25.248 63.882 25.752 63.658 26.44ZM74.3277 34.24C73.1437 34.24 72.0957 33.992 71.1837 33.496C70.2877 32.984 69.5917 32.272 69.0957 31.36C68.5997 30.448 68.3517 29.384 68.3517 28.168C68.3517 26.936 68.5997 25.864 69.0957 24.952C69.5917 24.04 70.2877 23.328 71.1837 22.816C72.0957 22.304 73.1437 22.048 74.3277 22.048C75.5277 22.048 76.5757 22.304 77.4717 22.816C78.3677 23.328 79.0637 24.04 79.5597 24.952C80.0717 25.864 80.3277 26.936 80.3277 28.168C80.3277 29.384 80.0717 30.448 79.5597 31.36C79.0637 32.272 78.3677 32.984 77.4717 33.496C76.5757 33.992 75.5277 34.24 74.3277 34.24ZM74.3277 31.936C75.3997 31.936 76.2557 31.592 76.8957 30.904C77.5517 30.2 77.8797 29.288 77.8797 28.168C77.8797 27.032 77.5517 26.112 76.8957 25.408C76.2557 24.704 75.3997 24.352 74.3277 24.352C73.2717 24.352 72.4157 24.704 71.7597 25.408C71.1197 26.096 70.7997 27.008 70.7997 28.144C70.7997 29.28 71.1197 30.2 71.7597 30.904C72.4157 31.592 73.2717 31.936 74.3277 31.936ZM86.1734 34.24C85.2934 34.24 84.5974 34.104 84.0854 33.832C83.5734 33.544 83.1974 33.168 82.9574 32.704C82.7174 32.224 82.5574 31.688 82.4774 31.096C82.4134 30.504 82.3814 29.896 82.3814 29.272V22.288H84.7814V29.776C84.7814 30.608 84.9654 31.168 85.3334 31.456C85.7174 31.744 86.1654 31.888 86.6774 31.888C87.2054 31.888 87.7254 31.784 88.2374 31.576C88.7654 31.368 89.2374 31.088 89.6534 30.736C90.0854 30.368 90.4054 29.976 90.6134 29.56V30.904H90.2294V22.288H92.6294V34H90.8054L90.3014 31.936L90.9014 31.864C90.4854 32.36 90.0214 32.792 89.5094 33.16C88.9974 33.512 88.4614 33.784 87.9014 33.976C87.3414 34.152 86.7654 34.24 86.1734 34.24ZM102.392 22.048C103.224 22.048 103.88 22.192 104.36 22.48C104.84 22.752 105.192 23.128 105.416 23.608C105.64 24.072 105.784 24.6 105.848 25.192C105.912 25.784 105.944 26.392 105.944 27.016V34H103.544V26.512C103.544 25.68 103.352 25.12 102.968 24.832C102.6 24.544 102.16 24.4 101.648 24.4C101.136 24.4 100.616 24.504 100.088 24.712C99.5602 24.92 99.0882 25.2 98.6722 25.552C98.2562 25.904 97.9362 26.296 97.7122 26.728V25.384H98.0962V34H95.6962V22.288H97.5202L98.0242 24.352L97.4242 24.424C97.8722 23.912 98.3602 23.48 98.8882 23.128C99.4162 22.776 99.9762 22.512 100.568 22.336C101.16 22.144 101.768 22.048 102.392 22.048ZM113.478 34.24C112.406 34.24 111.462 33.984 110.646 33.472C109.83 32.96 109.198 32.248 108.75 31.336C108.302 30.408 108.078 29.336 108.078 28.12C108.078 26.904 108.302 25.84 108.75 24.928C109.198 24.016 109.83 23.312 110.646 22.816C111.462 22.304 112.406 22.048 113.478 22.048C114.534 22.048 115.454 22.304 116.238 22.816C117.022 23.312 117.63 24.016 118.062 24.928C118.51 25.84 118.734 26.904 118.734 28.12C118.734 29.336 118.51 30.408 118.062 31.336C117.63 32.248 117.022 32.96 116.238 33.472C115.454 33.984 114.534 34.24 113.478 34.24ZM113.838 32.176C114.83 32.176 115.622 31.808 116.214 31.072C116.822 30.336 117.126 29.36 117.126 28.144C117.126 26.928 116.822 25.952 116.214 25.216C115.622 24.48 114.83 24.112 113.838 24.112C112.846 24.112 112.046 24.48 111.438 25.216C110.83 25.952 110.526 26.92 110.526 28.12C110.526 29.336 110.83 30.32 111.438 31.072C112.046 31.808 112.846 32.176 113.838 32.176ZM117.582 34L117.006 31.648H117.246V24.976H117.006V17.656H119.406V34H117.582Z" fill="#4D54BA"/>
<circle cx="3" cy="3" r="3" transform="matrix(-1 0 0 1 58 30)" fill="#E2E2EF"/>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

48
static/js/cases.js Normal file
View File

@@ -0,0 +1,48 @@
// function change(){
// if (document.getElementById('radio1').checked && document.getElementById('radio2').checked == false){
// linkTao.style.display = 'block';
// textTao.style.display = 'none';
// console.log(1)
// }
// else if (document.getElementById('radio1').checked == false && document.getElementById('radio2').checked){
// textTao.style.display = 'block';
// linkTao.style.display = 'none';
// console.log(2)
// }
// else{
// textTao.style.display = 'none';
// linkTao.style.display = 'none';
// console.log(3)
// }
// }
document.addEventListener('DOMContentLoaded', function () {
const radio1 = document.getElementById('radio1');
const radio2 = document.getElementById('radio2');
const linkTao = document.getElementById('inputLink');
const textTao = document.getElementById('inputText');
function toggleInputs() {
if (radio1.checked) {
linkTao.style.display = 'flex';
textTao.style.display = 'none';
console.log(1);
} else if (radio2.checked && radio1.checked == false) {
linkTao.style.display = 'none';
textTao.style.display = 'flex';
console.log(2);
} else {
linkTao.style.display = 'none';
textTao.style.display = 'none';
console.log(3);
}
}
linkTao.style.display = 'none';
textTao.style.display = 'none';
radio1.addEventListener('click', toggleInputs);
radio2.addEventListener('click', toggleInputs);
});

96
templates/index.html Normal file
View File

@@ -0,0 +1,96 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
<title>Оставить заявку</title>
</head>
<body>
<!-- ----------- header ------------ -->
<header class="header">
<div class="wrapper">
<div class="container">
<div class="header-inner">
<ul class="headerUL">
<li class="headerLi">
<a href="#" class="logoLink">
<img src="{{ url_for('static', filename='imgs/logo.svg') }}" alt="">
</a>
</li>
<!-- <li class="headerLi">1</li>
<li class="headerLi">1</li>
<li class="headerLi">1</li>
<li class="headerLi">1</li> -->
</ul>
</div>
</div>
</div>
</header>
<!-- --------------- main -------------- -->
<main class="main">
<div class="wrapper">
<div class="container">
<div class="main-inner">
<h1 class="zayavkaH1 arial-bald lightBlue">Оставить заявку на товар</h1>
{% block content %}
<form action="/process" method="POST" class="form1 flex between w100">
<div class="e1 flex">
<!-- ОБРАЗАТЬ ТЕЛЕФОН: БЕЗ ПРОБЕЛОВ, ЧЕРТ И ПЛЮСОВ -->
<div class="colms flex">
<label for="tel" class="arial-regular white f14">Телефон для обращения</label>
<input type="tel" name="tel" id="tel" class="inputZ input1Width">
</div>
<!-- tg -->
<div class="colms flex">
<label for="tg" class="arial-regular white f14">Telegram для обратной связи</label>
<input type="text" name="tg" id="tg" class="inputZ input1Width" placeholder="t.me/">
</div>
</div>
<!-- radio -->
<div class="e2 flex">
<label for="radioDiv" class="arial-regular white f14">Тип обращения</label>
<div class="radioDiv">
<div class="flex e3">
<div class="radio1Div flex">
<input type="radio" name="radio12" id="radio1" value="link">
<label for="radio1" class="arial-regular white f14">Ссылка</label>
</div>
<div class="radio1Div flex">
<input type="radio" name="radio12" id="radio2" value="text">
<label for="radio2" class="arial-regular white f14" id="l1">Описать необходимый
товар</label>
</div>
</div>
</div>
<div class="colms flex">
<div id="inputLink">
<input type="url" name="linkI" id="linkTao" class="inputZ inpt2"
placeholder="Ссылка на товар TaoBao">
</div>
<div id="inputText">
<textarea type="text" name="textI" id="linkItem" class="inputZ inpt2"
placeholder="Опишите желаемый товар..."></textarea>
</div>
</div>
</div>
<button class="btn">Отправить заявку</button>
</form>
{% endblock %}
</div>
</div>
</div>
</div>
</main>
<script src="{{ url_for('static', filename='js/cases.js') }}"></script>
</body>
</html>