项目选用的是python的flask框架进行设计
flask轻量级框架流程比较简单
其中web页面的展示就包括
论文的显示
ECCV2018论文信息展示
ICCV2019论文信息展示
两年论文信息比对
包括四个部分
还有一个新闻的主页面
我的css模板是运用的黄某人的模板,在此感谢黄某人
CSS文件如下
*{
padding: 0;
margin: 0;
box-sizing: border-box;
}
html,body{
font-family: "Segoe UI",Tahoma,Geneva,Verdana,sans-serif;
}
a{
color: #333;
text-decoration: none;
}
h1,h3,h3{
padding-bottom: 20px;
}
p{
margin: 10px 0;
}
.text-primary {
color: #fff;
}
.bg-dark {
background: #444;
color: #fff;
}
#showcase {
background: url("../images/9b1d03cb3c0738af59fb7ec4be61a7a7.jpeg") no-repeat center center/cover;
height: 646px;
}
#showcase .showcase-content {
color: #fff;
text-align: center;
padding-top: 170px;
}
#showcase .showcase-content h1 {
font-size: 60px;
line-height: 1.2cm;
}
#showcase .showcase-content p {
font-size: 20px;
line-height: 1.7cm;
padding-bottom: 20px;
}
.btn {
display: inline-block;
font-size: 18px;
color: #fff;
background: #2E9AFE;
padding: 13px 20px;
}
#home-info {
height: 250px;
}
#home-info .info-img {
float: left;
50%;
background: url("../images/51c687e67f7c0454d40601117c12d005.jpeg") no-repeat center center/cover;
height: 100%;
}
#home-info .info-content {
float: right;
50%;
text-align: center;
height: 100%;
padding: 50px 30px;
overflow: hidden;
}
前端的功能第一个是论文的内容展示
其中论文可查询全部
也可按照标题 关键词 摘要 进行查询
其中查询全部直接进行数据库的查询
然后是条件查询
选用多条件模糊查询
其中选用三个查询框
按照输入的内容进行多条件模糊查询
其中查询语句如下
sql = '''select * from paper where title like '%%%%%s%%%%' and abstract like '%%%%%s%%%%' and keywords like '%%%%%s%%%%' and href is not null
''' % (title, abstract, keywords)
在sql语言中模糊查询匹配多个字符是用%
在sql语言加入预编译的写法时会出现他的%和模糊查询的%语义冲突
需要加入%%%进行转义
所以在上述sql语句会出现%%%%%s%%%%
然后实现多条件模糊查询
查询页面如下