Show More
@@ -84,8 +84,10 b' textarea, input {' | |||||
84 | display: inline; |
|
84 | display: inline; | |
85 | } |
|
85 | } | |
86 |
|
86 | |||
87 |
.post-button-form > |
|
87 | .post-button-form > button { | |
88 | border: none; |
|
88 | border: none; | |
89 |
margin: |
|
89 | margin: inherit; | |
90 |
padding: |
|
90 | padding: inherit; | |
|
91 | background: none; | |||
|
92 | font-size: inherit; | |||
91 | } |
|
93 | } |
@@ -509,3 +509,7 b' ul {' | |||||
509 | .highlight { |
|
509 | .highlight { | |
510 | background-color: #222; |
|
510 | background-color: #222; | |
511 | } |
|
511 | } | |
|
512 | ||||
|
513 | .post-button-form > button:hover { | |||
|
514 | text-decoration: underline; | |||
|
515 | } |
@@ -397,3 +397,7 b' li {' | |||||
397 | .highlight { |
|
397 | .highlight { | |
398 | background-color: #D4F0F9; |
|
398 | background-color: #D4F0F9; | |
399 | } |
|
399 | } | |
|
400 | ||||
|
401 | .dead_post { | |||
|
402 | border-right: 1ex solid #666; | |||
|
403 | } |
@@ -81,21 +81,6 b' function translate_time(node) {' | |||||
81 | }); |
|
81 | }); | |
82 | } |
|
82 | } | |
83 |
|
83 | |||
84 | /** |
|
|||
85 | * We use buttons viewed as a form with link and hidden inputs to ensure |
|
|||
86 | * the search crawlers don't index or click them. |
|
|||
87 | * |
|
|||
88 | * But we need to submit the form by clicking the links. That's why these |
|
|||
89 | * handlers are here. |
|
|||
90 | */ |
|
|||
91 | function addPostButtonActions() { |
|
|||
92 | $('.post-button-form > a').each(function() { |
|
|||
93 | $(this).click(function() { |
|
|||
94 | $(this).parent().submit(); |
|
|||
95 | }); |
|
|||
96 | }); |
|
|||
97 | } |
|
|||
98 |
|
||||
99 | $( document ).ready(function() { |
|
84 | $( document ).ready(function() { | |
100 | hideEmailFromForm(); |
|
85 | hideEmailFromForm(); | |
101 |
|
86 | |||
@@ -111,6 +96,4 b' function addPostButtonActions() {' | |||||
111 | highlightCode($(document)); |
|
96 | highlightCode($(document)); | |
112 |
|
97 | |||
113 | translate_time(null); |
|
98 | translate_time(null); | |
114 |
|
||||
115 | addPostButtonActions(); |
|
|||
116 | }); |
|
99 | }); |
@@ -41,22 +41,17 b'' | |||||
41 | <div class="tag_info"> |
|
41 | <div class="tag_info"> | |
42 | <h2> |
|
42 | <h2> | |
43 | <form action="{% url 'tag' tag.name %}" method="post" class="post-button-form"> |
|
43 | <form action="{% url 'tag' tag.name %}" method="post" class="post-button-form"> | |
44 | <input type="hidden" name="method" |
|
|||
45 | {% if is_favorite %} |
|
44 | {% if is_favorite %} | |
46 |
< |
|
45 | <button name="method" value="unsubscribe" class="fav">★</button> | |
47 | <a class="fav" href="#">★</a> |
|
|||
48 | {% else %} |
|
46 | {% else %} | |
49 |
< |
|
47 | <button name="method" value="subscribe" class="not_fav">★</button> | |
50 | <a class="not_fav" href="#">★</a> |
|
|||
51 | {% endif %} |
|
48 | {% endif %} | |
52 | </form> |
|
49 | </form> | |
53 | <form action="{% url 'tag' tag.name %}" method="post" class="post-button-form"> |
|
50 | <form action="{% url 'tag' tag.name %}" method="post" class="post-button-form"> | |
54 | {% if is_hidden %} |
|
51 | {% if is_hidden %} | |
55 |
< |
|
52 | <button name="method" value="unhide" class="fav">H</button> | |
56 | <a class="fav" href="#">H</a> |
|
|||
57 | {% else %} |
|
53 | {% else %} | |
58 |
< |
|
54 | <button name="method" value="hide" class="not_fav">H</button> | |
59 | <a class="not_fav" href="#">H</a> |
|
|||
60 | {% endif %} |
|
55 | {% endif %} | |
61 | </form> |
|
56 | </form> | |
62 | {% autoescape off %} |
|
57 | {% autoescape off %} |
General Comments 0
You need to be logged in to leave comments.
Login now