开始Flask项目
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title> {% block title %}{% endblock %} 首页</title> <link type="text/css" rel="stylesheet" href="{{url_for('static',filename='css/index.css')}}"> {% block head %} {% endblock %} </head> <body> <img src="../static/image/woman32.png" alt="wo" width="30px"> <a href="{{url_for('index')}}">首页</a> <a href="http://127.0.0.1:5000/login">login</a> <a href="{{url_for('login')}}">regist</a> <img scr="{{url_for('static',filename='image/woman32.png'}}" alt="" width="50px"> {% block main %}{% endblock %} </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title> {% block title %} {% endblock %}--海贼王</title> {% block head %} <link rel="stylesheet" href="{{url_for('static',filename='css/index.css')}}" type="text/css"> <script src="{{url_for('static',filename='js/base.js'}}"></script> {% endblock %} </head> <body id="myBody"> <nav style="padding-top:5px"> {% block main %} <img id="myOnOff" onclick="mySwitch()" src="http://www.runoob.com/images/pic_bulbon.gif" width="30px"> <a href="{{ url_for('base') }}">首页</a> <a href="">下载APP</a> <a href="{{ url_for('login') }}">登录</a> <a href="{{ url_for('regist') }}">注册</a> </nav> <div class="area"> <br> <select> <option>路飞</option> <option>娜美</option> <option>山治</option> <option>索隆</option> </select> <p>Onepiece</p> <p>onepiece</p> </div> <div class="subarea"> <div class="img"> <a href="http://www.gzcc.cn"><img src="http://img4q.duitang.com/uploads/item/201503/05/20150305160221_UtNZR.thumb.700_0.jpeg"></a> <div class="desc"><a href="http://www.gzcc.cn">海贼王</a> </div> </div> <div class="img"> <a href="http://www.gzcc.cn"><img src="http://photo.l99.com/bigger/31/1363338579349_p05ju6.jpg"></a> <div class="desc"><a href="http://www.gzcc.cn">海贼王</a> </div> </div> <div class="img"> <a href="http://www.gzcc.cn"><img src="http://p5.so.qhimgs1.com/t01ae15dfa7929fd93b.jpg"></a> <div class="desc"><a href="http://www.gzcc.cn">海贼王</a> </div> </div> <div class="img"> <a href="http://www.gzcc.cn"><img src="http://p1.so.qhimgs1.com/t01370d2d421ed381cd.jpg"></a> <div class="desc"><a href="http://www.gzcc.cn">海贼王</a> </div> </div> <br> <footer> <div class="footer_box"> 西瓜大胖 </div> </footer> </body> </html>