diff options
author | luxagraf <sng@luxagraf.net> | 2015-11-26 12:32:19 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2015-11-26 12:32:19 -0500 |
commit | 2bf6dcdbc3ffd051cb9686277de8e0a436de36f3 (patch) | |
tree | c2878722f24da5f5ea8f1a8004378b64c014c92f | |
parent | 576afa4a5fb49eccfb3bd4972d2359d3d48c0dd3 (diff) |
added gumroad purchase options to src
-rw-r--r-- | app/TODO | 8 | ||||
-rw-r--r-- | app/src/admin.py | 2 | ||||
-rw-r--r-- | app/src/models.py | 1 | ||||
-rw-r--r-- | design/sass/_src.scss | 9 | ||||
-rw-r--r-- | design/templates/details/src_book.html | 10 |
5 files changed, 24 insertions, 6 deletions
@@ -11,6 +11,11 @@ https://css-tricks.com/serviceworker-for-offline/ https://adactio.com/journal/9814 https://adactio.com/journal/9775 http://brucelawson.github.io/manifest/ +https://serviceworker-cookbook.herokuapp.com/ + +fix amp support by anitizing html: + +https://github.com/duner/django-bluebox/blob/master/bluebox/converters/sanitizer.py --- @@ -54,7 +59,8 @@ resume clean up design of book detail add paypal app and generate button -handle callbacks from paypal to deliver the book and link to files +handle callbacks from paypal to deliver the book and link to files: +https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNandPDTVariables/ redirect lhp: home, book and rss diff --git a/app/src/admin.py b/app/src/admin.py index cd6ba1d..76f09a2 100644 --- a/app/src/admin.py +++ b/app/src/admin.py @@ -19,7 +19,7 @@ class BookAdmin(admin.ModelAdmin): ('pub_date', 'status'), ('price', 'price_sale'), 'meta_description', - ('slug', 'template_name'), + ('slug', 'template_name', 'pages'), ), 'classes': ( 'show', diff --git a/app/src/models.py b/app/src/models.py index 1686301..10df6b2 100644 --- a/app/src/models.py +++ b/app/src/models.py @@ -100,6 +100,7 @@ class Book(models.Model): price = models.FloatField() price_sale = models.FloatField() meta_description = models.CharField(max_length=256, null=True, blank=True) + pages = models.DecimalField(max_digits=3, decimal_places=0, null=True, blank=True) DEFAULT = 'details/src_book.html' BOOK2 = 'details/src_book_2.html' TEMPLATES = ( diff --git a/design/sass/_src.scss b/design/sass/_src.scss index 9a37a18..1546ce5 100644 --- a/design/sass/_src.scss +++ b/design/sass/_src.scss @@ -109,3 +109,12 @@ code > .comment::after { } } } + +@include breakpoint(beta) { + .btn-top { + margin-left: 1.2em + } + .btn-bottom { + margin-left: 5em; + } +} diff --git a/design/templates/details/src_book.html b/design/templates/details/src_book.html index b5d9045..bc12ebf 100644 --- a/design/templates/details/src_book.html +++ b/design/templates/details/src_book.html @@ -24,16 +24,18 @@ </dl> </div> <div class="paypal-form-wrapper"> - {{paypal_form.render}} +<script src="https://gumroad.com/js/gumroad.js"></script> +<a target="_blank" class="gumroad-button btn-top" href="https://gum.co/rwd-b">Buy it Now</a> +{%comment%}{{paypal_form.render}}{%endcomment%} </div> <div class="highlights"> <h4>Learn Responsive Design:</h4> <article class="h-entry hentry post--article book" itemscope itemType="http://schema.org/Article"> {{object.body_html|safe|amp|smartypants}} - <div class="paypal-form-wrapper"> - {{paypal_form.render}} - </div> +<script src="https://gumroad.com/js/gumroad.js"></script> +<a target="_blank" class="gumroad-button btn-bottom" href="https://gum.co/rwd-b">Buy it Now</a> +{%comment%}{{paypal_form.render}}{%endcomment%} </article> </div> </main> |