ltsecurityinc安防产品在线商城代码

This commit is contained in:
2026-09-14 17:47:10 +08:00
parent 57d8444c15
commit 6a3c9c5bd8
14539 changed files with 1775310 additions and 0 deletions
@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<!--
/**
* Copyright © 2015 Magento. 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>Contact Us</title>
</head>
<body>
<referenceContainer name="content">
<block class="Olegnax\Athlete2\Block\Template" name="contactPage" template="Magento_Contact::contact_page.phtml">
<block class="Olegnax\Athlete2\Block\Template" name="google_map" template="Magento_Contact::google_map.phtml"/>
<block class="Magento\Contact\Block\ContactForm" name="contactForm" template="Magento_Contact::form.phtml">
<container name="form.additional.info" label="Form Additional Info"/>
</block>
</block>
</referenceContainer>
</body>
</page>
@@ -0,0 +1,76 @@
<?php
$_helper = $this->helper( 'Olegnax\Athlete2\Helper\CssFiles' );
$theme_helper = $this->helper( 'Olegnax\Athlete2\Helper\Helper' );
$at_settings = $theme_helper->getConfig( 'athlete2_settings/contacts_page' );
$firstBlock = $at_settings[ 'first_block_type' ];
$secondBlock = $theme_helper->getBlockTemplateProcessor( $at_settings[ 'second_block_content' ] );
$contactsLayout = $at_settings[ 'contacts_layout' ];
$secondBlockShow = $at_settings[ 'second_block_show' ];
$thirdBlockShow = $at_settings[ 'third_block_show' ];
$thirdBlock = $theme_helper->getBlockTemplateProcessor( $at_settings[ 'third_block_content' ] );
switch ( $firstBlock ) {
case 'google_map':
$firstBlock = $this->getChildHtml( 'google_map' );
break;
case 'image':
if ( $contactsLayout === 'left-right' ) {
$firstBlock = '<div style="min-height:500px;">&nbsp;</div>';
} else {
$firstBlock = '<img src="' . $_helper->getBaseMediaUrl( Olegnax\Athlete2\Model\Config\Backend\Image\Logo::UPLOAD_DIR ) . "/" . $at_settings[ 'contacts_page_image' ] . '" />';
}
break;
case 'content':
$firstBlock = '<div class="contacts-first-block-inner">' . $theme_helper->getBlockTemplateProcessor( $at_settings[ 'first_block_content' ] ) . '</div>';
break;
default:
$firstBlock = '';
}
if ( $contactsLayout === 'left-right' ) {
?>
<div class="contacts-wrapper">
<div class="row contacts-layout-split">
<?php if(!empty($firstBlock)) { ?>
<div class="col-md-6 contacts-first-block"><?= $firstBlock ?></div>
<?php } ?>
<div class="col-md-6 contacts-form-block">
<?php if ( $secondBlockShow ) {
echo '<div class="contacts-second-block">' . $secondBlock . '</div>';
} ?>
<?php echo $this->getChildHtml( 'contactForm' ) ?>
</div>
<?php if ( $thirdBlockShow ) {
echo '<div class="col-12 contacts-third-block">' . $thirdBlock . '</div>';
} ?>
</div>
</div>
<?php } else { ?>
<div class="row contacts-layout-default">
<?php if(!empty($firstBlock)) { ?>
<div class="col-md-12 contacts-first-block"><?= $firstBlock ?></div>
<?php } ?>
<div class="container">
<div class="row contacts-page-row">
<?php if ( $secondBlockShow ) { ?>
<div class="col-md-6 contacts-form-block">
<?php echo $this->getChildHtml( 'contactForm' ) ?>
</div>
<div class="col-md-6 contacts-second-block">
<?= $secondBlock ?>
</div>
<?php } else { ?>
<div class="col-md-12">
<?php echo $this->getChildHtml( 'contactForm' ) ?>
</div>
<?php } ?>
</div>
<div class="row">
<?php if ( $thirdBlockShow ) {
echo '<div class="col-12 contacts-third-block">' . $thirdBlock . '</div>';
} ?>
</div>
</div>
</div>
<?php } ?>
@@ -0,0 +1,52 @@
<?php
$theme_helper = $this->helper( 'Olegnax\Athlete2\Helper\Helper' );
$at_settings = $theme_helper->getConfig( 'athlete2_settings/contacts_page' );
if ( $at_settings[ 'first_block_type' ] === 'google_map' ) {
if ( $theme_helper->isActivePlugin( 'Olegnax_GoogleMap' ) && $at_settings[ 'google_map_module' ]) {
echo $this->getChildHtml( 'ox.google.map' );
} else {
$google_map_api_key = $at_settings[ 'google_map_api_key' ];
$google_map_latitude = $at_settings[ 'google_map_latitude' ];
$google_map_longitude = $at_settings[ 'google_map_longitude' ];
$google_map_zoom = $at_settings[ 'google_map_zoom' ] ?: 4;
$svgColor1 = $at_settings[ 'google_map_pin_color1' ] ?: '#000000';
$svgColor2 = $at_settings[ 'google_map_pin_color2' ] ?: '#f8e749';
?>
<div id="contact-page-gmap" ></div>
<script>
function initMap() {
// The location of Uluru
var uluru = { lat: <?= $google_map_latitude ?>, lng: <?= $google_map_longitude ?> };
// The map, centered at Uluru
var map = new google.maps.Map(
document.getElementById( 'contact-page-gmap' ), { zoom: <?= $google_map_zoom ?>, center: uluru, mapTypeControlOptions: { mapTypeIds: [] }, streetViewControl: false } );
// Marker SVG
var athleteMarkerSvg = [
'<svg id="athlete-marker" data-name="athlete-marker" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 34 48.4">',
'<circle fill="{{ color2 }}" cx="17" cy="17" r="17"/>',
'<circle fill="{{ color }}" cx="17" cy="17" r="6"/>',
'<polyline fill="{{ color3 }}" points="30.9 26.8 17.1 48.4 2.6 26"/>',
'</svg>'
].join('\n');
var athleteMarker = athleteMarkerSvg.replace('{{ color }}', '<?= $svgColor2 ?>').replace('{{ color2 }}', '<?= $svgColor1 ?>').replace('{{ color3 }}', '<?= $svgColor1 ?>');
// The marker, positioned at Uluru
var marker = new google.maps.Marker( {
position: uluru,
map: map,
icon: { url: 'data:image/svg+xml;charset=UTF-8;base64,' + btoa(athleteMarker), scaledSize: new google.maps.Size(34, 48) }, optimized: false
/*icon: { url: 'data:image/svg+xml;charset=UTF-8,' + encodeURIComponent(athleteMarker), scaledSize: new google.maps.Size(34, 48) },*/
} );
}
</script>
<!--Load the API from the specified URL
* The async attribute allows the browser to render the page while the API loads
* The key parameter will contain your own API key (which is not needed for this tutorial)
* The callback parameter executes the initMap() function
-->
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=<?= $google_map_api_key ?>&callback=initMap">
</script>
<?php }
}
@@ -0,0 +1,126 @@
& when (@media-common = true) {
.gm-style{
button:after{
content:none;
}
}
/* Set the size of the div element that contains the map */
#contact-page-gmap {
min-height: 550px;
width: 100%;
}
.contact-index-index {
.page-title-wrapper {
display: none;
}
.contacts-wrapper{
padding-left: 20px;
padding-right:20px;
}
&.contacts-fullwidth{
.page-main{
max-width: 100%;
}
.contacts-wrapper{
padding:0;
}
#contact-page-gmap {
min-height: 600px;
}
}
.contacts-layout-default{
> .container{
padding: 0 40px;
}
.contacts-first-block{
margin-bottom: 50px;
}
.form.contact{
padding: 50px;
background: #f8f8f8;
}
}
&.contacts-fullwidth{
.contacts-layout-default{
margin-bottom: 50px;
}
.contacts-layout-split {
.contacts-third-block{
margin-bottom: 50px;
}
&.row{
margin: 0;
}
}
}
.contacts-layout-split {
.container{
max-width: 100%;
padding: 0;
}
.form.contact{
margin: 0 auto;
}
.contacts-first-block{
padding: 0;
background-color: #f8f8f8;
background-repeat: no-repeat;
background-size: cover;
}
.contacts-first-block-inner,
.contacts-form-block{
padding: 7%;
}
.contacts-second-block{
max-width:550px;
margin-left: auto;
margin-right: auto;
margin-bottom: 40px;
}
}
.column:not(.sidebar-main) .form.contact,
.column:not(.sidebar-additional) .form.contact{
width: 100%;
float: none;
}
.form.contact{
max-width:550px;
.action.submit.primary{
padding: @button__padding__b;
min-width: 200px;
}
.fieldset .legend{
margin-bottom: 10px;
font-size:36px;
}
}
.contacts-third-block{
margin-top: 50px;
}
}
}
.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__sm) {
.contacts-layout-default{
.contact-index-index &,
&{
.form.contact{
padding: 30px;
max-width: 100%;
}
.contacts-second-block{
margin-top: 50px;
}
}
}
}
.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__sm) {
.contact-index-index.contacts-fullwidth{
.contacts-layout-split {
.ox-gmap-wrapper,
#contact-page-gmap {
min-height: 100%;
}
}
}
}