diff --git a/app/assets/javascripts/archive/pdf/viewer.js b/app/assets/javascripts/archive/pdf/viewer.js index eedc602..b311f02 100644 --- a/app/assets/javascripts/archive/pdf/viewer.js +++ b/app/assets/javascripts/archive/pdf/viewer.js @@ -114,6 +114,7 @@ ; +window.lang = document.getElementsByTagName('html')[0].getAttribute('lang'); var pdfjsWebApp, pdfjsWebAppOptions; { pdfjsWebApp = __webpack_require__(1); @@ -9126,8 +9127,10 @@ var PDFOutlineViewer = /*#__PURE__*/function () { this._bindLink(element, item); this._setStyles(element, item); - element.textContent = (0, _pdfjsLib.removeNullCharacters)(item.title) || DEFAULT_TITLE; + if(element.textContent.trim() == ""){ + element.textContent = (window.lang == "zh_tw" ? "投影片編號 " : "Slide ") + (outlineCount + 1); + } div.appendChild(element); if (item.items.length > 0) { diff --git a/app/assets/stylesheets/archive/download_file.css b/app/assets/stylesheets/archive/download_file.css index f917370..d7810e3 100644 --- a/app/assets/stylesheets/archive/download_file.css +++ b/app/assets/stylesheets/archive/download_file.css @@ -13,4 +13,18 @@ img{ } h3{ display: none; +} +a { + text-decoration: none; + color: #333; +} +a:hover { + text-decoration: underline; + color: #666; +} +.wrap_block{ + top: 50%; + left: 50%; + transform: translate(-50%,-50%); + position: absolute; } \ No newline at end of file diff --git a/app/controllers/archives_controller.rb b/app/controllers/archives_controller.rb index f194b67..3c67362 100644 --- a/app/controllers/archives_controller.rb +++ b/app/controllers/archives_controller.rb @@ -225,7 +225,11 @@ class ArchivesController < ApplicationController if @ext == "png" || @ext == "jpg" || @ext == "bmp" || @ext == "pdf" render "download_file",:layout=>false else - send_file(@path) + if (current_site.accessibility_mode rescue false) + render "redirect_to_file",:layout=>false + else + send_file(@path) + end end rescue redirect_to @url diff --git a/app/views/archives/redirect_to_file.html.erb b/app/views/archives/redirect_to_file.html.erb new file mode 100644 index 0000000..0968d5c --- /dev/null +++ b/app/views/archives/redirect_to_file.html.erb @@ -0,0 +1,17 @@ + +
++ <%=t('close')%> +
+