diff --git a/static/css/styles(boris).css b/static/css/styles(boris).css index 1e55bcf..6d0c6a4 100644 --- a/static/css/styles(boris).css +++ b/static/css/styles(boris).css @@ -1034,24 +1034,58 @@ padding-bottom: 10px; } -.items_subscribe.select{ +.text_option_item{ font-size: 16px; color: #272424; + width: 93%; + float: right; + } -.items_subscribe.select::marker{ - content: url("/static/img/svg/galka.svg"); - display: inline-block; - width: 10%; - clear: both; +.cont_photo_option_item{ + height: 100%; + float: left; + width: 5%; } -.items_subscribe > span{ - display: inline-block; - padding-left: 10px; - width: 90%; +.cont_photo_option_item > img{ + display: block; + margin: auto; } -.items_subscribe{ - padding-bottom: 5px; -} \ No newline at end of file +.item_options_subscribe{ + height: fit-content; + width: 100%; +} + +/*.option_list{*/ +/* list-style-image: url("/static/img/svg/galka.svg");*/ +/*}*/ + +/*.items_subscribe.select{*/ +/* font-size: 16px;*/ +/* color: #272424;*/ +/* padding-left: 20px;*/ +/* !*position: relative;*!*/ +/* margin: 10px;*/ +/*}*/ + +/*.items_subscribe.select:before{*/ +/* content: url(/static/img/svg/galka.svg);*/ +/* position: absolute;*/ +/* !* top: 13px; *!*/ +/* color: #FF613A;*/ +/* display: inline-block;*/ +/* vertical-align: center;*/ +/* padding-right: 20px;*/ +/*}*/ + +/*.items_subscribe > text{*/ +/* display: inline-block;*/ +/* padding-left: 4%;*/ +/* width: 93%;*/ +/*}*/ + +/*.items_subscribe{*/ +/* padding-bottom: 5px;*/ +/*}*/ \ No newline at end of file diff --git a/static/js/chat_sockets.js b/static/js/chat_sockets.js index 156b9ac..0804bd5 100644 --- a/static/js/chat_sockets.js +++ b/static/js/chat_sockets.js @@ -20,7 +20,7 @@ -let url = `ws://localhost:8000/ws/socket-server/`; +// let url = `ws://localhost:8000/ws/socket-server/`; // // const chatSocket = new WebSocket(url); @@ -42,37 +42,75 @@ let url = `ws://localhost:8000/ws/socket-server/`; // var i = 0 -function sendMessageSocket (data) { - let chatSocket = new WebSocket(url); - chatSocket.onopen = function (){ - console.log("open") - chatSocket.send(JSON.stringify(data)) - } - chatSocket.onclose = function () { - console.log("close") - return false - } - // +// function sendMessageSocket (data) { +// let chatSocket = new WebSocket(url); +// chatSocket.onopen = function (){ +// console.log("open") +// chatSocket.send(JSON.stringify(data)) +// } +// chatSocket.onclose = function () { +// console.log("close") +// return false +// } +// // +// +// // } +// // open_socket() +// // chatSocket.OPEN +// +// // chatSocket.onopen = function (){ +// // console.log("open") +// // +// +// +// // } +// } - // } - // open_socket() - // chatSocket.OPEN - - // chatSocket.onopen = function (){ - // console.log("open") - // +// +// chatSocket.onmessage = function (e) { +// let data = JSON.parse(e.data); +// console.log('Data:', data); +// console.log("return") +// if (data.type === 'chat'){ +// document.querySelector(".container-messages").innerHTML = data.html; +// document.querySelector(".enter-message-inp").focus() +// } +// } - // } -} +let url = `ws://localhost:8000/ws/socket-server/`; +const chatSocket = new WebSocket(url); chatSocket.onmessage = function (e) { - let data = JSON.parse(e.data); - console.log('Data:', data); - console.log("return") - if (data.type === 'chat'){ - document.querySelector(".container-messages").innerHTML = data.html; - document.querySelector(".enter-message-inp").focus() - } -} \ No newline at end of file + let data = JSON.parse(e.data) + console.log('Data: ', data) + + if (data.type === 'chat') { + // let messages = document.getElementById('messages') + // + // messages.insertAdjacentHTML('beforeend', `
${data.message}
+ //