diff --git a/resources/assets/less/metager/result-page.less b/resources/assets/less/metager/result-page.less index 331a47cd9a06738a414122046e6934dce913c5d3..467199d70102af22dedc9fe800a47a202b48f41e 100644 --- a/resources/assets/less/metager/result-page.less +++ b/resources/assets/less/metager/result-page.less @@ -4,8 +4,9 @@ @import "./result-saver.less"; @import "./result.less"; @import "./product.less"; -@result-width: 700px; -@quicktip-width: 500px; +// +@resultpage-background-color: #FAFAFA; +// @results-margin-left: @resultpage-leftbox-big-screen-margin-left; // @result-page-body-background-color: @background-color; @@ -18,6 +19,24 @@ @a-hover-color: @result-page-a-hover-color; @a-donation-hover-color: @result-page-a-hover-color; @product-shop-color: @result-page-product-shop-color; +// +@results-width-min: 500px; +@results-width-max: 700px; +@additions-width-min: 400px; +@additions-width-max: 500px; +// +@resultpage-breakpoint-large: (@results-width-max + @additions-width-max + @padding-small-default * 4); +@resultpage-breakpoint-small: (@results-width-min + @additions-width-min + @padding-small-default * 4); +// +@resultpage-leftbox-max-width: @results-width-max; +@resultpage-leftbox-min-dist-left-right: @padding-small-default; +@resultpage-leftbox-min-dist-top-bottom: @padding-small-default; +@resultpage-leftbox-big-screen-margin-left: 50px; +// +@logo-size-breakpoint: (@results-width-min + @padding-small-default * 2); +// +@openSidebar-breakpoint: (@results-width-max + @padding-small-default * 2 + 60px); +// #header-logo { z-index: 0; padding-right: 10px; @@ -27,12 +46,24 @@ font-size: 22px; display: inline-block; } + .screen-small { + display: none; + } + .screen-large {} + @media (max-width: @logo-size-breakpoint) { + .screen-large { + display: none; + } + .screen-small { + display: initial; + } + } } body { - &#resultBody { + &#resultpage-body { background-image: inherit; - background-color: #FAFAFA; + background-color: @resultpage-background-color; } &.quicktips { background-color: @quicktip-background-color; @@ -186,7 +217,7 @@ a { } .description-container { - margin: 0!important; + margin: 0 !important; } .options-list>li { @@ -211,7 +242,6 @@ a { display: none; } - /* Hier der Style für die Bilder */ #fit-width .masonry { @@ -234,7 +264,6 @@ a { flex-wrap: wrap; } - /* Placeholder für ladende Tabs */ .loader { @@ -284,7 +313,7 @@ a { } .lightslider { - overflow: visible!important; + overflow: visible !important; } #products { @@ -317,7 +346,6 @@ a { } } - /* New result style */ .content-wrapper { @@ -326,37 +354,178 @@ a { } #resultpage-container { - width: @result-width + @quicktip-width; - align-self: left; - display: flex; - justify-content: left; - margin-left: @results-margin-left; - background-color: #FAFAFA; - @media (max-width: (2 * @results-margin-left + @result-width + @quicktip-width - 1px)) { - width: @result-width; + margin: @padding-small-default; + display: grid; + grid-template-columns: @results-width-max @additions-width-max; + grid-template-areas: "searchbar ." "foki ." "results additions"; + grid-column-gap: (@padding-small-default * 2); + grid-row-gap: @padding-small-default; + justify-items: stretch; + align-items: stretch; + /**/ + background-color: @resultpage-background-color; + #research-bar-container { + grid-area: searchbar; + /**/ + width: (@results-width-max + @padding-small-default * 2); + max-width: (@results-width-max + @padding-small-default * 2); + } + #research-bar-placeholder { + grid-area: searchbar; + /**/ + max-width: @results-width-max; + } + #foki { + grid-area: foki; + /**/ + max-width: @results-width-max; + } + #results-container { + grid-area: results; + /**/ + max-width: @results-width-max; + .alert { + margin: @padding-small-default 0px; + } + } + #additions-container { + grid-area: additions; + /**/ + //min-width: @additions-width-min; + max-width: @additions-width-max; + #search-settings { + display: none; + } + } + @media (max-width: @resultpage-breakpoint-large) { + @supports (display: grid) { + #research-bar-container { + width: ~"calc(60% - 1px)"; + } + grid-template-columns:~"calc(60% - 8px)"~"calc(40% - 8px)"; + grid-template-areas: "searchbar ." "foki ." "results additions"; + } + } + @media (max-width: @resultpage-breakpoint-small) { + #research-bar-container { + width: 100%; + } + grid-template-columns: 100%; + grid-template-areas: "searchbar" "foki" "results"; #additions-container { display: none; - float: right; } } - @media (max-width: (2 * @results-margin-left + @result-width - 1px)) { +} + +#research-bar-container { + position: fixed; + z-index: 100; + top: 0; + left: 0; + background-color: @resultpage-background-color; + padding: 8px 8px 0px 8px; + #research-bar { + background-color: white; + border: 1px solid #ccc; + border-bottom: 2px solid @metager-orange; + box-shadow: 0px 1px 1.5px 0px rgba(0, 0, 0, 0.12), 1px 0px 1px 0px rgba(0, 0, 0, 0.24); + display: flex; + align-items: center; + padding: 4px; + .resultpage-searchbar { + .search-input-submit .search-input input { + border-bottom: 1px solid #ccc; + } + @media (max-width: @openSidebar-breakpoint) { + .search-focus-selector { + border-top: none; + border-radius: 5px; + } + .search-input-submit { + border-radius: 5px; + } + >* { + border-radius: 5px; + min-height: 40px; + &:not(:first-child) { + border-left: 1px solid #aaa; + } + } + } + } + } +} + +#foki { + display: flex; + justify-content: left; + /* + @media (max-width: (@results-width-min + @additions-width-min - 1px)) { width: 100%; - justify-content: center; + max-width: none; margin: 0px; - padding: 0px @resultpage-leftbox-min-dist-left-right; // Verhindert, dass Text bei kleinen Bildschirmen an den Rand ragt + padding: @padding-small-default; + .scrollbox { + max-width: none; + margin: 0px; + #foki-box { + max-width: none; + margin: 0px; + } + } } - #results-container { - max-width: @result-width; + @media (max-width: (4 * @padding-small-default + @results-width-max + @additions-width-max - 1px)) { + padding-left: @padding-small-default; + } + @media (max-width: (@results-width-min + @additions-width-min - 1px)) { width: 100%; - .alert { - margin: 8px 0px; + max-width: 700px; + margin: 0px; + padding: @padding-small-default; + #research-bar { + max-width: none; + margin: 0px; } } - #additions-container { - padding-left: 50px; - width: @quicktip-width; - #search-settings { - display: none; + */ + #foki-box { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + width: 100%; + max-width: @resultpage-leftbox-max-width; + background-color: white; + border: 1px solid #ccc; + -webkit-box-shadow: 0px 1px 1.5px 0px rgba(0, 0, 0, 0.12), 1px 0px 1px 0px rgba(0, 0, 0, 0.24); + box-shadow: 0px 1px 1.5px 0px rgba(0, 0, 0, 0.12), 1px 0px 1px 0px rgba(0, 0, 0, 0.24); + overflow-x: visible; + padding: 10px; + @media (max-width: 700px) { + overflow-x: auto; + } + &>div { + padding: 0px 10px; + &>a { + color: black; + } + &.active>a { + border-bottom: 1px solid @metager-orange; + color: @metager-orange; + } + &:last-child { + padding-right: 20px + } + } + .edit-focus { + margin-left: 7px; + } + /* Scrollbar Style */ + &::-webkit-scrollbar { + height: 0px; + /* remove scrollbar space */ + background: transparent; + /* optional: just make scrollbar invisible */ } } } @@ -374,7 +543,43 @@ footer.resultPageFooter { max-width: 700px; margin-left: 50px; margin-top: 20px; - @media (max-width: (2 * @results-margin-left + @result-width - 1px)) { + @media (max-width: (2 * @results-margin-left + @results-width-max - 1px)) { margin: 20px 0 0 0; } +} + +/* Searchbar Opener */ + +#research-bar>.openSidebar { + display: none; + margin-right: 10px; + margin-left: 20px; +} + +@media(max-width: @openSidebar-breakpoint) { + #resultpage-container>.openSidebar { + display: none; + } + #research-bar>.openSidebar { + display: initial; + } +} + +/* Style-fixes for browsers that do not support grid layout */ + +#resultpage-container { + #results-container { + float: left; + @media (max-width: @resultpage-breakpoint-small) { + float:none; + } + } + #additions-container { + float: left; + margin-left: 20px; + @supports (display: grid) { + float: none; + margin-left: 0px; + } + } } \ No newline at end of file diff --git a/resources/assets/less/metager/result.less b/resources/assets/less/metager/result.less index c7dc485186eac5a9b68aef583db8ff49edaab2de..0834a6d00ab1282f134792e90140bf79931cab0c 100644 --- a/resources/assets/less/metager/result.less +++ b/resources/assets/less/metager/result.less @@ -50,7 +50,7 @@ } } } - .result-body { + .resultpage-body { margin-top: 20px; .result-description { margin-bottom: 3px; diff --git a/resources/assets/less/metager/searchbar.less b/resources/assets/less/metager/searchbar.less index 5e8fa43c65e1fffa3893dc6ed423c356c8b164e7..e3a41ba771b5a0b463dbfc4e8af0a69113230688 100644 --- a/resources/assets/less/metager/searchbar.less +++ b/resources/assets/less/metager/searchbar.less @@ -24,9 +24,6 @@ display: -ms-flexbox; display: flex; max-width: 600px; - @media (max-width: @screen-xs-max) { - max-width: initial; - } } .search-input { -webkit-box-flex: 1; @@ -79,6 +76,9 @@ } .search-input-submit { border-radius: 5px; + @media (max-width: @screen-xs-max) { + max-width: initial; + } } .search-submit { border-left: 1px solid #aaa; @@ -104,159 +104,19 @@ } } -.resultpage-searchbar { - padding: 5px; - .search-input-submit .search-input input { - border-bottom: 1px solid #ccc; - } - @media (max-width: @screen-xs-max) { - .search-focus-selector { - border-top: none; - border-radius: 5px; - } - .search-input-submit { - border-radius: 5px; - } - >* { - border-radius: 5px; - min-height: 40px; - &:not(:first-child) { - border-left: 1px solid #aaa; - } - } - *:not(.search-submit) { - width: 100%; - } - } -} - -@resultpage-leftbox-max-width: @result-width; -@resultpage-leftbox-min-dist-left-right: 8px; -@resultpage-leftbox-min-dist-top-bottom: 8px; -@resultpage-leftbox-big-screen-margin-left: 50px; -header { - padding-top: @resultpage-leftbox-min-dist-top-bottom; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - position: fixed; - z-index: 100; // Makes the header larger, so it correctly covers the non scrolling parts below - width: @resultpage-leftbox-max-width + @resultpage-leftbox-big-screen-margin-left + 10; - padding-left: @resultpage-leftbox-big-screen-margin-left; - background-color: inherit; - @media (max-width: 799px) { - width: 100%; - max-width: 799px; - margin: 0px; - padding: @resultpage-leftbox-min-dist-top-bottom @resultpage-leftbox-min-dist-left-right 0px @resultpage-leftbox-min-dist-left-right; - -webkit-box-pack: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - } - #research-bar { - width: 100%; - max-width: @resultpage-leftbox-max-width; - padding: 0px 30px 0px 10px; - background-color: white; - border: 1px solid #ccc; - border-bottom: 2px solid @metager-orange; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-box-shadow: 0px 1px 1.5px 0px rgba(0, 0, 0, 0.12), 1px 0px 1px 0px rgba(0, 0, 0, 0.24); - box-shadow: 0px 1px 1.5px 0px rgba(0, 0, 0, 0.12), 1px 0px 1px 0px rgba(0, 0, 0, 0.24); - @media (max-width: 799px) { - margin: 0px @resultpage-leftbox-min-dist-left-right; - } - } -} - header:nth-child(1) { @media (max-width: 1400px) { position: relative; } } -#foki { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: left; - -ms-flex-pack: left; - justify-content: left; - margin-left: @resultpage-leftbox-big-screen-margin-left; - padding-top: 8px; - width: @resultpage-leftbox-max-width; - @media (max-width: 799px) { - width: 100%; - margin: 0px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - padding: @resultpage-leftbox-min-dist-top-bottom @resultpage-leftbox-min-dist-left-right 0px @resultpage-leftbox-min-dist-left-right; - } - #foki-box { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - width: 100%; - max-width: @resultpage-leftbox-max-width; - background-color: white; - border: 1px solid #ccc; - -webkit-box-shadow: 0px 1px 1.5px 0px rgba(0, 0, 0, 0.12), 1px 0px 1px 0px rgba(0, 0, 0, 0.24); - box-shadow: 0px 1px 1.5px 0px rgba(0, 0, 0, 0.12), 1px 0px 1px 0px rgba(0, 0, 0, 0.24); - overflow-x: visible; - padding: 10px; - @media (max-width: 700px) { - overflow-x: auto; - } - &>div { - padding: 0px 10px; - &>a { - color: black; - } - &.active>a { - border-bottom: 1px solid @metager-orange; - color: @metager-orange; - } - &:last-child { - padding-right: 20px - } - } - .edit-focus { - margin-left: 7px; - } - /* Scrollbar Style */ - &::-webkit-scrollbar { - height: 0px; - /* remove scrollbar space */ - background: transparent; - /* optional: just make scrollbar invisible */ - } - } -} - /* Scrollbar Style */ @scrollfade-color: white; .scrollbox { position: relative; width: 100%; - max-width: @result-width; + max-width: @results-width-max; .foki-scrollfade { &-left, &-right { @@ -295,10 +155,11 @@ header:nth-child(1) { #search-delete-btn { position: absolute; - right: 0; - bottom: 0px; + right: 2px; + bottom: 1px; + width: auto; border: none; - background-color: transparent; + background-color: white; font-size: 25px; font-weight: normal; } \ No newline at end of file diff --git a/resources/assets/less/metager/sidebar.less b/resources/assets/less/metager/sidebar.less index db1714c8ac9f18ae788ab988d177f95d9a106b61..dec6ccb72481b0c1b94abd21dc8feb74561a6752 100644 --- a/resources/assets/less/metager/sidebar.less +++ b/resources/assets/less/metager/sidebar.less @@ -142,11 +142,13 @@ input#sideBarToggle:checked { } } -label#openSidebar { - position: fixed; - top: 23px; - right: 25px; - z-index: 998; +.openSidebar { + &.fixed { + position: fixed; + top: 23px; + right: 25px; + z-index: 998; + } font-size: 36px; line-height: 23px; border-radius: 5px; diff --git a/resources/assets/less/metager/variables.less b/resources/assets/less/metager/variables.less index c2f862dc95dfca975a22333d27b216fc7b3b1dff..ba9529a07ae70c6a1589428557c483339b4ff9a8 100644 --- a/resources/assets/less/metager/variables.less +++ b/resources/assets/less/metager/variables.less @@ -25,7 +25,8 @@ Arial, sans-serif; // General textual link color. @link-color: @metager-orange; - +// +@padding-small-default: 8px; /* Unsorted */ @quicktip-background-color: @color-white; diff --git a/resources/views/layouts/ad.blade.php b/resources/views/layouts/ad.blade.php index 09476d1adfe406b1dc6e527f4621b205d88a200e..3ad6119e7d72d917d2c93e450eed3d56fdad9427 100644 --- a/resources/views/layouts/ad.blade.php +++ b/resources/views/layouts/ad.blade.php @@ -14,7 +14,7 @@ {{ $ad->anzeigeLink }} </a> </div> - <div class="result-body"> + <div class="resultpage-body"> <div class="result-description"> {{ $ad->descr }} </div> diff --git a/resources/views/layouts/researchandtabs.blade.php b/resources/views/layouts/researchandtabs.blade.php index a84bea27ac0b54d27531e16bfc268607d436dabb..56fcf4e7fa4c0074be4cd8bc1c94384e55bde9ff 100644 --- a/resources/views/layouts/researchandtabs.blade.php +++ b/resources/views/layouts/researchandtabs.blade.php @@ -1,29 +1,32 @@ -<header> - <div id="research-bar"> - <div id="header-logo"> - <a class="hidden-xs" href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/") }}"> - <h1>MetaGer</h1> - </a> - <a class="visible-xs" href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/") }}"> - <h1>M</h1> - </a> - </div> - <div id="header-searchbar"> - @include('parts.searchbar', ['class' => 'resultpage-searchbar', 'request' => Request::method()]) +<div id="resultpage-container"> + <div id="research-bar-container"> + <div id="research-bar"> + <div id="header-logo"> + <a class="screen-large" href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/") }}"> + <h1>MetaGer</h1> + </a> + <a class="screen-small" href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/") }}"> + <h1>M</h1> + </a> + </div> + <div id="header-searchbar"> + @include('parts.searchbar', ['class' => 'resultpage-searchbar', 'request' => Request::method()]) + </div> + @include('parts.sidebar-opener') </div> </div> -</header> -<div id="research-bar-placeholder"></div> -<div id="foki"> - <div class="scrollbox"> - <div class="foki-scrollfade-left"></div> - <div id="foki-box"> - @include('parts.foki') + <div id="research-bar-placeholder"> + </div> + @include('parts.sidebar-opener', ['class' => 'fixed']) + <div id="foki"> + <div class="scrollbox"> + <div class="foki-scrollfade-left"></div> + <div id="foki-box"> + @include('parts.foki') + </div> + <div class="foki-scrollfade-right"></div> </div> - <div class="foki-scrollfade-right"></div> </div> -</div> -<div id="resultpage-container"> <div id="results-container"> @yield('results') </div> diff --git a/resources/views/layouts/result.blade.php b/resources/views/layouts/result.blade.php index 6615b06b2ccc9c6d7273c1cae2e8f742716a0b0c..0f7635b22c6b43a51e27729587894e7ebe2f2da2 100644 --- a/resources/views/layouts/result.blade.php +++ b/resources/views/layouts/result.blade.php @@ -21,7 +21,7 @@ </span> @endif </div> - <div class="result-body"> + <div class="resultpage-body"> @if( isset($result->logo) ) <div class="result-logo"> <a href="{{ $result->link }}" target="{{ $metager->getNewtab() }}" rel="noopener"> diff --git a/resources/views/layouts/resultPage.blade.php b/resources/views/layouts/resultPage.blade.php index b1d3dae2051c3e52e61a3251130ae05b43322025..d9d0aab8678a4d1b1747bcd13e1bbc5378e68210 100644 --- a/resources/views/layouts/resultPage.blade.php +++ b/resources/views/layouts/resultPage.blade.php @@ -23,7 +23,7 @@ <meta name="referrer" content="origin"> @include('parts.utility') </head> - <body id="resultBody"> + <body id="resultpage-body"> @if(Request::getHttpHost() === "metager3.de") <div class="alert alert-info" style="text-align: center; position: fixed; bottom: 0;"> Sie befinden sich auf einer MetaGer Testversion. Hier werden Features vor der Veröffentlichung getestet. Unter Umständen funktioniert hier nicht alles wie gewohnt. diff --git a/resources/views/layouts/staticPages.blade.php b/resources/views/layouts/staticPages.blade.php index 0dbf5137839b880e5105d3046d6eebf7f1001695..31ccdf9b2d530b9b7c9eb697ec530a400df51cde 100644 --- a/resources/views/layouts/staticPages.blade.php +++ b/resources/views/layouts/staticPages.blade.php @@ -42,6 +42,7 @@ @yield('homeIcon') </header> @include('parts.sidebar', ['id' => 'staticPagesSideBar']) + @include('parts.sidebar-opener', ['class' => 'fixed']) <div class="wrapper"> <main class="mg-panel"> @if (isset($success)) diff --git a/resources/views/parts/fake-result.blade.php b/resources/views/parts/fake-result.blade.php index 952b300d6052e52f72f01911323f0fad499cfaba..bd09696b7441d6fc031c7b76a9473ec19bc52d6a 100644 --- a/resources/views/parts/fake-result.blade.php +++ b/resources/views/parts/fake-result.blade.php @@ -12,7 +12,7 @@ de.wikipedia.org </a> </div> - <div class="result-body"> + <div class="resultpage-body"> <div class="result-description" data-tooltip="{{ trans('fake-result.description') }}"> Wikipedia ist ein Projekt zum Aufbau einer Enzyklopädie aus freien Inhalten, zu denen du sehr gern beitragen kannst. Seit Mai 2001 sind 2.150.918 Artikel in ... </div> diff --git a/resources/views/parts/sidebar-opener.blade.php b/resources/views/parts/sidebar-opener.blade.php new file mode 100644 index 0000000000000000000000000000000000000000..9836ef0c7d56b5565d5b1bd748844096f4179dd0 --- /dev/null +++ b/resources/views/parts/sidebar-opener.blade.php @@ -0,0 +1 @@ +<label class="openSidebar {{$class or ''}}" role="button" for="sideBarToggle"></label> \ No newline at end of file diff --git a/resources/views/parts/sidebar.blade.php b/resources/views/parts/sidebar.blade.php index bb95177cd79f168d945c2c23ce8ead1c53f91d9d..a8771e5049a14e7b60cd039863d442a8510d4679 100644 --- a/resources/views/parts/sidebar.blade.php +++ b/resources/views/parts/sidebar.blade.php @@ -1,5 +1,4 @@ <input id="sideBarToggle" style="display: none;" type="checkbox"> -<label id="openSidebar" class="noprint" role="button" for="sideBarToggle"></label> <div class="sideBar"> <label id="closeSidebar" role="button" for="sideBarToggle"></label> <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/") }}"> diff --git a/webpack.mix.js b/webpack.mix.js index f8fd523975b1abf39d72da6c30d657e924d11004..0f157f89bedac90d1939c3e0c0d324df9e6b55a5 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -12,9 +12,15 @@ let mix = require('laravel-mix'); */ mix - .less('resources/assets/less/default.less', 'public/css/themes/default.css') - .less('resources/assets/less/metager/beitritt.less', 'public/css/beitritt.css') - .less('resources/assets/less/utility.less', 'public/css/utility.css') + .less('resources/assets/less/default.less', 'public/css/themes/default.css', { + strictMath: true + }) + .less('resources/assets/less/metager/beitritt.less', 'public/css/beitritt.css', { + strictMath: true + }) + .less('resources/assets/less/utility.less', 'public/css/utility.css', { + strictMath: true + }) // js .babel(['resources/assets/js/lib/jquery.js', 'resources/assets/js/lib/jquery-ui.min.js', 'resources/assets/js/lib/bootstrap.js', 'resources/assets/js/lib/lightslider.js', 'resources/assets/js/lib/masonry.js', 'resources/assets/js/lib/imagesloaded.js', 'resources/assets/js/lib/openpgp.min.js', 'resources/assets/js/lib/iframeResizer.min.js',