Commit 3f96cdd0 authored by 박민석's avatar 박민석

update mobile ui

parent 977de2ba
Pipeline #21513 failed with stages
in 1 minute and 41 seconds
...@@ -116,7 +116,7 @@ body { ...@@ -116,7 +116,7 @@ body {
color: #333; color: #333;
font-family: inherit; font-family: inherit;
font-size: 0.95rem; font-size: 0.95rem;
width: 120px; /* width: 120px; */
height: 45px; height: 45px;
border: 1px solid #dbdbdb; border: 1px solid #dbdbdb;
border-radius: 28px; border-radius: 28px;
...@@ -305,19 +305,27 @@ body { ...@@ -305,19 +305,27 @@ body {
} }
@media screen and (max-width: 768.5px) { @media screen and (max-width: 768.5px) {
.navbar-brand .navbar-item.search {
display: none;
}
.mobile-menu-item > a { .mobile-menu-item > a {
width: 100%; width: 100%;
justify-content: center; justify-content: center;
} }
.mobile-toolbar .field {
width: 100%;
}
#search-input { #search-input {
width: 100%; width: 100%;
} }
} }
@media screen and (min-width: 769px) { @media screen and (min-width: 769px) {
#search-input { .mobile-toolbar .field {
width: 100%; display: none;
} }
} }
...@@ -334,10 +342,6 @@ body { ...@@ -334,10 +342,6 @@ body {
.navbar-menu { .navbar-menu {
display: none; display: none;
} }
.navbar-brand .navbar-item.search {
display: none;
}
} }
@media screen and (min-width: 1024px) { @media screen and (min-width: 1024px) {
......
...@@ -248,7 +248,6 @@ ...@@ -248,7 +248,6 @@
position: relative; position: relative;
border-radius: 0.5rem; border-radius: 0.5rem;
border: 2px solid var(--color-smoke-90); border: 2px solid var(--color-smoke-90);
transition: all 0.15s ease-in-out;
z-index: var(--z-index-page-version-menu); z-index: var(--z-index-page-version-menu);
} }
......
...@@ -313,7 +313,8 @@ ...@@ -313,7 +313,8 @@
font-weight: 300; font-weight: 300;
} }
#expand-btn { #expand-btn,
#close-btn {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
...@@ -324,12 +325,18 @@ ...@@ -324,12 +325,18 @@
transition: 300ms ease; transition: 300ms ease;
} }
#expand-btn:hover { #close-btn {
display: none;
}
#expand-btn:hover,
#close-btn:hover {
cursor: pointer; cursor: pointer;
background-color: #005bb5; background-color: #005bb5;
} }
#expand-btn:active svg { #expand-btn:active svg,
#close-btn:active svg {
transform: scale(0.9); transform: scale(0.9);
} }
...@@ -506,3 +513,55 @@ ...@@ -506,3 +513,55 @@
background: var(--color-bwg-main); background: var(--color-bwg-main);
} }
} }
@media screen and (max-width: 768.5px) {
.chat {
width: 100%;
height: 100%;
z-index: 100;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.chat.expand {
width: 100%;
height: 100%;
}
.chat .chat-head .chat-logo {
margin-top: 3px;
width: 30px;
height: 30px;
}
.chat-logo-title-contents .chat-logo-title.main{
font-size: 20px;
}
.chat-logo-title-contents .chat-logo-title.sub {
font-size: 10px;
}
#expand-btn {
display: none;
}
#close-btn {
display: flex;
}
.chat .chat-body {
height: 100%;
}
.chat .chat-area textarea {
font-size: 13px;
}
.chat .chat-body > ul {
max-width: 90%;
}
.chat .chat-body .message {
font-size: 12px;
}
.chat .chat-head .model {
top: 60px;
}
.chat-head .model .tooltip .tooltip-text {
font-size: 12px;
width: 200px;
}
}
...@@ -16,11 +16,11 @@ ...@@ -16,11 +16,11 @@
.mobile-toolbar { .mobile-toolbar {
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: center;
align-items: center; align-items: center;
} }
.nav-toggle { .nav-toggle,
#collapse-panel-btn {
border: none; border: none;
outline: none; outline: none;
line-height: inherit; line-height: inherit;
...@@ -35,16 +35,10 @@ ...@@ -35,16 +35,10 @@
margin-right: 10px; margin-right: 10px;
} }
.nav-toggle:active { .nav-toggle:active,
#collapse-panel-btn:active {
background-color: rgba(0, 0, 0, 0.1); background-color: rgba(0, 0, 0, 0.1);
} }
.mobile-toolbar .field {
width: 100%;
}
.mobile-toolbar .field input {
width: 100%;
}
@media screen and (min-width: 1024px) { @media screen and (min-width: 1024px) {
.mobile-toolbar { .mobile-toolbar {
...@@ -55,11 +49,6 @@ ...@@ -55,11 +49,6 @@
} */ } */
} }
.nav-toggle.is-active {
background-image: url(../img/back.svg);
background-size: 41.5%;
}
.home-link { .home-link {
display: block; display: block;
background: url(../img/home-o.svg) no-repeat center; background: url(../img/home-o.svg) no-repeat center;
...@@ -87,6 +76,11 @@ ...@@ -87,6 +76,11 @@
font-weight: 600; font-weight: 600;
} }
.panel-toolbar {
margin-top: 17px;
padding-left: 20px;
}
@media screen and (min-width: 1024px) { @media screen and (min-width: 1024px) {
.edit-this-page { .edit-this-page {
display: block; display: block;
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
var navContainer = document.querySelector('.nav-container') var navContainer = document.querySelector('.nav-container')
if (!navContainer) return if (!navContainer) return
var navToggle = document.querySelector('.nav-toggle') var navToggle = document.querySelector('.nav-toggle')
var panelToggle = document.getElementById('collapse-panel-btn')
var nav = navContainer.querySelector('.nav') var nav = navContainer.querySelector('.nav')
var navMenuToggle = navContainer.querySelector('.nav-menu-toggle') var navMenuToggle = navContainer.querySelector('.nav-menu-toggle')
...@@ -95,6 +96,10 @@ ...@@ -95,6 +96,10 @@
if (e.detail > 1) e.preventDefault() if (e.detail > 1) e.preventDefault()
}) })
panelToggle.addEventListener('click', () => {
navContainer.classList.remove('is-active')
})
function onHashChange () { function onHashChange () {
var navLink var navLink
var hash = window.location.hash var hash = window.location.hash
...@@ -165,7 +170,7 @@ ...@@ -165,7 +170,7 @@
// trapEvent(e) // trapEvent(e)
// var html = document.documentElement // var html = document.documentElement
// html.classList.add('is-clipped--nav') // html.classList.add('is-clipped--nav')
navToggle.classList.add('is-active') // navToggle.classList.add('is-active')
navContainer.classList.add('is-active') navContainer.classList.add('is-active')
// var bounds = nav.getBoundingClientRect() // var bounds = nav.getBoundingClientRect()
// var expectedHeight = window.innerHeight - Math.round(bounds.top) // var expectedHeight = window.innerHeight - Math.round(bounds.top)
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
const stopButton = document.getElementById('stop-btn') const stopButton = document.getElementById('stop-btn')
const chatBody = document.querySelector('.chat .chat-body') const chatBody = document.querySelector('.chat .chat-body')
const expandButton = document.querySelector('#expand-btn svg') const expandButton = document.querySelector('#expand-btn svg')
const closeButton = document.getElementById('close-btn')
const productButton = document.getElementById('model-toggle') const productButton = document.getElementById('model-toggle')
const productList = document.getElementById('model-popover') const productList = document.getElementById('model-popover')
const backdrop = document.querySelector('.model .backdrop') const backdrop = document.querySelector('.model .backdrop')
...@@ -106,6 +107,10 @@ ...@@ -106,6 +107,10 @@
} }
}) })
closeButton.addEventListener('click', () => {
chat.classList.remove('show')
})
productButton.addEventListener('click', () => { productButton.addEventListener('click', () => {
if (productList.classList.contains('show')) { if (productList.classList.contains('show')) {
productList.classList.remove('show') productList.classList.remove('show')
......
...@@ -15,6 +15,11 @@ ...@@ -15,6 +15,11 @@
<path d="m13.28 7.78 3.22-3.22v2.69a.75.75 0 0 0 1.5 0v-4.5a.75.75 0 0 0-.75-.75h-4.5a.75.75 0 0 0 0 1.5h2.69l-3.22 3.22a.75.75 0 0 0 1.06 1.06ZM2 17.25v-4.5a.75.75 0 0 1 1.5 0v2.69l3.22-3.22a.75.75 0 0 1 1.06 1.06L4.56 16.5h2.69a.75.75 0 0 1 0 1.5h-4.5a.747.747 0 0 1-.75-.75ZM12.22 13.28l3.22 3.22h-2.69a.75.75 0 0 0 0 1.5h4.5a.747.747 0 0 0 .75-.75v-4.5a.75.75 0 0 0-1.5 0v2.69l-3.22-3.22a.75.75 0 1 0-1.06 1.06ZM3.5 4.56l3.22 3.22a.75.75 0 0 0 1.06-1.06L4.56 3.5h2.69a.75.75 0 0 0 0-1.5h-4.5a.75.75 0 0 0-.75.75v4.5a.75.75 0 0 0 1.5 0V4.56Z"></path> <path d="m13.28 7.78 3.22-3.22v2.69a.75.75 0 0 0 1.5 0v-4.5a.75.75 0 0 0-.75-.75h-4.5a.75.75 0 0 0 0 1.5h2.69l-3.22 3.22a.75.75 0 0 0 1.06 1.06ZM2 17.25v-4.5a.75.75 0 0 1 1.5 0v2.69l3.22-3.22a.75.75 0 0 1 1.06 1.06L4.56 16.5h2.69a.75.75 0 0 1 0 1.5h-4.5a.747.747 0 0 1-.75-.75ZM12.22 13.28l3.22 3.22h-2.69a.75.75 0 0 0 0 1.5h4.5a.747.747 0 0 0 .75-.75v-4.5a.75.75 0 0 0-1.5 0v2.69l-3.22-3.22a.75.75 0 1 0-1.06 1.06ZM3.5 4.56l3.22 3.22a.75.75 0 0 0 1.06-1.06L4.56 3.5h2.69a.75.75 0 0 0 0-1.5h-4.5a.75.75 0 0 0-.75.75v4.5a.75.75 0 0 0 1.5 0V4.56Z"></path>
</svg> </svg>
</div> </div>
<div id="close-btn">
<svg data-slot='icon' fill='none' strokeWidth='1.5' stroke='#fff' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' aria-hidden='true' width='30' height='30'>
<path strokeLinecap='round' strokeLinejoin='round' d='M6 18 18 6M6 6l12 12'></path>
</svg>
</div>
<div class="model"> <div class="model">
<div class="backdrop"></div> <div class="backdrop"></div>
<button id="model-toggle">전체</button> <button id="model-toggle">전체</button>
......
<div class="nav-container"{{#if page.component}} data-component="{{page.component.name}}" data-version="{{page.version}}"{{/if}}> <div class="nav-container"{{#if page.component}} data-component="{{page.component.name}}" data-version="{{page.version}}"{{/if}}>
<aside class="nav"> <aside class="nav">
<div class="panels"> <div class="panels">
{{!-- <button> {{> panel-toolbar}}
<svg stroke="#0072ce" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" height="30px" width="30px" xmlns="http://www.w3.org/2000/svg">
<rect width="18" height="18" x="3" y="3" rx="2" ry="2"></rect>
<path d="M9 3v18"></path>
<path d="m16 15-3-3 3-3"></path>
</svg>
</button> --}}
{{> nav-explore}} {{> nav-explore}}
{{> nav-menu}} {{> nav-menu}}
</div> </div>
......
<div class="panel-toolbar">
<button id="collapse-panel-btn">
<svg stroke="#0072ce" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" height="30px" width="30px" xmlns="http://www.w3.org/2000/svg">
<rect width="18" height="18" x="3" y="3" rx="2" ry="2"></rect>
<path d="M9 3v18"></path>
<path d="m16 15-3-3 3-3"></path>
</svg>
</button>
</div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment