Author Topic: ALTUI : Theming, CSS  (Read 9404 times)

Offline NikV

  • Full Member
  • ***
  • Posts: 136
  • Karma: +2/-1
Re: ALTUI : Theming, CSS
« Reply #30 on: December 21, 2016, 01:53:40 pm »
examples from mine - openluup on rpi3

thanks to amg0


Offline amg0

  • Moderator
  • Sr. Hero Member
  • *****
  • Posts: 2879
  • Karma: +189/-8
Re: ALTUI : Theming, CSS
« Reply #31 on: March 06, 2017, 05:39:55 pm »
examples from mine - openluup on rpi3

thanks to amg0

great ! 
Any other good examples out there ?

Offline DesT

  • Sr. Member
  • ****
  • Posts: 332
  • Karma: +4/-1
Re: ALTUI : Theming, CSS
« Reply #32 on: April 23, 2018, 06:38:51 am »
amg0,

Having a little issue since a while.  The variable LocalBootstrap keep changing.

I tried:

/css/bootstrap.css
http://networkname/css/bootstrap.css

and it always change by adding ../ at the beginning...
Vera Edge-UI7/Plus-UI7 (2), DSC Partition (5 ) + Zones Sensors(31), Nest thermostat (1) & Protect Fire/CO (3), GE Sw (8 ), GE Dimr (14), FGMS-001 (2), ZW100 (2), RZCS4 (1), AL-DSC11 (1), Aeon HEM 2nd Edition (1), Aeon SSE (5), YRD220-ZW (1), SONOS (6), MyQ Chamberlain (1)
PINE64/openLuup/ALTUI/Rules

Offline amg0

  • Moderator
  • Sr. Hero Member
  • *****
  • Posts: 2879
  • Karma: +189/-8
Re: ALTUI : Theming, CSS
« Reply #33 on: April 23, 2018, 07:07:35 am »
amg0,

Having a little issue since a while.  The variable LocalBootstrap keep changing.

I tried:

/css/bootstrap.css
http://networkname/css/bootstrap.css

and it always change by adding ../ at the beginning...

it is to make sure it is a relative url ( so that it works when used in remote access context ).  I do not recall exactly how this works but I think your starting point is /etc/www and then it must be relative url (   remote access mode has a totally different url path to start with so absolute url wont work )

Code: [Select]
-- verify this starts by ../ to make sure it works for remote access
if (string.starts(localbootstrap,"../") == false) then
if (string.starts(localbootstrap,"/") == false) then
localbootstrap = ".."..localbootstrap
else
localbootstrap = "../"..localbootstrap
end
luup.variable_set(ALTUI_SERVICE, "LocalBootstrap", localbootstrap, lul_device)
end

Offline DesT

  • Sr. Member
  • ****
  • Posts: 332
  • Karma: +4/-1
Re: ALTUI : Theming, CSS
« Reply #34 on: April 23, 2018, 07:11:10 am »
So if my starting point is /etc/www

then my variable should be css/bootstrap.css
Vera Edge-UI7/Plus-UI7 (2), DSC Partition (5 ) + Zones Sensors(31), Nest thermostat (1) & Protect Fire/CO (3), GE Sw (8 ), GE Dimr (14), FGMS-001 (2), ZW100 (2), RZCS4 (1), AL-DSC11 (1), Aeon HEM 2nd Edition (1), Aeon SSE (5), YRD220-ZW (1), SONOS (6), MyQ Chamberlain (1)
PINE64/openLuup/ALTUI/Rules

Offline amg0

  • Moderator
  • Sr. Hero Member
  • *****
  • Posts: 2879
  • Karma: +189/-8
Re: ALTUI : Theming, CSS
« Reply #35 on: April 23, 2018, 07:23:17 am »
So if my starting point is /etc/www

then my variable should be css/bootstrap.css
I believe so . which would then get translated to ../css/bootstrap.css which should result to the same thing