Commit 51375a30 authored by liyuanhong's avatar liyuanhong

删除了与项目无关的文件

parent 02b4babe
......@@ -11,13 +11,6 @@ from views.messageTools.msgSetting_process import msgSetting_process
from views.messageTools.message_view import message_view
from views.messageTools.message_process import message_process
from views.tab1.style import style
from views.tab1.icon import icon
from views.tab2.login import login
from views.tab2.example import example
from views.other import other
app = Flask(__name__)
app.register_blueprint(setting_view,url_prefix = "/protocolTools/setting_view")
app.register_blueprint(setting_process,url_prefix = "/protocolTools/setting_process")
......@@ -30,12 +23,6 @@ app.register_blueprint(msgSetting_process,url_prefix = "/messageTools/msgSetting
app.register_blueprint(message_view,url_prefix = "/messageTools/message_view")
app.register_blueprint(message_process,url_prefix = "/messageTools/message_process")
app.register_blueprint(style,url_prefix = "/tab1/style")
app.register_blueprint(icon,url_prefix = "/tab1/icon")
app.register_blueprint(login,url_prefix = "/tab2/login")
app.register_blueprint(example,url_prefix = "/tab2/example")
app.register_blueprint(other,url_prefix = "/other")
@app.route('/')
def hello():
return redirect('/tab1/style')
......
/**
*tab1基本控件顶部tab且换
*/
function iconManTab(e){
var url = window.location.href;
var id = $(e).attr("id");
if(id == "style_index"){
$(location).attr('href', "http://" + window.location.host + "/tab1/icon");
}else{
alert(id)
}
}
/**
*tab1基本控件顶部tab且换
*/
function styleManTab(e){
var url = window.location.href;
var id = $(e).attr("id");
if(id == "style_buttons"){
$(location).attr('href', "http://" + window.location.host + "/tab1/style");
}else if(id == "style_labels"){
$(location).attr('href', "http://" + window.location.host + "/tab1/style/labels");
}else if(id == "style_tables"){
$(location).attr('href', "http://" + window.location.host + "/tab1/style/tables");
}else{
alert(id)
}
}
......@@ -21,9 +21,6 @@
<ul class="nav nav-tabs" style="font-size:18px;">
<li role="presentation" {% if arg.path[0]=="protocolTools" %} class="active" {% endif %}><a onclick="swichTap(this)" id="protocolTools">M500协议工具</a></li>
<li role="presentation" {% if arg.path[0]=="messageTools" %} class="active" {% endif %}><a onclick="swichTap(this)" id="messageTools">新硬件消息工具</a></li>
<li role="presentation" {% if arg.path[0]=="tab1" %} class="active" {% endif %}><a onclick="swichTap(this)" id="tab1">案例</a></li>
<li role="presentation" {% if arg.path[0]=="tab2" %} class="active" {% endif %}><a onclick="swichTap(this)" id="tab2">演示页面</a></li>
<li role="presentation" {% if arg.path[0]=="other" %} class="active" {% endif %}><a onclick="swichTap(this)" id="otherTab">其他</a></li>
</ul>
</div>
</div>
......
{% extends "base.html" %}
{% block title %}other{% endblock %}
{% block content %}
<div style="width:70%;height:700px;margin:auto;">
<h1 style="margin-top:100px;">什么也没有哦~</h1>
</div>
{% endblock %}
{% block bottom %}
<div style="width:100%;height:80px;background-color:grey;float:left;">
{% endblock %}
</div>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
{% extends "base.html" %}
{% block title %}index{% endblock %}
{% block content %}
<style type="text/css">
.link-tab {
background-color:#e4e2dd;
}
.active_left_tab {
background-color:#428BCA;
color:white;
}
.table>thead>tr>th,.table>tbody>tr>td{
_background-color:red;
}
</style>
<!-- 切换左边的tab -->
<script type="text/javascript">
function swichLeftTab(e){
var id = $(e).attr("id")
if(id == "style"){
$(location).attr('href', "http://" + window.location.host + "/tab1/style");
}else if(id == "icon"){
$(location).attr('href', "http://" + window.location.host + "/tab1/icon");
}
}
</script>
<!-- 左侧导航添加为可继承模块 -->
{% block leftNav %}
<div id="container1" class="col-sm-3 col-md-2 sidebar" style="margin-top:50px;width:15%;padding:0px;margin-right:15px;">
<ul class="nav nav-sidebar">
<li id="style" onclick="swichLeftTab(this)"><a {% if arg.path[1]=="style" %} class="active_left_tab" {% endif %}><span class="glyphicon glyphicon-user" aria-hidden="true"></span>基本控件<span class="sr-only"></span></a></li>
<li id="icon" onclick="swichLeftTab(this)"><a {% if arg.path[1]=="icon" %} class="active_left_tab" {% endif %}><span class="glyphicon glyphicon-flag" aria-hidden="true"></span>图标预览</a></li>
</ul>
<ul class="nav nav-sidebar" style="margin-top:20px;">
<li><a><span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span>其他页面</a></li>
</ul>
</div>
{% endblock %}
{% block content_01 %}
<!-- 右边内容区域 -->
{% endblock %}
{% endblock %}
</div>
\ No newline at end of file
{% extends "tab1/index.html" %}
{% block title %}buttons{% endblock %}
{% block content_01 %}
<script src="../../static/js/tab1/style.js"></script>
<div id="container2" style="width:82%;min-height:750px;float:left;_background:grey;margin-top:50px;">
{% block content_02 %}
<ul class="nav nav-pills" style="font-size:14px;">
<li role="presentation"><a id="style_buttons" {% if arg.path[2]=="" %} class="link-tab" {% endif %} onclick="styleManTab(this)">按钮</b></a></li>
<li role="presentation"><a id="style_labels" {% if arg.path[2]=="labels" %} class="link-tab" {% endif %} onclick="styleManTab(this)">标签</a></li>
<li role="presentation"><a id="style_tables" {% if arg.path[2]=="tables" %} class="link-tab" {% endif %} onclick="styleManTab(this)">表格</a></li>
</ul>
{% endblock %}
{% block content_1 %}
<div id="container3" style="width:100%;min-height:750px;float:left;_background:green;margin-top:10px;">
<div class="page-header">
<h1>Buttons</h1>
<p>
<button type="button" class="btn btn-lg btn-default">Default</button>
<button type="button" class="btn btn-lg btn-primary">Primary</button>
<button type="button" class="btn btn-lg btn-success">Success</button>
<button type="button" class="btn btn-lg btn-info">Info</button>
<button type="button" class="btn btn-lg btn-warning">Warning</button>
<button type="button" class="btn btn-lg btn-danger">Danger</button>
<button type="button" class="btn btn-lg btn-link">Link</button>
</p>
<p>
<button type="button" class="btn btn-default">Default</button>
<button type="button" class="btn btn-primary">Primary</button>
<button type="button" class="btn btn-success">Success</button>
<button type="button" class="btn btn-info">Info</button>
<button type="button" class="btn btn-warning">Warning</button>
<button type="button" class="btn btn-danger">Danger</button>
<button type="button" class="btn btn-link">Link</button>
</p>
<p>
<button type="button" class="btn btn-sm btn-default">Default</button>
<button type="button" class="btn btn-sm btn-primary">Primary</button>
<button type="button" class="btn btn-sm btn-success">Success</button>
<button type="button" class="btn btn-sm btn-info">Info</button>
<button type="button" class="btn btn-sm btn-warning">Warning</button>
<button type="button" class="btn btn-sm btn-danger">Danger</button>
<button type="button" class="btn btn-sm btn-link">Link</button>
</p>
<p>
<button type="button" class="btn btn-xs btn-default">Default</button>
<button type="button" class="btn btn-xs btn-primary">Primary</button>
<button type="button" class="btn btn-xs btn-success">Success</button>
<button type="button" class="btn btn-xs btn-info">Info</button>
<button type="button" class="btn btn-xs btn-warning">Warning</button>
<button type="button" class="btn btn-xs btn-danger">Danger</button>
<button type="button" class="btn btn-xs btn-link">Link</button>
</p>
</div>
</div>
{% endblock %}
</div>
{% endblock %}
\ No newline at end of file
{% extends "tab1/style_buttons.html" %}
{% block title %}labels{% endblock %}
{% block content_1 %}
<div id="container3" style="width:100%;min-height:750px;float:left;_background:green;margin-top:10px;">
<div class="page-header">
<h1>Labels</h1>
</div>
<h1>
<span class="label label-default">Default</span>
<span class="label label-primary">Primary</span>
<span class="label label-success">Success</span>
<span class="label label-info">Info</span>
<span class="label label-warning">Warning</span>
<span class="label label-danger">Danger</span>
</h1>
<h2>
<span class="label label-default">Default</span>
<span class="label label-primary">Primary</span>
<span class="label label-success">Success</span>
<span class="label label-info">Info</span>
<span class="label label-warning">Warning</span>
<span class="label label-danger">Danger</span>
</h2>
<h3>
<span class="label label-default">Default</span>
<span class="label label-primary">Primary</span>
<span class="label label-success">Success</span>
<span class="label label-info">Info</span>
<span class="label label-warning">Warning</span>
<span class="label label-danger">Danger</span>
</h3>
<h4>
<span class="label label-default">Default</span>
<span class="label label-primary">Primary</span>
<span class="label label-success">Success</span>
<span class="label label-info">Info</span>
<span class="label label-warning">Warning</span>
<span class="label label-danger">Danger</span>
</h4>
<h5>
<span class="label label-default">Default</span>
<span class="label label-primary">Primary</span>
<span class="label label-success">Success</span>
<span class="label label-info">Info</span>
<span class="label label-warning">Warning</span>
<span class="label label-danger">Danger</span>
</h5>
<h6>
<span class="label label-default">Default</span>
<span class="label label-primary">Primary</span>
<span class="label label-success">Success</span>
<span class="label label-info">Info</span>
<span class="label label-warning">Warning</span>
<span class="label label-danger">Danger</span>
</h6>
</div>
{% endblock %}
\ No newline at end of file
{% extends "tab1/style_buttons.html" %}
{% block title %}tables{% endblock %}
{% block content_1 %}
<div id="container3" style="width:100%;min-height:750px;float:left;_background:green;margin-top:10px;">
<div class="page-header">
<h1>Tables</h1>
</div>
<!-- 第一个div包裹的table -->
<div class="row">
<div class="col-md-6">
<table class="table">
<thead>
<tr>
<th>#</th>
<th>First Name</th>
<th>Last Name</th>
<th>Username</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
<td>2</td>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<td>3</td>
<td>Larry</td>
<td>the Bird</td>
<td>@twitter</td>
</tr>
</tbody>
</table>
</div>
<div class="col-md-6">
<table class="table table-striped">
<thead>
<tr>
<th>#</th>
<th>First Name</th>
<th>Last Name</th>
<th>Username</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
<td>2</td>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<td>3</td>
<td>Larry</td>
<td>the Bird</td>
<td>@twitter</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- 第二个div包裹的table -->
<div class="row">
<div class="col-md-6">
<table class="table table-bordered">
<thead>
<tr>
<th>#</th>
<th>First Name</th>
<th>Last Name</th>
<th>Username</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="2">1</td>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
<td>Mark</td>
<td>Otto</td>
<td>@TwBootstrap</td>
</tr>
<tr>
<td>2</td>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<td>3</td>
<td colspan="2">Larry the Bird</td>
<td>@twitter</td>
</tr>
</tbody>
</table>
</div>
<div class="col-md-6">
<table class="table table-condensed">
<thead>
<tr>
<th>#</th>
<th>First Name</th>
<th>Last Name</th>
<th>Username</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
<td>2</td>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<td>3</td>
<td colspan="2">Larry the Bird</td>
<td>@twitter</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
{% endblock %}
\ No newline at end of file
{% extends "tab2/index.html" %}
{% block title %}example{% endblock %}
{% block content_01 %}
<script src="../../static/js/tab1/style.js"></script>
<style>
</style>
<div id="container2" style="width:82%;min-height:750px;float:left;_background:grey;margin-top:50px;">
{% block content_1 %}
<div id="container3" style="width:100%;min-height:750px;float:left;_background:green;margin-top:10px;">
<div class="container">
<div class="page-header">
<h1>Non-responsive Bootstrap</h1>
<p class="lead">Disable the responsiveness of Bootstrap by fixing the width of the container and using the first grid system tier. <a href="http://getbootstrap.com/getting-started/#disable-responsive">Read the documentation</a> for more information.</p>
</div>
<h3>What changes</h3>
<p>Note the lack of the <code>&lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;</code>, which disables the zooming aspect of sites in mobile devices. In addition, we reset our container's width and changed the navbar to prevent collapsing, and are basically good to go.</p>
<h3>Regarding navbars</h3>
<p>As a heads up, the navbar component is rather tricky here in that the styles for displaying it are rather specific and detailed. Overrides to ensure desktop styles display are not as performant or sleek as one would like. Just be aware there may be potential gotchas as you build on top of this example when using the navbar.</p>
<h3>Browsers, scrolling, and fixed elements</h3>
<p>Non-responsive layouts highlight a key drawback to fixed elements. <strong class="text-danger">Any fixed component, such as a fixed navbar, will not be scrollable when the viewport becomes narrower than the page content.</strong> In other words, given the non-responsive container width of 970px and a viewport of 800px, you'll potentially hide 170px of content.</p>
<p>There is no way around this as it's default browser behavior. The only solution is a responsive layout or using a non-fixed element.</p>
<h3>Non-responsive grid system</h3>
<div class="row">
<div class="col-xs-4">One third</div>
<div class="col-xs-4">One third</div>
<div class="col-xs-4">One third</div>
</div>
</div>
</div>
{% endblock %}
</div>
{% endblock %}
\ No newline at end of file
{% extends "base.html" %}
{% block title %}tab2_index{% endblock %}
{% block content %}
<style type="text/css">
.link-tab {
background-color:#e4e2dd;
}
.active_left_tab {
background-color:#428BCA;
color:white;
}
.table>thead>tr>th,.table>tbody>tr>td{
_background-color:red;
}
</style>
<!-- 切换左边的tab -->
<script type="text/javascript">
function swichLeftTab(e){
var id = $(e).attr("id")
if(id == "login"){
$(location).attr('href', "http://" + window.location.host + "/tab2/login");
}else if(id == "example"){
$(location).attr('href', "http://" + window.location.host + "/tab2/example");
}
}
</script>
<!-- 左侧导航添加为可继承模块 -->
{% block leftNav %}
<div id="container1" class="col-sm-3 col-md-2 sidebar" style="margin-top:50px;width:15%;padding:0px;margin-right:15px;">
<ul class="nav nav-sidebar">
<li id="login" onclick="swichLeftTab(this)"><a {% if arg.path[1]=="login" %} class="active_left_tab" {% endif %}><span class="glyphicon glyphicon-asterisk" aria-hidden="true"></span>登录页面演示<span class="sr-only"></span></a></li>
<li id="example" onclick="swichLeftTab(this)"><a {% if arg.path[1]=="example" %} class="active_left_tab" {% endif %}><span class="glyphicon glyphicon-asterisk" aria-hidden="true"></span>简易文本页面</a></li>
</ul>
<ul class="nav nav-sidebar" style="margin-top:20px;">
<li><a><span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span>其他页面</a></li>
</ul>
</div>
{% endblock %}
{% block content_01 %}
<!-- 右边内容区域 -->
{% endblock %}
{% endblock %}
</div>
\ No newline at end of file
{% extends "tab2/index.html" %}
{% block title %}login{% endblock %}
{% block content_01 %}
<script src="../../static/js/tab1/style.js"></script>
<style>
.form-signin {
max-width: 330px;
padding: 15px;
margin: 0 auto;
}
</style>
<div id="container2" style="width:82%;min-height:750px;float:left;_background:grey;margin-top:50px;">
{% block content_1 %}
<div id="container3" style="width:100%;min-height:750px;float:left;_background:green;margin-top:10px;">
<div class="container">
<form class="form-signin">
<h2 class="form-signin-heading">Please sign in</h2>
<label for="inputEmail" class="sr-only">Email address</label>
<input type="email" id="inputEmail" class="form-control" placeholder="Email address" required="" autofocus="">
<label for="inputPassword" class="sr-only">Password</label>
<input type="password" id="inputPassword" class="form-control" placeholder="Password" required="">
<div class="checkbox">
<label>
<input type="checkbox" value="remember-me"> Remember me
</label>
</div>
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
</form>
</div>
</div>
{% endblock %}
</div>
{% endblock %}
\ No newline at end of file
from flask import Blueprint, render_template, Response ,request
other = Blueprint('other', __name__)
@other.route('/')
def index():
path = "other/index.html"
arg = {}
arg["path"] = path.split("/")
return render_template(path,arg=arg)
\ No newline at end of file
#coding:utf-8
from flask import Blueprint, render_template ,request
import re
icon = Blueprint('icon', __name__)
##########################################
# 【视图类型】访问tab1中icons类别
##########################################
@icon.route('/')
def index():
#获取请求的路劲
url = request.url
reqPath = re.findall("http://(.*)$",url)[0]
reqPath = re.findall("/(.*)$", reqPath)[0]
arg = {}
path = "tab1/icon_index.html"
arg["path"] = reqPath.split("/")
return render_template(path,arg=arg)
\ No newline at end of file
#coding:utf-8
from flask import Blueprint, render_template ,request
import re
style = Blueprint('style', __name__)
##########################################
# 【视图类型】访问tab1首页buttons
##########################################
@style.route('/')
def index():
#获取请求的路劲
url = request.url
reqPath = re.findall("http://(.*)$",url)[0]
reqPath = re.findall("/(.*)$", reqPath)[0]
arg = {}
path = "tab1/style_buttons.html"
arg["path"] = reqPath.split("/")
return render_template(path,arg=arg)
##########################################
# 【视图类型】访问tab1中的labels标签页面
##########################################
@style.route('/labels')
def getLabelsPage():
#获取请求的路劲
url = request.url
reqPath = re.findall("http://(.*)$",url)[0]
reqPath = re.findall("/(.*)$", reqPath)[0]
arg = {}
path = "tab1/style_labels.html"
arg["path"] = reqPath.split("/")
return render_template(path,arg=arg)
##########################################
# 【视图类型】访问tab1中的tables标签页面
##########################################
@style.route('/tables')
def getTablesPage():
#获取请求的路劲
url = request.url
reqPath = re.findall("http://(.*)$",url)[0]
reqPath = re.findall("/(.*)$", reqPath)[0]
arg = {}
path = "tab1/style_tables.html"
arg["path"] = reqPath.split("/")
return render_template(path,arg=arg)
#coding:utf-8
from flask import Blueprint, render_template ,request
import re
example = Blueprint('example', __name__)
##########################################
# 【视图类型】访问tab2中的example页面
##########################################
@example.route('/')
def index():
#获取请求的路劲
url = request.url
reqPath = re.findall("http://(.*)$",url)[0]
reqPath = re.findall("/(.*)$", reqPath)[0]
arg = {}
path = "tab2/example.html"
arg["path"] = reqPath.split("/")
return render_template(path,arg=arg)
\ No newline at end of file
#coding:utf-8
from flask import Blueprint, render_template ,request
import re
login = Blueprint('login', __name__)
##########################################
# 【视图类型】访问tab2首页login页面
##########################################
@login.route('/')
def index():
#获取请求的路劲
url = request.url
reqPath = re.findall("http://(.*)$",url)[0]
reqPath = re.findall("/(.*)$", reqPath)[0]
arg = {}
path = "tab2/login.html"
arg["path"] = reqPath.split("/")
return render_template(path,arg=arg)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment