Skip to content

Commit cb81303

Browse files
author
差沙
committed
init
1 parent 0d87f7d commit cb81303

File tree

9 files changed

+716
-67
lines changed

9 files changed

+716
-67
lines changed

content.txt

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
1. 使用bootstrap作为UI
2+
3+
2. 使用 Class Base View 解决扩展的问题
4+
5+
Tornado中使用的View方式
6+
每次请求会创建一个view对象来处理请求
7+
该对象是面向请求的, 所以可以随意使用self
8+
例如 self.request
9+
10+
3. 使用元类动态创建 AdminClass
11+
12+
什么是元类
13+
使用元类的实例
14+
15+
xadmin创建 AdminClass 的流程
16+
17+
UserAdmin + ModelBaseAdmin + Plugins = FinalAdminClass
18+
19+
4. 内建的插件机制
20+
21+
借鉴自 Wordpress
22+
23+
AdminClass的主要方法都可以使用插件来进行扩展
24+
25+
实现原理:
26+
27+
动态注入相关插件
28+
29+
使用装饰器实现方法拦截
30+
31+
使用示例:
32+
33+
xadmin目前实现的功能:
34+
35+
1. 简单图表功能
36+
2. 数据详情页面
37+
3. 过滤器强化,可以选择时间范围,数字范围,模糊搜索等等。
38+
4. 书签
39+
5. 导出csv, xml, json, excel
40+
6. 动态显示列
41+
7. 关联数据查询
42+
8. 数据添加向导
43+
9. 随意布局
44+
10. dashboard页面
45+
11. 定义图标
46+
12. 系统主题功能
47+
13. 数据版本
48+
49+
xadmin的在线资源
50+
51+
https://github.com/sshwsfc/django-exadmin
52+
53+
http://exadmin.herokuapp.com
54+
55+
开源项目的一些心得:
56+
57+
Github GOOD
58+
59+
`github hook等功能`
60+
61+
heroku.com
62+
63+
`免费的建站方式`
64+
65+
travis-ci.org
66+
67+
`自动化测试助手`
68+
69+
...
70+
71+
目前xadmin的问题
72+
73+
细节优化
74+
语言问题
75+
时间和精力

