From 707a7c93a19a620b1ac870e13919463c96d485b9 Mon Sep 17 00:00:00 2001 From: soraefir Date: Thu, 13 Jul 2023 18:57:49 +0200 Subject: [PATCH] made bar linear --- public/css/index.css | 74 +++++++-------------------------- public/js/main.js | 4 +- template/module/journey_sec.pug | 11 +++-- 3 files changed, 23 insertions(+), 66 deletions(-) diff --git a/public/css/index.css b/public/css/index.css index 7f5a122..a6dd656 100644 --- a/public/css/index.css +++ b/public/css/index.css @@ -2147,63 +2147,6 @@ pre { [v-cloak] { display: none; } -.list-group { - display: -ms-flexbox; - display: -webkit-box; - display: flex; - -ms-flex-direction: column; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - flex-direction: column; - padding-left: 0; - margin-bottom: 0; - min-height: 100%; } - -.list-group-item-action { - width: 100%; - color: #495057; - text-align: inherit; } - -.list-group-item-action:focus, -.list-group-item-action:hover { - z-index: 1; - color: #495057; - text-decoration: none; - background-color: #f8f9fa; } - -.list-group-item-action:active { - color: #212529; - background-color: #e9ecef; } - -.list-group-item { - position: relative; - display: block; - padding: .75rem 1.25rem; - margin-bottom: -1px; - background-color: #fff; - border: 1px solid rgba(0, 0, 0, 0.125); } - -.list-group-item:first-child { - border-top-left-radius: .25rem; - border-top-right-radius: .25rem; } - -.list-group-item:last-child { - margin-bottom: 0; - border-bottom-right-radius: .25rem; - border-bottom-left-radius: .25rem; } - -.list-group-item.disabled, -.list-group-item:disabled { - color: #6c757d; - pointer-events: none; - background-color: #fff; } - -.list-group-item.active { - z-index: 2; - color: #fff; - background-color: #007bff; - border-color: #007bff; } - /** * Reset */ @@ -4016,5 +3959,20 @@ input:-webkit-autofill { } .list-group { - margin-top: 16px; + overflow: auto; + white-space: nowrap; + scrollbar-width: none; + padding: 1rem 0rem; +} + +.list-group-item { + background-color: #fff; + border: 1px solid rgba(0, 0, 0, 0.125); + display: inline-block; + position: relative; +} + +.list-group-item div { + display: block; + padding: 0.5rem 1.5rem; } \ No newline at end of file diff --git a/public/js/main.js b/public/js/main.js index d1ae73e..0dfde9c 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -280,9 +280,9 @@ const app = new Vue({ e.flight = undefined; e.step_title = e.step_title || []; } - - }); + + this.debounceSave = _.debounce(this.save_data, 500) this.debounceSearch = {"hotel":_.debounce((q)=>{this.querying.hotel=true;this.search_nominatim(q,(r)=>(r.type=="hotel" || r.type=="hostel")).then((r)=>{this.querying.hotel=false});}, 500), "restaurants":_.debounce((q)=>{this.querying.food=true;this.search_nominatim(q,(r)=>(is_restauration_type(r))).then((r)=>{this.querying.food=false});}, 500), diff --git a/template/module/journey_sec.pug b/template/module/journey_sec.pug index 67bdd08..0ae4428 100644 --- a/template/module/journey_sec.pug +++ b/template/module/journey_sec.pug @@ -1,9 +1,8 @@ -draggable(tag='ul' :list='journey_data.main' class='col-1 list-group p-abs' handle='.handle') - div.list-group-item.handle(v-for='(element, idx) in journey_data.main' :key='idx' @click='sel_section(idx)' :style='journey_step_data.section==idx?"left:10px":""') - span.text {{element.title}} - //- input.col-12.input(disabled='' :value='element.title' style='display:block;margin:0;') +draggable(tag='ul' :list='journey_data.main' class='list-group bg-dark' handle='.handle') + div.list-group-item.handle(v-for='(element, idx) in journey_data.main' :key='idx' @click='sel_section(idx)' :style='journey_step_data.section==idx?"background:red":""') + div.text {{element.title}} i.fa.fa-times.close.fright(style='top:2px;right:2px;position:absolute;' @click='rm_section(idx)') div.list-group-item() - span.text Add Section - i.fa.fa-plus.add(@click='add_section()') \ No newline at end of file + div.text Add Section + i.fa.fa-plus.add(style='top:12px;right:5px;position:absolute;' @click='add_section()') \ No newline at end of file