Permalink
Browse files

Added published status graphics

Signed-off-by: Jens Alm <jens.alm@mac.com>
  • Loading branch information...
1 parent c8bd706 commit 0fdd18998aacdd4cfc05635a868425604f14b79a @ulmus committed Feb 20, 2012
View
@@ -19,7 +19,8 @@ class CardResource(ModelResource):
"body",
"type",
"keywords",
- "protected"
+ "protected",
+ "published_status",
)
View
BIN db.sqlite
Binary file not shown.
@@ -39,6 +39,13 @@ Handlebars.registerHelper("cardCategoryDisplaySymbol", (abbr) ->
when "ADVN" then "O"
)
+Handlebars.registerHelper("cardPublishedStatusDisplay", (abbr) ->
+ switch abbr
+ when "SGST" then new Handlebars.SafeString('<div class="stamp">SUGGESTION</div>')
+ when "DRFT" then new Handlebars.SafeString('<div class="stamp">DRAFT</div>')
+ else ""
+)
+
# The Card Models and Collections
class Card extends Foundation.Model
@@ -198,6 +205,7 @@ class CardView extends Foundation.ModelView
{{attr.title}}
</h2>
{{#if attr.protected }}<div class="noprint lock"><i class="icon-lock"></i></div>{{/if }}
+ {{cardPublishedStatusDisplay attr.published_status}}
<div class="cardtext">
<div class="body">
{{{markdown attr.body}}}
@@ -235,6 +243,7 @@ class CardInDeckView extends Foundation.ModelView
<h2 class="title">
{{card.attributes.title}}
</h2>
+ {{cardPublishedStatusDisplay card.attributes.published_status}}
<div class="cardtext">
<div class="body">
{{{markdown card.attributes.body}}}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -109,6 +109,19 @@ div.card .contents .title {
background-image: -webkit-linear-gradient(bottom, #d4d2d4 7%, #f2f2f2 70%);
background-image: -ms-linear-gradient(bottom, #d4d2d4 7%, #f2f2f2 70%);
}
+div.card .contents .stamp {
+ text-align: center;
+ z-index: 10;
+ opacity: 0.06;
+ font-family: "Droid Sans", sans-serif;
+ font-size: 30pt;
+ font-weight: bold;
+ position: absolute;
+ width: 100%;
+ -webkit-transform: rotate(-45deg);
+ transform: rotate(-45deg);
+ top: 42mm;
+}
div.card .contents .cardtext {
font-family: "Droid Serif", serif;
width: auto;
@@ -125,6 +125,20 @@ div.card {
background-image: -ms-linear-gradient(bottom, rgb(212,210,212) 7%, rgb(242,242,242) 70%);
}
+ .stamp {
+ text-align: center;
+ z-index: 10;
+ opacity: 0.06;
+ font-family: "Droid Sans", sans-serif;
+ font-size: 30pt;
+ font-weight: bold;
+ position: absolute;
+ width: 100%;
+ -webkit-transform: rotate(-45deg);
+ transform: rotate(-45deg);
+ top: 42mm;
+ }
+
.cardtext {
font-family: "Droid Serif", serif;
width: auto;

0 comments on commit 0fdd189

Please sign in to comment.