Commit fdb26b00 by liumengfei

优化顶部免运费模块

parent 5c0f7253
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
<acl>
<resources>
<resource id="Magento_Backend::admin">
<resource id="Magento_Backend::stores">
<resource id="Magento_Backend::stores_settings">
<resource id="Magento_Config::config">
<resource id="Joshine_FreeBar::config_system" title="Free Bar" sortOrder="1" />
</resource>
</resource>
</resource>
</resource>
</resources>
</acl>
</config>
<?xml version="1.0"?> <?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body> <body>
<referenceContainer name="header.container"> <referenceContainer name="page.wrapper">
<block class="Joshine\FreeBar\Block\Index" name="free-shipping.bar" template="Joshine_FreeBar::free_shipping_bar.phtml" before="header.panel.wrapper" > <block class="Joshine\FreeBar\Block\Index" name="free-shipping.bar" template="Joshine_FreeBar::free_shipping_bar.phtml" before="-" >
<arguments> <arguments>
<argument name="cache_lifetime" xsi:type="number">3600</argument> <argument name="cache_lifetime" xsi:type="number">3600</argument>
</arguments> </arguments>
......
...@@ -29,17 +29,10 @@ if ($isEnable): ...@@ -29,17 +29,10 @@ if ($isEnable):
background-repeat: no-repeat; background-repeat: no-repeat;
background-color: <?=$block->getConfigValue('freebar/general/content_back_color') ?>; background-color: <?=$block->getConfigValue('freebar/general/content_back_color') ?>;
font-size: <?=$block->getConfigValue('freebar/general/content_size') ?>; font-size: <?=$block->getConfigValue('freebar/general/content_size') ?>;
z-index: 10;
} }
@media (max-width: 768px) {.free-shipping-bar{position: fixed;}}
.free-shipping-bar span {width: 100%;height: 100%; display: block; color: <?=$block->getConfigValue('freebar/general/content_color') ?>} .free-shipping-bar span {width: 100%;height: 100%; display: block; color: <?=$block->getConfigValue('freebar/general/content_color') ?>}
@media (max-width: 768px) {
.free-shipping-bar{
width: 100%;
height: 30px;
line-height: 30px;
background-size: 100% 100%!important;
background-repeat: no-repeat;
}
}
</style> </style>
<div class="free-shipping-bar"> <div class="free-shipping-bar">
<span><?=$block->getConfigValue('freebar/general/content') ?></p></span> <span><?=$block->getConfigValue('freebar/general/content') ?></p></span>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment