M2: 主题系统(sablog经典+modern简约)+ 前台全部页面 + 老 URL 301 兼容 + markdown 双份导入
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
<div id="footer">
|
||||
<p>© {{ date('Y') }} {{ $siteName }}
|
||||
@if($siteIcp)<a href="https://beian.miit.gov.cn/" target="_blank" rel="noopener">{{ $siteIcp }}</a>@endif
|
||||
</p>
|
||||
<p>Powered by LaraLog · Laravel · Filament</p>
|
||||
</div>
|
||||
</div>{{-- #page --}}
|
||||
</div>{{-- #outmain --}}
|
||||
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>{{ $pageTitle ?? $siteName }}</title>
|
||||
<meta name="description" content="{{ $pageDescription ?? $siteDescription }}">
|
||||
@if(($pageKeywords ?? '') !== '')
|
||||
<meta name="keywords" content="{{ $pageKeywords }}">
|
||||
@endif
|
||||
<meta name="generator" content="LaraLog">
|
||||
<link rel="canonical" href="{{ url()->current() }}">
|
||||
<link rel="alternate" type="application/rss+xml" title="{{ $siteName }}" href="{{ route('feed.rss') }}">
|
||||
<link rel="stylesheet" href="{{ theme('asset', 'style.css') }}">
|
||||
@stack('head')
|
||||
</head>
|
||||
@@ -0,0 +1,30 @@
|
||||
<div id="outmain">
|
||||
<div id="header">
|
||||
<div class="logo">
|
||||
<a href="{{ route('home') }}">{{ $siteName }}</a>
|
||||
<p class="description">{{ $siteDescription }}</p>
|
||||
</div>
|
||||
<div id="nav">
|
||||
<ul>
|
||||
<li class="{{ request()->routeIs('home') ? 'current_page_item' : '' }}"><a href="{{ route('home') }}">首页</a></li>
|
||||
<li class="{{ request()->routeIs('archives*') ? 'current_page_item' : '' }}"><a href="{{ route('archives') }}">归档</a></li>
|
||||
<li class="{{ request()->routeIs('tags*') ? 'current_page_item' : '' }}"><a href="{{ route('tags') }}">标签</a></li>
|
||||
<li class="{{ request()->routeIs('links') ? 'current_page_item' : '' }}"><a href="{{ route('links') }}">友链</a></li>
|
||||
<li class="{{ request()->routeIs('comments') ? 'current_page_item' : '' }}"><a href="{{ route('comments') }}">评论</a></li>
|
||||
<li><a href="{{ route('feed.rss') }}">RSS</a></li>
|
||||
@auth
|
||||
<li><a href="{{ route('profile') }}">{{ auth()->user()->name }}</a></li>
|
||||
<li>
|
||||
<form action="{{ route('logout') }}" method="post" class="inline-form">
|
||||
@csrf
|
||||
<button type="submit" class="link-btn">退出</button>
|
||||
</form>
|
||||
</li>
|
||||
@else
|
||||
<li><a href="{{ route('login') }}">登录</a></li>
|
||||
<li><a href="{{ route('register') }}">注册</a></li>
|
||||
@endauth
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="page">
|
||||
@@ -0,0 +1,72 @@
|
||||
<div class="sidebar">
|
||||
<div class="searchbox">
|
||||
<form action="{{ route('search') }}" method="get">
|
||||
<input type="search" name="q" value="{{ request('q', request('keyword', '')) }}" placeholder="搜索文章">
|
||||
<input type="submit" value="搜索">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="widget">
|
||||
<h3>分类</h3>
|
||||
<ul>
|
||||
@forelse($categories as $category)
|
||||
<li><a href="{{ route('category.show', $category->slug ?: $category->id) }}">{{ $category->name }}</a> ({{ $category->post_count }})</li>
|
||||
@empty
|
||||
<li>暂无分类</li>
|
||||
@endforelse
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="widget">
|
||||
<h3>最新文章</h3>
|
||||
<ul>
|
||||
@forelse($recentPosts as $post)
|
||||
<li><a href="{{ route('posts.show', $post->slug ?: $post->id) }}">{{ $post->title }}</a></li>
|
||||
@empty
|
||||
<li>暂无文章</li>
|
||||
@endforelse
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="widget">
|
||||
<h3>最新评论</h3>
|
||||
<ul>
|
||||
@forelse($recentComments as $comment)
|
||||
<li><a href="{{ route('posts.show', $comment->post->slug ?: $comment->post->id) }}#comment-{{ $comment->id }}">{{ $comment->author_name }}:{{ Str::limit(strip_tags($comment->content), 20) }}</a></li>
|
||||
@empty
|
||||
<li>暂无评论</li>
|
||||
@endforelse
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="widget">
|
||||
<h3>标签</h3>
|
||||
<p class="tagcloud">
|
||||
@forelse($hotTags as $tag)
|
||||
<a href="{{ route('tags.show', $tag->slug ?: $tag->name) }}">{{ $tag->name }}</a>
|
||||
@empty
|
||||
暂无标签
|
||||
@endforelse
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="widget">
|
||||
<h3>友情链接</h3>
|
||||
<ul>
|
||||
@forelse($links as $link)
|
||||
<li><a href="{{ $link->url }}" target="_blank" rel="noopener">{{ $link->name }}</a></li>
|
||||
@empty
|
||||
<li>暂无链接</li>
|
||||
@endforelse
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="widget">
|
||||
<h3>统计</h3>
|
||||
<ul>
|
||||
<li>文章 {{ $blogStats['posts'] }} 篇</li>
|
||||
<li>评论 {{ $blogStats['comments'] }} 条</li>
|
||||
<li>标签 {{ $blogStats['tags'] }} 个</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user