O'Reilly logo

Raspberry Pi Blueprints by Dan Nixon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The web application

The web application we will use for the mirror is essentially a framework built using Flask, which provides a common interface for individual widgets displayed on the mirror. In order to get the desired effect where the widgets are visible through the mirror, the page must have a black background with white text and graphics. For best results, the text should be as large as possible so that it allows maximum light to pass through the mirror's surface.

Developing a new widget

Each type of widget that can be shown on the mirror is comprised of four files:

  • A server-side (Python) script file (widgets/CLASSNAME.py)
  • A Jinja-style template file (templates/widgets/CLASSNAME.html)
  • A CSS file (static/widgets/CLASSNAME/style.css)
  • A client-side ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required