where are the html files?

All the topics related to QLC+ on the Raspberry Pi
Post Reply
sk07ch
Posts: 4
Joined: Thu Jun 18, 2015 5:56 am
Real Name:

Hi Guys, Love the software on the pi! We have been using it for ages and its been great.
I am now looking to change the web interface slightly to fit onto smaller device screens. Maybe add a little bootstrap.

Looking through the files on the pi i have found all of the css and javascript files but i cant find any of the html files.
are these generated by the software ? or am i just looking in the wrong place?

Any help would be great. thanks!
janosvitok
Posts: 1330
Joined: Mon Apr 13, 2015 7:05 am
Location: Bratislava, Slovakia
Real Name: Jano Svitok
Contact:

User avatar
mcallegari
Posts: 4807
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

The HTML code is generated dynamically by QLC+, but you can modify the CSS/JS files if you like. They're in

Code: Select all

/usr/share/qlcplus/web/
sk07ch
Posts: 4
Joined: Thu Jun 18, 2015 5:56 am
Real Name:

Thanks for the replies guys. My main goal is to change the main page so i can fit it nicely onto a phone screen.
is there any way i can add a html file? and clone the generated code?
i briefly tried adding a html page to the directory with the css and js files but cant seem t access it. is there a directory where i could add html files and access them over the browser?

Thanks
plugz
Posts: 637
Joined: Sun Apr 12, 2015 6:30 pm
Real Name: David

The HTML code is generated dynamically by QLC+, but you can modify the CSS/JS files if you like. They're in

Code: Select all

/usr/share/qlcplus/web/
This means no, you can't just put an html file in a directory and expect it to be distributed by QLC+.

QLC+ is not an apache web server.

You will either have to play with the css/js files, or change the C++ code and recompile QLC+ yourself.
User avatar
mcallegari
Posts: 4807
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

plugz wrote:QLC+ is not an apache web server.
It's not Apache, but it is Mongoose web server :)
If you put something like:

Code: Select all

  else if (QString(conn->uri).endsWith(".html"))
  {
      QString clUri = QString(conn->uri).mid(1);
      if (sendFile(conn, QString("%1%2%3").arg(QLCFile::systemDirectory(WEBFILESDIR).path())
                   .arg(QDir::separator()).arg(clUri), "text/html") == true)
          return MG_TRUE;
  }
After https://github.com/mcallegari/qlcplus/b ... s.cpp#L274
it should redistribute HTML files as well.

Anyway, just playing with the virtualconsole.css file should be enough to adapt the pages to the screen size
sk07ch
Posts: 4
Joined: Thu Jun 18, 2015 5:56 am
Real Name:

Thanks heaps guys. One last thing, where can webaccess.cpp be found?

Thanks
User avatar
mcallegari
Posts: 4807
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

Post Reply