fuel9 / DisplayMonkey

Display Monkey digital signage solution
Other
126 stars 50 forks source link

Background image in Templates #96

Open maintenancedirector opened 5 years ago

maintenancedirector commented 5 years ago

Hi there, I have a question regarding styling a template. Is it possible to add a background image to a template? I'd like to find an easy way to create memo frames with their own backgrounds separate from the canvas background. Also, my coding knowledge is virtually nonexistent. Any help or advice would be greatly appreciated, Thanks.

jelleVanhove commented 5 years ago

Having the same question but with no idea how to fix it

mikmat commented 4 years ago

This is how I make a Memo-template with a full background image:

- Create a Memo template containing:

<div class="memo" style="color:#000000;">
  <div class="bg1">
      <h1 class="subject"></h1>
      <span class="body"></span>
  </div>
</div>

- Edit the file "styles/custom.css" and add:

.memo {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 914px;
    line-height: normal;
    /*border:1px solid maroon;*/
    font-family: Futura, Verdana, Arial, Helvetica, sans-serif;
    font-size: 1.5em;
    text-align: left;
    color: rgb(0, 102, 0);
    padding: 15px;
    background-color: #F5F8F2;
}

    .memo h1.subject {
        padding:15px;
        color:white;
        font-size:40px;
        line-height:40px;
        text-transform:uppercase;
    }

    .memo .body {
        padding:15px;
        height: 100%
    }

    .memo .bg1 {
        background-image: url("https://via.placeholder.com/150");
        height: 100%;
    }

  .memo .bg2 {
        background-image: url("https://via.placeholder.com/250");
        height: 100%;
    }

If you want a template with another background, simply create a new one and replace

with