ember-web-app icon indicating copy to clipboard operation
ember-web-app copied to clipboard

theme_color in manifest but not index.html

Open topaxi opened this issue 6 years ago • 2 comments

Is there a way to define the theme_color in the manifest only? I'm setting the theme_color meta element programmatically through ember-cli-head depending on my backgrounds and don't want a duplicate meta element in my head.

topaxi avatar Oct 16 '17 20:10 topaxi

There's no way to disable the generation of the theme_color meta at the moment. Sorry about that.

Is there a possibility that you use the theme_color generated by ember-web-app and update it when the ember app boots? Instead of using ember-cli-head.

I guess we could offer a blacklist mechanism on this addon to avoid generating unwanted meta tags, maybe through ember-cli-build.js config flag...

var EmberApp = require('ember-cli/lib/broccoli/ember-app');

module.exports = function(defaults) {
  var options = {
    'ember-web-app': {
      'disable-theme-meta': true
    }
  };

  var app = new EmberApp(defaults, options);

  return app.toTree();
};

or something like this.

Maybe we should think on a way to disable fallbacks altogether.

san650 avatar Oct 16 '17 21:10 san650

I thought of updating it manually, but that would require DOM manipulation which is not available in FastBoot. Would definitely be nice to blacklist unwanted meta tags.

Maybe have an override for each target?

module.exports = function() {
  return {
    name: "Theme color manifest",
    theme_color: "#ffa105",

    apple: {
      statusBarStyle: 'black-translucent'
    },

    html: { // or `meta`
      theme_color: null
    }
  }
}

topaxi avatar Oct 17 '17 05:10 topaxi