Read the statement by Michael Teeuw here.
Is it possible to have CSS for normal screens and a custom CSS for 7in screen?
-
@Radnor see my comments above workaround for not defined at node_module load time
-
@Radnor css and config.js are different things… no way to change the filenames of the css files…
-
Getting really close!
My config file is:
var small_size = 800; var width = 0; try { width=outerWidth } catch(error){ } SNIP { module: "newsfeed", position: "bottom_bar", disabled: width > small_size ? false:true, config: { SNIP
On phone does not show. On laptop stuck at “Loading…”
-
@Radnor said in Is it possible to have CSS for normal screens and a custom CSS for 7in screen?:
disabled: width > small_size ? false:true,
because width =0
0 > 800 is false, so disabled=true
when loading the node_modules, so it doesn’t get loadedtry
var width=801
the node_helper might get loaded, but won’t execute cause they are waiting for module to send parmsthe value will be corrected on browser side
-
@sdetweil said in Is it possible to have CSS for normal screens and a custom CSS for 7in screen?:
@Radnor said in Is it possible to have CSS for normal screens and a custom CSS for 7in screen?:
disabled: width > small_size ? false:true,
because width =0
Dont think so. I started it up with DEV option. Loaded the config.js file in debugger hovered over the width and it showed 1280. Then hovered over the small_size and it showed 800. Then thought false and true might need double quotes because the rest in config has t/f in double quotes.
Thank you for sticking with me and getting this working I really appreciate your time. it is SO close.
-
I put in config width =801 and reran it. Same “Loading …”
And commented out try - catch block. -
@Radnor single or double quotes don’t matter, as long as both ends of the string have the same
I just set my code to
var width = 1920 // make it so on big screen they get enabled try { width=outerWidth } catch(error){ } var large_screen=1920 // expected size on computer
and the test for calendar at
module: "calendar", disabled: width< large_screen?true:false, // if the current screen is smaller than computer, disabled // you can flip too, ?false:true header: "US Holidays", position: "top_left",
-
@Radnor I had to fix the size for node_helper loading…
I have them enabled if big screen, disabled if small screen
-
@sdetweil better
var width = 801 try { width=outerWidth } catch(error){ } var small_screen=800
and module disabled
{ module: "calendar", disabled: width>small_screen ?false: true,
-
OK, I think the disabled has something to do with the newsfeed.
I have several config files. config_WORKING has modules alert, notify, clock, wx, wx forecast, calendar, and newsfeed.
I have config_CLOCK with modules clock, wx, and wx forecast. In this config I told it via disable: width > small ? false:true. On my laptop get all 3. on phone no forecast (which should not be there).
In the newsfeed module the disable test is messing it up.
I rename either WORKING or CLOCK to just config.js to test.