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
61f22eca
Commit
61f22eca
authored
Jan 09, 2023
by
lmf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页页面加载分屏实现
parent
35a34c6b
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
4 deletions
+32
-4
app/design/frontend/Joshine/breeze/Magento_Cms/templates/default/flashsaleproduct.phtml
+1
-1
app/design/frontend/Joshine/breeze/Magento_Cms/templates/default/home.phtml
+1
-1
app/design/frontend/Joshine/breeze/Magento_Cms/templates/default/homenewproduct.phtml
+1
-1
app/design/frontend/Joshine/breeze/Magento_Theme/templates/html/footer.phtml
+28
-0
app/design/frontend/Joshine/breeze/Magento_Theme/templates/html/header/logo.phtml
+1
-1
No files found.
app/design/frontend/Joshine/breeze/Magento_Cms/templates/default/flashsaleproduct.phtml
View file @
61f22eca
...
@@ -16,7 +16,7 @@ foreach($ids as $pid):
...
@@ -16,7 +16,7 @@ foreach($ids as $pid):
?>
?>
<div
class=
"flash-sale-item"
>
<div
class=
"flash-sale-item"
>
<a
href=
"
<?php
echo
$product
->
getProductUrl
()
?>
"
>
<a
href=
"
<?php
echo
$product
->
getProductUrl
()
?>
"
>
<img
src=
"
<?php
echo
$productImage
;
?>
"
/></a>
<img
data-src=
"
<?php
echo
$productImage
;
?>
"
alt=
"Loading...
"
/></a>
<div
class=
"flash-sale-info"
>
<div
class=
"flash-sale-info"
>
<a
class=
"product-name"
href=
"
<?php
echo
$product
->
getProductUrl
()
?>
"
>
<?php
echo
$product
->
getName
();
?>
</a>
<a
class=
"product-name"
href=
"
<?php
echo
$product
->
getProductUrl
()
?>
"
>
<?php
echo
$product
->
getName
();
?>
</a>
<?=
$blocklist
->
getReviewsSummaryHtml
(
$product
,
$templateType
)
?>
<?=
$blocklist
->
getReviewsSummaryHtml
(
$product
,
$templateType
)
?>
...
...
app/design/frontend/Joshine/breeze/Magento_Cms/templates/default/home.phtml
View file @
61f22eca
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
this
.
_obj
.
init
=
function
(){
this
.
_obj
.
init
=
function
(){
var
str
=
``
;
var
str
=
``
;
for
(
var
i
=
0
;
i
<
this
.
img
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
this
.
img
.
length
;
i
++
){
str
+=
`<a href="
${
this
.
href
[
i
]}
"><img src="
${
this
.
img
[
i
]}
"></a>`
str
+=
`<a href="
${
this
.
href
[
i
]}
"><img
alt="Loading..." data-
src="
${
this
.
img
[
i
]}
"></a>`
}
}
that
.
html
(
`<div class="imgbox">
${
str
}
</div>`
).
css
({
that
.
html
(
`<div class="imgbox">
${
str
}
</div>`
).
css
({
"width"
:
"100%"
,
"width"
:
"100%"
,
...
...
app/design/frontend/Joshine/breeze/Magento_Cms/templates/default/homenewproduct.phtml
View file @
61f22eca
...
@@ -26,7 +26,7 @@ foreach($ids as $pid):
...
@@ -26,7 +26,7 @@ foreach($ids as $pid):
?>
?>
<div
class=
"flash-sale-item"
>
<div
class=
"flash-sale-item"
>
<a
href=
"
<?php
echo
$product
->
getProductUrl
()
?>
"
>
<a
href=
"
<?php
echo
$product
->
getProductUrl
()
?>
"
>
<img
src=
"
<?php
echo
$productImage
;
?>
"
/></a>
<img
data-src=
"
<?php
echo
$productImage
;
?>
"
alt=
"Loading...
"
/></a>
<div
class=
"flash-sale-info"
>
<div
class=
"flash-sale-info"
>
<a
class=
"product-name"
href=
"
<?php
echo
$product
->
getProductUrl
()
?>
"
>
<?php
echo
$product
->
getName
();
?>
</a>
<a
class=
"product-name"
href=
"
<?php
echo
$product
->
getProductUrl
()
?>
"
>
<?php
echo
$product
->
getName
();
?>
</a>
<?=
$blocklist
->
getReviewsSummaryHtml
(
$product
,
$templateType
)
?>
<?=
$blocklist
->
getReviewsSummaryHtml
(
$product
,
$templateType
)
?>
...
...
app/design/frontend/Joshine/breeze/Magento_Theme/templates/html/footer.phtml
View file @
61f22eca
...
@@ -7,6 +7,34 @@
...
@@ -7,6 +7,34 @@
?>
?>
<?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
();
?>
<script>
<script>
const
imgs
=
document
.
getElementsByTagName
(
"img"
);
const
viewHeight
=
window
.
innerHeight
||
document
.
documentElement
.
clientHeight
;
let
num
=
0
;
function
lazyload
()
{
for
(
let
i
=
num
;
i
<
imgs
.
length
;
i
++
)
{
let
distance
=
viewHeight
-
imgs
[
i
].
getBoundingClientRect
().
top
;
if
(
distance
>=
0
)
{
imgs
[
i
].
src
=
imgs
[
i
].
getAttribute
(
"data-src"
);
num
=
i
+
1
;
}
}
}
function
debounce
(
fn
,
delay
=
500
)
{
let
timer
=
null
;
return
function
(...
args
)
{
if
(
timer
)
clearTimeout
(
timer
);
timer
=
setTimeout
(()
=>
{
fn
.
call
(
this
,
args
);
},
delay
);
};
}
window
.
onload
=
lazyload
;
window
.
addEventListener
(
"scroll"
,
debounce
(
lazyload
,
600
),
false
);
require
([
require
([
'jquery'
'jquery'
],
function
(
$
)
{
],
function
(
$
)
{
...
...
app/design/frontend/Joshine/breeze/Magento_Theme/templates/html/header/logo.phtml
View file @
61f22eca
...
@@ -25,7 +25,7 @@ $logoHeight = $logoSizeResolver !== null && $logoSizeResolver->getHeight()
...
@@ -25,7 +25,7 @@ $logoHeight = $logoSizeResolver !== null && $logoSizeResolver->getHeight()
href=
"
<?=
$block
->
escapeUrl
(
$block
->
getUrl
(
''
))
?>
"
href=
"
<?=
$block
->
escapeUrl
(
$block
->
getUrl
(
''
))
?>
"
title=
"
<?=
$block
->
escapeHtmlAttr
(
$storeName
)
?>
"
title=
"
<?=
$block
->
escapeHtmlAttr
(
$storeName
)
?>
"
aria-label=
"store logo"
>
aria-label=
"store logo"
>
<img
src=
"
<?=
$block
->
escapeUrl
(
$block
->
getLogoSrc
())
?>
"
<img
alt=
"Loading..."
data-
src=
"
<?=
$block
->
escapeUrl
(
$block
->
getLogoSrc
())
?>
"
title=
"
<?=
$block
->
escapeHtmlAttr
(
$block
->
getLogoAlt
())
?>
"
title=
"
<?=
$block
->
escapeHtmlAttr
(
$block
->
getLogoAlt
())
?>
"
alt=
"
<?=
$block
->
escapeHtmlAttr
(
$block
->
getLogoAlt
())
?>
"
alt=
"
<?=
$block
->
escapeHtmlAttr
(
$block
->
getLogoAlt
())
?>
"
<?=
$logoWidth
?
'width="'
.
$block
->
escapeHtmlAttr
(
$logoWidth
)
.
'"'
:
''
?>
<?=
$logoWidth
?
'width="'
.
$block
->
escapeHtmlAttr
(
$logoWidth
)
.
'"'
:
''
?>
...
...
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