Merge branch 'sprint/272_tsj_theme' into sprint/272

This commit is contained in:
孙广明
2022-12-21 16:00:12 +08:00
4 changed files with 32 additions and 19 deletions
+1
View File
@@ -31,6 +31,7 @@
.block-guide .tab-pane .app-qrcode .col-md-12 {padding-left: 0; padding-top: 10px;}
.block-guide .tab-pane .app-qrcode .qrcode-down img {padding-top: 16px;}
.block-guide .tab-pane .app-qrcode .qrcode-down .text-primary {padding-top: 10px;}
.block-guide .tab-pane {height: 100%;}
<?php if(common::checkNotCN()):?>
.block-guide .col-nav {width: 215px;}
<?php endif;?>
+1 -1
View File
@@ -3,8 +3,8 @@
.block-guide .tab-pane .mode-switch .dataTitle {padding: 14px 20px;}
.block-guide .tab-pane .mode-switch .mode-block {background: rgba(230, 240, 255, 0.4); margin-left: 10px; cursor: pointer; padding-top: 8px;}
.block-guide .tab-pane .mode-switch .mode-block:nth-child(2) {margin-left: 8%;}
.block-guide .tab-pane .mode-switch .mode-block.active {box-shadow: 0 0 0 2px #2E7FFF;}
.block-guide .tab-pane .mode-switch .mode-block:hover {box-shadow: 0 0 14px rgba(0, 0, 0, 0.12);}
.block-guide .tab-pane .mode-switch .mode-block.active {box-shadow: 0 0 0 2px #2E7FFF;}
.block-guide .tab-pane .mode-switch .mode-desc {padding: 4px 4px 10px; font-size: 12px; color: #5E626D;}
<?php if(common::checkNotCN()):?>
.block-guide .tab-pane .mode-switch .mode-block:nth-child(1) {padding-bottom: 18px;}
+27 -17
View File
@@ -1,23 +1,28 @@
<style>
#theme-default {background: url('/theme/default/images/guide/theme_default.png') no-repeat;}
#theme-blue {background: url('/theme/default/images/guide/theme_blue.png') no-repeat;}
#theme-green {background: url('/theme/default/images/guide/theme_green.png') no-repeat;}
#theme-red {background: url('/theme/default/images/guide/theme_red.png') no-repeat;}
#theme-pink {background: url('/theme/default/images/guide/theme_pink.png') no-repeat;}
#theme-blackberry {background: url('/theme/default/images/guide/theme_blackberry.png') no-repeat;}
#theme-classic {background: url('/theme/default/images/guide/theme_classic.png') no-repeat;}
#theme-purple {background: url('/theme/default/images/guide/theme_purple.png') no-repeat;}
.theme {display: inline-block; margin-left: 10px; color: #FFF; border: none; height: 88px; width: 128px; margin-top: 25px; background-size: 100% !important; position: relative; cursor:pointer}
.theme-text {position: absolute; top: 64px; left: 43px;}
.theme-text.active {left: 20px;}
.themeSwitch .table-row {border-top: 0px !important;}
.themeSwitch .theme-container:first-child {padding-top: 1%;}
@media screen and (max-width: 1366px){.themeSwitch .theme-container:first-child {padding-top: 3%;} .theme-container + .theme-container {padding-top: 3%;}}
.themeSwitch .theme-container {border-collapse:separate; border-spacing:10px; border: none;}
.theme {margin-left: 10px; color: #FFF; border: none; background-size: 100% !important; cursor:pointer; border-radius: 4px; position: relative;}
.theme:hover {box-shadow: 0 0 14px rgba(0, 0, 0, 0.4);}
.theme-text {width: 100%;position: absolute; bottom: 6%; left: 50%; transform: translateX(-50%);}
.theme-text .icon {padding-right: 10px;}
.theme-text.active {left: 42%;}
div.theme-default {background: #3785ff;}
div.theme-blue {background: #2b80ff;}
div.theme-green {background: #248f83;}
div.theme-red {background: #f34a5a;}
div.theme-pink {background: #f7889c;}
div.theme-blackberry {background: #304269;}
div.theme-classic {background: #114f8e;}
div.theme-purple {background: #9958dc;}
</style>
<script>
$(function()
{
var $block = $('#block<?php echo $blockID;?>');
var themePosition = "<?php echo 'themePosition-' . $blockID;?>";
$block.find('.themeSwitch > .theme').click(function()
$block.find('.themeSwitch .theme').click(function()
{
var scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop || $block.find('#guideBody').offset().top;
localStorage.setItem(themePosition, scrollTop);
@@ -27,11 +32,16 @@ $(function()
})
</script>
<div class='themeSwitch'>
<?php $i = 0;?>
<?php foreach($lang->block->themes as $themeKey => $themeName):?>
<div class='theme' id="<?php echo 'theme-' . $themeKey;?>" data-value="<?php echo $themeKey;?>">
<?php $hidden = $app->cookie->theme == $themeKey ? '' : 'hidden';?>
<?php $active = $app->cookie->theme == $themeKey ? 'active' : '';?>
<div class='theme-text <?php echo $active;?>'><i class="icon icon-check-circle <?php echo $hidden;?>"></i><?php echo $themeName;?></div>
</div>
<?php if($i % 4 == 0) echo "<div class='col-12 table-row theme-container'>"?>
<div class="theme col-3 theme-<?php echo $themeKey;?>" data-value="<?php echo $themeKey;?>">
<?php echo html::image($config->webRoot . "theme/default/images/guide/theme_{$themeKey}.png");?>
<?php $hidden = $app->cookie->theme == $themeKey ? '' : 'hidden';?>
<?php $active = $app->cookie->theme == $themeKey ? 'active' : '';?>
<div class='theme-text text-center <?php echo $active;?>'><i class="icon icon-check-circle <?php echo $hidden;?>"></i><?php echo $themeName;?></div>
</div>
<?php if($i % 4 == 3) echo "</div>";?>
<?php $i ++;?>
<?php endforeach;?>
</div>
+3 -1
View File
@@ -3,8 +3,10 @@
.vision-switch-container {display: flex;}
.vision {width: 47%; border: none; background-color: rgba(230, 240 , 255, 0.4); cursor:pointer; border-radius: 2px; padding: 10px 10px 0 10px;}
.vision + .vision {margin-left: 10px;}
.vision.active {box-shadow: 0 0 0 2px #2E7FFF;}
.vision:hover {box-shadow: 0 0 14px rgba(0, 0, 0, 0.12);}
<<<<<<< module/block/view/visionswitch.html.php
.vision.active {box-shadow: 0 0 0 2px #2E7FFF;}
.vision-img {height: 118px; width: 100%; background-size: 100% !important;}
.vision-title {font-size: 14px; color: #0B0F18; padding: 0 8px; margin-top: 10px;}
.vision-text {font-size: 12px; color: #5E626D; padding: 8px;}
</style>