Skip to content

Commit

Permalink
Merge pull request #19 from newpanjing/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
newpanjing authored Apr 24, 2019
2 parents 40cc1e2 + e228943 commit bc8405b
Show file tree
Hide file tree
Showing 159 changed files with 534 additions and 1,925 deletions.
34 changes: 34 additions & 0 deletions QUICK.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ simpleui 快速上手指南
+ [修改默认图标](#修改默认图标)
+ [修改默认首页](#修改默认首页)
+ [修改LOGO](#修改LOGO)
+ [配置首页模块](#配置首页模块)
+ [服务器信息](#服务器信息)
+ [快速操作](#快速操作)
+ [最近动作](#最近动作)
+ [关闭分析](#关闭分析)
+ [自定义菜单](#自定义菜单)
+ [修改模板](#修改模板)
Expand Down Expand Up @@ -184,12 +188,41 @@ simpleui内置了一个默认的首页,只是由简单的快捷导航与最近
+ 自定义SIMPLEUI的Logo
> SIMPLEUI_LOGO = 'https://avatars2.githubusercontent.com/u/13655483?s=60&v=4'
## 配置首页模块
首页默认展示3个模块,服务器信息、快速操作、最近动作,大家可以根据需要来显示或者隐藏某些模块。
### 服务器信息
隐藏:
> SIMPLEUI_HOME_INFO = False
显示:
> SIMPLEUI_HOME_INFO = True
### 快速操作

隐藏:
> SIMPLEUI_HOME_QUICK = False
显示:
> SIMPLEUI_HOME_QUICK = True
### 最近动作

隐藏:
> SIMPLEUI_HOME_ACTION = False
显示:
> SIMPLEUI_HOME_ACTION = True
## 关闭分析
+ False=不收集分析信息,True=收集,一天只上报一次分析数据
> SIMPLEUI_ANALYSIS = False
## 自定义菜单

### system_keep 保留系统菜单
该字段用于告诉simpleui,是否需要保留系统默认的菜单,默认为False,不保留。
如果改为True,自定义和系统菜单将会并存

### menus说明

|字段|说明|
Expand All @@ -202,6 +235,7 @@ simpleui内置了一个默认的首页,只是由简单的快捷导航与最近
### 例子
```python
SIMPLEUI_CONFIG = {
'system_keep':False,
'menus': [{
'name': 'Simpleui',
'icon': 'fas fa-code',
Expand Down
43 changes: 25 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ simpleui

🎨 Django Admin默认界面设计语言存在着的一些不足,比如色彩单一,大量线条的使用,分割化明显。将这些不足归类一下就是界面单调、雷同性明显、缺少惊喜。我们认为新的平台类视觉风格可以打破这些束缚,尝试一些新的探索,启发传统的设计认知,因此结合当下设计趋势,构思了Element+Django Admin的Simpleui。让Django Admin和Element产生完美的交互。

## 本地Demo下载
如果你没有任何python django基础,可以下载一个可以直接运行的demo进行体验。
[😝DEMO源码](https://github.com/newpanjing/simpleui_demo)

## 在线Demo
> 权限受限,只能查看模块的相关数据,不能操作。如果要体验全部功能,请在自己的系统安装simpleui查看效果。
+ 地址:[https://www.88cto.com/admin/](https://www.88cto.com/admin/)
+ 用户名:demo
+ 密码:demo123456

# simpleui 是什么?
🚀simpleui 是django admin的一个主题 是一个基于element-ui+vue开发,重写和优化90%以上的页面。
与suit是同类产品。我们是一个更符合国人审美和使用习惯的一个主题。
Expand All @@ -47,17 +58,8 @@ simpleui
```python
pip install django-simpleui
```
+ 升级
```python
pip install django-simpleui --upgrade
```
+ 克隆源码本地安装
```shell
git clone https://github.com/newpanjing/simpleui
cd simpleui
python setup.py sdist install
```
用pip或者源码方式安装simpleui后,在自己项目的settings.py文件中INSTALLED_APPS的第一行加入`simpleui`

用pip或者[源码方式](#克隆源码本地安装)安装simpleui后,在自己项目的settings.py文件中INSTALLED_APPS的第一行加入`simpleui`

举个例子🌰:
```python
Expand All @@ -74,15 +76,20 @@ python setup.py sdist install
...
]
```
## 在线Demo
> 权限受限,只能查看模块的相关数据,不能操作。如果要体验全部功能,请在自己的系统安装simpleui查看效果。

+ 地址:[https://www.88cto.com/admin/](https://www.88cto.com/admin/)
+ 用户名:demo
+ 密码:demo123456
如果不知道怎么配置或者如何使用,请下载[本地demo](#本地Demo下载)进行学习。或者加入QQ群:786576510 咨询。

## demo下载
[DEMO](https://github.com/newpanjing/simpleui_demo)
# 升级simpleui
```python
pip install django-simpleui --upgrade
```

# 克隆源码本地安装
```shell
git clone https://github.com/newpanjing/simpleui
cd simpleui
python setup.py sdist install
```

## 常见问题:

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@
long_description=long_description,
author_email='newpanjing@icloud.com',
description='django admin theme 后台模板',
install_requires=['django', 'requests'],
install_requires=['django'],
)
2 changes: 1 addition & 1 deletion simpleui/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
def get_version():
return '2.0'
return '2.0.4'
58 changes: 39 additions & 19 deletions simpleui/static/admin/simpleui-x/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,60 +53,80 @@ a:link, a:visited {
text-decoration: none;
}

.object-tools{
.object-tools {
margin-top: 0px;
}

.vTextField{
.vTextField {
outline: none;
}

td, th {
vertical-align: inherit;
border-bottom: none;
}

.row2 {
background: #fafafa;
}
tbody tr:hover td,tbody tr:hover th{

tbody tr:hover td, tbody tr:hover th {
background-color: #ebf5ff;
}
.form-row{
border-bottom: none!important;

.form-row {
border-bottom: none !important;
}

.submit-row input[type='submit'] {
height: auto;
}

.submit-row input[type='submit'] {
padding: 12px 20px !important;
}

@media (max-width: 767px) {
.submit-row > * {
margin-left: 0px !important;
margin-bottom: 10px;
}
.form-main{

.form-main {
padding: 0px;
}
#content{
padding:0px 3px!important;

#content {
padding: 0px 3px !important;
}

.simpleui-form .el-input{
.simpleui-form .el-input {
width: 100px;
padding-left: 0px!important;
padding-right: 0px!important;
padding-left: 0px !important;
padding-right: 0px !important;
margin: 0px;
margin-right: 10px;
}
.object-tools{

.object-tools {
margin-top: 10px;
}
.el-pagination{

.el-pagination {
white-space: inherit;
}
}

@media (max-width: 1024px) {
.change-list .filtered .results, .change-list .filtered .paginator, .filtered #toolbar, .filtered .actions, .filtered div.xfull{
margin-right: 0px!important;
.change-list .filtered .results, .change-list .filtered .paginator, .filtered #toolbar, .filtered .actions, .filtered div.xfull {
margin-right: 0px !important;
}
#changelist-search > div{
max-width: 100%!important;

#changelist-search > div {
max-width: 100% !important;
}
#content{
padding: 0px!important;

#content {
padding: 0px !important;
}
}
12 changes: 12 additions & 0 deletions simpleui/static/admin/simpleui-x/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,18 @@ html, body {
margin-left: 10px;
}

.quick-card {
width: auto;
display: inline-block !important;
float: left;
margin: 10px;
}
.quick-card a {
text-decoration: none;
line-height: 35px;
color: rgb(64, 158, 255);
}

@media screen and (max-width: 1000px) {
#home .el-col-6 {
width: 50%;
Expand Down
7 changes: 7 additions & 0 deletions simpleui/static/admin/simpleui-x/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@
var width = document.documentElement.clientWidth || document.body.clientWidth;
self.fold = width < 800;
self.small = width < 800;

//判断全屏状态
try {
self.zoom = document.webkitIsFullScreen;
} catch (e) {
//不是非webkit内核下无能为力
}
}
window.app = this;
this.menus = window.menus
Expand Down
6 changes: 6 additions & 0 deletions simpleui/static/admin/simpleui-x/js/vue.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion simpleui/static/admin/simpleui-x/locale/en-us.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ var Lanuages = {
"Tips": "",
"Are you sure you want them all closed": "Are you sure you want them all closed?",

"to":""
"to": "",
"Quick navigation": ""
}
3 changes: 2 additions & 1 deletion simpleui/static/admin/simpleui-x/locale/zh-hans.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ var Lanuages = {
"Tips": "提示",
"Are you sure you want them all closed": "你确定要全部关闭吗?",

"to": "至"
"to": "至",
"Quick navigation": "快捷操作"
}
6 changes: 6 additions & 0 deletions simpleui/static/admin/simpleui-x/theme/admin.lte.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion simpleui/static/admin/simpleui-x/theme/admin.lte.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bc8405b

Please sign in to comment.