Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
joshine
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
joshine
Commits
a2862376
Commit
a2862376
authored
Feb 06, 2023
by
wd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改返回顶部方式,取消链接功能添加js返回
parent
01c344fc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
app/design/frontend/Joshine/breeze/Magento_Theme/templates/html/footer.phtml
+2
-2
app/design/frontend/Joshine/breeze/Magento_Theme/templates/html/header/logo.phtml
+7
-0
No files found.
app/design/frontend/Joshine/breeze/Magento_Theme/templates/html/footer.phtml
View file @
a2862376
...
@@ -7,9 +7,9 @@
...
@@ -7,9 +7,9 @@
?>
?>
<?php
echo
$block
->
getLayout
()
->
createBlock
(
'Magento\Cms\Block\Block'
)
->
setBlockId
(
'public_footer'
)
->
toHtml
();
?>
<?php
echo
$block
->
getLayout
()
->
createBlock
(
'Magento\Cms\Block\Block'
)
->
setBlockId
(
'public_footer'
)
->
toHtml
();
?>
<
a
href=
"#top"
title=
"go to header"
id=
"topBtn"
style=
"display: none;"
>
<
p
title=
"go to header"
id=
"topBtn"
style=
"display: none;"
>
<img
loading=
"lazy"
src=
"
<?php
echo
$block
->
getViewFileUrl
(
'images/goTop.png'
);
?>
"
>
<img
loading=
"lazy"
src=
"
<?php
echo
$block
->
getViewFileUrl
(
'images/goTop.png'
);
?>
"
>
</
a
>
</
p
>
<script>
<script>
require
([
require
([
...
...
app/design/frontend/Joshine/breeze/Magento_Theme/templates/html/header/logo.phtml
View file @
a2862376
...
@@ -21,6 +21,7 @@ $logoHeight = $logoSizeResolver !== null && $logoSizeResolver->getHeight()
...
@@ -21,6 +21,7 @@ $logoHeight = $logoSizeResolver !== null && $logoSizeResolver->getHeight()
?>
?>
<script>
<script>
//go to top button show
window
.
onscroll
=
function
(){
window
.
onscroll
=
function
(){
var
top
=
document
.
getElementById
(
"topBtn"
);
var
top
=
document
.
getElementById
(
"topBtn"
);
if
(
document
.
documentElement
.
scrollTop
>
200
||
document
.
body
.
scrollTop
>
200
){
if
(
document
.
documentElement
.
scrollTop
>
200
||
document
.
body
.
scrollTop
>
200
){
...
@@ -38,6 +39,12 @@ $logoHeight = $logoSizeResolver !== null && $logoSizeResolver->getHeight()
...
@@ -38,6 +39,12 @@ $logoHeight = $logoSizeResolver !== null && $logoSizeResolver->getHeight()
}
}
require
([
'jquery'
],
function
(
$
){
require
([
'jquery'
],
function
(
$
){
//go to top button click
$
(
'#topBtn'
).
click
(
function
(){
document
.
body
.
scrollTop
=
0
;
document
.
documentElement
.
scrollTop
=
0
;
});
if
(
flag
){
if
(
flag
){
var
imgH
=
$
(
'.logo'
).
height
();
var
imgH
=
$
(
'.logo'
).
height
();
imgH
=
Math
.
ceil
(
imgH
/
3
);
imgH
=
Math
.
ceil
(
imgH
/
3
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment