Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix whitespace problems in templates
unfortunately {% spaceless %} does not remove whitespace inside attribute values
- Loading branch information
1 parent
04ab14e
commit 42f1a49
Showing
3 changed files
with
29 additions
and
52 deletions.
There are no files selected for viewing
35 changes: 13 additions & 22 deletions
35
cmsplugin_facebook/templates/cmsplugin_facebook/likebox.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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&width=292& | ||
colorscheme=light&connections=10& | ||
stream=true& | ||
header=true& | ||
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 %}& | ||
width={% if instance.width %}{{ instance.width }}{% else %}{{ width|default:295 }}{% endif %}& | ||
connections={{ instance.connections }}& | ||
stream={% if instance.stream %}true{% else %}false{% endif %}& | ||
header={% if instance.header %}true{% else %}false{% endif %}& | ||
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 %}&width={% if instance.width %}{{ instance.width }}{% else %}{{ width|default:295 }}{% endif %}&connections={{ instance.connections }}&stream={% if instance.stream %}true{% else %}false{% endif %}&header={% if instance.header %}true{% else %}false{% endif %}&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%} |
28 changes: 10 additions & 18 deletions
28
cmsplugin_facebook/templates/cmsplugin_facebook/likebutton.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,23 @@ | ||
{% comment %} | ||
<!-- Example from Facebook --> | ||
<!-- | ||
<!-- | ||
<iframe src="http://www.facebook.com/plugins/like.php? | ||
href=http%3A%2F%2Fwww.facebook.com%2Fbarackobama& | ||
layout=standard& | ||
show_faces=true& | ||
width=450& | ||
action=like& | ||
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 %}& | ||
layout={% if instance.layout %}{{instance.layout}}{% endif %}& | ||
show_faces={{instance.show_faces}}& | ||
width={% if instance.width %}{{ instance.width }}{% else %}{{ width|default:295 }}&{% endif %} | ||
height={{ instance.height }} | ||
action=like& | ||
colorscheme=light&" | ||
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 %}&layout={% if instance.layout %}{{instance.layout}}{% endif %}&show_faces={{instance.show_faces}}&width={% if instance.width %}{{ instance.width }}{% else %}{{ width|default:295 }}{% endif %}&height={{ instance.height }}&action=like&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%} |
18 changes: 6 additions & 12 deletions
18
cmsplugin_facebook/templates/cmsplugin_facebook/sharebutton.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 %} |