add template

This commit is contained in:
JohnYan 2020-12-10 21:35:46 +08:00
parent e764a0d19a
commit f94e262831
7 changed files with 271 additions and 77 deletions

View File

@ -56,8 +56,7 @@ ROOT_URLCONF = 'django_smartchart.urls'
TEMPLATES = [ TEMPLATES = [
{ {
'BACKEND': 'django.template.backends.django.DjangoTemplates', 'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates')] 'DIRS': [os.path.join(BASE_DIR, 'templates')],
,
'APP_DIRS': True, 'APP_DIRS': True,
'OPTIONS': { 'OPTIONS': {
'context_processors': [ 'context_processors': [

View File

@ -0,0 +1,64 @@
<html><head><title>大数据:{{title}}</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta http-equiv="X-UA-Compatible" content="IE=edge">{% block head %}{% endblock %}{{contentrefresh|safe}}<style type="text/css">
.table th, .table td {
text-align: center;
}
.table {
font-size:10px;
}
::-webkit-scrollbar {
width: 0.25rem;
height: 0.25rem;
background-image: linear-gradient(135deg, #1DE9B6 0%, rgba(8, 196, 219, 0.5) 72%, rgba(0, 182, 234, 0.3) 100%);
}
::-webkit-scrollbar-track {
border-radius: 0;
}
::-webkit-scrollbar-thumb {
background-image: linear-gradient(135deg, #1DE9B6 0%, #08c4db 72%, #057494 100%);
transition: all .2s;
border-radius: 0.25rem;
}
::-webkit-scrollbar-thumb:hover {
background-color: rgba(95, 95, 95, 0.7);
}
{% block style %}
{% endblock %}</style></head>
<link rel="icon" type="image.png" href="https://www.smartchart.cn/static/images/favicon.ico"><link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.2.0/css/bootstrap.min.css">
{% block stylesheet %}{% endblock %}{{devhead|safe}}
{% block body %}{% endblock %} {{footer|safe}}
</html><script src="https://www.smartchart.cn/static/js/jquery-2.2.3.min.js"></script><script type="text/javascript" src="https://www.smartchart.cn/static/echart/dist/echarts.min.js"></script><script type="text/javascript" src="https://www.smartchart.cn/static/echart/dist/extension/echarts-wordcloud.min.js"></script><script src="https://www.smartchart.cn/static/js/fun.js"></script><script src="https://www.smartchart.cn/static/echart/theme/{{theme}}"></script><script type="text/javascript" src="https://www.smartchart.cn/static/bootstrap/js/bootstrap.min.js"></script>
{% block javascript %}{% endblock %}
<script>var app = {};var charts = [];{{echart_main|safe}}window.onresize = function(){for(var i = 0; i < charts.length; i++){charts[i].resize();}};
$(function(){
$("#fullScreen").on("click",function(){
var isFull=!!(document.webkitIsFullScreen || document.mozFullScreen ||
document.msFullscreenElement || document.fullscreenElement
);
if (isFull==false) {fullScreen();
}else{exitFullscreen();}
})
})
function fullScreen() {
var element = document.documentElement;
if (element.requestFullscreen) {
element.requestFullscreen();
} else if (element.msRequestFullscreen) {
element.msRequestFullscreen();
} else if (element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if (element.webkitRequestFullscreen) {
element.webkitRequestFullscreen();
}
}
function exitFullscreen() {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen();
}
}
</script>

View File

@ -0,0 +1,17 @@
{% extends "echart/base.html" %}
{% block head %}{% endblock %}
{% block style %}{% endblock %}
{% block stylesheet %}{% endblock %}
{% block body %}
<body {{body|safe}}>
<div class="container_fluid">
<div class="row_fluid">
{% for div in div_list %}
{{div|safe}}
{% endfor %}
</div>
</div>
</body>
{% endblock %}
{% block javascript %}{% endblock %}

View File

@ -55,7 +55,6 @@
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
</div> </div>
<!-- 模态框Modal -->
<div class="modal fade" id="myModal_reset" tabindex="-1" role="dialog" aria-labelledby="myModalLabel_reset" aria-hidden="true"> <div class="modal fade" id="myModal_reset" tabindex="-1" role="dialog" aria-labelledby="myModalLabel_reset" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
@ -77,8 +76,8 @@
开始执行 开始执行
</button> </button>
</div> </div>
</div> </div><!-- /.modal-content -->
</div> </div><!-- /.modal -->
</div> </div>
<script src="https://www.smartchart.cn/static/js/jquery-2.2.3.min.js"></script> <script src="https://www.smartchart.cn/static/js/jquery-2.2.3.min.js"></script>
<script type="text/javascript" src="https://www.smartchart.cn/static/ace/ace.js"></script> <script type="text/javascript" src="https://www.smartchart.cn/static/ace/ace.js"></script>

View File

@ -15,8 +15,6 @@
<link href="https://unpkg.com/bootstrap-table@1.15.5/dist/extensions/fixed-columns/bootstrap-table-fixed-columns.css" rel="stylesheet"> <link href="https://unpkg.com/bootstrap-table@1.15.5/dist/extensions/fixed-columns/bootstrap-table-fixed-columns.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="https://www.smartchart.cn/static/echart/pivot/color-brewer.min.css"> <link rel="stylesheet" type="text/css" href="https://www.smartchart.cn/static/echart/pivot/color-brewer.min.css">
<link href="https://www.smartchart.cn/static/echart/pivot/css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="https://www.smartchart.cn/static/echart/pivot/pivot.css">
<title>SmartChart Editor</title> <title>SmartChart Editor</title>
<script type="text/javascript"> <script type="text/javascript">
@ -1202,11 +1200,6 @@
<div id="code-container" style="width: 40%;"> <div id="code-container" style="width: 40%;">
<div id="control-panel"> <div id="control-panel">
<div id="code-info"><span class="code-info-time">07:54:08</span><span class="code-info-type-info">图表已生成, 54ms</span></div> <div id="code-info"><span class="code-info-time">07:54:08</span><span class="code-info-type-info">图表已生成, 54ms</span></div>
<div class="color-container">
<div class="color-picker" style="display: none;"></div>
<div class="current-palette"><span class="bgTopColor" style="background-color: rgb(237, 237, 237);" original-title="BG Gradient Color1"></span></div>
</div>
<div class="control-btn-panel">{{editormenu|safe}} <div class="control-btn-panel">{{editormenu|safe}}
<a href="javascript:;" onclick="disposeAndRun()" class="btn btn-default btn-sm">运行</a></div> <a href="javascript:;" onclick="disposeAndRun()" class="btn btn-default btn-sm">运行</a></div>
</div> </div>
@ -1274,62 +1267,7 @@
<script type="text/javascript" src="https://www.smartchart.cn/static/echart/echartedit/world.js"></script> <script type="text/javascript" src="https://www.smartchart.cn/static/echart/echartedit/world.js"></script>
<script type="text/javascript" src="https://www.smartchart.cn/static/echart/echartedit/ext-language_tools.js"></script> <script type="text/javascript" src="https://www.smartchart.cn/static/echart/echartedit/ext-language_tools.js"></script>
<script type="text/javascript" src="https://www.smartchart.cn/static/echart/echartedit/editor_min.js"></script> <script type="text/javascript" src="https://www.smartchart.cn/static/echart/echartedit/editor_min.js"></script>
<script type="text/javascript" src="https://www.smartchart.cn/static/echart/echartedit/bmap.js"></script>
<script src="https://www.smartchart.cn/static/layoutit/buttoncreator/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="https://www.smartchart.cn/static/layoutit/buttoncreator/js/colorpicker.js"></script>
<script src="https://www.smartchart.cn/static/layoutit/buttoncreator/js/button_simple.js" type="text/javascript"></script>
<script src="https://unpkg.com/bootstrap-table@1.15.5/dist/bootstrap-table.min.js"></script>
<script src="https://unpkg.com/bootstrap-table@1.15.5/dist/extensions/fixed-columns/bootstrap-table-fixed-columns.js"></script>
<script type="text/javascript" src="https://www.smartchart.cn/static/echart/pivot/jquery-ui.min.js"></script>
<script type="text/javascript" src="https://www.smartchart.cn/static/echart/pivot/pivot.js"></script>
<script type="text/javascript" src="https://www.smartchart.cn/static/echart/pivot/plotly-basic-latest.min.js"></script>
<script type="text/javascript" src="https://www.smartchart.cn/static/echart/pivot/plotly_renderers.js"></script>
<script type="text/javascript" src="https://www.smartchart.cn/static/echart/pivot/export_renderers.js"></script>
<script>{{chartinit|safe}}</script> <script>{{chartinit|safe}}</script>
<!-- Javascript End -->
<div class="colorpicker" id="collorpicker_811">
<div class="colorpicker_color" style="background-color: rgb(255, 0, 255);">
<div>
<div style="left: 0px; top: 5px;"></div>
</div>
</div>
<div class="colorpicker_hue">
<div style="top: 25px;"></div>
</div>
<div class="colorpicker_new_color" style="background-color: rgb(245, 245, 245);"></div>
<div class="colorpicker_current_color" style="background-color: rgb(245, 245, 245);"></div>
<div class="colorpicker_hex">
<input type="text" maxlength="6" size="6">
</div>
<div class="colorpicker_rgb_r colorpicker_field">
<input type="text" maxlength="3" size="3"><span></span>
</div>
<div class="colorpicker_rgb_g colorpicker_field">
<input type="text" maxlength="3" size="3"><span></span>
</div>
<div class="colorpicker_rgb_b colorpicker_field">
<input type="text" maxlength="3" size="3"><span></span>
</div>
<div class="colorpicker_hsb_h colorpicker_field">
<input type="text" maxlength="3" size="3"><span></span>
</div>
<div class="colorpicker_hsb_s colorpicker_field">
<input type="text" maxlength="3" size="3"><span></span>
</div>
<div class="colorpicker_hsb_b colorpicker_field">
<input type="text" maxlength="3" size="3"><span></span>
</div>
<div class="colorpicker_submit"></div>
</div>
<div class="colorpicker" id="collorpicker_843"><div class="colorpicker_color" style="background-color: rgb(255, 0, 255);"><div><div style="left: 0px; top: 5px;"></div></div></div><div class="colorpicker_hue"><div style="top: 25px;"></div></div><div class="colorpicker_new_color" style="background-color: rgb(245, 245, 245);"></div><div class="colorpicker_current_color" style="background-color: rgb(245, 245, 245);"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6"></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3"><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3"><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3"><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3"><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3"><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3"><span></span></div><div class="colorpicker_submit"></div></div>
</body> </body>
</html> </html>

View File

@ -47,7 +47,6 @@
</style> </style>
<script src="https://www.smartchart.cn/static/js/jquery-2.2.3.min.js"></script> <script src="https://www.smartchart.cn/static/js/jquery-2.2.3.min.js"></script>
<script src="https://www.smartchart.cn/static/index/colorpicker.js"></script>
<script src="https://www.smartchart.cn/static/index/dialog.js"></script> <script src="https://www.smartchart.cn/static/index/dialog.js"></script>
<script src="https://www.smartchart.cn/static/index/index_d.js"></script> <script src="https://www.smartchart.cn/static/index/index_d.js"></script>
</head> </head>
@ -55,17 +54,15 @@
<body lang="zh-CN" class="reader-black-font" style="overflow-y: scroll;"> <body lang="zh-CN" class="reader-black-font" style="overflow-y: scroll;">
<nav class="navbar navbar-default navbar-fixed-top" role="navigation" id="smart_head"> <nav class="navbar navbar-default navbar-fixed-top" role="navigation" id="smart_head">
<div > <div >
<a class="logo" href="https://www.smartchart.cn"><img src="https://www.smartchart.cn/static/index/logo9.png" alt="smartchart logo"></a> <a class="logo" href="https://www.smartchart.cn"><img src="https://www.smartchart.cn/static/index/logo8.png" alt="smartchart logo"></a>
<div class="nav_end"> <div class="nav_end">
<span class="head_icon" id="devchange" onclick="reset_dev()"><small><i class="fas fa-user"></i>{{user}}</small></span> <span class="head_icon" id="devchange" onclick="reset_dev()"><small><i class="fas fa-user"></i>{{user}}</small></span>
<a id="color-picker" class="picker head_icon" title="首页样式"><small><i class="fas fa-palette"></i></small></a>|
<a class="head_icon" id="iframe-heart" onclick="make_love()" title="收藏" ><small><i class="fas fa-heart"></i></small></a> <a class="head_icon" id="iframe-heart" onclick="make_love()" title="收藏" ><small><i class="fas fa-heart"></i></small></a>
<a class="head_icon" id="iframe-full" onclick="requestFullScreen()" title="全屏" ><small><i class="fas fa-expand"></i></small></a> <a class="head_icon" id="iframe-full" onclick="requestFullScreen()" title="全屏" ><small><i class="fas fa-expand"></i></small></a>
<a class="head_icon" id="iframe-refresh" onclick="refreshFrame()" title="刷新"><small><i class="fas fa-sync-alt"></i></small></a> <a class="head_icon" id="iframe-refresh" onclick="refreshFrame()" title="刷新"><small><i class="fas fa-sync-alt"></i></small></a>
<a class="head_icon" id="iframe-message" onclick="report_msg()" title="留言"><small><i class="fab fa-rocketchat"></i></small></a> <a class="head_icon" id="iframe-message" onclick="report_msg()" title="留言"><small><i class="fab fa-rocketchat"></i></small></a>
<a class="head_icon" id="iframe-edit" title="编辑" onclick="reset_dev()"><small><i class="fas fa-edit"></i></small></a>| <a class="head_icon" id="iframe-edit" title="编辑" onclick="reset_dev()"><small><i class="fas fa-edit"></i></small></a>|
<a class="head_icon" title="帮助" onclick="help()"><small><i class="fas fa-question-circle"></i></small></a> <a class="head_icon" title="帮助" href="https://gitee.com/smartchart/django_smartchart"><small><i class="fas fa-question-circle"></i></small></a>
<a href="https://gitee.com/smartchart/django_smartchart" title="手机版"><small><i class="fas fa-mobile-alt"></i></small></a>
<a href="/echart/logout" title="退出"><small><i class="fas fa-sign-out-alt"></i></small></a> <a href="/echart/logout" title="退出"><small><i class="fas fa-sign-out-alt"></i></small></a>
<a href="javascript:changelayout();" title="切换可视区"><img src="https://www.smartchart.cn/static/images/change.png" style="height: 25px;"></a> <a href="javascript:changelayout();" title="切换可视区"><img src="https://www.smartchart.cn/static/images/change.png" style="height: 25px;"></a>
</div> </div>
@ -109,7 +106,3 @@
<!--<p>&copy;powered by smartchart.cn,Designed by JohnYan mailto:84345999@qq.com, https://gitee.com/smartchart/django_smartchart</p>--> <!--<p>&copy;powered by smartchart.cn,Designed by JohnYan mailto:84345999@qq.com, https://gitee.com/smartchart/django_smartchart</p>-->
</body> </body>
</html> </html>
<script>var p_background = localStorage.getItem('p_background') || "#ffffff";let p_background_h = localStorage.getItem('p_background_h') || "#ffffff";$('#smart_head').css('background',p_background_h);$('#leftside').css('height',$(document.body).height())
Colorpicker.create({el: "color-picker", color: p_background, change: function(elem, hex) {if ($('#show_list').hasClass('mcd-menu1')){$('#smart_head').css('background',hex);localStorage.setItem('p_background_h',hex);
}else{$('#leftside').css('background',hex);localStorage.setItem('p_background',hex);p_background=hex;}}});
</script>

File diff suppressed because one or more lines are too long