Skip to content

Commit c71e008

Browse files
committed
Merge pull request #102 from dongweiming/react
React
2 parents 1e07354 + 0ed493c commit c71e008

File tree

4 files changed

+46
-38
lines changed

4 files changed

+46
-38
lines changed

firefly/templates/widgets/markdown_editor.html

Lines changed: 42 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -39,40 +39,47 @@
3939
</div>
4040
{%- endmacro %}
4141

42-
{#
43-
- def topic()
44-
div#reply-control.open.hide
45-
div.grippie
46-
div.contents
47-
div.control
48-
a.toggler href=''
49-
div.control-row.reply-area
50-
div.composer-fields
51-
div.reply-to data-comment-id=''
52-
span
53-
回应
54-
a#reply-topic.avatar href="/t/6"
55-
img.avatar.reply-author alt="" width="20" height="20"
56-
span
57-
div.wmd-controls style="top: 56px; bottom: 45px;"
58-
div.textarea-wrapper
59-
textarea#wmd-input tabindex="4"
42+
{% macro topic() -%}
43+
<div id="reply-control" class="open hide">
44+
<div class="grippie"></div>
45+
<div class="contents">
46+
<div class="control">
47+
<a class="toggler" href=""></a>
48+
<div class="control-row reply-area">
49+
<div class="composer-fields">
50+
<div class="reply-to" data-comment-id=''>
51+
<span>回应</span>
52+
<a id="reply-topic" class="avatar" href="/t/6"></a>
53+
<img class="avatar reply-author" alt="" width="20" height="20" />
54+
<span></span>
55+
</div>
56+
</div>
57+
<div class="wmd-controls" style="top: 56px; bottom: 45px;" >
58+
<div class="textarea-wrapper">
59+
<textarea id="wmd-input" cols="30" id="" name="" rows="10" tabindex="4"></textarea>
60+
</div>
6061

61-
div.preview-wrapper.regular
62-
div#wmd-preview.cooked
63-
div.composer-bottom-right
64-
a.toggle-preview href="#"
65-
« 关闭预览
66-
div#file-uploading.hidden
67-
div.spinner.small
68-
Uploading %
69-
a#cancel-file-upload
70-
cancel
62+
<div class="preview-wrapper regular">
63+
<div id="wmd-preview" class="cooked"></div>
64+
</div>
65+
<div class="composer-bottom-right">
66+
<a class="toggle-preview" href="#">« 关闭预览</a>
67+
<div id="file-uploading" class="hidden">
68+
<div class="spinner small"></div>
69+
Uploading %
70+
<a id="cancel-file-upload" href="">cancel</a>
71+
</div>
72+
</div>
73+
</div>
7174

72-
div.submit-panel
73-
button.btn.btn-primary.reply tabindex="5" title="Or press Ctrl+Enter"
74-
i.fa.fa-plus
75-
发布评论
76-
a.cancel href="#" tabindex="6"
77-
取消
78-
#}
75+
<div class="submit-panel">
76+
<button class="btn btn-primary reply" tabindex="5" title="Or press Ctrl+Enter" >
77+
<i class="fa fa-plus">发布评论</i>
78+
</button>
79+
<a class="cancel" href="#" tabindex="6">取消</a>
80+
</div>
81+
</div>
82+
</div>
83+
</div>
84+
</div>
85+
{%- endmacro %}

firefly/views/auth.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# coding=utf-8
22
from __future__ import absolute_import
33
from flask.blueprints import Blueprint
4-
from flask_mako import render_template
54
from flask_security import login_required
65

6+
from firefly.libs.template import render_template
7+
78
bp = Blueprint('auth', __name__, url_prefix="/auth")
89

910

firefly/views/keyboard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
from flask import request
44
from flask.views import MethodView
55
from flask.blueprints import Blueprint
6-
from flask_mako import render_template
76

87
from firefly.models.consts import KEYBOARD_URL_MAPS
8+
from firefly.libs.template import render_template
99

1010

1111
bp = Blueprint('keyboard', __name__, url_prefix='/keyboard')

firefly/views/post.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
from __future__ import absolute_import
33
from flask.views import MethodView
44
from flask.blueprints import Blueprint
5-
from flask_mako import render_template
65
from flask_mongoengine.wtf import model_form
76

87
from firefly.models.topic import Post, Comment
8+
from firefly.libs.template import render_template
99

1010

1111
bp = Blueprint("post", __name__, url_prefix="/post")

0 commit comments

Comments
 (0)