Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix whitespace problems in templates

unfortunately {% spaceless %} does not remove whitespace inside attribute values
  • Loading branch information...
commit 42f1a49109915c9a8f1d4d3a5632b7437543183e 1 parent 04ab14e
@stefanfoulis stefanfoulis authored
View
35 cmsplugin_facebook/templates/cmsplugin_facebook/likebox.html
@@ -1,35 +1,26 @@
{% comment %}
<!-- Example from Facebook website: -->
-<!--
+<!--
<iframe src="http://www.facebook.com/plugins/likebox.php?
href=http%3A%2F%2Fwww.facebook.com%2Fplatform&amp;width=292&amp;
colorscheme=light&amp;connections=10&amp;
stream=true&amp;
header=true&amp;
- height=587"
- scrolling="no"
- frameborder="0"
- style="border:none;
- overflow:hidden;
- width:292px;
- height:587px;"
+ height=587"
+ scrolling="no"
+ frameborder="0"
+ style="border:none;
+ overflow:hidden;
+ width:292px;
+ height:587px;"
allowTransparency="true">
</iframe> -->
{% endcomment %}
{% spaceless %}
-<iframe src="http://www.facebook.com/plugins/likebox.php?
- href={% autoescape on %}{{ instance.pageurl }}{% endautoescape %}&amp;
- width={% if instance.width %}{{ instance.width }}{% else %}{{ width|default:295 }}{% endif %}&amp;
- connections={{ instance.connections }}&amp;
- stream={% if instance.stream %}true{% else %}false{% endif %}&amp;
- header={% if instance.header %}true{% else %}false{% endif %}&amp;
- height={{ instance.height }}"
- scrolling="no"
- frameborder="0"
- style="border:none;
- overflow:hidden;
- width:{% if instance.width %}{{ instance.width }}{% else %}{{ width|default:295 }}{% endif %}px;
- height:{{ instance.height }}px;"
- allowTransparency="{{instance.transparent}}">
+<iframe src="http://www.facebook.com/plugins/likebox.php?href={% autoescape on %}{{ instance.pageurl }}{% endautoescape %}&amp;width={% if instance.width %}{{ instance.width }}{% else %}{{ width|default:295 }}{% endif %}&amp;connections={{ instance.connections }}&amp;stream={% if instance.stream %}true{% else %}false{% endif %}&amp;header={% if instance.header %}true{% else %}false{% endif %}&amp;height={{ instance.height }}"
+ scrolling="no"
+ frameborder="0"
+ style="border:none;overflow:hidden;width:{% if instance.width %}{{ instance.width }}{% else %}{{ width|default:295 }}{% endif %}px;height:{{ instance.height }}px;"
+ allowTransparency="{{instance.transparent}}">
</iframe>
{%endspaceless%}
View
28 cmsplugin_facebook/templates/cmsplugin_facebook/likebutton.html
@@ -1,6 +1,6 @@
{% comment %}
<!-- Example from Facebook -->
-<!--
+<!--
<iframe src="http://www.facebook.com/plugins/like.php?
href=http%3A%2F%2Fwww.facebook.com%2Fbarackobama&amp;
layout=standard&amp;
@@ -8,24 +8,16 @@
width=450&amp;
action=like&amp;
height=80"
- scrolling="no"
- frameborder="0"
- style="border:none; overflow:hidden; width:450px; height:80px;"
+ scrolling="no"
+ frameborder="0"
+ style="border:none; overflow:hidden; width:450px; height:80px;"
allowTransparency="true">
</iframe> -->
{% endcomment %}
-{% spaceless%}
-<iframe src="http://www.facebook.com/plugins/like.php?
- href={% autoescape on %}{{ instance.pageurl }}{% endautoescape %}&amp;
- layout={% if instance.layout %}{{instance.layout}}{% endif %}&amp;
- show_faces={{instance.show_faces}}&amp;
- width={% if instance.width %}{{ instance.width }}{% else %}{{ width|default:295 }}&amp;{% endif %}
- height={{ instance.height }}
- action=like&amp;
- colorscheme=light&amp;"
- scrolling="no"
- frameborder="0"
- style="border:none;overflow:hidden; width:{% if instance.width %}{{ instance.width }}{% else %}{{ width|default:295 }}{% endif %}px; height:{{ instance.height }}px;"
- allowTransparency="true">
+{% spaceless %}
+<iframe src="http://www.facebook.com/plugins/like.php?href={% autoescape on %}{{ instance.pageurl }}{% endautoescape %}&amp;layout={% if instance.layout %}{{instance.layout}}{% endif %}&amp;show_faces={{instance.show_faces}}&amp;width={% if instance.width %}{{ instance.width }}{% else %}{{ width|default:295 }}{% endif %}&amp;height={{ instance.height }}&amp;action=like&amp;colorscheme=light"
+ frameborder="0"
+ style="border:none;overflow:hidden; width:{% if instance.width %}{{ instance.width }}{% else %}{{ width|default:295 }}{% endif %}px; height:{{ instance.height }}px;"
+ allowTransparency="true">
</iframe>
-{% endspaceless%}
+{% endspaceless%}
View
18 cmsplugin_facebook/templates/cmsplugin_facebook/sharebutton.html
@@ -1,20 +1,14 @@
{% comment %}
<!-- Example from Facebook -->
-<!-- <a
- name="fb_share"
+<!-- <a
+ name="fb_share"
type="button" # Can be button, button_count or box_count (box_count is above, button_count is inline)
href="http://www.facebook.com/sharer.php">Share</a>
- <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
+ <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
-->
+{{ instance.style }} can be "button", "button_count" or "box_count" (box_count is above, button_count is inline)
{% endcomment %}
{% spaceless %}
- <a
- name="fb_share"
- type="{{ instance.style }}" # Can be button, button_count or box_count (box_count is above, button_count is inline)
- href="http://www.facebook.com/sharer.php"
- {% if instance.share_url %}
- share_url="{{instance.share_url}}"
- {% endif %}>{{instance.button_text}}</a>
- <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
-
+<a name="fb_share" type="{{ instance.style }}" href="http://www.facebook.com/sharer.php"{% if instance.share_url %} share_url="{{ instance.share_url }}"{% endif %}>{{ instance.button_text }}</a>
+<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
{% endspaceless %}
Please sign in to comment.
Something went wrong with that request. Please try again.