From b272bca0cafcd4a14a415a49580ccf44e3505024 Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Wed, 25 Sep 2019 16:08:58 +0200 Subject: [PATCH] history is functionnal and with state transition --- assets/css/app.scss | 128 +++++++++++++++------ src/App.vue | 4 +- src/components/Content/HistoryItem.vue | 42 +++++++ src/components/Content/ResultItem.vue | 18 +-- src/components/nav/FooterTabs.vue | 21 +++- src/components/nav/History.vue | 70 +++++++---- src/components/nav/Results.vue | 1 + src/index.js | 3 + src/{components/Content => pages}/Item.vue | 0 src/router/index.js | 28 ++--- src/store/index.js | 4 +- src/store/modules/history.js | 46 ++++++++ 12 files changed, 279 insertions(+), 86 deletions(-) create mode 100644 src/components/Content/HistoryItem.vue rename src/{components/Content => pages}/Item.vue (100%) create mode 100644 src/store/modules/history.js diff --git a/assets/css/app.scss b/assets/css/app.scss index c514794..13e8888 100644 --- a/assets/css/app.scss +++ b/assets/css/app.scss @@ -61,6 +61,57 @@ footer[role="tools"]{ z-index: 8; background-color: $or; padding:1.2em $side-padding; + max-height: $list-item-h; + @include accordeon-transition($list-item-h); + >header{ + + } + .history-list{ + overflow-x: hidden; + .wrapper{ + height:100%; + // hidding the scrollbar + overflow-y: auto; + width:calc(100% + 1em); + padding-right: 1em; + >ul{ + padding:0; + display: flex; + flex-direction: row; + flex-wrap: wrap; + } + } + li.item{ + box-sizing: border-box; + flex-basis: percentage(2/$default_sum); + height: $list-item-h; + overflow: hidden; + padding-bottom: 1em; + padding-right: 0.7em; + article{ + max-height: 100%; + overflow: hidden; + } + } + article.history.item{ + header{ + h1{ + font-size: 0.882em; + font-weight: normal; + margin:0 0 0.5em 0; + } + } + .extract{ + p{ + font-size: 0.882em; + margin:0; + } + code{ + background-color: lighten(desaturate($rouge,20%), 20%); + } + } + } + } } #results{ z-index: 9; @@ -69,56 +120,61 @@ footer[role="tools"]{ max-height: $list-item-h * 3; @include accordeon-transition($list-item-h * 3); >header{ + .search-keys{ + font-size: 0.756em; + font-weight: 500; + } .results-count{ font-size: 0.756em; } } .results-list{ - overflow-x: hidden; - .wrapper{ - height:100%; - overflow-y: auto; - width:calc(100% + 1em); - padding-right: 1em; - >ul{ - padding:0; - display: flex; - flex-direction: row; - flex-wrap: wrap; + overflow-x: hidden; + .wrapper{ + height:100%; + // hidding the scrollbar + overflow-y: auto; + width:calc(100% + 1em); + padding-right: 1em; + >ul{ + padding:0; + display: flex; + flex-direction: row; + flex-wrap: wrap; + } } - } - li.result{ - box-sizing: border-box; - flex-basis: percentage(2/$default_sum); - height: $list-item-h; - overflow: hidden; - padding-bottom: 1em; - padding-right: 0.7em; - article{ - max-height: 100%; + li.result{ + box-sizing: border-box; + flex-basis: percentage(2/$default_sum); + height: $list-item-h; overflow: hidden; - } - } - article.result.item{ - header{ - h1{ - font-size: 0.882em; - font-weight: normal; - margin:0 0 0.5em 0; + padding-bottom: 1em; + padding-right: 0.7em; + article{ + max-height: 100%; + overflow: hidden; } } - .extract{ - p{ - font-size: 0.882em; - margin:0; + article.result.item{ + header{ + h1{ + font-size: 0.882em; + font-weight: normal; + margin:0 0 0.5em 0; + } } - code{ - background-color: lighten(desaturate($rouge,20%), 20%); + .extract{ + p{ + font-size: 0.882em; + margin:0; + } + code{ + background-color: lighten(desaturate($rouge,20%), 20%); + } } } } } - } #footer-bottom{ z-index: 10; padding:0 $side-padding; diff --git a/src/App.vue b/src/App.vue index 6021126..4598cec 100644 --- a/src/App.vue +++ b/src/App.vue @@ -6,7 +6,7 @@ class="site-title" tabindex="0" > - Les Guides de Paris + Les Guides de Paris @@ -58,7 +58,7 @@ export default { diff --git a/src/components/Content/ResultItem.vue b/src/components/Content/ResultItem.vue index 16d4628..a251801 100644 --- a/src/components/Content/ResultItem.vue +++ b/src/components/Content/ResultItem.vue @@ -15,6 +15,9 @@