diff --git a/.gitignore b/.gitignore index bc22f48bbd5..97d1a6b9302 100644 --- a/.gitignore +++ b/.gitignore @@ -54,7 +54,7 @@ bootsnap-compile-cache/ !/plugins/discourse-narrative-bot !/plugins/discourse-presence !/plugins/discourse-local-dates -!/plugins/discourse-internet-explorer +!/plugins/discourse-unsupported-browser /plugins/*/auto_generated/ /spec/fixtures/plugins/my_plugin/auto_generated diff --git a/app/assets/javascripts/browser-detect.js b/app/assets/javascripts/browser-detect.js index bdbbc27b3ef..c13298dbb4f 100644 --- a/app/assets/javascripts/browser-detect.js +++ b/app/assets/javascripts/browser-detect.js @@ -1,3 +1,12 @@ if (!window.WeakMap || !window.Promise) { window.unsupportedBrowser = true; +} else { + // Some implementations of `WeakMap.prototype.has` do not accept false + // values and Ember's `isClassicDecorator` sometimes does that (it only + // checks for `null` and `undefined`). + try { + new WeakMap().has(0); + } catch (err) { + window.unsupportedBrowser = true; + } } diff --git a/app/assets/stylesheets/common/base/_topic-list.scss b/app/assets/stylesheets/common/base/_topic-list.scss index 5b9cff00763..01fc70a2bb2 100644 --- a/app/assets/stylesheets/common/base/_topic-list.scss +++ b/app/assets/stylesheets/common/base/_topic-list.scss @@ -142,6 +142,12 @@ } } + .link-bottom-line { + .category-name { + margin-right: 12px; + } + } + .unread-indicator { &.read { display: none; diff --git a/app/assets/stylesheets/common/base/crawler_layout.scss b/app/assets/stylesheets/common/base/crawler_layout.scss index 8f42f9ae0bd..c0ca9315100 100644 --- a/app/assets/stylesheets/common/base/crawler_layout.scss +++ b/app/assets/stylesheets/common/base/crawler_layout.scss @@ -21,12 +21,6 @@ body.crawler { } } - .raw-topic-link { - display: block; - font-weight: bold; - margin-bottom: 0.25em; - } - .topic-list { margin-bottom: 1em; } @@ -34,6 +28,14 @@ body.crawler { footer { margin-top: 4em; } + + .category-title { + color: $primary; + } + + .discourse-tags { + color: $primary-medium; + } } .noscript-footer-nav { @@ -47,10 +49,7 @@ body.crawler { #noscript-footer { padding: 0 10px; -} - -.crawler-topic-title { - margin-top: 0.5em; + text-align: center; } .crawler-post { @@ -86,27 +85,6 @@ body.crawler { } } -#breadcrumbs { - margin-bottom: 0.5em; - font-size: $font-up-1; - > div { - margin-bottom: 0.15em; - } - .badge-category-bg { - background-color: $secondary-high; - } - .category-title { - color: $primary; - } -} - -.crawler-tags-list { - span { - display: block; - margin-bottom: 0.15em; - } -} - .crawler-linkback-list { margin-top: 1em; a { diff --git a/app/helpers/topics_helper.rb b/app/helpers/topics_helper.rb index 4f4a56b6e7c..00204236218 100644 --- a/app/helpers/topics_helper.rb +++ b/app/helpers/topics_helper.rb @@ -12,9 +12,9 @@ module TopicsHelper category = topic.category if category && !category.uncategorized? - breadcrumb.push(url: category.url, name: category.name) + breadcrumb.push(url: category.url, name: category.name, color: category.color) while category = category.parent_category - breadcrumb.prepend(url: category.url, name: category.name) + breadcrumb.prepend(url: category.url, name: category.name, color: category.color) end end diff --git a/app/views/layouts/crawler.html.erb b/app/views/layouts/crawler.html.erb index e8fc43c0231..b5a83455506 100644 --- a/app/views/layouts/crawler.html.erb +++ b/app/views/layouts/crawler.html.erb @@ -34,13 +34,13 @@ <%= yield %>