• 制作首页的显示列表。


    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>首页
            {% block logintitle %}{% endblock %}
            {% block registertitle %}{% endblock %}
        </title>
        <nav style="background-color: white">
            <ul class="nav nav-tabs">
                <li><a href="{{ url_for('lx') }}">首页</a></li>
                {% if username %}
                    <li><a href="#">{{ username }}</a></li>
                    <li><a href="{{ url_for('logout')}}">注销</a></li>
                {% else %}
                    <li><a href="{{ url_for('login') }}">登录</a></li>
                    <li><a href="{{ url_for('regist') }}">注册</a></li>
                {% endif %}
                <li><a href="{{ url_for('fabu') }}">发布</a></li>
                <li><input type="text" class="form-control" style=" 200px"></li>
                <button type="button" class="btn btn-default">搜索</button>
    
            </ul>
        </nav>
        {% block loginhead %}{% endblock %}
        {% block registerhead %}{% endblock %}
    </head>
    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <link type="text/css" rel="stylesheet" href="{{ url_for('static',filename='css/webb.css') }}">
    
    <body class="body">
    
    <h1  align="center">欢迎进入我的网站</h1>
    {% block body %}
        <div class="container">
        <div class="row clearfix">
            <div class="col-md-2 column">
            </div>
            <div class="col-md-8 column">
                <div class="list-group">
                     <a href="#" class="list-group-item active">用户名:{{ user}}</a>
    
                    <div class="list-group-item">
                        <h4 class="list-group-item-heading">
                            {{ title}}
                        </h4>
                        <p class="list-group-item-text">
                            {{ detail}}
                        </p>
                    </div>
                    <div class="list-group-item">
                         <span class="badge">发布时间:{{time}}}</span> 发布时间
                    </div>
            </div>
            <div class="col-md-2 column">
            </div>
        </div>
    </div>
    {% endblock %}
    <footer class="foot">
        <div><a href="#"> 联系我们</a> · <a href="#"> 加入我们</a> · <a href="#"> 品牌与徽标 </a> · <a href="#">帮助中心</a> · <a href="#">合作伙伴</a>
        </div>
        <div>©2015-2017 广州商学院信息技术与工程学院 / 粤ICP备278953737号-5 / 粤公网安备2015060050046号 / Smrz 粤公网安备201506050046号 / Wxb
            举报电话:020-15533935928
        </div>
    </footer>
    
    
    </body>
    </html>
    @app.route('/')
    def lx():
        context = {
            'user': 'zmz',
            'title': '火锅底料',
            'time': '2017-11-29',
            'detail': '老子吃火锅,你吃火锅底料。',
    
        }
        return render_template('lx3.html',**context)

  • 相关阅读:
    hbase java api
    hbase
    误删/usr文件夹解决办法
    死锁问题 代码示例
    H2O 生成 多线程并发控制 Semaphore
    多线程 打印零与奇偶数
    多线程交替打印 采用Semaphore
    多线程按顺序执行
    判断回文数
    整数反转
  • 原文地址:https://www.cnblogs.com/zheng01/p/7922876.html
Copyright © 2020-2023  润新知