diff --git a/app.py b/app.py new file mode 100644 index 0000000..6f345ba --- /dev/null +++ b/app.py @@ -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) \ No newline at end of file diff --git a/static/css/style.css b/static/css/style.css new file mode 100644 index 0000000..bac7317 --- /dev/null +++ b/static/css/style.css @@ -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; + } */ +} \ No newline at end of file diff --git a/static/imgs/logo.svg b/static/imgs/logo.svg new file mode 100644 index 0000000..768f7fa --- /dev/null +++ b/static/imgs/logo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/static/js/cases.js b/static/js/cases.js new file mode 100644 index 0000000..f7fac52 --- /dev/null +++ b/static/js/cases.js @@ -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); +}); \ No newline at end of file diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..baedc61 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,96 @@ + + + + + + + + + Оставить заявку + + + + +
+
+
+
+ +
+
+
+
+ + +
+
+
+
+

Оставить заявку на товар

+ {% block content %} +
+
+ +
+ + +
+ +
+ + +
+
+ + +
+ +
+
+
+ + +
+
+ + + +
+
+
+ + +
+ +
+ +
+
+
+ +
+ {% endblock %} +
+
+
+ +
+ + + + \ No newline at end of file