From 5861b8360eee380383e381ea76c784b9ea96cda3 Mon Sep 17 00:00:00 2001 From: rulingcom Date: Wed, 29 Mar 2023 11:55:59 +0800 Subject: [PATCH] Fix bug. --- assets/javascripts/app.js | 17 ++++++++++++----- assets/stylesheets/template/layout/header.scss | 18 ++++++++++-------- .../personal_journal/index_by_author.html.erb | 13 +++++++++++++ modules/personal_journal/info.json | 8 ++++++++ 4 files changed, 43 insertions(+), 13 deletions(-) create mode 100644 modules/personal_journal/index_by_author.html.erb diff --git a/assets/javascripts/app.js b/assets/javascripts/app.js index 7b5f3f9..c327560 100644 --- a/assets/javascripts/app.js +++ b/assets/javascripts/app.js @@ -484,7 +484,12 @@ } // 在所有的頁面(包含首頁)執行下面這幾個函數 - window.has_topest_banner = ($('[data-pp="300"] .w-ad-banner').length != 0); + if($('.header-banner .jp-jplayer').length == 0){ + $('.layout-header .header-banner .w-ba-banner').addClass('no-video'); + window.has_topest_banner = false; + }else{ + window.has_topest_banner = true; + } initdata1(); orbit.sitemenuDropdown(); orbit.goBackTop('top', 800); @@ -720,6 +725,9 @@ function transdate(){ window.clearTimeout(window.focus_timeout_id); } var _this = $(document.activeElement);//$(this); + if(_this.is('body')){ + return; + } if($('body').css('position') != 'fixed' && !_this.hasClass('close-screen-btn') && !_this.hasClass('navbar-toggle')){ var ele_offset = _this[0].getBoundingClientRect().top; if(_this.parents('.kenjohn.navFixed').length == 0) @@ -750,11 +758,10 @@ function transdate(){ //RWD 自動縮放headerbannner function headerH() { if ($(window).outerWidth() < 769) { - const navH = $('.layout-header .navbar-header').outerHeight(); - + const navH = $('.layout-header .navbar-header').outerHeight(); + } } - } - headerH(); + headerH(); $(window).resize(function() { headerH(); }) diff --git a/assets/stylesheets/template/layout/header.scss b/assets/stylesheets/template/layout/header.scss index 034b870..17e7af9 100644 --- a/assets/stylesheets/template/layout/header.scss +++ b/assets/stylesheets/template/layout/header.scss @@ -154,14 +154,16 @@ a#content{ position: absolute; } } - @media screen and (min-width: 769px){ - height: 100vh!important; - } - @media screen and(min-width:$screen-xs) and (max-width:768px){ - height: 1000px!important; - } - @media screen and (max-width: $screen-xs){ - height: 720px!important; + &:not(.no-video){ + @media screen and (min-width: 769px){ + height: 100vh!important; + } + @media screen and(min-width:$screen-xs) and (max-width:768px){ + height: 1000px!important; + } + @media screen and (max-width: $screen-xs){ + height: 720px!important; + } } } } diff --git a/modules/personal_journal/index_by_author.html.erb b/modules/personal_journal/index_by_author.html.erb new file mode 100644 index 0000000..972a947 --- /dev/null +++ b/modules/personal_journal/index_by_author.html.erb @@ -0,0 +1,13 @@ +

{{page-title}}

+
+
+

{{year}}

+
+

{{name}}

+
    +
  • {{title}}
  • +
+
+
+
+{{pagination_goes_here}} \ No newline at end of file diff --git a/modules/personal_journal/info.json b/modules/personal_journal/info.json index bdb0c2c..b3b2ea3 100644 --- a/modules/personal_journal/info.json +++ b/modules/personal_journal/info.json @@ -15,6 +15,14 @@ "en" : "2. List which includes search" }, "thumbnail" : "thumb.png" + }, + { + "filename" : "index_by_author", + "name" : { + "zh_tw" : "3. 作者論文", + "en" : "3. List by Author" + }, + "thumbnail" : "thumb.png" } ] } \ No newline at end of file