Compare commits

...

4 Commits

Author SHA1 Message Date
12bca6caf1 路由表更新 2023-06-16 12:02:22 +08:00
906534e716 友链查询 2023-06-16 12:02:02 +08:00
3fdd4b52d9 资源更新 2023-06-16 12:01:43 +08:00
bee7669c0f console.aside.blade 添加侧边栏 2023-06-16 12:01:04 +08:00
6 changed files with 540 additions and 86 deletions

View File

@ -0,0 +1,83 @@
<?php
/*
* Copyright © 2016 - 2023 筱锋xiao_lfeng. All Rights Reserved.
* 开发开源遵循 MIT 许可,若需商用请联系开发者
* https://www.x-lf.com/
*/
namespace App\Http\Controllers\Console;
use App\Http\Controllers\Controller;
use App\Http\Controllers\Index;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\View\View;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Response;
class Link extends Controller
{
protected array $data;
public function __construct()
{
$data = new Index();
$this->data = $data->data;
}
protected function ViewList(Request $request): Factory|View|Application|RedirectResponse
{
$dataMarge = [
'blogFriendsTotal' => DB::table('blog_link')
->whereNotIn('blog_link.blogLocation', [0])
->count(),
'blogFriendsCheck' => DB::table('blog_link')
->where('blog_link.blogLocation', 0)
->count(),
'blogFriendsBest' => DB::table('blog_link')
->where('blog_link.blogLocation', 2)
->count(),
];
if (empty($request->search)) {
// 获取数据库信息
if (empty($request->page)) $request->page = 0;
$this->data['blog'] = DB::table('blog_link')
->whereNotIn('blogLocation',[0])
->orderBy('id')
->offset($request->page*10)
->limit(10)
->get()
->toArray();
$this->data['blogCount'] = DB::table('blog_link')
->whereNotIn('blogLocation',[0])
->orderBy('id')
->count();
$this->data['webClass'] = [
'active' => 'px-3 py-2 text-blue-600 border border-gray-300 bg-blue-50 hover:bg-blue-100 hover:text-blue-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white',
'unactive' => 'px-3 py-2 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white',
];
$this->data['blogCount'] = ceil($this->data['blogCount']/10);
} else {
$this->data['blog'] = DB::select("SELECT * FROM xf_index.blog_link WHERE blogName LIKE '%$request->search%' OR blogUrl LIKE '%$request->search%' ORDER BY id");
}
$this->data['request'] = $request;
if ($this->data['request']->page > $this->data['blogCount']-1) return Response::redirectTo(route('console.friends-link.list'));
$this->data = array_merge($this->data, $dataMarge);
return view('console.friends-link.list', $this->data);
}
protected function ViewCheck(Request $request): Factory|View|Application
{
return view('console.friends-link.check', $this->data);
}
protected function ViewEdit(Request $request) {
return view('console.friends-link.edit',$this->data);
}
protected function ViewAdd(Request $request) {
return view('console.friends-link.add',$this->data);
}
}

View File

@ -1045,6 +1045,18 @@ .top-0{
.top-\[calc\(100\%-13rem\)\]{
top: calc(100% - 13rem);
}
.bottom-2{
bottom: 0.5rem;
}
.bottom-2\.5{
bottom: 0.625rem;
}
.right-2{
right: 0.5rem;
}
.right-2\.5{
right: 0.625rem;
}
.isolate{
isolation: isolate;
}
@ -1072,6 +1084,15 @@ .col-span-1{
.col-span-2{
grid-column: span 2 / span 2;
}
.col-span-3{
grid-column: span 3 / span 3;
}
.col-span-7{
grid-column: span 7 / span 7;
}
.col-span-10{
grid-column: span 10 / span 10;
}
.-m-1{
margin: -0.25rem;
}
@ -1090,6 +1111,9 @@ .m-1{
.m-5{
margin: 1.25rem;
}
.m-4{
margin: 1rem;
}
.-mx-3{
margin-left: -0.75rem;
margin-right: -0.75rem;
@ -1114,17 +1138,17 @@ .my-3{
margin-top: 0.75rem;
margin-bottom: 0.75rem;
}
.my-8{
margin-top: 2rem;
margin-bottom: 2rem;
}
.my-4{
margin-top: 1rem;
margin-bottom: 1rem;
}
.my-2{
margin-top: 0.5rem;
margin-bottom: 0.5rem;
.my-8{
margin-top: 2rem;
margin-bottom: 2rem;
}
.my-5{
margin-top: 1.25rem;
margin-bottom: 1.25rem;
}
.mb-1{
margin-bottom: 0.25rem;
@ -1141,6 +1165,9 @@ .mb-3{
.mb-4{
margin-bottom: 1rem;
}
.mb-5{
margin-bottom: 1.25rem;
}
.mb-6{
margin-bottom: 1.5rem;
}
@ -1173,14 +1200,23 @@ .mt-2{
.mt-28{
margin-top: 7rem;
}
.mt-5{
margin-top: 1.25rem;
}
.mt-6{
margin-top: 1.5rem;
}
.mb-5{
margin-bottom: 1.25rem;
.mt-3{
margin-top: 0.75rem;
}
.ml-0{
margin-left: 0px;
}
.mt-5{
margin-top: 1.25rem;
}
.mb-10{
margin-bottom: 2.5rem;
}
.mt-4{
margin-top: 1rem;
}
.block{
display: block;
@ -1224,6 +1260,9 @@ .hidden{
.aspect-\[1155\/678\]{
aspect-ratio: 1155/678;
}
.h-1{
height: 0.25rem;
}
.h-10{
height: 2.5rem;
}
@ -1263,14 +1302,11 @@ .h-\[52px\]{
.h-full{
height: 100%;
}
.h-screen{
height: 100vh;
}
.h-px{
height: 1px;
}
.h-1{
height: 0.25rem;
.h-screen{
height: 100vh;
}
.min-h-full{
min-height: 100%;
@ -1281,6 +1317,9 @@ .w-1\/2{
.w-10{
width: 2.5rem;
}
.w-11{
width: 2.75rem;
}
.w-14{
width: 3.5rem;
}
@ -1296,6 +1335,9 @@ .w-4{
.w-44{
width: 11rem;
}
.w-48{
width: 12rem;
}
.w-5{
width: 1.25rem;
}
@ -1320,14 +1362,8 @@ .w-auto{
.w-full{
width: 100%;
}
.w-11{
width: 2.75rem;
}
.w-48{
width: 12rem;
}
.w-24{
width: 6rem;
.min-w-0{
min-width: 0px;
}
.max-w-2xl{
max-width: 42rem;
@ -1338,6 +1374,9 @@ .max-w-4xl{
.max-w-screen-xl{
max-width: 1280px;
}
.max-w-md{
max-width: 28rem;
}
.flex-1{
flex: 1 1 0%;
}
@ -1347,10 +1386,6 @@ .flex-shrink{
.flex-shrink-0{
flex-shrink: 0;
}
.border-spacing-x-10{
--tw-border-spacing-x: 2.5rem;
border-spacing: var(--tw-border-spacing-x) var(--tw-border-spacing-y);
}
.-translate-x-1\/2{
--tw-translate-x: -50%;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
@ -1419,17 +1454,14 @@ .grid-cols-3{
.grid-cols-4{
grid-template-columns: repeat(4, minmax(0, 1fr));
}
.grid-cols-5{
grid-template-columns: repeat(5, minmax(0, 1fr));
}
.grid-cols-7{
grid-template-columns: repeat(7, minmax(0, 1fr));
}
.grid-rows-1{
grid-template-rows: repeat(1, minmax(0, 1fr));
}
.grid-rows-2{
grid-template-rows: repeat(2, minmax(0, 1fr));
}
.grid-rows-3{
grid-template-rows: repeat(3, minmax(0, 1fr));
.grid-cols-10{
grid-template-columns: repeat(10, minmax(0, 1fr));
}
.flex-col{
flex-direction: column;
@ -1485,6 +1517,11 @@ .space-y-6 > :not([hidden]) ~ :not([hidden]){
margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));
margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));
}
.-space-x-px > :not([hidden]) ~ :not([hidden]){
--tw-space-x-reverse: 0;
margin-right: calc(-1px * var(--tw-space-x-reverse));
margin-left: calc(-1px * calc(1 - var(--tw-space-x-reverse)));
}
.divide-y > :not([hidden]) ~ :not([hidden]){
--tw-divide-y-reverse: 0;
border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));
@ -1497,6 +1534,10 @@ .divide-gray-100 > :not([hidden]) ~ :not([hidden]){
.divide-gray-500\/10 > :not([hidden]) ~ :not([hidden]){
border-color: rgb(107 114 128 / 0.1);
}
.divide-gray-200 > :not([hidden]) ~ :not([hidden]){
--tw-divide-opacity: 1;
border-color: rgb(229 231 235 / var(--tw-divide-opacity));
}
.overflow-hidden{
overflow: hidden;
}
@ -1540,16 +1581,13 @@ .border-0{
.border-4{
border-width: 4px;
}
.border-x-4{
border-left-width: 4px;
border-right-width: 4px;
}
.border-r-4{
border-right-width: 4px;
}
.border-dashed{
border-style: dashed;
}
.border-blue-500{
--tw-border-opacity: 1;
border-color: rgb(63 131 248 / var(--tw-border-opacity));
}
.border-blue-600{
--tw-border-opacity: 1;
border-color: rgb(28 100 242 / var(--tw-border-opacity));
@ -1570,17 +1608,13 @@ .border-gray-300{
--tw-border-opacity: 1;
border-color: rgb(209 213 219 / var(--tw-border-opacity));
}
.border-red-300{
.border-blue-300{
--tw-border-opacity: 1;
border-color: rgb(248 180 180 / var(--tw-border-opacity));
border-color: rgb(164 202 254 / var(--tw-border-opacity));
}
.border-red-500{
.border-white{
--tw-border-opacity: 1;
border-color: rgb(240 82 82 / var(--tw-border-opacity));
}
.border-blue-500{
--tw-border-opacity: 1;
border-color: rgb(63 131 248 / var(--tw-border-opacity));
border-color: rgb(255 255 255 / var(--tw-border-opacity));
}
.bg-blue-100{
--tw-bg-opacity: 1;
@ -1633,6 +1667,10 @@ .bg-white{
.bg-white\/50{
background-color: rgb(255 255 255 / 0.5);
}
.bg-blue-50{
--tw-bg-opacity: 1;
background-color: rgb(235 245 255 / var(--tw-bg-opacity));
}
.bg-opacity-50{
--tw-bg-opacity: 0.5;
}
@ -1668,6 +1706,12 @@ .p-4{
.p-6{
padding: 1.5rem;
}
.p-10{
padding: 2.5rem;
}
.p-5{
padding: 1.25rem;
}
.px-2{
padding-left: 0.5rem;
padding-right: 0.5rem;
@ -1732,6 +1776,18 @@ .py-8{
padding-top: 2rem;
padding-bottom: 2rem;
}
.py-10{
padding-top: 2.5rem;
padding-bottom: 2.5rem;
}
.px-10{
padding-left: 2.5rem;
padding-right: 2.5rem;
}
.py-5{
padding-top: 1.25rem;
padding-bottom: 1.25rem;
}
.pe-2{
-webkit-padding-end: 0.5rem;
padding-inline-end: 0.5rem;
@ -1756,6 +1812,22 @@ .ps-5{
.pt-2{
padding-top: 0.5rem;
}
.pb-0{
padding-bottom: 0px;
}
.pb-3{
padding-bottom: 0.75rem;
}
.pt-3{
padding-top: 0.75rem;
}
.pb-2{
padding-bottom: 0.5rem;
}
.ps-1{
-webkit-padding-start: 0.25rem;
padding-inline-start: 0.25rem;
}
.text-left{
text-align: left;
}
@ -1789,6 +1861,10 @@ .text-xl{
font-size: 1.25rem;
line-height: 1.75rem;
}
.text-4xl{
font-size: 2.25rem;
line-height: 2.5rem;
}
.font-bold{
font-weight: 700;
}
@ -1798,6 +1874,12 @@ .font-medium{
.font-semibold{
font-weight: 600;
}
.font-extrabold{
font-weight: 800;
}
.font-normal{
font-weight: 400;
}
.uppercase{
text-transform: uppercase;
}
@ -1816,6 +1898,12 @@ .leading-8{
.leading-9{
line-height: 2.25rem;
}
.leading-none{
line-height: 1;
}
.leading-tight{
line-height: 1.25;
}
.tracking-tight{
letter-spacing: -0.025em;
}
@ -2055,6 +2143,10 @@ .hover\:bg-white:hover{
--tw-bg-opacity: 1;
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
}
.hover\:bg-blue-100:hover{
--tw-bg-opacity: 1;
background-color: rgb(225 239 254 / var(--tw-bg-opacity));
}
.hover\:text-blue-600:hover{
--tw-text-opacity: 1;
color: rgb(28 100 242 / var(--tw-text-opacity));
@ -2071,6 +2163,14 @@ .hover\:text-indigo-500:hover{
--tw-text-opacity: 1;
color: rgb(104 117 245 / var(--tw-text-opacity));
}
.hover\:text-blue-700:hover{
--tw-text-opacity: 1;
color: rgb(26 86 219 / var(--tw-text-opacity));
}
.hover\:text-gray-700:hover{
--tw-text-opacity: 1;
color: rgb(55 65 81 / var(--tw-text-opacity));
}
.hover\:underline:hover{
text-decoration-line: underline;
}
@ -2166,6 +2266,10 @@ :is(.dark .dark\:divide-gray-600) > :not([hidden]) ~ :not([hidden]){
--tw-divide-opacity: 1;
border-color: rgb(75 85 99 / var(--tw-divide-opacity));
}
:is(.dark .dark\:divide-gray-700) > :not([hidden]) ~ :not([hidden]){
--tw-divide-opacity: 1;
border-color: rgb(55 65 81 / var(--tw-divide-opacity));
}
:is(.dark .dark\:border-blue-500){
--tw-border-opacity: 1;
border-color: rgb(63 131 248 / var(--tw-border-opacity));
@ -2302,6 +2406,10 @@ :is(.dark .dark\:focus\:ring-gray-600:focus){
--tw-ring-opacity: 1;
--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity));
}
:is(.dark .dark\:focus\:ring-blue-900:focus){
--tw-ring-opacity: 1;
--tw-ring-color: rgb(35 56 118 / var(--tw-ring-opacity));
}
:is(.dark .group:hover .dark\:group-hover\:text-white){
--tw-text-opacity: 1;
color: rgb(255 255 255 / var(--tw-text-opacity));
@ -2323,6 +2431,15 @@ @media (min-width: 640px){
.sm\:top-\[calc\(100\%-30rem\)\]{
top: calc(100% - 30rem);
}
.sm\:col-span-2{
grid-column: span 2 / span 2;
}
.sm\:col-span-3{
grid-column: span 3 / span 3;
}
.sm\:col-span-10{
grid-column: span 10 / span 10;
}
.sm\:mx-auto{
margin-left: auto;
margin-right: auto;
@ -2334,9 +2451,6 @@ @media (min-width: 640px){
.sm\:ml-64{
margin-left: 16rem;
}
.sm\:mb-3{
margin-bottom: 0.75rem;
}
.sm\:hidden{
display: none;
}
@ -2369,6 +2483,20 @@ @media (min-width: 640px){
padding-top: 4rem;
padding-bottom: 4rem;
}
.sm\:py-4{
padding-top: 1rem;
padding-bottom: 1rem;
}
.sm\:px-16{
padding-left: 4rem;
padding-right: 4rem;
}
.sm\:pb-4{
padding-bottom: 1rem;
}
.sm\:pt-4{
padding-top: 1rem;
}
.sm\:text-6xl{
font-size: 3.75rem;
line-height: 1;
@ -2390,13 +2518,14 @@ @media (min-width: 640px){
}
}
@media (min-width: 768px){
.md\:my-10{
margin-top: 2.5rem;
margin-bottom: 2.5rem;
.md\:col-span-2{
grid-column: span 2 / span 2;
}
.md\:my-5{
margin-top: 1.25rem;
margin-bottom: 1.25rem;
.md\:col-span-3{
grid-column: span 3 / span 3;
}
.md\:col-span-10{
grid-column: span 10 / span 10;
}
.md\:my-6{
margin-top: 1.5rem;
@ -2408,6 +2537,9 @@ @media (min-width: 768px){
.md\:flex{
display: flex;
}
.md\:hidden{
display: none;
}
.md\:grid-cols-2{
grid-template-columns: repeat(2, minmax(0, 1fr));
}
@ -2426,8 +2558,30 @@ @media (min-width: 768px){
.md\:p-6{
padding: 1.5rem;
}
.md\:text-5xl{
font-size: 3rem;
line-height: 1;
}
}
@media (min-width: 1024px){
.lg\:visible{
visibility: visible;
}
.lg\:col-span-8{
grid-column: span 8 / span 8;
}
.lg\:col-span-7{
grid-column: span 7 / span 7;
}
.lg\:col-span-3{
grid-column: span 3 / span 3;
}
.lg\:block{
display: block;
}
.lg\:inline{
display: inline;
}
.lg\:flex{
display: flex;
}
@ -2456,8 +2610,22 @@ @media (min-width: 1024px){
padding-top: 10rem;
padding-bottom: 10rem;
}
.lg\:text-6xl{
font-size: 3.75rem;
line-height: 1;
}
.lg\:text-xl{
font-size: 1.25rem;
line-height: 1.75rem;
}
}
@media (min-width: 1280px){
.xl\:col-span-2{
grid-column: span 2 / span 2;
}
.xl\:col-span-8{
grid-column: span 8 / span 8;
}
.xl\:grid-cols-4{
grid-template-columns: repeat(4, minmax(0, 1fr));
}
@ -2465,5 +2633,9 @@ @media (min-width: 1280px){
padding-top: 12rem;
padding-bottom: 12rem;
}
.xl\:px-48{
padding-left: 12rem;
padding-right: 12rem;
}
}

View File

@ -1,3 +1,9 @@
/*
* Copyright © 2016 - 2023 筱锋xiao_lfeng. All Rights Reserved.
* 开发开源遵循 MIT 许可若需商用请联系开发者
* https://www.x-lf.com/
*/
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
@ -25190,7 +25196,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
@ -25204,20 +25210,20 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
/******/ loaded: false,
/******/ exports: {}
/******/ };
/******/
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = __webpack_modules__;
/******/
/******/
/************************************************************************/
/******/ /* webpack/runtime/chunk loaded */
/******/ (() => {
@ -25250,7 +25256,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
/******/ return result;
/******/ };
/******/ })();
/******/
/******/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
@ -25262,7 +25268,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
/******/ }
/******/ };
/******/ })();
/******/
/******/
/******/ /* webpack/runtime/global */
/******/ (() => {
/******/ __webpack_require__.g = (function() {
@ -25274,12 +25280,12 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
/******/ }
/******/ })();
/******/ })();
/******/
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
@ -25290,7 +25296,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/******/
/******/ /* webpack/runtime/node module decorator */
/******/ (() => {
/******/ __webpack_require__.nmd = (module) => {
@ -25299,11 +25305,11 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
/******/ return module;
/******/ };
/******/ })();
/******/
/******/
/******/ /* webpack/runtime/jsonp chunk loading */
/******/ (() => {
/******/ // no baseURI
/******/
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
@ -25311,19 +25317,19 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
/******/ "/js/app": 0,
/******/ "css/app": 0
/******/ };
/******/
/******/
/******/ // no chunk on demand loading
/******/
/******/
/******/ // no prefetching
/******/
/******/
/******/ // no preloaded
/******/
/******/
/******/ // no HMR
/******/
/******/
/******/ // no HMR manifest
/******/
/******/
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
/******/
/******/
/******/ // install a JSONP callback for chunk loading
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
/******/ var [chunkIds, moreModules, runtime] = data;
@ -25348,20 +25354,20 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
/******/ }
/******/ return __webpack_require__.O(result);
/******/ }
/******/
/******/
/******/ var chunkLoadingGlobal = self["webpackChunk"] = self["webpackChunk"] || [];
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
/******/ })();
/******/
/******/
/************************************************************************/
/******/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
/******/ __webpack_require__.O(undefined, ["css/app"], () => (__webpack_require__("./resources/js/app.js")))
/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["css/app"], () => (__webpack_require__("./resources/css/app.css")))
/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
/******/
/******/
/******/ })()
;
;

View File

@ -0,0 +1,184 @@
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
<link rel="stylesheet" href="{{ asset('css/flowbite.css') }}">
@include('modules.head')
{!! $webHeader !!}
</head>
<body>
<button data-drawer-target="sidebar-multi-level-sidebar" data-drawer-toggle="sidebar-multi-level-sidebar"
aria-controls="sidebar-multi-level-sidebar" type="button"
class="inline-flex items-center p-2 mt-2 ml-3 text-sm text-gray-500 rounded-lg sm:hidden hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600">
<span class="sr-only">Open sidebar</span>
<svg class="w-6 h-6" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path clip-rule="evenodd" fill-rule="evenodd"
d="M2 4.75A.75.75 0 012.75 4h14.5a.75.75 0 010 1.5H2.75A.75.75 0 012 4.75zm0 10.5a.75.75 0 01.75-.75h7.5a.75.75 0 010 1.5h-7.5a.75.75 0 01-.75-.75zM2 10a.75.75 0 01.75-.75h14.5a.75.75 0 010 1.5H2.75A.75.75 0 012 10z"></path>
</svg>
</button>
@include('console.modules.aside')
<div class="p-4 sm:ml-64">
<div class="p-4 border-gray-200 border-dashed rounded-lg dark:border-gray-700">
@include('console.modules.personal')
<div class="grid grid-cols-1 gap-4 mb-4">
<div class="text-2xl text-gray-400 dark:text-gray-500"><i class="bi bi-link-45deg"></i> 友链列表</div>
</div>
<div class="grid grid-cols-10 gap-4 mb-4">
<div class="col-span-10 lg:hidden gird grid-cols-1">
<div class="items-center justify-center rounded bg-gray-50 dark:bg-gray-800 shadow grid grid-cols-1">
<p class="text-2xl text-center text-gray-400 dark:text-gray-500 pt-3"><i class="bi bi-person-check"></i> 当前友链 <b class="text-black dark:text-white">{{ $blogFriendsTotal }}</b> </p>
<p class="text-2xl text-center text-gray-400 dark:text-gray-500"><i class="bi bi-person-hearts"></i> 超级友链 <b class="text-black dark:text-white">{{ $blogFriendsBest }}</b> </p>
<p class="text-2xl text-center text-gray-400 dark:text-gray-500 pb-3"><i class="bi bi-person-check-fill"></i> 待审友链 <b class="text-black dark:text-white">{{ $blogFriendsCheck }}</b> </p>
</div>
</div>
<div class="col-span-10 lg:col-span-7 items-center justify-center rounded bg-gray-50 dark:bg-gray-800 shadow">
<div class="px-10 py-5">
@if(!empty($blog) && empty($request->search))
<ul class="divide-y divide-gray-200 dark:divide-gray-700">
@foreach($blog as $blogValue)
<li class="py-3 sm:py-4">
<div class="flex items-center space-x-4">
<div class="flex-shrink-0">
<img id="Lazy" class="w-10 h-10 rounded-full" src="{{ asset('images/avatar.png') }}" data-src="{{ $blogValue->blogIcon }}" alt="Neil image">
</div>
<div class="flex-1 min-w-0">
<p class="text-sm font-bold text-gray-900 truncate dark:text-white">
{{ $blogValue->blogName }}
</p>
<p class="text-sm text-gray-400 truncate dark:text-gray-300">
<a href="{{ $blogValue->blogUrl }}" target="_blank">{{ $blogValue->blogUrl }}</a>
</p>
</div>
<a href="?" type="button" class="inline-flex items-center text-base font-semibold text-gray-900 dark:text-white">
<a href="{{ route('console.friends-link.edit',$blogValue->id) }}" type="button" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-3 py-2 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">
<i class="bi bi-pencil"></i>
<span class="ps-1">编辑</span>
</a>
</a>
</div>
</li>
@endforeach
</ul>
<div class="justify-center items-center text-center">
<ul class="inline-flex items-center -space-x-px py-3">
<li>
<a @if($request->page != 0)href="{{ route('console.friends-link.list','page='.$request->page-1) }}" @endif class="block px-3 py-2 ml-0 leading-tight text-gray-500 border border-gray-300 @if($request->page != 0)bg-white @else bg-gray-100 @endif rounded-l-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white">
<span class="sr-only">Previous</span>
<svg aria-hidden="true" class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd"></path></svg>
</a>
</li>
@if($blogCount == 0)
<li>
<a href="{{ route('console.friends-link.list','page='.$blogCount+1) }}" class="px-3 py-2 text-blue-600 border border-gray-300 bg-blue-50 hover:bg-blue-100 hover:text-blue-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white">1</a>
</li>
@else
@for($i = ($request->page-5>0 ? $request->page-5 : 0); $i < min($blogCount,6); $i++)
<li>
<a href="{{ route('console.friends-link.list','page='.$i) }}" class="@if($i == $request->page) {{ $webClass['active'] }} @else {{ $webClass['unactive'] }} @endif">{{ $i+1 }}</a>
</li>
@endfor
@endif
<li>
<a @if($request->page != $blogCount-1)href="{{ route('console.friends-link.list','page='.$request->page+1) }}" @endif class="block px-3 py-2 leading-tight text-gray-500 @if($request->page != $blogCount-1)bg-white @else bg-gray-100 @endif border border-gray-300 rounded-r-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white">
<span class="sr-only">Next</span>
<svg aria-hidden="true" class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd"></path></svg>
</a>
</li>
</ul>
</div>
@elseif(!empty($request->search))
<a href="{{ route('console.friends-link.list') }}" type="button" class="text-white mt-4 mb-10 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-3 py-2 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"><i class="bi bi-box-arrow-left me-1"></i> 返回友链列表</a>
@if(!empty($blog))
<ul class="divide-y divide-gray-200 dark:divide-gray-700">
@foreach($blog as $blogValue)
<li class="py-3 sm:py-4">
<div class="flex items-center space-x-4">
<div class="flex-shrink-0">
<img id="Lazy" class="w-10 h-10 rounded-full" src="{{ asset('images/avatar.png') }}" data-src="{{ $blogValue->blogIcon }}" alt="Neil image">
</div>
<div class="flex-1 min-w-0">
<p class="text-sm font-bold text-gray-900 truncate dark:text-white">
{{ $blogValue->blogName }}
</p>
<p class="text-sm text-gray-400 truncate dark:text-gray-300">
<a href="{{ $blogValue->blogUrl }}" target="_blank">{{ $blogValue->blogUrl }}</a>
</p>
</div>
<a href="?" type="button" class="inline-flex items-center text-base font-semibold text-gray-900 dark:text-white">
<a href="{{ route('console.friends-link.edit',$blogValue->id) }}" type="button" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-3 py-2 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">
<i class="bi bi-pencil"></i>
<span class="ps-1">编辑</span>
</a>
</a>
</div>
</li>
@endforeach
</ul>
@else
<p class="text-center mb-4 text-4xl font-extrabold leading-none tracking-tight text-gray-900 dark:text-white mt-5">没有查找到用户呢</p>
@endif
@else
<h1 class="text-center mb-4 text-4xl font-extrabold leading-none tracking-tight text-gray-900 md:text-5xl lg:text-6xl dark:text-white mt-5">您还没有友链呢</h1>
<p class="mb-6 text-lg font-normal text-gray-500 lg:text-xl sm:px-16 xl:px-48 dark:text-gray-400 text-center">赶紧去添加一个吧</p>
<div class="justify-center items-center text-center mb-5">
<a href="{{ route('console.friends-link.add') }}" class="inline-flex items-center justify-center px-5 py-3 text-base font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-900">
<i class="bi bi-person-plus"></i>
<span class="ps-1">添加友链</span>
</a>
</div>
@endif
</div>
</div>
<div class="sm:hidden lg:block col-span-3 gird grid-cols-1">
<div class="items-center justify-center rounded bg-gray-50 dark:bg-gray-800 shadow grid grid-cols-1 mb-4">
<label for="search" class="mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white">Search</label>
<div class="relative">
<div class="absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none">
<i class="bi bi-search"></i>
</div>
<input type="search" id="search" name="search" class="block w-full p-4 pl-10 text-sm text-gray-900 border border-gray-300 rounded bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="查找" required>
<a id="Submit" href="" type="submit" class="text-white absolute right-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">查找</a>
</div>
</div>
<div class="items-center justify-center rounded bg-gray-50 dark:bg-gray-800 shadow grid grid-cols-1">
<p class="text-2xl text-center text-gray-400 dark:text-gray-500 pt-3"><i class="bi bi-person-check"></i> 当前友链 <b class="text-black dark:text-white">{{ $blogFriendsTotal }}</b> </p>
<p class="text-2xl text-center text-gray-400 dark:text-gray-500 py-1"><i class="bi bi-person-hearts"></i> 超级友链 <b class="text-black dark:text-white">{{ $blogFriendsBest }}</b> </p>
<p class="text-2xl text-center text-gray-400 dark:text-gray-500 pb-3"><i class="bi bi-person-check-fill"></i> 待审友链 <b class="text-black dark:text-white">{{ $blogFriendsCheck }}</b> </p>
</div>
</div>
</div>
</div>
</div>
</body>
<script src="{{ asset('js/app.js') }}"></script>
<script src="{{ asset('js/jquery.js') }}"></script>
<script async src="{{ asset('js/lazyload.js') }}"></script>
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function () {
const lazyLoadInstance = new LazyLoad({
elements_selector: '#Lazy', // 指定要延迟加载的元素选择器
loaded: function (element) {
element.classList.add('fade');
},
callback_error: function (element) {
element.src = '{{ asset('images/avatar.png') }}'; // 图像加载失败时替换为占位图像
}
});
});
$("#Submit").mouseenter(function () {
if (!$("#search").val().trim() !== '') {
$('#Submit').prop('href','?search='+$('#search').val());
} else {
$('#search').attr('placeholder',"请输入查找内容");
}
})
</script>
</html>

View File

@ -40,6 +40,13 @@ class="flex items-center w-full p-2 text-gray-900 transition duration-75 rounded
<span class="ml-3">待审核</span>
</a>
</li>
<li>
<a href="{{ route('console.friends-link.add') }}"
class="flex items-center w-full p-2 text-gray-900 transition duration-75 rounded-lg pl-11 group hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700">
<i class="bi bi-person-plus"></i>
<span class="ml-3">添加友链</span>
</a>
</li>
</ul>
</li>
<li>

View File

@ -44,6 +44,8 @@
Route::redirect('list','list/1');
Route::get('list',[ConsoleLink::class,'ViewList'])->name('console.friends-link.list');
Route::get('check',[ConsoleLink::class,'ViewCheck'])->name('console.friends-link.check');
Route::get('edit/{page}',[ConsoleLink::class,'ViewEdit'])->name('console.friends-link.edit');
Route::get('add',[ConsoleLink::class,'ViewAdd'])->name('console.friends-link.add');
});
});