This commit is contained in:
rulingcom 2021-09-17 15:51:01 +08:00
parent 53485fe1ba
commit 11fa38de6f
11 changed files with 201 additions and 159 deletions

View File

@ -522,7 +522,7 @@
//背景widget設定 //背景widget設定
if ( location.href.search('editmode=on') != -1 ) { if ( location.href.search('editmode=on') != -1 ) {
$('.background').css('z-index','0'); $('.background').css('z-index','0');
$('.layout-footer').css('position','relative')
} else { } else {
$('.background').css('z-index','-1'); $('.background').css('z-index','-1');

View File

@ -23,4 +23,41 @@
position: absolute!important; position: absolute!important;
} }
} }
.linkwraper{
flex-wrap: wrap;
}
}
@media(min-width: 1600px){
.linkwraper{
flex-wrap: wrap;
margin-bottom: 6em;
}
}
@media(max-width: 1600px){
.linkwraper{
ul{
padding-left: 20px;
}
}
}
.linkwraper{
display:flex;
width: 100%;
}
@media only screen and (min-width: 768px) and (max-width: 1600px){
.linkone{
width:50%;
}
.linktwo{
width:50%;
}
}
@media(max-width:$screen-xs){
.linkone{
width:100%;
}
.linktwo{
width:100%;
}
} }

View File

@ -10,6 +10,12 @@
margin-left: 430px; margin-left: 430px;
} }
} }
.layout-content-inner{
padding: 0;
}
.layout-content-box2{
padding: 0;
}
.layout-content { .layout-content {
min-height: 37.5em; min-height: 37.5em;

View File

@ -26,10 +26,10 @@
@media(min-width:1025px){ @media(min-width:1025px){
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 2em; left: 2.5em;
.layout-footer-inner{ .layout-footer-inner{
width: 350px!important; width: 360px!important;
padding: 0 3em!important; padding: 0 1.2em!important;
} }
} }
@media only screen and (min-width: 768px) and (max-width: 1024px) { @media only screen and (min-width: 768px) and (max-width: 1024px) {
@ -61,3 +61,6 @@
width: 100%!important; width: 100%!important;
} }
} }
.footerbox{
padding: 0;
}

View File

