Browse Source

更新样式,添加欢迎页

master
左文祺 8 years ago
parent
commit
3776a9a473
  1. 2
      src/main.py
  2. BIN
      src/static/images/welcome.jpg
  3. 4
      src/static/index.css
  4. 10
      src/static/js/index.js
  5. 2
      src/templates/index.html
  6. 50
      src/templates/welcome.html

2
src/main.py

@ -114,4 +114,4 @@ def run(host, port, debug): @@ -114,4 +114,4 @@ def run(host, port, debug):
if __name__ == '__main__':
run('localhost', 8080, True)
run('0.0.0.0', 8080, True)

BIN
src/static/images/welcome.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 1005 KiB

4
src/static/index.css

@ -80,8 +80,8 @@ h4 { @@ -80,8 +80,8 @@ h4 {
}
.luckerList {
width: 800px;
height: 550px;
/*width: 800px;*/
min-height: 550px;
}
.left ul {

10
src/static/js/index.js

@ -247,17 +247,21 @@ class Index { @@ -247,17 +247,21 @@ class Index {
let lisArray = award.data.map((data) => {
return `<li class="${data.role == 2 || data.role == 3 ? 'sp' : ''}">${data.name}<span>【${data.uid}】</span></li>`
});
if(lisArray.length!==0){
content += `
<section>
<section>
<h5>${award.name}</h5>
<ul>
${lisArray.join("")}
</ul>
</section>`;
</section>
`;
}
}
layer.open({
type: 1,
area: '800px',
area: '1024px',
skin: 'layui-layer-lan', //样式类名
offset: [offset.top, offset.left],
closeBtn: 1, //不显示关闭按钮

2
src/templates/index.html

@ -4,8 +4,6 @@ @@ -4,8 +4,6 @@
<meta charset="UTF-8">
<title>运营技术中心2018年会抽奖</title>
<link rel="stylesheet" href="../static/index.css">
<link href='https://fonts.googleapis.com/css?family=Oswald&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="../static/web-fonts-with-css/css/fontawesome-all.min.css">
<link rel="stylesheet" href="../static/buttons.css">
<link rel="stylesheet" href="../static/animate.css">

50
src/templates/welcome.html

@ -0,0 +1,50 @@ @@ -0,0 +1,50 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>运营技术中心2018年会</title>
<link rel="stylesheet" href="../static/buttons.css">
<style>
html,body{
margin:0;
padding:0;
height:100%;
}
body{
position: relative;
width:100%;
height: 100%;
background: url("../static/images/welcome.jpg") no-repeat top center;
background-size: cover;
}
h1{
margin:0;
position: absolute;
top:40%;
left:50%;
white-space: nowrap;
transform: translate3d(-50%,-50%,0);
text-align: center;
font-size: 100px;
color: #3c0a06;
font-family: "LiSu", "Microsoft YaHei", sans-serif;
}
.btns{
position: absolute;
left:50%;
transform: translate3d(-50%,0,0);
bottom:10%;
}
</style>
</head>
<body>
<h1>运营技术中心<br>2018年会</h1>
<div class="btns">
<a href="/templates/index.html" class="button button-raised button-primary">抽奖</a>
<a href="/templates/manage.html" class="button button-raised " target="_blank">管理</a>
</div>
</body>
</html>
Loading…
Cancel
Save