diff --git a/app/assets/javascripts/app/views/small_frame.js b/app/assets/javascripts/app/views/small_frame.js index 76f0ad99c..2b727bb6a 100644 --- a/app/assets/javascripts/app/views/small_frame.js +++ b/app/assets/javascripts/app/views/small_frame.js @@ -16,7 +16,12 @@ app.views.SmallFrame = app.views.Base.extend({ }, postRenderTemplate : function() { - this.$el.addClass(this.dimensionsClass() + " " + this.colorClass()) + this.$el.addClass([this.dimensionsClass(), this.colorClass(), this.frameClass()].join(' ')) + }, + + frameClass : function(){ + var name = this.model.get("frame_name") || "" + return name.toLowerCase() }, colorClass : function() { diff --git a/app/assets/stylesheets/new_styles/_canvas.scss b/app/assets/stylesheets/new_styles/_canvas.scss index 47a02de0c..c2a3a3d87 100644 --- a/app/assets/stylesheets/new_styles/_canvas.scss +++ b/app/assets/stylesheets/new_styles/_canvas.scss @@ -76,6 +76,7 @@ body { /* used in masking photos with overflow: hidden; */ .image-container { + overflow : hidden; width : 100%; @@ -188,4 +189,37 @@ body { &.x2.width .content { @include wide(); } &.sticky-note.x2.height .content { @include tall(); } + + &.wallpaper { + .info { + + } + .content{ + display: table; + } + + .image-container { + background-color: black; + display: table-cell; + + img { + @include opacity(0.7); + } + } + + .text-content { + position: absolute; + left: 0; + width: 100%; + top: 40%; + @include centered-frame(); + font-size: 3em; + color: white; + @include opacity(1); + text-shadow : none; + font-weight: bold; + + + } + } } diff --git a/app/assets/templates/small-frame.jst.hbs b/app/assets/templates/small-frame.jst.hbs index 11f4f4f6f..0b49292a3 100644 --- a/app/assets/templates/small-frame.jst.hbs +++ b/app/assets/templates/small-frame.jst.hbs @@ -30,14 +30,12 @@ {{/if}} - {{#unless photos}}
{{{text}}}
{{#if text}}
{{/if}} - {{/unless}}
diff --git a/app/models/post.rb b/app/models/post.rb index 251e60b92..3413a96dc 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -45,6 +45,7 @@ class Post < ActiveRecord::Base t.add :photos t.add :nsfw t.add :favorite + t.add :frame_name end xml_attr :provider_display_name