From 527648da0a30b09c05c972d2265378652ab15ad5 Mon Sep 17 00:00:00 2001 From: nccu Date: Mon, 10 Nov 2014 16:42:09 +0800 Subject: [PATCH] update template --- app/templates/nccu/assets/images/disc.jpg | Bin 0 -> 1157 bytes app/templates/nccu/assets/javascripts/app.js | 13 ++++++++- .../stylesheets/template/base/_default.scss | 21 ++++++++------ .../stylesheets/template/base/_tab.scss | 2 ++ .../template/modules/announcement.scss | 26 +++++++++++++++++- .../stylesheets/template/modules/news.scss | 1 + .../announcement/_annc_widget14.html.erb | 19 +++++++++++++ .../nccu/modules/announcement/info.json | 8 ++++++ .../nccu/modules/news/_news_widget1.html.erb | 4 +-- .../_widget1.html.erb | 2 +- 10 files changed, 82 insertions(+), 14 deletions(-) create mode 100644 app/templates/nccu/assets/images/disc.jpg create mode 100644 app/templates/nccu/modules/announcement/_annc_widget14.html.erb diff --git a/app/templates/nccu/assets/images/disc.jpg b/app/templates/nccu/assets/images/disc.jpg new file mode 100644 index 0000000000000000000000000000000000000000..901dc24bd91a0992e3e7d27559192959361ec9d2 GIT binary patch literal 1157 zcma)5O;6N77=BANU}B8bh#vn+-1C=GbX_J|Ep67YrnRzDvlpnzzI}3IIn$5>B1*6En zgHZ2y?S0_j5=;94`4Ru5MQLoxa+FH0Pqwk-kxNxe1Af^F{P@(8< zlMb~+*6E)ugz-@J%(FTLbe!{{VOShMPd24%c+~Hi!s*6-jO8_)l1}1b2A?U&u~|#7 zOG&ap$ll--S6hUVv_)c6Ti4OU%^>ngH+|H@JC50mQtCz?Zq_Z4DM&%!o63Bp+R$dJ zw!W;Xs;yQHyV59YwqndxwRxj4;MR%P32{URTz|x^jpY_r2xC^cj+5X8_8SQaQE$s; zFuoUKtX`k%kMCu9ELUdD$i>B;y68cQxu+NoZObM@y_vE F=if>7CWQb1 literal 0 HcmV?d00001 diff --git a/app/templates/nccu/assets/javascripts/app.js b/app/templates/nccu/assets/javascripts/app.js index 8d9cd9c..cc13107 100644 --- a/app/templates/nccu/assets/javascripts/app.js +++ b/app/templates/nccu/assets/javascripts/app.js @@ -1,4 +1,4 @@ -;(function($) { +(function($) { // Init functions function init() { @@ -7,6 +7,16 @@ } + function heightCompare () { + var priHeight = $('.primary').height(); + var secHeight = $('.secondary').height(); + if( priHeight <= secHeight ) { + $('.primary') + .children('.inner') + .css('height', secHeight + 30); + } + } + function searchDetect () { if( $('body').attr('data-module') == 'news' || $('body').attr('data-module') == 'announcement' ) { if( window.location.search.length < 1 ) { @@ -115,6 +125,7 @@ bullsEye(); moveElement(); searchDetect(); + heightCompare(); } } diff --git a/app/templates/nccu/assets/stylesheets/template/base/_default.scss b/app/templates/nccu/assets/stylesheets/template/base/_default.scss index 0cbb82d..5ab68c5 100644 --- a/app/templates/nccu/assets/stylesheets/template/base/_default.scss +++ b/app/templates/nccu/assets/stylesheets/template/base/_default.scss @@ -625,18 +625,17 @@ button, input, select, textarea { float: left; } -.main_menu.expansion .page_menu.level_1 > li:last-child { +html[lang="zh_tw"] .main_menu.expansion .page_menu.level_1 > li:last-child { background-color: #ff9900; } - -.main_menu.expansion .page_menu.level_1 > li:last-child:hover { +html[lang="zh_tw"] .main_menu.expansion .page_menu.level_1 > li:last-child:hover { background-color: #ff9900; -moz-box-shadow: inset 0 -4px 0 #FF7A00; -webkit-box-shadow: inset 0 -4px 0 #FF7A00; box-shadow: inset 0 -4px 0 #FF7A00; } -.main_menu.expansion .page_menu.level_1 > li:last-child > a { +html[lang="zh_tw"] .main_menu.expansion .page_menu.level_1 > li:last-child > a { color: #FFF; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6); } @@ -3205,7 +3204,7 @@ article.page_content .linkAndFile > div:last-child { } .content .content-inner { - padding: 1em 1em; + padding: 1em 1em 0 1em; } .content .content-inner:before, .content .content-inner:after { @@ -3474,9 +3473,10 @@ article.page_content .linkAndFile > div:last-child { .index_page .primary > .right .events .event_title a { color: #888888; - font-size: 24px; + font-size: 18px; line-height: 36px; font-weight: normal; + padding-left: 10px; } .index_page .primary > .right .events .event_title a:active { @@ -3841,11 +3841,14 @@ img { clear: both; } - +.inside_page .primary .inner{ + @include clearfix(); + border-right: 1px solid #cfcfcf; + padding: 0 20px 0 0; + margin: 2em 0 2em 2em; +} #main-content { - padding-right: 20px; - border-right: 1px solid #cfcfcf; font-size: 13px; font-size: 0.8125rem; font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; diff --git a/app/templates/nccu/assets/stylesheets/template/base/_tab.scss b/app/templates/nccu/assets/stylesheets/template/base/_tab.scss index 4c30e28..4fa7c74 100644 --- a/app/templates/nccu/assets/stylesheets/template/base/_tab.scss +++ b/app/templates/nccu/assets/stylesheets/template/base/_tab.scss @@ -131,6 +131,7 @@ float: left; width: 26%; .wlink-heading { + font-weight: bold; height: 2.3em; margin: 0; line-height: 1.6em; @@ -152,6 +153,7 @@ text-overflow: ellipsis; border-bottom: 1px solid #ccc; & > a { + font-family: $sub-font; color: #333; &:hover { color: #cc0033; diff --git a/app/templates/nccu/assets/stylesheets/template/modules/announcement.scss b/app/templates/nccu/assets/stylesheets/template/modules/announcement.scss index f137f8e..e6c41b3 100644 --- a/app/templates/nccu/assets/stylesheets/template/modules/announcement.scss +++ b/app/templates/nccu/assets/stylesheets/template/modules/announcement.scss @@ -195,9 +195,33 @@ $table-th-bgcolor: $theme-color-main; // Announcement widget 12 -- table .annc-widget-12 {} -// Announcement widget 12 -- table +// Announcement widget 13 .annc-widget-13 {} +// Announcement widget 14 -- table +.annc-widget-14 { + .w-announcement__table { + border: 1px solid #ddd; + font-family: $sub-font; + } + .w-announcement__th { + padding: 3px; + color: #000; + background: none; + } + .w-announcement__link { + font-family: $sub-font; + background: url(/assets/disc.jpg) 3px center no-repeat; + padding-left: 17px; + } + th, td { + padding: 3px; + line-height: 18px; + text-align: left; + border: 1px solid #ddd; + } +} + // ****************** index ****************** // Announcement index 1 -- table diff --git a/app/templates/nccu/assets/stylesheets/template/modules/news.scss b/app/templates/nccu/assets/stylesheets/template/modules/news.scss index b423451..62f3c9f 100644 --- a/app/templates/nccu/assets/stylesheets/template/modules/news.scss +++ b/app/templates/nccu/assets/stylesheets/template/modules/news.scss @@ -26,6 +26,7 @@ .i-news__content-wrap { display: inline-block; width: 58.79828326180258%; + vertical-align: top; } .i-news__title { margin: 0 0 0.5em 0; diff --git a/app/templates/nccu/modules/announcement/_annc_widget14.html.erb b/app/templates/nccu/modules/announcement/_annc_widget14.html.erb new file mode 100644 index 0000000..047cf7e --- /dev/null +++ b/app/templates/nccu/modules/announcement/_annc_widget14.html.erb @@ -0,0 +1,19 @@ + +
+

