From 487647029a192e8e6028c8f81fe3ebb44a0562db Mon Sep 17 00:00:00 2001 From: borissedw Date: Sat, 21 Oct 2023 23:42:19 +0300 Subject: [PATCH] 0.0.288 add profile page --- static/css/styles(boris).css | 155 ++++++++++++++++++++++++ static/js/user_profile_2.js | 14 +++ templates/blocks/b_header.html | 2 +- templates/blocks/profile/b_profile.html | 67 +++++++++- 4 files changed, 236 insertions(+), 2 deletions(-) diff --git a/static/css/styles(boris).css b/static/css/styles(boris).css index d068b25..b53fa0c 100644 --- a/static/css/styles(boris).css +++ b/static/css/styles(boris).css @@ -14,12 +14,30 @@ text-align: -webkit-center; width: 100%; +} +.text-align-right{ + text-align: -webkit-right; + width: 100%; + +} +.text-align-left{ + text-align: -webkit-left; + width: 100%; + } .w-68{ width: 68%; } +.width-50{ + width: 50%; +} + +.pointer{ + cursor: pointer; +} + .f-r{ float: right; } @@ -1946,4 +1964,141 @@ background: #dad7d7; width: 100%; top: 60px; +} + +/*profile block*/ + + +.block_inf_profile{ + width: 100%; + padding-bottom: 20px; + border-bottom:1px solid #E6E6E6; +} + +.img_user{ + object-fit: cover; + height: 110px; + width: 110px; +} + +.upload_photo_container{ + position: relative; +} + +.btn_f_upload_photo{ + opacity: 0; + position: absolute; + height: 110px; + width: 110px; + left: 0; +} + +.upload_photo_label{ + display: block; + font-size: 14px; + font-weight: 400; + color: #27242499; +} + +.select_f_profile_status{ + border: 1px solid #E6E6E6; + display: block; + height: 62px; + width: 100%; + border-radius: 10px; + padding: 0; + color: #272424; + font-family: Inter; + font-size: 16px; + font-style: normal; + font-weight: 400; + margin-top: 0; + padding-left: 10px; + appearance: none; + background: white url(/static/img/png/icon-arrow.svg) no-repeat calc(100% - 15px) center; +} +.input_f_profile{ + display: block; + height: 20px; + width: calc(100% - 30.4px); + float: left; + background-image: none !important; + padding: 20px 15.2px; + border: 1px solid #E6E6E6; + color: #272424; + font-size: 16px; + font-weight: 400; + border-radius: 10px; +} + +.status_f_profile{ + width: calc(100% - 120px); + padding-left: 10px; +} + +.status_label{ + font-size: 18px; + font-weight: 600; + color: #272424; + padding-bottom: 5px; +} + +.cur_subscribe_label{ + font-weight: 600; + font-size: 18px; + color: #272424; + padding-bottom: 5px; +} + +.cur_subscribe_f_profile{ + color: #FF613A; + font-size: 18px; + font-weight: 600; + padding-bottom: 5px; +} + +.btn_go_to_subscribes{ + text-decoration: underline; + color: #27242499; + font-weight: 400; + font-size: 14px; +} + +.label_f_profile{ + color: #272424; + font-size: 16px; + font-weight: 500; + display: block; + padding-bottom: 10px; + padding-left: 10px; +} + +.container_el_form_profile{ + width: 49%; + margin: 0 0.5% 0.5% 0.5%; +} + +.container_form_profile{ + padding-top: 40px; + width: 100%; + display: flex; + flex-wrap: wrap; +} + +.line_f_form_profile{ + height: 1px; + background: #E6E6E6; + margin: 40px 0; + width: 100%; +} + +.confirm_profile_btn{ + width: 100%; + height: 60px; + background: #FF613A; + color: #FFFFFF; + margin-top: 40px; + border-radius: 10px; + font-weight: 600; + font-size: 18px; } \ No newline at end of file diff --git a/static/js/user_profile_2.js b/static/js/user_profile_2.js index b09059d..7bfa103 100644 --- a/static/js/user_profile_2.js +++ b/static/js/user_profile_2.js @@ -220,6 +220,20 @@ async function attachFilemeassge (el,id_ticket=null,sender,receiver){ +} + + +function upload_photo_f_profile (el) { + let file = el.files[0] + let Blob = new Blob(file) + Blob.onload(function (){ + let url = URL.createObjectURL(Blob) + let insert_place = document.querySelector(".img_user") + if (insert_place){ + insert_place.src = url + } + }) + } diff --git a/templates/blocks/b_header.html b/templates/blocks/b_header.html index aa340cf..7dd042f 100644 --- a/templates/blocks/b_header.html +++ b/templates/blocks/b_header.html @@ -58,7 +58,7 @@