demo.js.html

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
2+
<!doctype html>
3+
4+
<html lang="zh_CN">
5+
<head>
6+
<meta charset="utf-8" />
7+
<meta name="viewport" content="width=1024" />
8+
<meta name="apple-mobile-web-app-capable" content="yes" />
9+
<title>Speeding Up Drupal</title>
10+
11+
<meta name="description" content="Tools and Tips for increasing website speed for front-end (Drupal) developers." />
12+
<meta name="author" content="Evan Willhite" />
13+
14+
<link href="xadmin.js.css" rel="stylesheet" />
15+
16+
<link rel="shortcut icon" href="favicon.png" />
17+
<link rel="apple-touch-icon" href="apple-touch-icon.png" />
18+
</head>
19+
<body class="impress-supported">
20+
<div class="fallback-message">
21+
<p>Your browser <b>doesn't support the features required</b> by impress.js, so you are presented with a simplified version of this presentation.</p>
22+
<p>For the best experience please use the latest <b>Chrome</b>, <b>Safari</b> or <b>Firefox</b> browser.</p>
23+
</div>
24+
<div id="impress">
25+
26+
<div id="speed" class="step big hidden" data-x="280" data-y="2100" data-scale="6" data-z="-300000" data-transition-duration="100">
27+
<p>Speeding Up</p>
28+
<div class="drupal">Drupal</div>
29+
<div class="obligatory">
30+
<p class="left">Drupal Camp Atlanta 2012</p>
31+
<p class="right">#DcATL</p>
32+
</div>
33+
</div>
34+
35+
<div class="biz-card step slide hidden" data-x="280" data-y="2100" data-scale="7" data-z="-300000" data-transition-duration="100">
36+
<q>Evan Willhite</q>
37+
<p>Senior Developer at <a href="http://centresource.com">Centresource</a></p>
38+
<p>Nashville, TN</p>
39+
<p class="left"><a class="lower" href="http://twitter.com/evanmwillhite">@evanmwillhite</a></p>
40+
<img class="right map" src="img/map.png" />
41+
</div>
42+
43+
<!-- <div id="speed" class="step big hidden" data-x="280" data-y="2100" data-scale="6" data-z="-300000">
44+
<p>Speeding Up<div class="drupal">Drupal</div></p>
45+
</div> -->
46+
47+
<div id="basics" class="step" data-x="280" data-y="2100" data-scale="4">
48+
<p class="big">The Basics</p>
49+
<div class="small">(The Stuff We Can't Control)</div>
50+
</div>
51+
52+
<div id="content" class="step hidden" data-x="1080" data-y="2100" data-scale="1">
53+
<p class="huge">Content</p>
54+
<p class="elephant">(The Elephant in the Room)</p>
55+
</div>
56+
57+
<div id="the-stack" class="step hidden" data-x="680" data-y="2500" data-scale="1">
58+
<p>The Stack</p>
59+
</div>
60+
61+
<div id="the-functionality" class="step" data-x="680" data-y="4500" data-scale="1">
62+
<p>The Functionality</p>
63+
</div>
64+
65+
<div id="control" class="step" data-x="4500" data-y="-850" data-rotate="270" data-scale="6">
66+
<p class="huge">So What</p>
67+
<p class="big">Can We Control?</p>
68+
</div>
69+
70+
<div id="the-theme" class="step" data-x="4500" data-y="-7850" data-rotate="270" data-scale="6">
71+
<p>The Theme</p>
72+
</div>
73+
74+
<div id="but-how" class="obvious step" data-x="9000" data-y="-7850" data-rotate="270" data-scale="6">
75+
<p class="huge">But How?</p>
76+
<p>Less code</p>
77+
<p>Less files</p>
78+
<p>Smarter asset loading</p>
79+
</div>
80+
81+
<div id="less-code" class="obvious step" data-x="9000" data-y="-13850" data-rotate="270" data-scale="6">
82+
<p class="huge">Less code</p>
83+
<p>No Base theme?</p>
84+
<p>Stark, <a href="http://drupal.org/project/mothership">Mothership</a></p>
85+
<p>Image compression</p>
86+
<p>Clean code, <span class="big">CLEAN UP</span>.</p>
87+
</div>
88+
89+
<div id="less-files" class="obvious step" data-x="9000" data-y="-19850" data-rotate="270" data-scale="6">
90+
<p class="huge">Less files</p>
91+
<p>No Base theme?!</p>
92+
<p>Sprites</p>
93+
<p>Aggregation</p>
94+
<p>Minification (<a href="http://drupal.org/project/speedy">Speedy</a>)</p>
95+
</div>
96+
97+
<div id="smarter-loading" class="obvious step" data-x="9000" data-y="-25850" data-rotate="270" data-scale="6">
98+
<p class="huge">Smarter Loading</p>
99+
<p>Beware the .info file</p>
100+
<p>Use <a href="http://evanwillhite.com/blog/css-and-javascript-theming-functions">template functions</a></p>
101+
<p>If javascript, <a href="http://api.jquery.com/jQuery.getScript/">conditional loading</a></p>
102+
<p><a href="http://drupal.org/project/cdn">CDN</a>, <a href="http://drupal.org/project/scriptjs">Script.js</a>, <a href="http://drupal.org/project/labjs">Labjs</a></p>
103+
</div>
104+
105+
<div id="resources" class="obvious step last" data-x="9000" data-y="-31850" data-rotate="270" data-scale="6">
106+
<p class="huge">Other Resources</p>
107+
<p class="left"><a href="http://gzipwtf.com/">Gzip</a></p>
108+
<p class="right"><a href="http://incident57.com/codekit/">Codekit</a></p>
109+
<p class="left"><a href="http://jpegclub.org/jpegtran/">jpegtran</a></p>
110+
<p class="right"><a href="http://tinypng.org/">TinyPNG.org</a></p>
111+
<p class="left"><a href="http://drupal.org/project/core_library">Core Library</a></p>
112+
<p class="right"><a href="http://drupal.org/project/imageapi_optimize">ImageAPI Optimize</a></p>
113+
<p class="left"><a href="http://drupal.org/project/blackwhite">Black n White</a></p>
114+
<p class="right"><a href="http://drupal.org/project/adaptive_image">Adaptive Images</a></p>
115+
<p class="left"><a href="http://developer.yahoo.com/yslow/">YSlow</a></p>
116+
<p class="right"><a href="https://developers.google.com/speed/pagespeed/insights">Google PageSpeed</a></p>
117+
</div>
118+
119+
<div id="your-turn" class="step huge" data-x="9500" data-y="-300" data-scale="6">
120+
<p>Your Turn</p>
121+
</div>
122+
123+
<!-- <div id="overview" class="step" data-x="3000" data-y="1500" data-scale="5">
124+
</div> -->
125+
126+
</div>
127+
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
128+
<script src="js/impress.js"></script>
129+
<script src="js/speed-script.js"></script>
130+
</body>
131+
</html>
132+

imgs/crazy.gif

1.69 MB
Loading

imgs/heroku.png

7.97 KB
Loading

imgs/ti.png

33.8 KB
Loading

js/speed-script.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
$(function() {
2+
3+
impress().init();
4+
$('.hidden').css('opacity',0);
5+
window.addEventListener('impress:stepenter', function() {
6+
$('.hidden.active').animate({'opacity': 1});
7+
});
8+
window.addEventListener('impress:stepleave', function() {
9+
$('.hidden.past').animate({'opacity': 0});
10+
});
11+
12+
});

0 commit comments

Comments
 (0)