Das klappt bei mir leider auch nicht. Der Button wird einfach nicht angezeigt. Der soll ja schon vor dem js-file-Einbau zumindest zu sehen sein. Ist er aber leider nicht…[/quote] Hallo Tanny, [quote]Der Link sollte ganz unten nach unserem gesamten Content kommen. Wenn wir uns einmal die originale Shopware index.tpl aus dem Bare Theme anschauen, haben wir hier den Block frontend_index_page_wrap[/quote] Bei mir im Shop unter Shopware 5.1.1 gibt es den Block nicht und du musst den „frontend_index_body_inline“ erweitern. {\* Scroll to top Button \*} {block name='frontend\_index\_body\_inline' append} {/block}
Dann bin ich kein Freund von Bildern und habe deshalb die Shopware-Schrift genommen. Meine modifizierte scroll.less sieht jetzt so aus. .cd-top { z-index: 999; display: inline-block; position: fixed; .unitize(bottom, 40); .unitize(right, 10); box-shadow: 0 0 1px @body-bg; background: @body-bg; /\* image replacement properties \*/ overflow: hidden; white-space: nowrap; border: 1px solid @brand-primary; .border-radius(); visibility: hidden; opacity: 0; -webkit-transition: opacity .3s 0s, visibility 0s .3s; -moz-transition: opacity .3s 0s, visibility 0s .3s; transition: opacity .3s 0s, visibility 0s .3s; &:after { font-family: 'shopware'; content: "\e610"; color: @brand-primary; font-weight: 700; .unitize(font-size, 20); display:block; .unitize-padding(12, 12 ); } } .cd-top.cd-is-visible, .cd-top.cd-fade-out, .no-touch .cd-top:hover { -webkit-transition: opacity .3s 0s, visibility 0s 0s; -moz-transition: opacity .3s 0s, visibility 0s 0s; transition: opacity .3s 0s, visibility 0s 0s; } .cd-top.cd-is-visible { /\* the button becomes visible \*/ visibility: visible; opacity: 1; } .cd-top.cd-fade-out { /\* if the user keeps scrolling down, the button is out of focus and becomes less visible \*/ opacity: .5; } .cd-top:hover, { background-color: @brand-primary; opacity: 1; &:after { color: @body-bg; } } @media only screen and (min-width: 768px) { .cd-top { .unitize(right, 20); .unitize(bottom, 20); } } @media only screen and (min-width: 1024px) { .cd-top { .unitize(right, 30); .unitize(bottom, 30); } }
Edit: Danke Carsten für die Info habe den „z-index: 999;“ noch hinzugefügt. [quote=„sonic“] „.cd-top“ könnte hier noch einen hohen z-index gebrauchen - ich habe mal 9999 genommen.