master #6
| @ -16,61 +16,56 @@ | |||||||
|         let userinfo = {% PUT jsinsert userinfo %}; |         let userinfo = {% PUT jsinsert userinfo %}; | ||||||
|         let initial_chatListUpdResp = {% PUT jsinsert initial_chatListUpdResp %}; |         let initial_chatListUpdResp = {% PUT jsinsert initial_chatListUpdResp %}; | ||||||
|     </script> |     </script> | ||||||
| 
 |  | ||||||
|     <!-- Chat creation popup window --> |  | ||||||
|     <div id="chat-creation-win" class="popup-window"> |     <div id="chat-creation-win" class="popup-window"> | ||||||
|         <h1 class="popup-window-header">{%w pres.list-rooms.new-chat-header %}</h1> |         <h1 class="popup-window-msg">{%w pres.list-rooms.new-chat-header %}</h1> | ||||||
|         <table class="form-table"> |         <table class="id-str-input-table"> | ||||||
|             <tr> |             <tr> | ||||||
|                 <td class="form-label"> |                 <td class="id-str-input-td1"> | ||||||
|                     <label for="chat-nickname-input">{%w pres.list-rooms.directive-nickname %}</label> |                     <label for="chat-nickname-input">{%w pres.list-rooms.directive-nickname %}</label> | ||||||
|                 </td> |                 </td> | ||||||
|                 <td> |                 <td class="id-str-input-td2"> | ||||||
|                     <input id="chat-nickname-input" type="text" class="form-input" placeholder="{%w pres.list-rooms.placeholder-nickname %}" required> |                     <input id="chat-nickname-input" type="text" class="one-line-input" | ||||||
|  |                            placeholder="{%w pres.list-rooms.placeholder-nickname %}" required> | ||||||
|                 </td> |                 </td> | ||||||
|             </tr> |             </tr> | ||||||
|             <tr> |             <tr> | ||||||
|                 <td class="form-label"> |                 <td class="id-str-input-td1"> | ||||||
|                     <label for="chat-name-input">{%w pres.list-rooms.directive-name %}</label> |                     <label for="chat-name-input">{%w pres.list-rooms.directive-name %}</label> | ||||||
|                 </td> |                 </td> | ||||||
|                 <td> |                 <td class="id-str-input-td2"> | ||||||
|                     <input id="chat-name-input" type="text" class="form-input" placeholder="{%w pres.list-rooms.placeholder-name %}" required> |                     <input id="chat-name-input" type="text" class="one-line-input" | ||||||
|  |                            placeholder="{%w pres.list-rooms.placeholder-name %}" required> | ||||||
|                 </td> |                 </td> | ||||||
|             </tr> |             </tr> | ||||||
|         </table> |         </table> | ||||||
|         <h1 class="popup-window-subheader">{%w pres.list-rooms.reask-create-new-chat %}</h1> |         <h1 class="popup-window-msg">{%w pres.list-rooms.reask-create-new-chat %}</h1> | ||||||
|         <div class="popup-actions"> |         <button class="popup-window-btn-yes" id="chat-creation-win-yes">{%w pres.list-rooms.yes-create %}</button> | ||||||
|             <button class="popup-btn" id="chat-creation-win-yes">{%w pres.list-rooms.yes-create %}</button> |         <button class="popup-window-btn-no" id="chat-creation-win-no">{%w pres.list-rooms.no-create %}</button> | ||||||
|             <button class="popup-btn" id="chat-creation-win-no">{%w pres.list-rooms.no-create %}</button> |  | ||||||
|         </div> |  | ||||||
|     </div> |     </div> | ||||||
| 
 | 
 | ||||||
|     <!-- Chat renunciation popup window --> |  | ||||||
|     <div id="chat-renunciation-win" class="popup-window"> |     <div id="chat-renunciation-win" class="popup-window"> | ||||||
|         <h1 id="chat-renunciation-win-title" class="popup-window-header">||||||||||</h1> |         <h1 id="chat-renunciation-win-title" class="popup-window-msg">||||||||||</h1> | ||||||
|         <div class="popup-actions"> |         <button class="popup-window-btn-yes" id="chat-renunciation-win-yes">{%w pres.list-rooms.yes-leave %}</button> | ||||||
|             <button class="popup-btn" id="chat-renunciation-win-yes">{%w pres.list-rooms.yes-leave %}</button> |         <button class="popup-window-btn-no" id="chat-renunciation-win-no">{%w pres.list-rooms.no-leave %}</button> | ||||||
|             <button class="popup-btn" id="chat-renunciation-win-no">{%w pres.list-rooms.no-leave %}</button> |  | ||||||
|         </div> |  | ||||||
|     </div> |     </div> | ||||||
| 
 | 
 | ||||||
