Skip to content
Permalink
Browse files

fix #28 -- fallback for non-html posts

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information...
Kwpolska committed Jan 12, 2015
1 parent 66f22cc commit 9341eeeb53064a722f357a58cb7f6c353a55507f

This file was deleted.

@@ -3,6 +3,8 @@
* See /LICENSE for licensing information.
*/

/* global styles */

.save-btn, .save-icon {
transition: all 0.5s ease;
}
@@ -11,10 +13,14 @@
text-align: center;
}

/* index */

.list-group.posts, .list-group.pages {
margin-top: 22px;
}

/* edit */

#post-meta-line, #toolbar, #post-meta-panel, #content-area {
margin-top: 10px;
}
@@ -49,6 +55,13 @@
border-color: #66afe9;
}

.markup-warning {
vertical-align: middle;
float: none !important;
}

/* user management */

.inactive-user .username, .inactive-user .realname {
text-decoration: line-through;
}
@@ -61,10 +74,14 @@ table.users .uid {
vertical-align: middle !important;
}

/* permission management */

.perm, .select_all {
text-align: center;
}

/* login (copied from Bootstrap example) */

.form-signin {
max-width: 330px;
padding: 15px;

This file was deleted.

@@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="base.tmpl"/>
<%block name="extra_js">
% if action == 'save':
@@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="base.tmpl"/>
<%block name="extra_head">
</%block>
@@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="base.tmpl"/>
<%block name="extra_js">
<script>
@@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="base.tmpl"/>
<%block name="content">
% if alert:
@@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="base.tmpl"/>
<%block name="extra_js">
% if action == 'save':
@@ -45,6 +46,7 @@
<div id="toolbar" class="btn-toolbar">
<div class="btn-group"><button type="submit" class="btn btn-sm btn-primary save-btn"><i class="fa fa-save fa-fw save-icon"></i> Save</button></div>

% if is_html:
<div class="btn-group">
<a class="btn btn-default btn-sm" data-wysihtml5-command="bold" title="CTRL+B"><i class="fa fa-bold"></i></a>
<a class="btn btn-default btn-sm" data-wysihtml5-command="italic" title="CTRL+I"><i class="fa fa-italic"></i></a>
@@ -96,10 +98,14 @@
</select>
</label>
</div>
</div>
% else:
<div class="btn-group btn btn-sm disabled markup-warning text-warning"><i class="fa fa-warning"></i> Format: <strong>${post.compiler.name}</strong> — editor unavailable</div>
% endif
</div>

<textarea name="content" id="content-area" class="form-control" rows="24">${post_content}</textarea>
</form>
% if is_html:
<script src="/bower_components/wysihtml/dist/wysihtml5x-toolbar.min.js"></script>
<script src="/bower_components/wysihtml/parser_rules/advanced_and_extended.js"></script>
<script type="text/javascript">
@@ -109,4 +115,5 @@
stylesheets: ['/comet_assets/css/wysihtml5x.css']
});
</script>
% endif
</%block>
@@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="base.tmpl"/>
<%block name="extra_js">
% if action == 'save':
@@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="base.tmpl"/>
<%block name="extra_js">
% if action == 'save':
@@ -1,3 +1,4 @@
## -*- coding: utf-8 -*-
<%inherit file="base.tmpl"/>
<%block name="extra_js">
<script>
@@ -565,6 +565,7 @@ def edit(path):
context['current_auid'] = int(post.meta('author.uid') or current_user.uid)
context['title'] = 'Editing {0}'.format(post.title())
context['permalink'] = '/edit/' + path
context['is_html'] = post.compiler.name == 'html'
return render('comet_post_edit.tmpl', context)


0 comments on commit 9341eee

Please sign in to comment.
You can’t perform that action at this time.