mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-22 05:58:07 +01:00
Merge commit 'c6684aa1e392f2dd86af4362b4259809549abaad' into glitch-soc/merge-upstream
Conflicts: - `app/views/layouts/application.html.haml`: Upstream changed how the `inert.css` file is included. The conflict is caused by glitch-soc's theming system. Ported the upstream change. Additional changes: - `config/webpack/shared.js`: bypass glitch-soc's theming system for `inert` pack.
This commit is contained in:
commit
60298af3c4
4 changed files with 15 additions and 3 deletions
4
app/javascript/packs/inert.js
Normal file
4
app/javascript/packs/inert.js
Normal file
|
@ -0,0 +1,4 @@
|
|||
/* Placeholder file to have `inert.scss` compiled by Webpack
|
||||
This is used by the `wicg-inert` polyfill */
|
||||
|
||||
import '../styles/inert.scss';
|
|
@ -1,3 +1,5 @@
|
|||
/* This is needed for the wicg-inert polyfill */
|
||||
|
||||
[inert] {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
|
@ -27,6 +27,10 @@
|
|||
%title= html_title
|
||||
|
||||
= javascript_pack_tag 'common', crossorigin: 'anonymous'
|
||||
|
||||
-# Needed for the wicg-inert polyfill. It needs to be on it's own <style> tag, with this `id`
|
||||
= stylesheet_pack_tag 'inert', media: 'all', id: 'inert-style'
|
||||
|
||||
- if @theme
|
||||
- if @theme[:supported_locales].include? I18n.locale.to_s
|
||||
= preload_pack_asset "locales/#{@theme[:flavour]}/#{I18n.locale}-json.js"
|
||||
|
@ -35,8 +39,6 @@
|
|||
= csrf_meta_tags unless skip_csrf_meta_tags?
|
||||
%meta{ name: 'style-nonce', content: request.content_security_policy_nonce }
|
||||
|
||||
= stylesheet_link_tag '/inert.css', skip_pipeline: true, media: 'all', id: 'inert-style'
|
||||
|
||||
= yield :header_tags
|
||||
|
||||
-# These must come after :header_tags to ensure our initial state has been defined.
|
||||
|
|
|
@ -54,7 +54,11 @@ const entries = Object.assign(
|
|||
|
||||
|
||||
module.exports = {
|
||||
entry: entries,
|
||||
entry: {
|
||||
...entries,
|
||||
// this is cursed, but bypass glitch-soc's theming system for this one
|
||||
inert: './app/javascript/packs/inert.js',
|
||||
},
|
||||
|
||||
output: {
|
||||
filename: 'js/[name]-[chunkhash].js',
|
||||
|
|
Loading…
Reference in a new issue