From 892432d11e26b0aa81e63199d4c001e89e52ced1 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 12 May 2015 17:28:59 +0800 Subject: [PATCH] add react --- static/code.jsx | 6 ++++++ theme/templates/component.html | 7 ------- theme/templates/layout.html | 14 ++++++++++++++ 3 files changed, 20 insertions(+), 7 deletions(-) create mode 100644 static/code.jsx diff --git a/static/code.jsx b/static/code.jsx new file mode 100644 index 0000000000..737c583521 --- /dev/null +++ b/static/code.jsx @@ -0,0 +1,6 @@ +/*jshint ignore:start */ +var CodeBox = React.createClass({ + render: function() { + return
{this.props.code}
; + } +}); diff --git a/theme/templates/component.html b/theme/templates/component.html index 91e0cfc508..6a01302ba4 100644 --- a/theme/templates/component.html +++ b/theme/templates/component.html @@ -2,10 +2,3 @@ {% block title %}{{post.title}} - {{config.site.name}}{% endblock %} {% block description %}{% if post.summay %}{{post.summary}}{% endif %}{% endblock %} -{% block main -%} -{%- include "aside.html" %} -
-

{{ post.title }}

- {{ post.html }} -
-{%- endblock %} diff --git a/theme/templates/layout.html b/theme/templates/layout.html index bbce2bcfd8..b72ba576d1 100644 --- a/theme/templates/layout.html +++ b/theme/templates/layout.html @@ -13,6 +13,13 @@ + + + + + {%- if post.meta.template === 'component' %} + + {%- endif %}