This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @import "compass/utilities/sprites"; | |
| @import "compass"; | |
| @import "compass/css3"; | |
| @import "reset"; | |
| @import "basic"; | |
| @import "header"; | |
| @import "footer"; | |
| @import "card"; | |
| @import "badge"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import Image | |
| #生成node 75x75 缩略图 | |
| def make_node_thumb(path): | |
| base, ext = os.path.splitext(path) | |
| try: | |
| im = Image.open(path) | |
| except IOError: | |
| print ' in IOError' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 压缩后: | |
| <div id="article-content"><div><br></div><div>在这里写文章<div contenteditable="false" class="comment-tpl-wrap tpl-wrap" id="comment-tpl-2" data-id="3369401"><div class="comment-tpl"><div class="box-action"><span class="edit"><i class="icon pencil"></i> 修改</span><span class="remove"><i class="icon remove"></i> 删除</span></div><form class="comment-id-input ui form" style="display: none;"><div class="ui input action"><input type="text" placeholder="请输入目标评论的ID"><button type="submit" class="ui button icon"><i class="icon add sign"></i></button></div></form><div class="card comment-box-wrap" style="display: block;"><div class="comment-box"><a class="author-avatar" href="http://baidu.com" target="_blank"> <img alt="jyTI" src="http://www.regexbuddy.com/img/icon.png"></a><div class="box-info"><span class="author-name"><a href="http://baidu.com" target="_blank">jyTI</a></span><p contenteditable="true" class="comment-content">这是一段内容</p></div></div></div></div></div></div></div> | |
| // 原始html: | |
| <div id="article-content |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| doctype html | |
| //- if lt IE 7 | |
| html.no-js.lt-ie9.lt-ie8.lt-ie7 | |
| //- if IE 7 | |
| html.no-js.lt-ie9.lt-ie8 | |
| //- if IE 8 | |
| html.no-js.lt-ie9 | |
| //- [if gt IE 8] <! | |
| html.no-js(lang="en") | |
| //- <![endif] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <link rel="stylesheet" href="/components/fancybox/source/jquery.fancybox.css"> | |
| <script src="/components/fancybox/source/jquery.fancybox.js"></script> | |
| <style> | |
| #panel-weixin { | |
| display: none; | |
| text-align: center; | |
| } | |
| #panel-weixin .weixin-section { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # auto convert xiami.com links to player | |
| def xiami(value): | |
| musics = re.findall('(http://www.xiami.com/song/[0-9]+)\s?', value) | |
| if (len(musics) > 0): | |
| for music in musics: | |
| music_id = re.findall('http://www.xiami.com/song/([0-9]+)', music) | |
| value = value.replace('http://www.xiami.com/song/' + music_id[0], | |
| '<embed src="http://www.xiami.com/widget/15289_' + music_id[0] + '/singlePlayer.swf" type="application/x-shockwave-flash" width="257" height="33" wmode="transparent"></embed>') | |
| return value | |
| else: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| # Usage in html template: | |
| "xxx | HTML2TXT" | |
| <div ng-bind-html=" YourString | HTML2TXT "></div> | |
| ======= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| # Usage in html template: | |
| "xxx | nl2br" | |
| <div ng-bind-html=" YourString | nl2br "></div> | |
| or: |