|     <!-- Main content container --> |     <div class="document-container resp-container"> | ||||||
|     <div class="document-container"> |  | ||||||
|         <div id="navigation-panel" class="panel"> |         <div id="navigation-panel" class="panel"> | ||||||
|             <a href="/user/{%w userinfo.nickname %}" id="go-to-my-profile" class="profile-link"> |             <a href="/user/{%w userinfo.nickname %}" id="go-to-my-profile" class="panel-thing"> | ||||||
|                 <img alt="Go to my profile" src="/assets/img/user.svg" class="profile-icon"> |                 <img alt="Go to my profile" src="/assets/img/user.svg" width="32px"> | ||||||
|             </a> |             </a> | ||||||
|             <p class="panel-description"> |             <p class="panel-thing panel-header-txt"> | ||||||
|                 {%w pres.list-rooms.page-description %} |                 {%w pres.list-rooms.page-description %} | ||||||
|             </p> |             </p> | ||||||
|         </div> |         </div> | ||||||
| 
 | 
 | ||||||
|         <div class="chat-list-container"> |         <div class="dynamic-block-list"> | ||||||
|             <img id="CL-bacbe" class="button-add" alt="New chat" src="/assets/img/add.svg"> |             <img id="CL-bacbe" class="button-add centered-block-el" alt="New chat" src="/assets/img/add.svg"> | ||||||
|             <div class="chat-list" id="CL-dblec"></div> |             <div class="dynamic-block-list-el-container" id="CL-dblec"> | ||||||
|  | 
 | ||||||
|  |             </div> | ||||||
|         </div> |         </div> | ||||||
|     </div> |     </div> | ||||||
| 
 |  | ||||||
