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
deee4193
Commit
deee4193
authored
Oct 29, 2022
by
lmf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
恢复顶部搜索框
parent
6483b10e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
140 additions
and
4 deletions
+140
-4
app/code/Magento/Search/view/frontend/templates/form.mini.phtml
+4
-4
app/design/frontend/Joshine/breeze/Magento_Search/layout/default.xml
+26
-0
app/design/frontend/Joshine/breeze/Magento_Search/layout/search_term_popular.xml
+17
-0
app/design/frontend/Joshine/breeze/Magento_Search/templates/form.mini.phtml
+63
-0
app/design/frontend/Joshine/breeze/Magento_Search/templates/term.phtml
+30
-0
No files found.
app/code/Magento/Search/view/frontend/templates/form.mini.phtml
View file @
deee4193
...
...
@@ -16,14 +16,14 @@ $allowedSuggestion = $configProvider->isSuggestionsAllowed();
$quickSearchUrl
=
$allowedSuggestion
?
$escaper
->
escapeUrl
(
$helper
->
getSuggestUrl
())
:
''
;
?>
<div
class=
"block block-search"
>
<!-- <div class="block block-title"><strong>-->
<?
//= $escaper->escapeHtml(__('Search')) ?><!--</strong></div>--
>
<div
class=
"block block-title"
><strong>
<?=
$escaper
->
escapeHtml
(
__
(
'Search'
))
?>
</strong></div
>
<div
class=
"block block-content"
>
<form
class=
"form minisearch"
id=
"search_mini_form"
action=
"
<?=
$escaper
->
escapeUrl
(
$helper
->
getResultUrl
())
?>
"
method=
"get"
>
<div
class=
"field search"
>
<!-- <label class="label" for="search" data-role="minisearch-label">--
>
<!-- <span>-->
<?
//= $escaper->escapeHtml(__('Search')) ?><!--</span>--
>
<!--
</
label
>--
>
<label
class=
"label"
for=
"search"
data-role=
"minisearch-label"
>
<span>
<?=
$escaper
->
escapeHtml
(
__
(
'Search'
))
?>
</span
>
</label
>
<div
class=
"control"
>
<input
id=
"search"
data-mage-init=
'{
...
...
app/design/frontend/Joshine/breeze/Magento_Search/layout/default.xml
0 → 100644
View file @
deee4193
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"urn:magento:framework:View/Layout/etc/page_configuration.xsd"
>
<body>
<referenceContainer
name=
"header-wrapper"
>
<block
class=
"Magento\Framework\View\Element\Template"
name=
"top.search"
as=
"topSearch"
template=
"Magento_Search::form.mini.phtml"
>
<arguments>
<argument
name=
"configProvider"
xsi:type=
"object"
>
Magento\Search\ViewModel\ConfigProvider
</argument>
</arguments>
</block>
</referenceContainer>
<referenceBlock
name=
"footer_links"
>
<block
class=
"Magento\Framework\View\Element\Html\Link\Current"
ifconfig=
"catalog/seo/search_terms"
name=
"search-term-popular-link"
>
<arguments>
<argument
name=
"label"
xsi:type=
"string"
translate=
"true"
>
Search Terms
</argument>
<argument
name=
"path"
xsi:type=
"string"
>
search/term/popular
</argument>
</arguments>
</block>
</referenceBlock>
</body>
</page>
app/design/frontend/Joshine/breeze/Magento_Search/layout/search_term_popular.xml
0 → 100644
View file @
deee4193
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
layout=
"1column"
xsi:noNamespaceSchemaLocation=
"urn:magento:framework:View/Layout/etc/page_configuration.xsd"
>
<head>
<title>
Popular Search Terms
</title>
</head>
<body>
<referenceContainer
name=
"content"
>
<block
class=
"Magento\Search\Block\Term"
name=
"seo.searchterm"
template=
"Magento_Search::term.phtml"
cacheable=
"false"
/>
</referenceContainer>
</body>
</page>
app/design/frontend/Joshine/breeze/Magento_Search/templates/form.mini.phtml
0 → 100644
View file @
deee4193
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
?>
<?php
/** @var $block \Magento\Framework\View\Element\Template */
/** @var $escaper \Magento\Framework\Escaper */
/** @var $configProvider \Magento\Search\ViewModel\ConfigProvider */
$configProvider
=
$block
->
getData
(
'configProvider'
);
/** @var $helper \Magento\Search\Helper\Data */
$helper
=
$configProvider
->
getSearchHelperData
();
$allowedSuggestion
=
$configProvider
->
isSuggestionsAllowed
();
$quickSearchUrl
=
$allowedSuggestion
?
$escaper
->
escapeUrl
(
$helper
->
getSuggestUrl
())
:
''
;
?>
<div
class=
"block block-search"
>
<!-- <div class="block block-title"><strong>-->
<?
//= $escaper->escapeHtml(__('Search')) ?><!--</strong></div>-->
<
div
class
="
block
block
-
content
">
<form class="
form
minisearch
" id="
search_mini_form
"
action="
<?=
$escaper
->
escapeUrl
(
$helper
->
getResultUrl
())
?>
" method="get">
<div
class=
"field search"
>
<!-- <label class="label" for="search" data-role="minisearch-label">-->
<!-- <span>-->
<?
//= $escaper->escapeHtml(__('Search')) ?><!--</span>-->
<!--
</
label
>-->
<
div
class
="
control
">
<input id="
search
"
data-mage-init='{
"
quickSearch
": {
"
formSelector
": "
#search_mini_form",
"url"
:
"<?= /* @noEscape */
$quickSearchUrl
?>"
,
"destinationSelector"
:
"#search_autocomplete"
,
"minSearchLength"
:
"<?=
$escaper->escapeHtml
(
$helper->getMinQueryLength
()) ?>"
}
}
'
type="text"
name="<?= $escaper->escapeHtmlAttr($helper->getQueryParamName()) ?>"
value="<?= /* @noEscape */ $helper->getEscapedQueryText() ?>"
placeholder="<?= $escaper->escapeHtmlAttr(__('
Search
entire
store
here
...
')) ?>"
class="input-text"
maxlength="<?= $escaper->escapeHtmlAttr($helper->getMaxQueryLength()) ?>"
role="combobox"
aria-haspopup="false"
aria-autocomplete="both"
autocomplete="off"
aria-expanded="false"/>
<div id="search_autocomplete" class="search-autocomplete"></div>
<?= $block->getChildHtml() ?>
</div>
</div>
<div class="actions">
<button type="submit"
title="<?= $escaper->escapeHtml(__('
Search
')) ?>"
class="action search"
aria-label="Search"
>
<span><?= $escaper->escapeHtml(__('
Search
'
))
?>
</span>
</button>
</div>
</form>
</div>
</div>
app/design/frontend/Joshine/breeze/Magento_Search/templates/term.phtml
0 → 100644
View file @
deee4193
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/**
* @var \Magento\Search\Block\Term $block
* @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
*/
?>
<?php
if
(
count
(
$block
->
getTerms
())
>
0
)
:
?>
<ul
class=
"search-terms"
>
<?php
foreach
(
$block
->
getTerms
()
as
$_term
)
:
?>
<li
id=
"term-
<?=
/* @noEscape */
$_term
->
getId
()
?>
"
class=
"item"
>
<a
href=
"
<?=
$block
->
escapeUrl
(
$block
->
getSearchUrl
(
$_term
))
?>
"
>
<?=
$block
->
escapeHtml
(
$_term
->
getQueryText
())
?>
</a>
</li>
<?=
/* @noEscape */
$secureRenderer
->
renderStyleAsTag
(
"font-size:"
.
(
$_term
->
getRatio
()
*
70
+
75
)
.
"%;"
,
'li#term-'
.
$_term
->
getId
()
)
?>
<?php
endforeach
;
?>
</ul>
<?php
else
:
?>
<div
class=
"message notice"
>
<div>
<?=
$block
->
escapeHtml
(
__
(
'There are no search terms available.'
))
?>
</div>
</div>
<?php
endif
;
?>
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