ltsecurityinc安防产品在线商城代码
This commit is contained in:
+71
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
// @codingStandardsIgnoreFile
|
||||
|
||||
/** @var Subscribe $block */
|
||||
|
||||
use Magento\Newsletter\Block\Subscribe;
|
||||
|
||||
$at_settings = $this->helper('Olegnax\Athlete2\Helper\Helper')->getConfig('athlete2_settings/footer');
|
||||
$newsletterStyle = $at_settings['newsletter_style'];
|
||||
$newsletterInputStyle = $at_settings['newsletter_input_underlined'];
|
||||
$newsletterTitle = __('Sign Up For Email');
|
||||
$newsletterLabel = $at_settings['newsletter_label']; //__('Get the latest deals and more')
|
||||
$newsletterLabelAria = $newsletterLabel ? $newsletterLabel : $newsletterTitle;
|
||||
if ($newsletterInputStyle) {
|
||||
$newsletterInputStyle = 'inputs-style--underlined';
|
||||
} else {
|
||||
$newsletterInputStyle = '';
|
||||
}
|
||||
?>
|
||||
<div class="block newsletter newsletter-style--<?= $newsletterStyle ?> <?= $newsletterInputStyle ?>">
|
||||
<div class="block_newsletter_info">
|
||||
<?php if ($newsletterTitle) {
|
||||
?>
|
||||
<div class="title">
|
||||
<svg aria-hidden="true" width="30" height="22" viewBox="0 0 30 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="1" y="1" width="28" height="20" rx="1" stroke="currentColor" stroke-width="2"/>
|
||||
<path d="M2 3L15 13L28 3" stroke="currentColor" stroke-width="2" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<span><?= $block->escapeHtml($newsletterTitle) ?></span>
|
||||
</div> <?php
|
||||
} ?>
|
||||
<?php if ($newsletterLabel) {
|
||||
?><label class="label">
|
||||
<span><?= $block->escapeHtml($newsletterLabel) ?></span></label> <?php
|
||||
} ?>
|
||||
</div>
|
||||
<div class="content">
|
||||
<form class="form subscribe"
|
||||
novalidate
|
||||
action="<?= $block->escapeUrl($block->getFormActionUrl()) ?>"
|
||||
method="post"
|
||||
data-mage-init='{"validation": {"errorClass": "mage-error"}}'
|
||||
id="newsletter-validate-detail">
|
||||
<div class="field newsletter">
|
||||
<div class="control">
|
||||
<label for="newsletter">
|
||||
<span class="label">
|
||||
<?= $block->escapeHtml($newsletterLabelAria) ?>
|
||||
</span>
|
||||
</label>
|
||||
<input name="email" type="email" id="newsletter"
|
||||
placeholder="<?= $block->escapeHtml(__('Enter your email address')) ?>"
|
||||
data-validate="{required:true, 'validate-email':true}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<button class="action subscribe primary"
|
||||
title="<?= $block->escapeHtmlAttr(__('Subscribe')) ?>"
|
||||
type="submit"
|
||||
aria-label="Subscribe">
|
||||
<span><?= $block->escapeHtml(__('Subscribe')) ?></span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © Magento, Inc. All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
|
||||
use Magento\Newsletter\Block\Subscribe;
|
||||
use Olegnax\NewsletterPopupBasic\Plugin\Frontend\Magento\ReCaptchaUi\Model\IsCaptchaEnabled;
|
||||
|
||||
$at_settings = $this->helper('Olegnax\Athlete2\Helper\Helper')->getConfig('athlete2_settings/footer');
|
||||
$newsletterLabelAria = $at_settings['newsletter_label'] ? $at_settings['newsletter_label'] : $at_settings['newsletter_title']; //__('Get the latest deals and more')
|
||||
/** @var Subscribe $block */
|
||||
?>
|
||||
<div class="block newsletter form-only">
|
||||
<form class="form subscribe"
|
||||
novalidate
|
||||
action="<?= $block->escapeUrl($block->getFormActionUrl()) ?>"
|
||||
method="post"
|
||||
data-mage-init='{"validation": {"errorClass": "mage-error"}}'
|
||||
id="newsletter-widget-validate-detail">
|
||||
<div class="field newsletter">
|
||||
<div class="control">
|
||||
<label for="newsletter-widget">
|
||||
<span class="label">
|
||||
<?= $block->escapeHtml($newsletterLabelAria) ?>
|
||||
</span>
|
||||
</label>
|
||||
<input name="email" type="email" id="newsletter-widget"
|
||||
placeholder="<?= $block->escapeHtml(__('Enter your email address')) ?>"
|
||||
data-validate="{required:true, 'validate-email':true}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<button class="action subscribe primary"
|
||||
title="<?= $block->escapeHtmlAttr(__('Subscribe')) ?>"
|
||||
type="submit"
|
||||
aria-label="Subscribe">
|
||||
<span><?= $block->escapeHtml(__('Subscribe')) ?></span>
|
||||
</button>
|
||||
</div>
|
||||
<input type="hidden"
|
||||
name="<?= $block->escapeHtmlAttr(IsCaptchaEnabled::INPUT_ATTR) ?>" value="<?= $block->escapeHtmlAttr(IsCaptchaEnabled::INPUT_VALUE) ?>">
|
||||
</form>
|
||||
</div>
|
||||
+345
@@ -0,0 +1,345 @@
|
||||
// /**
|
||||
// * Copyright © Magento, Inc. All rights reserved.
|
||||
// * See COPYING.txt for license details.
|
||||
// */
|
||||
|
||||
//
|
||||
// Common
|
||||
// _____________________________________________
|
||||
.footer-headings(){
|
||||
letter-spacing: -0.03em;
|
||||
text-transform:uppercase;
|
||||
color:#ffffff;
|
||||
}
|
||||
& when (@media-common = true) {
|
||||
|
||||
// Newsletter subscription
|
||||
.block_newsletter_wrapper{
|
||||
float:none;
|
||||
.block_newsletter_below{
|
||||
padding: 15px 0;
|
||||
}
|
||||
}
|
||||
.block.newsletter {
|
||||
color:#a8a8a8;
|
||||
background: #1d1d1d;
|
||||
padding: 30px;
|
||||
margin-bottom: 20px;
|
||||
float:none;
|
||||
.form.subscribe {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
flex-wrap: wrap;
|
||||
.field-recaptcha{
|
||||
flex-basis: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 10px;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.fieldset {
|
||||
display: table-cell;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.field {
|
||||
margin: 0;
|
||||
&.newsletter {
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
.label {
|
||||
&:extend(.abs-visually-hidden all);
|
||||
}
|
||||
.control {
|
||||
.lib-icon-font(
|
||||
@_icon-font-content: '\63',
|
||||
@_icon-font: 'athlete2',
|
||||
@_icon-font-size: 20px,
|
||||
@_icon-font-line-height: 38px,
|
||||
@_icon-font-color: @form-element-input-placeholder__color,
|
||||
@_icon-font-margin: 0 12px
|
||||
);
|
||||
display: block;
|
||||
|
||||
&:before {
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
input {
|
||||
padding-left: 46px;
|
||||
border:none;
|
||||
background: #ffffff;
|
||||
&:hover,
|
||||
&:focus{
|
||||
border:none;
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
margin-top: -4px;
|
||||
margin-bottom: 15px;
|
||||
.lib-heading(h4);
|
||||
.footer-headings();
|
||||
}
|
||||
|
||||
.label {
|
||||
font-family: @content-font;
|
||||
margin-bottom: 10px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.action.primary{
|
||||
padding-top:0;
|
||||
padding-bottom:0;
|
||||
height: 38px;
|
||||
}
|
||||
&.inputs-style--underlined{
|
||||
.newsletter {
|
||||
.control{
|
||||
&:before{
|
||||
margin-left:0;
|
||||
margin-top: -1px;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
input{
|
||||
border: none;
|
||||
border-bottom: 2px solid #fff;
|
||||
background-color: transparent;
|
||||
padding: 0 0 0 32px;
|
||||
transition: all 0.4s;
|
||||
border-radius:0;
|
||||
color: #ffffff;
|
||||
&:focus,
|
||||
&:hover{
|
||||
border-bottom: 2px solid #fff;
|
||||
}
|
||||
}
|
||||
input::-webkit-input-placeholder{
|
||||
color: #ffffff;
|
||||
}
|
||||
input::placeholder{
|
||||
color: #ffffff;
|
||||
}
|
||||
input:-ms-input-placeholder{
|
||||
color: #ffffff;
|
||||
}
|
||||
input::-ms-input-placeholder{
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.footer.content{
|
||||
.block.newsletter{
|
||||
&.newsletter-style--big{
|
||||
padding: 40px;
|
||||
.action.primary{
|
||||
padding: 0 26px;
|
||||
height:46px;
|
||||
font-size:16px;
|
||||
}
|
||||
.title{
|
||||
font-size: @h2__font-size;
|
||||
}
|
||||
.control{
|
||||
input{
|
||||
height:46px;
|
||||
}
|
||||
&:before{
|
||||
margin-top: -2px;
|
||||
line-height:46px;
|
||||
}
|
||||
}
|
||||
&.inputs-style--underlined{
|
||||
input{
|
||||
border-width: 3px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.footer--layout-4,
|
||||
.footer--layout-2{
|
||||
.footer.content{
|
||||
.block.newsletter{
|
||||
min-height: 160px;
|
||||
padding: 40px 0;
|
||||
margin-bottom: 40px;
|
||||
position: relative;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
margin-right: -15px;
|
||||
margin-left: -15px;
|
||||
align-items: center;
|
||||
&.newsletter-style--big{
|
||||
padding: 60px 0;
|
||||
}
|
||||
> * {
|
||||
position: relative;
|
||||
}
|
||||
.content,
|
||||
.block_newsletter_info{
|
||||
flex-basis: 0;
|
||||
-ms-flex-positive: 1;
|
||||
flex-grow: 1;
|
||||
max-width: 100%;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
padding-right: 15px;
|
||||
padding-left: 15px;
|
||||
}
|
||||
&:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: -200%;
|
||||
right: -200%;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
display: block;
|
||||
background-color: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.footer--layout-4{
|
||||
.footer.content{
|
||||
.block.newsletter{
|
||||
flex-direction: column;
|
||||
max-width: 590px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
.block_newsletter_info{
|
||||
text-align:center;
|
||||
}
|
||||
.form.subscribe{
|
||||
margin-top:15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__s) {
|
||||
|
||||
.footer.content{
|
||||
.block.newsletter{
|
||||
&.newsletter-style--big{
|
||||
.title{
|
||||
font-size: @h2__font-size-mobile;
|
||||
}
|
||||
}
|
||||
.form.subscribe{
|
||||
flex-direction: column;
|
||||
.field-recaptcha{
|
||||
justify-content:center;
|
||||
}
|
||||
}
|
||||
.action.primary{
|
||||
width: 100%;
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__sm) {
|
||||
.footer--layout-4,
|
||||
.footer--layout-2{
|
||||
.footer.content{
|
||||
.block.newsletter{
|
||||
.content,
|
||||
.block_newsletter_info{
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__sm) {
|
||||
.footer--layout-4{
|
||||
.footer.content{
|
||||
.block.newsletter{
|
||||
.form.subscribe{
|
||||
margin-top:30px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.footer--layout-4,
|
||||
.footer--layout-2{
|
||||
.footer.content{
|
||||
.block.newsletter.newsletter-style--big {
|
||||
padding: 90px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.footer--layout-2{
|
||||
.footer.content{
|
||||
.block_newsletter_info{
|
||||
> :last-child{
|
||||
margin-bottom:0;
|
||||
}
|
||||
}
|
||||
.block.newsletter.newsletter-style--big {
|
||||
.control{
|
||||
max-width: 450px;
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__m) {
|
||||
.footer--layout-1{
|
||||
.footer{
|
||||
.block.newsletter{
|
||||
margin-left: -20px;
|
||||
margin-right: -20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
// Desktop
|
||||
// _____________________________________________
|
||||
|
||||
.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
|
||||
.footer--layout-1{
|
||||
.footer.content{
|
||||
.block_newsletter_wrapper{
|
||||
width: 36%;
|
||||
float: right;
|
||||
.block_newsletter_below{
|
||||
padding: 15px 30px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.footer.content{
|
||||
.block_newsletter_wrapper{
|
||||
.block.newsletter {
|
||||
float: none;
|
||||
.field {
|
||||
.control {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.footer--layout-2 .footer.content .block.newsletter.newsletter-style--big{
|
||||
min-height: inherit;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user