Fix header-nav css.

This commit is contained in:
BoHung Chiu 2021-05-10 19:32:01 +08:00
parent 880e85290f
commit f48d96493a
10 changed files with 396 additions and 3 deletions

View File

@ -21,7 +21,7 @@
color: $theme-color-main;
font-family: $main-font;
& > * {
& > *:not(p) {
display: inline-block;
margin-top: 0;
margin-bottom: 0;

View File

@ -0,0 +1,86 @@
<div class="w-annc widget-announcement-18">
<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">
<a href="{{link_to_show}}" title="{{title}}">
<img class="w-annc__img" src="{{img_src}}" alt="{{img_description}}" title="{{img_description}}">
</a>
</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>
<div class="w-annc__subtitle">{{subtitle}}</div>
<div class="w-annc_read_more"><a href="{{link_to_show}}" title="{{title}}">{{read_more_text}}</a></div>
</div>
</li>
</ul>
</div>
<style type="text/css">
.widget-announcement-18 [data-list="announcements"] li > *{
background: #ffffff;
width: 100%;
float: left;
}
.widget-announcement-18 [data-list="announcements"] .w-annc__img{
width: 100%;
}
.widget-announcement-18 [data-list="announcements"] .w-annc__content-wrap{
padding: 0 1em;
}
.widget-announcement-18 .w-annc__title {
line-height: 1.3;
font-size: 1.2rem;
}
.widget-announcement-18 .w-annc__widget-title {
float: left;
}
.widget-announcement-18 .w-annc__more {
margin-top: 1.5em;
}
.widget-announcement-18 .w-annc__list > .w-annc__item:nth-child(3n+1) {
clear: both;
}
.widget-announcement-18 li.w-annc__item{
float: left;
}
.widget-announcement-18 .w-annc__img-wrap {
padding: 0 0 1em 0;
}
.w-annc_read_more{
display: inline-block;
padding: 1em;
}
.w-annc_read_more a{
float: left;
background: #4a97c2;
color: #ffffff;
padding: 0 0.5em;
border-radius: 0.3em;
border: 0.5em solid #4a97c2;
}
.w-annc__subtitle {
padding-bottom: 0.3em;
}
.w-annc_read_more a:hover{
background: #327397;
border: 0.5em solid #327397;
}
</style>
<script type="text/javascript">
$(document).ready(function(){
$("[data-subpart-id=\"{{subpart-id}}\"] .w-annc__subtitle").each(function(i,v){
var subtitle = $(v).text();
if(subtitle.length > 15){
$(v).text(subtitle.slice(0,15) + "...");
}
})
})
</script>

View File

@ -0,0 +1,31 @@
<div class="w-annc widget-announcement-17">
<div class="search_block">
<p>Search</p>
<form accept-charset="UTF-8" action="{{more_url}}" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓"></div>
<p>
<input id="search_query" name="keywords" placeholder="搜尋" type="text">
<input type="submit" value="搜尋">
</p>
</form>
</div>
<h3 class="w-annc__widget-title">
<span>{{widget-title}}</span>
</h3>
<ul class="w-annc__list" data-level="0" data-list="announcements">
<li class="w-annc__item row">
<span class="w-annc__postdate-wrap col-sm-3" date-format="%Y-%m-%d">
<i class="fa fa-calendar-o"></i>
<span class="w-annc__postdate">{{postdate}}</span>
</span>
<h4 class="w-annc__entry-title col-sm-9">
<span class="w-annc__status-wrap" data-list="statuses" data-level="1">
<span class="w-annc__status label status {{status-class}}">{{status}}</span>
</span>
<a class="w-annc__title" href="{{link_to_show}}">{{title}}</a>
</h4>
</li>
</ul>
<div class="w-annc__more-wrap clearfix">
<a class="w-annc__more btn btn-primary pull-right" href="{{more_url}}"><%= (I18n.locale.to_s =="zh_tw") ? "更多最新消息" : "More NEWS" %></a>
</div>
</div>

View File

@ -0,0 +1,60 @@
<div class="i-archive index-archive-5">
<h3 class="i-archive-title">
<span>{{page-title}}</span>
</h3>
<div class="i-archive__list list-unstyled" id="index-archive-group" data-list="categories" data-level="0">
<h4 class="i-archive__category-title">{{category-title}}</h4>
<div class="i-items">
<div class="thead row">
<div class="col-sm-2 date-thead">上傳日期</div>
<div class="col-sm-3 title-thead">標題</div>
<div class="col-sm-3 description-thead">{{description-head}}</div>
<div class="col-sm-2 file-thead">檔案下載</div>
</div>
<div class="tbody">
<div class="i-archive__category-list list-unstyled" data-list="archives" data-level="1">
<div class="archive-items clearfix">
<div class="date col-sm-2">{{created_at}}</div>
<div class="head col-sm-3">
{{archive-title}}
<span class="i-archive__status-wrap" data-list="statuses" data-level="2">
<span class="i-archive__status label status {{status-class}}">{{status}}</span>
</span>
</div>
<div class="description col-sm-3" style="border-right: 0.05em solid #333;">{{description}}</div>
<div class="i-archive__file-list col-sm-2" data-list="files" data-level="2">
<a href="{{file-url}}" class="i-archive-files-item" target="_blank" data-toggle="tooltip" data-placement="bottom" title="{{file-name}}"><span class="label label-primary">{{file-type}}</span></a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
if( window.location.href.indexOf('/en/') > -1 ) {
$('.date-thead').replaceWith('<div class="col-sm-2 date-thead-en">Updated At</div>')
$('.title-thead').replaceWith('<div class="col-sm-7 title-thead-en">Title</div>')
$('.file-thead').replaceWith('<div class="col-sm-3 file-thead-en">Download file</div>')
}
$(document).ready(function(){
if(window.innerWidth >= 768){
$(".archive-items .date").each(function(i,d){
$(d).parent().eq(0).children().css("min-height",$(d).parent().height());
})
}else{
$(".archive-items >").css("min-height","");
}
})
$(window).resize(function(){
if(window.innerWidth >= 768){
$(".archive-items .date").each(function(i,d){
$(d).parent().eq(0).children().css("min-height",$(d).parent().height());
})
}else{
$(".archive-items >").css("min-height","");
}
})
</script>

View File

@ -0,0 +1,48 @@
<div class="i-archive index-archive-6">
<h3 class="i-archive-title">
<span>{{page-title}}</span>
</h3>
<div class="i-archive__list list-unstyled" id="index-archive-group" data-list="categories" data-level="0">
<h4 class="i-archive__category-title">{{category-title}}</h4>
<div class="i-items">
<div class="thead row">
<div class="col-sm-2 date-thead">上傳日期</div>
<div class="col-sm-3 title-thead">標題</div>
<div class="col-sm-3 description-thead">{{description-head}}</div>
<div class="col-sm-2 file-thead">檔案下載</div>
</div>
<div class="tbody">
<div class="i-archive__category-list list-unstyled" data-list="archives" data-level="1">
<div class="archive-items clearfix">
<div class="date col-sm-2">{{created_at}}</div>
<div class="head col-sm-3">
<dl class="i-archive__file" data-list="files" data-level="2">
<div class="file-name">
<a class="i-archive__file-name" href="{{file-url}}" target="_blank" title="{{file-name}}">{{file-name}}</a>
<span class="i-archive__status-wrap" data-list="statuses" data-level="2">
<span class="i-archive__status label status {{status-class}}">{{status}}</span>
</span>
</div>
</dl>
</div>
<div class="description col-sm-3">{{description}}</div>
<div class="i-archive__file-list col-sm-2" data-list="files" data-level="2">
<div class="file-item">
<a href="{{file-url}}" class="i-archive-files-item" target="_blank" data-toggle="tooltip" data-placement="bottom" title="{{file-name}}"><span class="label label-primary">{{file-type}}</span></a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
if( window.location.href.indexOf('/en/') > -1 ) {
$('.date-thead').replaceWith('<div class="col-sm-2 date-thead-en">Updated At</div>')
$('.title-thead').replaceWith('<div class="col-sm-7 title-thead-en">Title</div>')
$('.file-thead').replaceWith('<div class="col-sm-3 file-thead-en">Download file</div>')
}
</script>

View File

@ -0,0 +1,38 @@
<div class="widget-gallery gallery card-group widget4 no-print">
<h3 class="widget-title">
<span>{{widget-title}}</span>
</h3>
<link rel="stylesheet" type="text/css" href="/assets/gallery_card.css">
<div class="row widget-content" data-level="0" data-list="images">
<div class="card card-flip h-100">
<div class="card-front">
<div class="card-body" style="padding:0;">
<img
srcset="
{{thumb-large-src}} 1024w,
{{thumb-src}} 768w"
src="{{thumb-src}}"
alt="{{alt_title}}"
>
<div class="card-footer">
<h3 class="card-title">{{image_short_description}}</h3>
</div>
</div>
</div>
<div class="card-back">
<div class="card-body" style="background-color: {{album_color}};color: {{album_card_text_color}};">
<h3 class="card-title">{{image_short_description}}</h3>
{{image_description}}
<div class="card-button-group">
<a href="{{link_to_show}}" class="btn btn-secondary view ">
<i class="fa fa-link" aria-hidden="true"></i>
</a>
<a href="{{src}}" data-toggle="lightbox" data-gallery="gallery" class="btn btn-secondary preview" data-title="{{alt_title}}" data-type="image">
<i class="fa fa-eye" aria-hidden="true"></i>
</a>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,72 @@
<div class="widget-gallery gallery widget5 no-print">
<h3 class="widget-title">
<span>{{widget-title}}</span>
</h3>
<% OrbitHelper.render_css_in_head(["theater.css"]) %>
<%= javascript_include_tag "jquery.touchSwipe.min" %>
<%= javascript_include_tag "theater-widget" %>
<% OrbitHelper.render_meta_tags([{"name" => "mobile-web-app-capable","content" => "yes"},{"name" => "apple-mobile-web-app-status-bar-style","content" => "black-translucent"}]) %>
<div id="gallery-theater-stage">
<div class="show-gallery-2 gallery" style="margin-top: 2.4em;">
<div class="gallery-loader">
<div class="spinner">
<div class="rect1"></div>
<div class="rect2"></div>
<div class="rect3"></div>
<div class="rect4"></div>
<div class="rect5"></div>
</div>
</div>
<div class="gallery-actions">
<div class="gallery-show-original gallery-actions-btn">
<a title="<%= t('gallery.show_original_image') %>" href="/uploads/album_image/file/606574f19bb8189e640000ac/49b36_245.jpg"><i class="fa fa-image"></i></a>
</div>
<div class="gallery-toggle-desc gallery-actions-btn">
<i class="fa fa-comment"></i>
</div>
<div class="gallery-theme-switch gallery-actions-btn">
<i class="fa fa-circle"></i>
</div>
<div class="gallery-close gallery-actions-btn">
<i class="fa fa-times"></i>
</div>
</div>
<div class="image-container" id="image-container">
</div>
<div class="gallery-thumb-toggle gallery-thumb-line">
<i class="fa fa-angle-double-up"></i>
</div>
<div class="gallery-thumb-container">
<div class="gallery-thumb-navs show">
<div class="gallery-thumb-prev gallery-thumb-nav">
<i class="fa fa-arrow-circle-o-left"></i>
</div>
<div class="gallery-thumb-next gallery-thumb-nav">
<i class="fa fa-arrow-circle-o-right"></i>
</div>
</div>
<ul class="gallery-thumb-wrap" data-level="0" data-list="images">
<li class="gallery-item" data-index="{{i}}">
<a style="cursor: pointer;">
<img class="gallery-thumb" src="{{thumb-src}}" data-theater-url="{{theater-src}}" data-link="{{src}}" alt="{{alt_title}}">
</a>
</li>
</ul>
</div>
<div class="gallery-img-desc">
<div class="gallery-img-desc-inner">
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
if(typeof Modernizr == "undefined"){
var script = $("<script>");
script.attr("src","/assets/modernizr.js");
$("head").append(script);
}
</script>
</div>

View File

@ -0,0 +1,32 @@
<div class="index-gallery gallery card-group index5">
<h1 class="index-title">
<span>{{page-title}}</span>
</h1>
<link rel="stylesheet" type="text/css" href="/assets/gallery_card.css">
<div class="row" data-level="0" data-list="albums">
<div class="card card-flip h-100">
<div class="card-front">
<div class="card-body" style="padding:0;">
<img
src="{{thumb-src}}"
alt="{{alt_title}}"
>
<div class="card-footer">
<h3 class="card-title">{{album-name}}</h3>
</div>
</div>
</div>
<div class="card-back">
<div class="card-body" style="background-color: {{album_color}};color: {{album_card_text_color}};">
<h3 class="card-title">{{album-name}}</h3>
<div class="card-button-group">
<a href="{{link_to_show}}" class="btn btn-secondary view ">
<i class="fa fa-link" aria-hidden="true"></i>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
{{pagination_goes_here}}

View File

@ -0,0 +1,18 @@
<div class="widget-link widget1">
<h3 class="widget-title">
<span>{{widget-title}}</span>
</h3>
<ul class="list-unstyled" data-level="0" data-list="web_link">
<li class="widget-content widget-content-horizontal">
<a class="widget-content-title" href="{{link_to_show}}" target="_blank" title="{{title_text}}">{{title}}</a>
<span data-list="statuses" data-level="1">
<span class="label status {{status-class}}">{{status}}</span>
</span>
</li>
</ul>
</div>
<style type="text/css">
.widget-content-horizontal{
float: left;
}
</style>

View File

@ -21,8 +21,16 @@
{
"filename" : "web_res_widget1",
"name" : {
"zh_tw" : "1. 列表 ( 模組標題, 連結 )",
"en" : "1. List (widget-title, link)"
"zh_tw" : "1. 直式列表 ( 模組標題, 連結 )",
"en" : "1. Vertical List (widget-title, link)"
},
"thumbnail" : "thumb.png"
},
{
"filename" : "web_res_widget2",
"name" : {
"zh_tw" : "2. 橫式列表 ( 模組標題, 連結 )",
"en" : "2. Horizontal List (widget-title, link)"
},
"thumbnail" : "thumb.png"
}