{{widget-title}}

+ + + + + + + + + + + +
{{title-head}}{{date-head}}
{{title}}{{postdate}}
+
\ No newline at end of file diff --git a/app/templates/nccu/modules/announcement/info.json b/app/templates/nccu/modules/announcement/info.json index 89cda6c..0d171d4 100644 --- a/app/templates/nccu/modules/announcement/info.json +++ b/app/templates/nccu/modules/announcement/info.json @@ -121,6 +121,14 @@ "en" : "13. List (widget-title, title)" }, "thumbnail" : "thumbnail-block.png" + }, + { + "filename" : "annc_widget14", + "name" : { + "zh_tw" : "14. 表格列表( 模組標題, 標題, 日期 )", + "en" : "14. Table (widget-title, title, postdate)" + }, + "thumbnail" : "thumbnail-block.png" } ] } \ No newline at end of file diff --git a/app/templates/nccu/modules/news/_news_widget1.html.erb b/app/templates/nccu/modules/news/_news_widget1.html.erb index b00b912..c5ab4c5 100644 --- a/app/templates/nccu/modules/news/_news_widget1.html.erb +++ b/app/templates/nccu/modules/news/_news_widget1.html.erb @@ -2,7 +2,7 @@ News widget-1 -->
-

{{widget-title}}

+

{{widget-title}}

更多+ @@ -24,7 +24,7 @@
  • -
    +
    Announcement image diff --git a/app/templates/nccu/widgets/announcement_link_widget/_widget1.html.erb b/app/templates/nccu/widgets/announcement_link_widget/_widget1.html.erb index be4658e..5675cf5 100644 --- a/app/templates/nccu/widgets/announcement_link_widget/_widget1.html.erb +++ b/app/templates/nccu/widgets/announcement_link_widget/_widget1.html.erb @@ -7,7 +7,7 @@