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設定
if ( location.href.search('editmode=on') != -1 ) {
$('.background').css('z-index','0');
$('.layout-footer').css('position','relative')
} else {
$('.background').css('z-index','-1');

View File

@ -23,4 +23,41 @@
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;
}
}
.layout-content-inner{
padding: 0;
}
.layout-content-box2{
padding: 0;
}
.layout-content {
min-height: 37.5em;

View File

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

View File

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

View File

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

View File

@ -1,7 +1,8 @@
<footer class="layout-footer no-print">
<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="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>
</footer>
</footer>

View File

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

View File

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

View File

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