This repository has been archived by the owner on Jan 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
101 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,48 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta name="renderer" content="webkit"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<meta name="description" content=""> | ||
<meta name="keywords" content=""> | ||
<title>@yield('title') -- ThinkPHP 入门教程</title> | ||
<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" | ||
crossorigin="anonymous"> | ||
<link rel="stylesheet" href="/static/css/app.css"> | ||
</head> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta name="renderer" content="webkit"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<meta name="description" content=""> | ||
<meta name="keywords" content=""> | ||
<title>@yield('title') -- ThinkPHP 入门教程</title> | ||
<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="/static/css/app.css"> | ||
</head> | ||
|
||
<body> | ||
@include('_layout.header') | ||
<div class="container"> | ||
@yield('content') | ||
<body> | ||
<div class="container mt-5"> | ||
<div class="row"> | ||
<div class="col"> | ||
@include('_layout.header') | ||
</div> | ||
<div class="col-6"> | ||
<ul class="list-group"> | ||
<li class="list-group-item"> | ||
<a onclick="window.history.go(-1); return false;" class="btn btn-light" aria-label="Previous"> | ||
<span aria-hidden="true">«</span> | ||
</a> | ||
@yield('title') | ||
</li> | ||
<li class="list-group-item"> | ||
@yield('content') | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="col"> | ||
@include('_layout.footer') | ||
</div> | ||
</div> | ||
@include('_layout.footer') | ||
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" | ||
crossorigin="anonymous"></script> | ||
<script src="https://cdn.bootcss.com/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" | ||
crossorigin="anonymous"></script> | ||
<script src="https://cdn.bootcss.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" | ||
crossorigin="anonymous"></script> | ||
<script src="/static/js/app.js"></script> | ||
</body> | ||
</div> | ||
|
||
|
||
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> | ||
<script src="https://cdn.bootcss.com/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script> | ||
<script src="https://cdn.bootcss.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script> | ||
<script src="/static/js/app.js"></script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,48 @@ | ||
<header> | ||
<div> | ||
<nav class="navbar navbar-expand-lg navbar-light bg-light"> | ||
<div class="container"> | ||
<a class="navbar-brand" href="#">ThinkPHP 入门教程</a> | ||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
<div class="collapse navbar-collapse" id="navbarSupportedContent"> | ||
<ul class="navbar-nav mr-auto"> | ||
<li class="nav-item active"> | ||
<a class="nav-link" href="{{ url('welcome/index/home') }}">主页 | ||
<span class="sr-only">(current)</span> | ||
</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="{{ url('welcome/index/help') }}">帮助</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="{{ url('welcome/index/about') }}">关于</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="{{ url('user/auth/index') }}">所有用户</a> | ||
</li> | ||
</ul> | ||
@if(session('user')) | ||
<div class="dropdown"> | ||
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | ||
{{ session('user.name') }} | ||
</button> | ||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> | ||
<a class="dropdown-item" href="{{ url('user/auth/read', ['id' => session('user.id')]) }}">个人主页</a> | ||
<a class="dropdown-item"> | ||
<form action="{{ url('user/session/delete', ['id' => session('user.id')]) }}" method="POST"> | ||
<nav class="nav flex-column"> | ||
<ul class="list-group list-group-flush"> | ||
<li class="list-group-item list-group-item-action"> | ||
<a class="nav-link" href="{{ url('welcome/index/home') }}"> | ||
主页 | ||
</a> | ||
</li> | ||
<li class="list-group-item list-group-item-action"> | ||
<a class="nav-link" href="{{ url('user/auth/index') }}"> | ||
所有用户 | ||
</a> | ||
</li> | ||
@if(session('user')) | ||
<li class="list-group-item list-group-item-action"> | ||
<a class="nav-link" href="{{ url('user/auth/read', ['id' => session('user.id')]) }}"> | ||
个人资料 | ||
</a> | ||
</li> | ||
<li class="list-group-item list-group-item-action"> | ||
<div class="dropdown"> | ||
<a class="nav-link dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" href="">更多</a> | ||
|
||
@php echo token() @endphp | ||
|
||
<button class="btn btn-block" type="submit" name="button">退出</button> | ||
</form> | ||
</a> | ||
</div> | ||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> | ||
<a class="dropdown-item"> | ||
<form action="{{ url('user/session/delete', ['id' => session('user.id')]) }}" method="POST"> | ||
@php echo token() @endphp | ||
<button class="btn btn-block" type="submit" name="button">退出</button> | ||
</form> | ||
</a> | ||
</div> | ||
@else | ||
<a class="btn btn-outline-success my-2 my-sm-0" href="{{ url('user/auth/create') }}">注册</a> | ||
<a class="btn btn-outline-success my-2 my-sm-0" href="{{ url('user/session/create') }}">登录</a> | ||
@endif | ||
</div> | ||
</div> | ||
</nav> | ||
</div> | ||
</li> | ||
@else | ||
<li class="list-group-item list-group-item-action"> | ||
<a class="nav-link" href="{{ url('user/auth/create') }}"> | ||
注册 | ||
</a> | ||
</li> | ||
<li class="list-group-item list-group-item-action"> | ||
<a class="nav-link" href="{{ url('user/session/create') }}"> | ||
登录 | ||
</a> | ||
</li> | ||
@endif | ||
</ul> | ||
</nav> | ||
</header> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters