diff --git a/assets/javascripts/app.js b/assets/javascripts/app.js index d1a14b4..4c2a9dc 100644 --- a/assets/javascripts/app.js +++ b/assets/javascripts/app.js @@ -2100,76 +2100,7 @@ $(document).ready(function () { // 預設 aria-expanded 為 false $(".searchbtn2").attr("aria-expanded", "false"); }); - //強制保持全站search展開 -$(document).ready(function () { - //search移位 - function moveSearchIfWide() { - if ($('.input-search').is(':focus')) return; - - if ($(window).width() > 769) { - // 如果已經在正確位置就不動 - if (!$('.modules-menu-level-0 .searchclass').length) { - $('.searchclass').appendTo('.header-nav'); - } - } else { - - $('.navbar-brand').after($('.searchclass')); - - } - } - - $(document).ready(moveSearchIfWide); - $(window).on('resize', moveSearchIfWide); - - const $searchBox = $('.search-box'); - const $input = $searchBox.find('.input-search'); - const $btn = $('.btn-search'); - - // 點擊 btn 時:若未展開則展開,展開後才可送出 - $btn.on('click', function (e) { - if (!$searchBox.hasClass('searching')) { - e.preventDefault(); // 第一次點擊不送出 - // 延遲讓 Android 不會立即 blur - setTimeout(() => { - $searchBox.addClass('searching'); - $input[0].focus(); // 用 DOM 方式較穩 - }, 100); - } else if (!$input.val().trim()) { - // 沒有輸入值 → 不送出,focus 回去 - e.preventDefault(); - $input[0].focus(); - } - // 有輸入值就正常送出 - }); - - // 點外面收起(無字才收) - $(document).on('click touchstart', function (e) { - if ( - !$searchBox.is(e.target) && - $searchBox.has(e.target).length === 0 && - !$input.val().trim() - ) { - $searchBox.removeClass('searching'); - } - }); - - // focus 時延遲加 .searching,避免 Android 被打斷 - $input.on('focus', function () { - setTimeout(() => { - $searchBox.addClass('searching'); - }, 50); - }); - - // blur 時延遲移除 .searching,避免太早發生 - $input.on('blur', function () { - setTimeout(() => { - if (!$input.val().trim()) { - $searchBox.removeClass('searching'); - } - }, 150); - }); - }); // 當文件物件模型(DOM)載入後,執行init函數 $(document).ready(function() { //常用到的js diff --git a/assets/stylesheets/template/modules/archives.scss b/assets/stylesheets/template/modules/archives.scss index db6307c..b699c11 100644 --- a/assets/stylesheets/template/modules/archives.scss +++ b/assets/stylesheets/template/modules/archives.scss @@ -7,15 +7,6 @@ // // Widget // ## gerenral styles -.i-archive{ - dd{ - margin-bottom: 0.5em; - width: 100%; - } -} -.i-archive__file-wrap{ - font-size: 1.2em; -} .i-archive__list{ .date-thead{ min-width: 4em; @@ -27,7 +18,6 @@ } } .i-items{ - border: 1px solid #ccc; @media(min-width: 768px){ background-color: #fff; } @@ -52,6 +42,9 @@ @extend .unity-title; } } +.i-archive-item-title{ + font-weight: normal; +} .panel-title{ @extend .i-title; } @@ -60,6 +53,10 @@ .w-archive__list.level-1 { padding: 0.5rem; } + .widget-archive-files-item { + padding: 1em; + display: inline-block; + } .w-archive__item.level-1 { list-style-position: inside; @@ -151,6 +148,7 @@ .i-archive-title { @extend .unity-title; } +/* 2. 對應的檔案顏色 (轉為 iOS 半透明色調) */ .link { background-color: #1368d4 !important; margin-left: 0.5em; } /* 對比 4.6:1 */ .txt { background-color: #3a8a40 !important; margin-left: 0.5em; } /* 對比 4.6:1 */ .xlsx { background-color: #9e3050 !important; margin-left: 0.5em; } /* 對比 4.6:1 */ @@ -171,12 +169,10 @@ font-family: $main-font; .i-archive__item-wrap{ - border-bottom: 1px solid #ccc; - padding-bottom: 1em; - padding-top: 1em; - &:last-child{ - border-bottom: 0; - } + border: 1px solid #ccc; + margin-bottom: 20px; + box-shadow: 0 1px 1px rgba(0, 0, 0, .05); + padding: 15px; } .i-archive__archive-title { @@ -196,6 +192,7 @@ list-style: none; } + .i-archive__category-list {} .i-archive__category-title { padding-bottom: 0.3125em; @@ -207,12 +204,13 @@ } .i-archive__file-list { + display: block; margin-bottom: 0; } .i-archive__file-wrap { margin:0; - padding:0 0 0.5em 0; + padding:0.5em 0 0; border-radius: 0.125em; } @@ -410,6 +408,7 @@ margin-bottom: 1.5em; position: relative; background: #fff; + border-radius: 5px; } .head{ @media(min-width: 821px){ diff --git a/modules/archive/_archive_widget2.html.erb b/modules/archive/_archive_widget2.html.erb index 2a6cd4d..3bdcf62 100644 --- a/modules/archive/_archive_widget2.html.erb +++ b/modules/archive/_archive_widget2.html.erb @@ -6,7 +6,7 @@

-

diff --git a/modules/archive/_archive_widget3.html.erb b/modules/archive/_archive_widget3.html.erb index 7eaaadf..275e169 100644 --- a/modules/archive/_archive_widget3.html.erb +++ b/modules/archive/_archive_widget3.html.erb @@ -10,7 +10,7 @@ diff --git a/modules/archive/_archive_widget4.html.erb b/modules/archive/_archive_widget4.html.erb index f322849..4c5436c 100644 --- a/modules/archive/_archive_widget4.html.erb +++ b/modules/archive/_archive_widget4.html.erb @@ -7,7 +7,7 @@

- diff --git a/modules/archive/archive_index1.html.erb b/modules/archive/archive_index1.html.erb index 39c0a75..9eaf312 100644 --- a/modules/archive/archive_index1.html.erb +++ b/modules/archive/archive_index1.html.erb @@ -16,9 +16,7 @@ {{description}}
- - {{file-name}} - {{file-type}} + {{file-name}}{{file-type}}

@@ -26,19 +24,3 @@
- \ No newline at end of file diff --git a/modules/archive/archive_index10.html.erb b/modules/archive/archive_index10.html.erb index f9752db..fc47cef 100644 --- a/modules/archive/archive_index10.html.erb +++ b/modules/archive/archive_index10.html.erb @@ -16,14 +16,13 @@ {{idx}} - {{archive-title}} + {{archive-title}} {{status}} - - {{description}} + - {{file-type}} + {{file-type}} @@ -31,23 +30,3 @@
- \ No newline at end of file diff --git a/modules/archive/archive_index11.html.erb b/modules/archive/archive_index11.html.erb index 8b7ab7c..5c43d9d 100644 --- a/modules/archive/archive_index11.html.erb +++ b/modules/archive/archive_index11.html.erb @@ -1,4 +1,4 @@ -
+

{{page-title}}

@@ -23,7 +23,7 @@ {{file-name}} - {{file-type}} + {{file-type}} @@ -32,23 +32,3 @@
- \ No newline at end of file diff --git a/modules/archive/archive_index12.html.erb b/modules/archive/archive_index12.html.erb index 705b2c1..d6f9ca9 100644 --- a/modules/archive/archive_index12.html.erb +++ b/modules/archive/archive_index12.html.erb @@ -1,69 +1,44 @@ -
+

{{page-title}}

-
+
-
-
-
- {{archive-title}} +
+
+ {{archive-title}} {{status}} - {{description}} -
-
+ +
{{file-name}} - {{file-type}} + {{file-type}}
-
-
-
+ +
{{link_to_edit}}
-
+
\ No newline at end of file diff --git a/modules/archive/archive_index13.html.erb b/modules/archive/archive_index13.html.erb index 7aeabe0..42e6dc3 100644 --- a/modules/archive/archive_index13.html.erb +++ b/modules/archive/archive_index13.html.erb @@ -11,20 +11,20 @@
{{link_to_edit}} @@ -32,34 +32,9 @@
\ No newline at end of file diff --git a/modules/archive/archive_index16.html.erb b/modules/archive/archive_index16.html.erb index 17640c9..69ffe02 100644 --- a/modules/archive/archive_index16.html.erb +++ b/modules/archive/archive_index16.html.erb @@ -8,7 +8,7 @@

{{created_at}}
- diff --git a/modules/archive/archive_index2.html.erb b/modules/archive/archive_index2.html.erb index 110cf74..9f683da 100644 --- a/modules/archive/archive_index2.html.erb +++ b/modules/archive/archive_index2.html.erb @@ -1,61 +1,42 @@
-

+

{{page-title}} -

+

-
-
-
+
+
{{archive-title}} {{status}} - {{description}} -
-
+ +
{{file-name}} - {{file-type}} + {{file-type}}
-
-
-
+ +
{{link_to_edit}}
diff --git a/modules/archive/archive_index3.html.erb b/modules/archive/archive_index3.html.erb index a9545e2..a0ed9e8 100644 --- a/modules/archive/archive_index3.html.erb +++ b/modules/archive/archive_index3.html.erb @@ -1,7 +1,7 @@
-

+

{{page-title}} -

+
- - \ No newline at end of file + \ No newline at end of file diff --git a/modules/archive/archive_index4.html.erb b/modules/archive/archive_index4.html.erb index 9f03e47..6d6095f 100644 --- a/modules/archive/archive_index4.html.erb +++ b/modules/archive/archive_index4.html.erb @@ -6,54 +6,29 @@

-

-
-
-
+
+
{{status}} - {{description}} +
+
{{file-name}} - {{file-type}} + {{file-type}}
-
-
-
+ +
- {{link_to_edit}} + {{link_to_edit}} - - + \ No newline at end of file diff --git a/modules/archive/archive_index5.html.erb b/modules/archive/archive_index5.html.erb index d0340cf..5263026 100644 --- a/modules/archive/archive_index5.html.erb +++ b/modules/archive/archive_index5.html.erb @@ -15,14 +15,13 @@
{{created_at}}
- {{archive-title}} + {{archive-title}} - {{status}} - - {{description}} + {{status}} +
- {{file-type}} + {{file-type}}
@@ -38,22 +37,4 @@ if( window.location.href.indexOf('/en/') > -1 ) { $('.title-thead').replaceWith('
Title
') $('.file-thead').replaceWith('
Download file
') } - - \ No newline at end of file + \ No newline at end of file diff --git a/modules/archive/archive_index6.html.erb b/modules/archive/archive_index6.html.erb index 79fb38e..2c46edf 100644 --- a/modules/archive/archive_index6.html.erb +++ b/modules/archive/archive_index6.html.erb @@ -1,48 +1,46 @@ -
-

+
+

{{page-title}}

-
    -
  • -

    {{category-title}}

    -
    -
    -
    -
    {{created_at}}
    - {{archive-title}} - - {{status}} - -
    - {{description}} -
    -
    - - {{file-name}} - {{file-type}} -
    -
    +
    +

    {{category-title}}

    +
    +
    +
    上傳日期
    +
    標題
    +
    檔案下載
    +
    +
    +
    +
    +
    {{created_at}}
    +
    +
    +
    + {{file-name}} + + {{status}} + +
    +
    +
    +
    + +
    +
    +
    -
    -
  • -
+
+

+ - \ No newline at end of file + \ No newline at end of file diff --git a/modules/archive/archive_index7.html.erb b/modules/archive/archive_index7.html.erb index 79cb3d8..e4216af 100644 --- a/modules/archive/archive_index7.html.erb +++ b/modules/archive/archive_index7.html.erb @@ -1,51 +1,54 @@ -
+

{{page-title}}

- -
-

{{category-title}}

-
- -
-
- -
-
-
- {{link_to_edit}} +
+

{{category-title}}

+ + + + + + + + + + + + + + + + {{status}} + + + + + +
{{date-head}}{{title-head}}{{description-head}}{{file-head}}
{{created_at}}{{archive-title}}{{description}} + {{file-type}} +
-
+ + + diff --git a/modules/archive/archive_index8.html.erb b/modules/archive/archive_index8.html.erb index db0d78b..f6e3cc6 100644 --- a/modules/archive/archive_index8.html.erb +++ b/modules/archive/archive_index8.html.erb @@ -1,48 +1,40 @@ -
-

+
+

{{page-title}}

-
    -
  • -

    {{category-title}}

    -
    -
    -
    - {{archive-title}} - - {{status}} - - {{description}} -
    -
    -
    - {{file-type}} -
    -
    +
    +

    {{category-title}}

    +
    +
    +
    {{date-head}}
    +
    {{title-head}}
    +
    {{description-head}}
    +
    {{file-head}}
    +
    +
    +
    +
    +
    {{created_at}}
    +
    +
    +
    + {{file-name}} + + {{status}} + +
    +
    +
    +
    {{description}}
    +
    + +
    +
    +
    -
    -
  • -
-
- \ No newline at end of file +

+
+
+ \ No newline at end of file diff --git a/modules/archive/archive_index9.html.erb b/modules/archive/archive_index9.html.erb index 2b036d8..b92f33c 100644 --- a/modules/archive/archive_index9.html.erb +++ b/modules/archive/archive_index9.html.erb @@ -19,7 +19,7 @@ {{file-name}} - {{file-type}} + {{file-type}} @@ -28,20 +28,3 @@ - \ No newline at end of file diff --git a/modules/archive/info.json b/modules/archive/info.json index 082794a..a1dd43e 100644 --- a/modules/archive/info.json +++ b/modules/archive/info.json @@ -1,97 +1,73 @@ { "frontend": [ - { - "filename": "archive_index2", - "name": { - "zh_tw": "A1. 手風琴式列表 ( 類別折疊,(左)檔案室標題與說明,(右)檔名及Icon)", - "en": "2. Accordion list (widget-title, category, filename, download link)" - }, - "thumbnail": "ar2.png" - }, - { - "filename": "archive_index12", - "name": { - "zh_tw": "A1-1. 手風琴式列表 ( 類別折疊,(上)檔案室標題與說明,(下)檔名及Icon)", - "en": "12. Accordion list - with drop down (widget-title, category, filename, download link)" - }, - "force_cover": "true", - "thumbnail": "ar12.png" - }, - { - "filename": "archive_index4", - "name": { - "zh_tw": "A2. 手風琴式列表 ( 類別折疊, 檔案室說明, 檔名Icon)", - "en": "4. Accordion list(no filename) (widget-title, category, download link)" - }, - "thumbnail": "ar4.png" - }, - { - "filename": "archive_index14", - "name": { - "zh_tw": "A3. 手風琴式列表 ( 類別折疊, 檔案室說明, 檔名Icon)", - "en": "14. Accordion list - with drop down - For every data (widget-title, title, filename, download link)" - }, - "force_cover": "true", - "thumbnail": "ar14.png" - }, - { - "filename": "archive_index7", - "name": { - "zh_tw": "A4. 手風琴式列表 ( 類別區塊, 檔案室標題折疊, 檔案室說明, 檔名Icon)", - "en": "7. Table list (widget-title, category, Updated At, filename, download link)" - }, - "thumbnail": "ar7.png" - }, - - - { "filename": "archive_index1", "name": { - "zh_tw": "L1. 條列式列表 ( 類別區塊, 檔案室標題, 檔案室說明, 檔名Icon )", + "zh_tw": "1. 列表 ( 模組標題, 類別標題, 檔案名稱, 下載連結 )", "en": "1. List (widget-title, category, filename, download link)" }, "thumbnail": "ar1.png" }, + { + "filename": "archive_index2", + "name": { + "zh_tw": "2. 手風琴式列表 ( 模組標題, 類別標題, 檔案名稱, 下載連結 )", + "en": "2. Accordion list (widget-title, category, filename, download link)" + }, + "thumbnail": "ar2.png" + }, { "filename": "archive_index3", "name": { - "zh_tw": "L2. 條列式列表 ( 類別區塊, 檔案室說明, 檔名Icon )", + "zh_tw": "3. 列表( 無檔案名稱 ) ( 模組標題, 類別標題, 下載連結 )", "en": "3. List(no filename) (widget-title, category, download link)" }, "thumbnail": "ar3.png" }, { - "filename": "archive_index8", + "filename": "archive_index4", "name": { - "zh_tw": "L3. 條列式列表 ( 類別區塊, 檔案室標題及說明, Icon)", - "en": "8. Table list (widget-title, Updated At, filename, download link)" + "zh_tw": "4. 手風琴式列表( 無檔案名稱 ( 模組標題, 類別標題, 下載連結 )", + "en": "4. Accordion list(no filename) (widget-title, category, download link)" }, - "thumbnail": "ar8.png" + "thumbnail": "ar4.png" + }, + { + "filename": "archive_index5", + "name": { + "zh_tw": "5. 表格列表 ( 模組標題, 類別標題, 檔案名稱, 下載連結 )", + "en": "5. Table list (widget-title, category, filename, download link)" + }, + "thumbnail": "ar5.png" }, { "filename": "archive_index6", "name": { - "zh_tw": "L4. 條列式列表 ( 類別區塊, 檔案室日期, 檔名Icon檔案室說明)", + "zh_tw": "6. 表格列表 ( 模組標題, 檔案名稱, 下載連結 )", "en": "6. Table list (widget-title, filename, download link)" }, - "thumbnail": "ar6.png" + "thumbnail": "ar5.png" }, - - - { - "filename": "archive_index5", + "filename": "archive_index7", "name": { - "zh_tw": "G1. 表格式列表 ( 類別區塊, 檔案室日期, 檔案室標題, 檔案室說明, Icon)", - "en": "5. Table list (widget-title, category, filename, download link)" + "zh_tw": "7. 表格列表 ( 模組標題, 類別標題, 上傳日期, 檔案名稱, 檔案簡介, 下載連結 )", + "en": "7. Table list (widget-title, category, Updated At, filename, download link)" + }, + "thumbnail": "ar5.png" + }, + { + "filename": "archive_index8", + "name": { + "zh_tw": "8. 表格列表 ( 模組標題, 上傳日期, 檔案名稱, 檔案簡介, 下載連結 )", + "en": "8. Table list (widget-title, Updated At, filename, download link)" }, "thumbnail": "ar5.png" }, { "filename": "archive_index9", "name": { - "zh_tw": "G2. 表格式列表 ( 類別區塊, 檔名, Icon )", + "zh_tw": "9. 表格列表 - 簡約 ( 模組標題, 檔案名稱, 下載連結 )", "en": "9. Table list - Simple (widget-title, filename, download link)" }, "force_cover": "true", @@ -100,25 +76,32 @@ { "filename": "archive_index10", "name": { - "zh_tw": "G3. 表格式列表 ( 類別區塊, 編號, 檔案室標題, 檔案室說明, Icon)", + "zh_tw": "10. 表格列表 ( 模組標題, 類別標題, 編號, 檔案名稱, 下載連結 )", "en": "10. Table list (widget-title, category, Serial Number, filename, download link)" }, - "thumbnail": "ar10.png" + "thumbnail": "ar5.png" }, { "filename": "archive_index11", "name": { - "zh_tw": "G4. 表格式列表 ( 類別區塊, 編號, 檔名, Icon)", + "zh_tw": "11. 表格列表 - 簡約 - 展開檔案 ( 模組標題, 類別標題, 編號, 檔案名稱, 下載連結 )", "en": "11. Table list - Simple - Unfold Files (widget-title, category, Serial Number, filename, download link)" }, - "thumbnail": "ar11.png" + "thumbnail": "ar9.png" + }, + { + "filename": "archive_index12", + "name": { + "zh_tw": "12. 手風琴式列表 - 有下拉 ( 模組標題, 類別標題, 檔案名稱, 下載連結 )", + "en": "12. Accordion list - with drop down (widget-title, category, filename, download link)" + }, + "force_cover": "true", + "thumbnail": "ar2.png" }, - - { "filename": "archive_index13", "name": { - "zh_tw": "T1. 頁籤式 ( 類別頁籤, 檔案室標題, 檔案室說明, Icon)", + "zh_tw": "13. 頁籤式 ( 模組標題, 類別標題, 標題, 下載連結, 描述 )", "en": "13. Tab list (widget-title, category, title, download link, description)" }, "old_name": { @@ -126,16 +109,34 @@ "en": "13. Tab list (widget-title, category, title, filename, download link, description)" }, "force_cover": "true", - "thumbnail": "ar13.png" + "thumbnail": "ar-tab1.png" + }, + { + "filename": "archive_index14", + "name": { + "zh_tw": "14. 手風琴式列表 - 有下拉 - 針對各筆資料 ( 模組標題, 標題, 檔案名稱, 下載連結 )", + "en": "14. Accordion list - with drop down - For every data (widget-title, title, filename, download link)" + }, + "force_cover": "true", + "thumbnail": "ar2.png" }, { "filename": "archive_index15", "name": { - "zh_tw": "T2. 頁籤式 ( 類別頁籤, 檔案室標題, 檔案室說明, 檔名Icon)", + "zh_tw": "15. 頁籤式 ( 模組標題, 類別標題, 標題, 完整檔案名稱, 下載連結, 描述 )", "en": "15. Tab list (widget-title, category, title, full filename, download link, description)" }, "force_cover": "true", - "thumbnail": "ar15.png" + "thumbnail": "ar-tab1.png" + }, + { + "filename": "archive_index16", + "name": { + "zh_tw": "16. 手風琴式列表 - 有下拉 - 針對各筆資料 ( 模組標題, 標題, 檔案名稱, 下載連結 )", + "en": "16. Accordion list - with drop down - For every data (date,widget-title, title, filename, download link)" + }, + "force_cover": "true", + "thumbnail": "ar2.png" } ], "widgets": [ diff --git a/modules/archive/thumbs/ar1.png b/modules/archive/thumbs/ar1.png index 6ee5487..e7cc100 100644 Binary files a/modules/archive/thumbs/ar1.png and b/modules/archive/thumbs/ar1.png differ diff --git a/modules/archive/thumbs/ar2.png b/modules/archive/thumbs/ar2.png index 03c113e..751fed2 100644 Binary files a/modules/archive/thumbs/ar2.png and b/modules/archive/thumbs/ar2.png differ diff --git a/modules/archive/thumbs/ar3.png b/modules/archive/thumbs/ar3.png index e36ff57..723ba3a 100644 Binary files a/modules/archive/thumbs/ar3.png and b/modules/archive/thumbs/ar3.png differ diff --git a/modules/archive/thumbs/ar4.png b/modules/archive/thumbs/ar4.png index a3307e5..2a7c106 100644 Binary files a/modules/archive/thumbs/ar4.png and b/modules/archive/thumbs/ar4.png differ diff --git a/modules/archive/thumbs/ar5.png b/modules/archive/thumbs/ar5.png index d5c5eee..1790944 100644 Binary files a/modules/archive/thumbs/ar5.png and b/modules/archive/thumbs/ar5.png differ diff --git a/modules/archive/thumbs/ar9.png b/modules/archive/thumbs/ar9.png index 72d67fc..8b11bb7 100644 Binary files a/modules/archive/thumbs/ar9.png and b/modules/archive/thumbs/ar9.png differ