@ -32,15 +32,13 @@
} }
.header-banner { overflow: hidden; } .header-banner { overflow: hidden; }
.header-nav { .header-nav {
padding: 1em 0; padding: 0.5em 1em;
color: $theme-color-main; color: $theme-color-main;
font-family: $main-font; font-family: $main-font;
text-transform:uppercase; text-transform:uppercase;
& > * { & > * {
display: inline-block; display: inline-block;
margin-top: 0;
margin-bottom: 0;
font-size: 0.8em; font-size: 0.8em;
color: $theme-color-main; color: $theme-color-main;
} }
@ -48,20 +46,17 @@
a { a {
color: $theme-color-main; color: $theme-color-main;
text-decoration: none; text-decoration: none;
padding: 15px;
} }
@media (min-width: $screen-sm) { @media (min-width: 1025px) {
text-align: inherit; text-align: inherit;
top: 131px; top: 120px;
position: fixed!important; position: fixed!important;
width: 400px!important;
} }
@media (min-width: 1100px) and (min-width: 1100px){ @media (min-width: 1601px){
width: 430px!important; top: 130px!important;
} }
@media (min-width: 1100px) and (min-width: 1350px){
width: 380px!important;
}
} }
.navbar-header { .navbar-header {
@ -183,7 +178,9 @@
} }
} }
.header-nav{ .header-nav{
padding:0 3em!important; @media (min-width: 1025px){
padding:0 3em!important;
}
} }
.nav-menu{ .nav-menu{
display:flex!important; display:flex!important;

View File

@ -32,10 +32,8 @@
// container setting // container setting
.response-container { .response-container {
position: relative; position: relative;
padding: 0;
@media (min-width: $screen-xs) { @media (min-width: $screen-xs) {
width: 100%; width: 100%;
padding: 0;
} }
@media (min-width: $screen-sm) { @media (min-width: $screen-sm) {

View File

@ -1,7 +1,8 @@
<footer class="layout-footer no-print"> <footer class="layout-footer no-print">
<div class="container layout-footer-inner"> <div class="container layout-footer-inner">
<section class="layout-content-box col-sm-12 footerbox" data-pp="104"></section>
<div class="layout-footer-content">{{footer-data}}</div> <div class="layout-footer-content">{{footer-data}}</div>
<div class="footer-counter"><a href="https://ruling.digital/"><img src="/assets/ruling_logo.png" alt="ruling-logo-icon"></a>{{site-counter}}</div> <div class="footer-counter"><a href="https://ruling.digital/"><img src="/assets/ruling_logo.png" alt="ruling-logo-icon"></a>{{site-counter}}</div>
<div class="footer-updated-date">{{last-updated}}</div> <div class="footer-updated-date">{{last-updated}}</div>
</div> </div>
</footer> </footer>

View File

@ -1,74 +1,74 @@
<div class="w-annc widget-announcement-4"> <div class="w-annc widget-announcement-4">
<div class="w-annc__more-wrap clearfix"> <div class="w-annc__more-wrap clearfix">
<h2 class="w-annc__widget-title"> <h2 class="w-annc__widget-title">
<span>{{widget-title}}</span> <span>{{widget-title}}</span>
</h2> </h2>
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a> <a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
</div> </div>
<ul class="w-annc__list row" data-level="0" data-list="announcements"> <ul class="w-annc__list row" data-level="0" data-list="announcements">
<li class="w-annc__item col-md-4"> <li class="w-annc__item col-md-4">
<div class="w-annc__img-wrap bullseye"> <div class="w-annc__img-wrap bullseye">
<img class="w-annc__img" src="{{img_src}}" alt="{{img_description}}" title="{{img_description}}"> <img class="w-annc__img" src="{{img_src}}" alt="{{img_description}}" title="{{img_description}}">
</div> </div>
<div class="w-annc__content-wrap"> <div class="w-annc__content-wrap">
<h4 class="w-annc__entry-title"> <h4 class="w-annc__entry-title">
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a> <a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4> </h4>
<p class="w-annc__subtitle">{{subtitle}}</p> <p class="w-annc__subtitle">{{subtitle}}</p>
</div> </div>
</li> </li>
</ul> </ul>
</div> </div>
<script> <script>
var lilength = $('.widget-announcement-4 li.w-annc__item').length; var lilength = $('.widget-announcement-4 li.w-annc__item').length;
function combineul(){ function combineul(){
for(var i=1;i<$('.widget-announcement-4 ul.w-annc__list').length;i++) for(var i=1;i<$('.widget-announcement-4 ul.w-annc__list').length;i++)
$('.widget-announcement-4 ul.w-annc__list').eq(0).find('>li').eq(-1).after($('.widget-announcement-4 ul.w-annc__list').eq(i).html()); $('.widget-announcement-4 ul.w-annc__list').eq(0).find('>li').eq(-1).after($('.widget-announcement-4 ul.w-annc__list').eq(i).html());
var ullength = $('.widget-announcement-4 ul.w-annc__list').length; var ullength = $('.widget-announcement-4 ul.w-annc__list').length;
for(var i = 1;i < ullength;i++) for(var i = 1;i < ullength;i++)
$('.widget-announcement-4 ul.w-annc__list').eq(-1).remove(); $('.widget-announcement-4 ul.w-annc__list').eq(-1).remove();
}; };
function reorganize(num){ function reorganize(num){
combineul(); combineul();
for(var i=1;i< Math.ceil(lilength/num);i++){ for(var i=1;i< Math.ceil(lilength/num);i++){
$('.widget-announcement-4 ul.w-annc__list').eq(-1).after('<ul class="w-annc__list row" data-level="0" data-list="announcements"></ul>') $('.widget-announcement-4 ul.w-annc__list').eq(-1).after('<ul class="w-annc__list row" data-level="0" data-list="announcements"></ul>')
var lihtml=""; var lihtml="";
if(i != (Math.ceil(lilength/num)-1)){ if(i != (Math.ceil(lilength/num)-1)){
for(var j=0;j<num;j++) for(var j=0;j<num;j++)
lihtml += "<li class='w-annc__item col-md-4'>"+$('.widget-announcement-4 li.w-annc__item').eq(i*num+j).html()+"</li>" lihtml += "<li class='w-annc__item col-md-4'>"+$('.widget-announcement-4 li.w-annc__item').eq(i*num+j).html()+"</li>"
}else{ }else{
for(var j=0;j< lilength - num *(Math.ceil(lilength/num)-1) ;j++) for(var j=0;j< lilength - num *(Math.ceil(lilength/num)-1) ;j++)
lihtml += "<li class='w-annc__item col-md-4'>"+$('.widget-announcement-4 li.w-annc__item').eq(i*num+j).html()+"</li>" lihtml += "<li class='w-annc__item col-md-4'>"+$('.widget-announcement-4 li.w-annc__item').eq(i*num+j).html()+"</li>"
}; };
$('.widget-announcement-4 ul.w-annc__list').eq(-1).html(lihtml); $('.widget-announcement-4 ul.w-annc__list').eq(-1).html(lihtml);
}; };
if(Math.ceil(lilength/num) != 1 ) if(Math.ceil(lilength/num) != 1 )
for(var i=0;i< lilength -num ; i++ ) for(var i=0;i< lilength -num ; i++ )
$('.widget-announcement-4 ul.w-annc__list').eq(0).find("li.w-annc__item").eq(num).remove(); $('.widget-announcement-4 ul.w-annc__list').eq(0).find("li.w-annc__item").eq(num).remove();
$('.widget-announcement-4 ul.w-annc__list >li').css('width','calc('+100/num+'% - '+20/16+'em)'); //20px=>li的margin $('.widget-announcement-4 ul.w-annc__list >li').css('width','calc('+100/num+'% - '+20/16+'em)'); //20px=>li的margin
}; };
$(document).ready(function(){ $(document).ready(function(){
if($(window).width()>1024){ if($(window).width()>1024){
reorganize(3); reorganize(3);
num=3; num=3;
}else if($(window).width()>576){ }else if($(window).width()>576){
reorganize(2); reorganize(2);
num=2; num=2;
}else{ }else{
reorganize(1); reorganize(1);
num=1; num=1;
} }
}); });
$(window).resize(function(){ $(window).resize(function(){
if($(window).width()>1024){ if($(window).width()>1024){
reorganize(3); reorganize(3);
num=3; num=3;
}else if($(window).width()>576){ }else if($(window).width()>576){
reorganize(2); reorganize(2);
num=2; num=2;
}else{ }else{
reorganize(1); reorganize(1);
num=1; num=1;
} }
}) })
</script> </script>

View File

@ -1,52 +1,52 @@
<div> <div>
<style type="text/css"> <style type="text/css">
.weather_widget1{ .weather_widget1{
background: #06dd95; background: #06dd95;
display: inline-block; display: inline-block;
width: 100%; width: 100%;
padding: 1.5em 0.8em;; padding: 1.5em 0.8em;;
font-size: 1.3em; font-size: 1.3em;
font-weight: bold; font-weight: bold;
} }
.weather_widget1 .white_text{ .weather_widget1 .white_text{
color: #ffffff; color: #ffffff;
font-size: 1.5em; font-size: 1.5em;
overflow-wrap: break-word; overflow-wrap: break-word;
} }
.weatherICON{ .weatherICON{
padding: 0; padding: 0;
} }
.weatherICON img{ .weatherICON img{
width: 100%; width: 100%;
} }
</style> </style>
<div class="weather_widget1" data-list="weather" data-level="0"> <div class="weather_widget1" data-list="weather" data-level="0">
<div class="col-sm-12 columns weatherBlock"> <div class="col-sm-12 columns weatherBlock">
<div class="col-sm-4 columns weatherICON"> <div class="col-sm-4 columns weatherICON">
<img src="{{wx_svg}}" data-name="wx_svg" /> <img src="{{wx_svg}}" data-name="wx_svg" />
</div> </div>
<div class="col-sm-4 columns"> <div class="col-sm-4 columns">
<div class="weatherTXT" data-name="wx_text">{{wx_text}}</div> <div class="weatherTXT" data-name="wx_text">{{wx_text}}</div>
<div class="Tempature white_text" data-name="avgt">{{avgt}}<span>℃</span></div> <div class="Tempature white_text" data-name="avgt">{{avgt}}<span>℃</span></div>
</div> </div>
<div class="col-sm-4 columns"> <div class="col-sm-4 columns">
<div class="UviItem">{{uv-head}}</div> <div class="UviItem">{{uv-head}}</div>
<div class="UviText white_text" data-name="uvi_text">{{uvi_text}}</div> <div class="UviText white_text" data-name="uvi_text">{{uvi_text}}</div>
</div> </div>
</div> </div>
<div class="col-sm-12 columns weatherBlock"> <div class="col-sm-12 columns weatherBlock">
<div class="col-sm-4 columns"> <div class="col-sm-4 columns">
<div class="weatherItem">{{relative_humidity-head}}</div> <div class="weatherItem">{{relative_humidity-head}}</div>
<div class="weatherItemNum white_text"><span data-name="rh">{{rh}}</span>%</div> <div class="weatherItemNum white_text"><span data-name="rh">{{rh}}</span>%</div>
</div> </div>
<div class="col-sm-4 columns"> <div class="col-sm-4 columns">
<div class="weatherItem">{{current_wind_speed-head}}</div> <div class="weatherItem">{{current_wind_speed-head}}</div>
<div class="weatherItemNum white_text"><span data-name="ws">{{ws}}</span>m/s</div> <div class="weatherItemNum white_text"><span data-name="ws">{{ws}}</span>m/s</div>
</div> </div>
<div class="col-sm-4 columns"> <div class="col-sm-4 columns">
<div class="weatherItem">{{accumulated_rainfall-head}}</div> <div class="weatherItem">{{accumulated_rainfall-head}}</div>
<div class="weatherItemNum white_text"><span data-name="rain">{{rain}}</span>mm</div> <div class="weatherItemNum white_text"><span data-name="rain">{{rain}}</span>mm</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,14 +1,14 @@
{ {
"frontend": [ "frontend": [
], ],
"widgets" : [ "widgets" : [
{ {
"filename" : "ruling_weather_widget1", "filename" : "ruling_weather_widget1",
"name" : { "name" : {
"zh_tw" : "1. 天氣呈現樣式1", "zh_tw" : "1. 天氣呈現樣式1",
"en" : "1. Weather layout 1" "en" : "1. Weather layout 1"
}, },
"thumbnail" : "weather1_thumbs.png" "thumbnail" : "weather1_thumbs.png"
} }
] ]
} }

View File

@ -1 +1 @@
{"key":"asia_kstyle1","title":"asia_Kstyle1","author":"ken","thumbnail":"assets/images/design_thumb.png"} {"key":"asia_Kstyle1","title":"asia_Kstyle1","author":"ken","thumbnail":"assets/images/design_thumb.png"}