|     <script src="/assets/js/common.js"></script> |     <script src="/assets/js/common.js"></script> | ||||||
|     <script src="/assets/js/common-popup.js"></script> |     <script src="/assets/js/common-popup.js"></script> | ||||||
|     <script src="/assets/js/list-rooms.js"></script> |     <script src="/assets/js/list-rooms.js"></script> | ||||||
|  | |||||||
| @ -1,193 +1,166 @@ | |||||||
| /* Общий стиль контейнера документа */ | /* Общие стили */ | ||||||
| .document-container { | body { | ||||||
|     display: flex; |     font-family: 'Roboto', sans-serif; | ||||||
|     flex-direction: column; |     background-color: #f7f9fc; | ||||||
|     max-width: 1200px; |     color: #333; | ||||||
|     margin: 0 auto; |     margin: 0; | ||||||
|     padding: 20px; |     padding: 0; | ||||||
|     background-color: #f9f9f9; |     box-sizing: border-box; | ||||||
|     border-radius: 8px; |  | ||||||
|     box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /* Панель навигации */ | /* Панель навигации */ | ||||||
| #navigation-panel { | .panel { | ||||||
|  |     background-color: #007bff; | ||||||
|  |     padding: 10px; | ||||||
|  |     color: white; | ||||||
|     display: flex; |     display: flex; | ||||||
|     align-items: center; |     align-items: center; | ||||||
|     background-color: #1e90ff; | } | ||||||
|     padding: 10px; | 
 | ||||||
|     border-radius: 8px; | .panel-thing { | ||||||
|     margin-bottom: 20px; |     margin-right: 20px; | ||||||
|  |     text-decoration: none; | ||||||
|     color: white; |     color: white; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .profile-link { | .panel-header-txt { | ||||||
|     margin-right: 15px; |     font-size: 18px; | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .profile-icon { |  | ||||||
|     width: 40px; |  | ||||||
|     height: 40px; |  | ||||||
|     border-radius: 50%; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .panel-description { |  | ||||||
|     font-size: 1.2em; |  | ||||||
|     font-weight: bold; |     font-weight: bold; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /* Стиль всплывающего окна */ | /* Стили динамических блоков */ | ||||||
| .popup-window { | .dynamic-block-list { | ||||||
|     display: none; |     display: flex; | ||||||
|     position: fixed; |     flex-direction: column; | ||||||
|     top: 50%; |     align-items: center; | ||||||
|     left: 50%; |  | ||||||
|     transform: translate(-50%, -50%); |  | ||||||
|     background-color: white; |  | ||||||
|     padding: 20px; |     padding: 20px; | ||||||
|     border-radius: 8px; |  | ||||||
|     box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); |  | ||||||
|     z-index: 100; |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .popup-window-header { | .dynamic-block-list-el-container { | ||||||
|     font-size: 1.5em; |     width: 100%; | ||||||
|  |     max-width: 600px; | ||||||
|  |     margin-top: 20px; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | /* Кнопка добавления */ | ||||||
|  | .button-add { | ||||||
|  |     width: 50px; | ||||||
|  |     height: 50px; | ||||||
|  |     cursor: pointer; | ||||||
|  |     transition: transform 0.2s; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .button-add:hover { | ||||||
|  |     transform: scale(1.1); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | /* Всплывающие окна */ | ||||||
|  | .popup-window { | ||||||
|  |     background-color: white; | ||||||
|  |     border-radius: 8px; | ||||||
|  |     box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); | ||||||
|  |     padding: 20px; | ||||||
|  |     max-width: 500px; | ||||||
|  |     margin: 0 auto; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .popup-window-msg { | ||||||
|  |     font-size: 20px; | ||||||
|     margin-bottom: 15px; |     margin-bottom: 15px; | ||||||
|     color: #333; |     color: #333; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .popup-window-subheader { | .popup-window-btn-yes, .popup-window-btn-no { | ||||||
|     font-size: 1.2em; |     padding: 10px 20px; | ||||||
|     margin-bottom: 20px; |     border: none; | ||||||
|     color: #666; |     border-radius: 5px; | ||||||
|  |     font-size: 16px; | ||||||
|  |     cursor: pointer; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .form-table { | .popup-window-btn-yes { | ||||||
|  |     background-color: #28a745; | ||||||
|  |     color: white; | ||||||
|  |     margin-right: 10px; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .popup-window-btn-no { | ||||||
|  |     background-color: #dc3545; | ||||||
|  |     color: white; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | /* Таблица ввода */ | ||||||
|  | table.id-str-input-table { | ||||||
|     width: 100%; |     width: 100%; | ||||||
|  |     border-collapse: collapse; | ||||||
|     margin-bottom: 20px; |     margin-bottom: 20px; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .form-label { | .id-str-input-td1, .id-str-input-td2 { | ||||||
|  |     border: none; | ||||||
|  |     padding: 10px; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .id-str-input-td1 { | ||||||
|     text-align: left; |     text-align: left; | ||||||
|     padding-right: 10px; |     padding-right: 10px; | ||||||
|     font-weight: bold; |     font-weight: bold; | ||||||
|     color: #333; |     color: #555; | ||||||
|  |     white-space: nowrap; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .form-input { | .id-str-input-td2 { | ||||||
|     width: 100%; |     width: 100%; | ||||||
|     padding: 8px; | } | ||||||
|     border: 1px solid #ddd; | 
 | ||||||
|  | .one-line-input { | ||||||
|  |     width: 100%; | ||||||
|  |     padding: 8px 12px; | ||||||
|  |     border: 1px solid #ccc; | ||||||
|     border-radius: 4px; |     border-radius: 4px; | ||||||
|  |     font-size: 14px; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .popup-actions { | /* Стили комнат */ | ||||||
|  | .CL-my-chat-box { | ||||||
|     display: flex; |     display: flex; | ||||||
|     justify-content: space-between; |     flex-direction: row; | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .popup-btn { |  | ||||||
|     background-color: #1e90ff; |  | ||||||
|     color: white; |  | ||||||
|     border: none; |  | ||||||
|     padding: 10px 20px; |  | ||||||
|     border-radius: 4px; |  | ||||||
|     cursor: pointer; |  | ||||||
|     font-size: 1em; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .popup-btn:hover { |  | ||||||
|     background-color: #005fbb; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| /* Контейнер списка чатов */ |  | ||||||
| .chat-list-container { |  | ||||||
|     display: flex; |  | ||||||
|     flex-direction: column; |  | ||||||
|     background-color: #fff; |  | ||||||
|     padding: 20px; |  | ||||||
|     border-radius: 8px; |  | ||||||
|     box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .button-add { |  | ||||||
|     margin-bottom: 10px; |  | ||||||
|     cursor: pointer; |  | ||||||
|     width: 40px; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| /* Список чатов */ |  | ||||||
| .chat-list { |  | ||||||
|     display: flex; |  | ||||||
|     flex-direction: column; |  | ||||||
|     max-height: 400px; |  | ||||||
|     overflow-y: auto; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| /* Стиль для каждой комнаты чата */ |  | ||||||
| .chat-room { |  | ||||||
|     display: flex; |  | ||||||
|     align-items: center; |  | ||||||
|     background-color: #40e0d0; /* Бирюзовый цвет */ |  | ||||||
|     padding: 10px; |  | ||||||
|     margin-bottom: 10px; |  | ||||||
|     border-radius: 8px; |  | ||||||
|     height: 40px; /* Низкая высота */ |  | ||||||
|     width: 85%; /* По умолчанию для портретного режима */ |  | ||||||
|     position: relative; |     position: relative; | ||||||
| } |     padding: 10px; | ||||||
| 
 |     background-color: #003366; /* Синий фон */ | ||||||
| .chat-room-name { |  | ||||||
|     flex-grow: 1; |  | ||||||
|     padding-left: 10px; |  | ||||||
|     font-size: 1.1em; |  | ||||||
|     color: white; |  | ||||||
|     font-weight: bold; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .chat-room-close { |  | ||||||
|     position: absolute; |  | ||||||
|     right: 10px; /* Красный крестик справа */ |  | ||||||
|     background-color: red; |  | ||||||
|     color: white; |  | ||||||
|     border: none; |  | ||||||
|     padding: 5px 10px; |  | ||||||
|     border-radius: 4px; |  | ||||||
|     cursor: pointer; |  | ||||||
|     font-size: 1em; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .chat-room-close:hover { |  | ||||||
|     background-color: darkred; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| /* Кастомный скроллбар для списка чатов */ |  | ||||||
| .chat-list::-webkit-scrollbar { |  | ||||||
|     width: 8px; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .chat-list::-webkit-scrollbar-track { |  | ||||||
|     background: #f1f1f1; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| .chat-list::-webkit-scrollbar-thumb { |  | ||||||
|     background: #888; |  | ||||||
|     border-radius: 8px; |     border-radius: 8px; | ||||||
|  |     margin-bottom: 10px; | ||||||
|  |     align-items: center; | ||||||
|  |     min-height: 40px; | ||||||
|  |     width: 100%; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .chat-list::-webkit-scrollbar-thumb:hover { | /* Текст внутри блока комнаты */ | ||||||
|     background: #555; | .CL-my-chat-box-nickname, .CL-my-chat-box-name, .CL-my-chat-box-my-role { | ||||||
|  |     margin-left: 8px; | ||||||
|  |     color: rgb(0, 0, 0); /* Белый цвет текста */ | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /* Адаптация ширины комнат под ориентацию экрана */ | /* Крестик в правом верхнем углу */ | ||||||
| @media (orientation: landscape) { | .CL-my-chat-box-leave-btn { | ||||||
|     .chat-room { |     position: absolute; | ||||||
|         width: 50%; /* Ширина для ландшафтной ориентации */ |     top: 8px; | ||||||
|     } |     right: 8px; | ||||||
|  |     width: 16px; | ||||||
|  |     height: 16px; | ||||||
|  |     background: url('/assets/img/close.svg') no-repeat center; | ||||||
|  |     background-size: cover; | ||||||
|  |     cursor: pointer; | ||||||
|  |     border: none; | ||||||
|  |     transition: transform 0.2s; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @media (orientation: portrait) { | .CL-my-chat-box-leave-btn:hover { | ||||||
|     .chat-room { |     transform: scale(1.2); | ||||||
|         width: 85%; /* Ширина для портретной ориентации */ | } | ||||||
|     } | 
 | ||||||
|  | /* Дизайн списка комнат остается таким же */ | ||||||
|  | #CL-bacbe { | ||||||
|  |     margin-top: 6px; | ||||||
|  |     margin-bottom: 4px; | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user