Author
|
zPlus <-->
2016-10-07 18:15:18
|
Committer
|
zPlus <-->
2016-10-07 18:15:18
|
Commit
|
948f98c
(patch)
|
Tree
|
acfb4ac
|
Parent(s)
|
|
Move anchors id="" from <a/> tag to <div/>
modified: css/freepost.css
modified: template/comment.twig
modified: template/post.twig
commits diff:
3cb7ca1..948f98c
3 files changed,
10 insertions,
15 deletions
—
download
Diffstat
Diff options
+5/-6
M css/freepost.css
16
|
16
|
|
html, body
|
17
|
17
|
|
{
|
18
|
18
|
|
background-color: #fff; /* #f5f8fa; */
|
19
|
|
- |
color: #000;
|
20
|
|
- |
font-family: Verdana;
|
21
|
19
|
|
font-size: 1em;
|
22
|
20
|
|
height: 100%;
|
23
|
21
|
|
line-height: 1em;
|
282
|
280
|
|
word-wrap: break-word;
|
283
|
281
|
|
}
|
284
|
282
|
|
|
285
|
|
- |
/* Give the comment that's linked to in the URL location hash a lightyellow background color */
|
286
|
|
- |
.content > .post > .comments > a:target + .comment {
|
287
|
|
- |
background-color: lightyellow;
|
288
|
|
- |
}
|
|
283
|
+ |
/* Give the comment that's linked to in the URL location hash a lightyellow background color */
|
|
284
|
+ |
.content > .post > .comments > .comment:target
|
|
285
|
+ |
{
|
|
286
|
+ |
background-color: lightyellow;
|
|
287
|
+ |
}
|
289
|
288
|
|
|
290
|
289
|
|
|
291
|
290
|
|
/* User home page */
|
+2/-4
M template/comment.twig
1
|
1
|
|
{% if comments[parent_id] %}
|
2
|
2
|
|
{% for comment in comments[parent_id] %}
|
3
|
3
|
|
|
4
|
|
- |
{# Add an anchor link for this comment #}
|
5
|
|
- |
<a id="comment-{{ comment.hashId }}"></a>
|
6
|
|
- |
|
7
|
|
- |
<div class="comment" style="margin-left:{{ depth * 2 }}em">
|
|
4
|
+ |
{# The id="" is used as anchor #}
|
|
5
|
+ |
<div class="comment" style="margin-left:{{ depth * 2 }}em" id="comment-{{ comment.hashId }}">
|
8
|
6
|
|
<div class="pin">▣</div>
|
9
|
7
|
|
|
10
|
8
|
|
<div class="info">
|
+3/-5
M template/post.twig
35
|
35
|
|
{{ post.text|markdown|raw }}
|
36
|
36
|
|
</div>
|
37
|
37
|
|
|
38
|
|
- |
{# An anchor for where the comments section starts #}
|
39
|
|
- |
<a id="comments"></a>
|
40
|
|
- |
|
41
|
38
|
|
{% if user %}
|
42
|
39
|
|
<form action="" method="post" class="new_comment">
|
43
|
40
|
|
<textarea name="new_comment" required="required" class="form-control" placeholder="Write a comment"></textarea>
|
44
|
41
|
|
<input type="submit" value="Add comment" class="btn btn-primary" />
|
45
|
42
|
|
</form>
|
46
|
43
|
|
{% endif %}
|
47
|
|
- |
|
48
|
|
- |
<div class="comments">
|
|
44
|
+ |
|
|
45
|
+ |
{# id="" used as anchor #}
|
|
46
|
+ |
<div class="comments" id="comments">
|
49
|
47
|
|
{% include 'comment.twig' with {
|
50
|
48
|
|
'post': post,
|
51
|
49
|
|
'comments': comments,
|