|
@@ -2,15 +2,7 @@
|
|
|
@section('css')
|
|
|
<link href="/assets/global/fonts/font-awesome/css/all.min.css" rel="stylesheet">
|
|
|
<link href="/assets/global/fonts/material-design/material-design.min.css" rel="stylesheet">
|
|
|
- <style>
|
|
|
- ol > li {
|
|
|
- margin-bottom: 8px;
|
|
|
- }
|
|
|
-
|
|
|
- .panel-group .panel-title {
|
|
|
- font-size: 20px;
|
|
|
- }
|
|
|
- </style>
|
|
|
+ <link href="/assets/custom/articles.min.css" rel="stylesheet">
|
|
|
@endsection
|
|
|
@section('content')
|
|
|
<div class="page-header">
|
|
@@ -19,69 +11,68 @@
|
|
|
<div class="page-content container-fluid">
|
|
|
@if ($knowledges->isNotEmpty())
|
|
|
<div class="row">
|
|
|
- <div class="col-xxl-2 col-lg-4 col-md-12">
|
|
|
+ <div class="offset-xxl-1 col-xxl-2 col-xl-3 offset-lg-0 col-lg-4 offset-sm-2 col-sm-8">
|
|
|
<div class="panel">
|
|
|
- <div class="panel-body">
|
|
|
- <div class="list-group" role="tablist">
|
|
|
- @foreach($knowledges as $category => $articles)
|
|
|
- @php $str = string_urlsafe($category) @endphp
|
|
|
- <a class="list-group-item list-group-item-action @if($loop->first) active @endif" data-toggle="tab"
|
|
|
- href="#{{$str}}" aria-controls="{{$str}}" role="tab">{{$category}}</a>
|
|
|
- @endforeach
|
|
|
- </div>
|
|
|
+ <div class="list-group" role="tablist">
|
|
|
+ @foreach ($knowledges as $category => $articles)
|
|
|
+ @php $str = string_urlsafe($category) @endphp
|
|
|
+ <a class="list-group-item @if ($loop->first) list-group-item-action active @endif" data-toggle="tab"
|
|
|
+ href="#{{ $str }}" role="tab" aria-controls="{{ $str }}">{{ $category }}</a>
|
|
|
+ @endforeach
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="col-xxl-8 col-lg-8 col-md-12">
|
|
|
+ <div class="col-xxl-8 col-xl-9 col-lg-8 col-md-12">
|
|
|
<div class="panel">
|
|
|
<div class="panel-heading progress" id="loading_article" style="display: none;">
|
|
|
- <div class="progress-bar progress-bar-striped active" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%" role="progressbar">
|
|
|
+ <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"
|
|
|
+ style="width: 100%">
|
|
|
<span class="sr-only">100% Complete</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="panel-body pt-30">
|
|
|
<div class="tab-content">
|
|
|
- @foreach($knowledges as $category => $articles)
|
|
|
- <div class="tab-pane animation-fade @if($loop->first) active @endif" id="{{string_urlsafe($category)}}" role="tabpanel">
|
|
|
- <div class="panel-group panel-group-simple panel-group-continuous" id="category_{{$loop->iteration}}" aria-multiselectable="true"
|
|
|
- role="tablist">
|
|
|
+ @foreach ($knowledges as $category => $articles)
|
|
|
+ <div class="tab-pane animation-fade @if ($loop->first) active @endif" id="{{ string_urlsafe($category) }}"
|
|
|
+ role="tabpanel">
|
|
|
+ <div class="panel-group panel-group-simple panel-group-continuous" role="tablist" aria-multiselectable="true">
|
|
|
@if ($loop->first)
|
|
|
<div class="panel">
|
|
|
<div class="panel-heading" id="question_1" role="tab">
|
|
|
- <a class="panel-title cyan-600" aria-controls="answer_1" aria-expanded="true" data-toggle="collapse" href="#answer_1"
|
|
|
- data-parent="#category_{{$loop->iteration}}">
|
|
|
- <i class="icon wb-link" aria-hidden="true"></i>{{trans('user.subscribe.link')}}
|
|
|
+ <a class="panel-title cyan-600" data-toggle="collapse" href="#answer_1" aria-controls="answer_1"
|
|
|
+ aria-expanded="true">
|
|
|
+ <i class="icon wb-link" aria-hidden="true"></i>{{ trans('user.subscribe.link') }}
|
|
|
</a>
|
|
|
</div>
|
|
|
- <div class="panel-collapse collapse show" id="answer_1" aria-labelledby="question_1" role="tabpanel">
|
|
|
+ <div class="panel-collapse collapse show" id="answer_1" role="tabpanel" aria-labelledby="question_1">
|
|
|
<div class="panel-body">
|
|
|
- @if($subStatus)
|
|
|
- <x-alert type="warning" :message="trans('user.subscribe.tips')"/>
|
|
|
+ @if ($subStatus)
|
|
|
+ <x-alert type="warning" :message="trans('user.subscribe.tips')" />
|
|
|
<div class="input-group">
|
|
|
- <input type="text" class="form-control" id="sub_link" value="{{$subUrl}}"/>
|
|
|
+ <input class="form-control" id="sub_link" type="text" value="{{ $subUrl }}" />
|
|
|
<div class="input-group-btn btn-group" role="group">
|
|
|
- @if(count($subType) > 1)
|
|
|
+ @if (count($subType) > 1)
|
|
|
<div class="btn-group" role="group">
|
|
|
- <button type="button" class="btn btn-primary dropdown-toggle" id="sublink" data-toggle="dropdown"
|
|
|
- aria-expanded="false">
|
|
|
+ <button class="btn btn-primary dropdown-toggle" id="sublink"
|
|
|
+ data-toggle="dropdown" type="button" aria-expanded="false">
|
|
|
{{ __('user.subscribe.custom') }}
|
|
|
</button>
|
|
|
- <div class="dropdown-menu" aria-labelledby="sublink" role="menu">
|
|
|
- @if(in_array('ss', $subType, true))
|
|
|
- <a class="dropdown-item" onclick="linkManager('0')"
|
|
|
- role="menuitem">{{ __('user.subscribe.ss_only') }}</a>
|
|
|
+ <div class="dropdown-menu" role="menu" aria-labelledby="sublink">
|
|
|
+ @if (in_array('ss', $subType, true))
|
|
|
+ <a class="dropdown-item" role="menuitem"
|
|
|
+ onclick="linkManager('0')">{{ __('user.subscribe.ss_only') }}</a>
|
|
|
@endif
|
|
|
- @if(in_array('ssr', $subType, true))
|
|
|
- <a class="dropdown-item" onclick="linkManager('1')"
|
|
|
- role="menuitem">{{ __('user.subscribe.ssr_only') }}</a>
|
|
|
+ @if (in_array('ssr', $subType, true))
|
|
|
+ <a class="dropdown-item" role="menuitem"
|
|
|
+ onclick="linkManager('1')">{{ __('user.subscribe.ssr_only') }}</a>
|
|
|
@endif
|
|
|
- @if(in_array('v2', $subType, true))
|
|
|
- <a class="dropdown-item" onclick="linkManager('2')"
|
|
|
- role="menuitem">{{ __('user.subscribe.v2ray_only') }}</a>
|
|
|
+ @if (in_array('v2', $subType, true))
|
|
|
+ <a class="dropdown-item" role="menuitem"
|
|
|
+ onclick="linkManager('2')">{{ __('user.subscribe.v2ray_only') }}</a>
|
|
|
@endif
|
|
|
- @if(in_array('trojan', $subType, true))
|
|
|
- <a class="dropdown-item" onclick="linkManager('3')"
|
|
|
- role="menuitem">{{ __('user.subscribe.trojan_only') }}</a>
|
|
|
+ @if (in_array('trojan', $subType, true))
|
|
|
+ <a class="dropdown-item" role="menuitem"
|
|
|
+ onclick="linkManager('3')">{{ __('user.subscribe.trojan_only') }}</a>
|
|
|
@endif
|
|
|
</div>
|
|
|
</div>
|
|
@@ -92,11 +83,11 @@
|
|
|
<button class="btn btn-outline-info mt-clipboard" data-clipboard-action="copy"
|
|
|
data-clipboard-target="#sub_link">
|
|
|
<i class="icon wb-copy" aria-hidden="true"></i>
|
|
|
- {{trans('common.copy.attribute')}}</button>
|
|
|
+ {{ trans('common.copy.attribute') }}</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
@else
|
|
|
- <x-alert type="danger" :message="__($subMsg)"/>
|
|
|
+ <x-alert type="danger" :message="__($subMsg)" />
|
|
|
@endif
|
|
|
</div>
|
|
|
</div>
|
|
@@ -104,14 +95,19 @@
|
|
|
@endif
|
|
|
@foreach ($articles as $article)
|
|
|
<div class="panel">
|
|
|
- <div class="panel-heading" id="article_Q{{$article->id}}" role="tab">
|
|
|
- <a class="panel-title" onclick="fetch('{{$article->id}}')" aria-controls="article_A{{$article->id}}"
|
|
|
- aria-expanded="false"
|
|
|
- data-toggle="collapse" href="#article_A{{$article->id}}" data-parent="#category_{{$loop->parent->iteration}}">
|
|
|
- {{$article->title}}
|
|
|
+ <div class="panel-heading"id="article_Q{{ $article->id }}">
|
|
|
+ <a class="panel-title collapsed" data-toggle="collapse" href="#article_A{{ $article->id }}"
|
|
|
+ role="tab" aria-controls="article_A{{ $article->id }}" aria-expanded="false"
|
|
|
+ style="display: flex;" onclick="getArticle('{{ $article->id }}')">
|
|
|
+ @isset($article->logo)
|
|
|
+ <img class="mr-5" src="{{ asset($article->logo) }}" alt=""
|
|
|
+ style="height: 36px; align-self: center" loading="lazy" />
|
|
|
+ @endisset
|
|
|
+ <h4 style="margin-top: 11px">{{ $article->title }}</h4>
|
|
|
</a>
|
|
|
- <div class="panel-collapse" id="article_A{{$article->id}}" aria-labelledby="article_Q{{$article->id}}" role="tabpanel">
|
|
|
- <div class="panel-body" id="article_B{{$article->id}}"></div>
|
|
|
+ <div class="panel-collapse collapse" id="article_A{{ $article->id }}" role="tabpanel"
|
|
|
+ aria-labelledby="article_Q{{ $article->id }}">
|
|
|
+ <div class="panel-body" id="load_article_{{ $article->id }}"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -135,75 +131,80 @@
|
|
|
<script src="/assets/custom/jump-tab.js"></script>
|
|
|
<script src="/assets/global/js/Plugin/asprogress.js"></script>
|
|
|
<script>
|
|
|
- const clipboard = new ClipboardJS('.mt-clipboard');
|
|
|
+ const clipboard = new ClipboardJS(".mt-clipboard");
|
|
|
|
|
|
- function fetch(id) {
|
|
|
- if (!document.getElementById('article_B' + id).innerHTML) {
|
|
|
- $.ajax({
|
|
|
- method: 'GET',
|
|
|
- url: '{{route('article', '')}}/' + id,
|
|
|
- beforeSend: function() {
|
|
|
- $('#loading_article').show();
|
|
|
- },
|
|
|
- success: function(ret) {
|
|
|
- document.getElementById('article_B' + id).innerHTML = ret.content;
|
|
|
- },
|
|
|
- complete: function() {
|
|
|
- $('#loading_article').hide();
|
|
|
- },
|
|
|
- });
|
|
|
- }
|
|
|
+ function getArticle(id) {
|
|
|
+ if (!document.getElementById("load_article_" + id).innerHTML) {
|
|
|
+ $.ajax({
|
|
|
+ method: "GET",
|
|
|
+ url: '{{ route('article', '') }}/' + id,
|
|
|
+ beforeSend: function() {
|
|
|
+ $("#loading_article").show();
|
|
|
+ },
|
|
|
+ success: function(ret) {
|
|
|
+ document.getElementById("load_article_" + id).innerHTML = ret.content;
|
|
|
+ },
|
|
|
+ complete: function() {
|
|
|
+ $("#loading_article").hide();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
- return false;
|
|
|
- }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
- function linkManager($type) {
|
|
|
- $('#sub_link').val('{{$subUrl}}?type=' + $type);
|
|
|
- return false;
|
|
|
- }
|
|
|
+ function linkManager($type) {
|
|
|
+ $("#sub_link").val('{{ $subUrl }}?type=' + $type);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
- // 更换订阅地址
|
|
|
- function exchangeSubscribe() {
|
|
|
- swal.fire({
|
|
|
- title: '{{trans('common.warning')}}',
|
|
|
- text: '{{trans('user.subscribe.exchange_warning')}}',
|
|
|
- icon: 'warning',
|
|
|
- showCancelButton: true,
|
|
|
- cancelButtonText: '{{trans('common.close')}}',
|
|
|
- confirmButtonText: '{{trans('common.confirm')}}',
|
|
|
- }).then((result) => {
|
|
|
- if (result.value) {
|
|
|
- $.post('{{route('changeSub')}}', {_token: '{{csrf_token()}}'}, function(ret) {
|
|
|
- if (ret.status === 'success') {
|
|
|
- swal.fire({
|
|
|
- title: ret.message,
|
|
|
- icon: 'success',
|
|
|
- timer: 1000,
|
|
|
- showConfirmButton: false,
|
|
|
- }).then(() => window.location.reload());
|
|
|
- } else {
|
|
|
- swal.fire({title: ret.message, icon: 'error'}).then(() => window.location.reload());
|
|
|
- }
|
|
|
+ // 更换订阅地址
|
|
|
+ function exchangeSubscribe() {
|
|
|
+ swal.fire({
|
|
|
+ title: '{{ trans('common.warning') }}',
|
|
|
+ text: '{{ trans('user.subscribe.exchange_warning') }}',
|
|
|
+ icon: "warning",
|
|
|
+ showCancelButton: true,
|
|
|
+ cancelButtonText: '{{ trans('common.close') }}',
|
|
|
+ confirmButtonText: '{{ trans('common.confirm') }}'
|
|
|
+ }).then((result) => {
|
|
|
+ if (result.value) {
|
|
|
+ $.post('{{ route('changeSub') }}', {
|
|
|
+ _token: '{{ csrf_token() }}'
|
|
|
+ }, function(ret) {
|
|
|
+ if (ret.status === "success") {
|
|
|
+ swal.fire({
|
|
|
+ title: ret.message,
|
|
|
+ icon: "success",
|
|
|
+ timer: 1000,
|
|
|
+ showConfirmButton: false
|
|
|
+ }).then(() => window.location.reload());
|
|
|
+ } else {
|
|
|
+ swal.fire({
|
|
|
+ title: ret.message,
|
|
|
+ icon: "error"
|
|
|
+ }).then(() => window.location.reload());
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
});
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
- clipboard.on('success', function() {
|
|
|
- swal.fire({
|
|
|
- title: '{{trans('common.copy.success')}}',
|
|
|
- icon: 'success',
|
|
|
- timer: 1300,
|
|
|
- showConfirmButton: false,
|
|
|
+ clipboard.on("success", function() {
|
|
|
+ swal.fire({
|
|
|
+ title: '{{ trans('common.copy.success') }}',
|
|
|
+ icon: "success",
|
|
|
+ timer: 1300,
|
|
|
+ showConfirmButton: false
|
|
|
+ });
|
|
|
});
|
|
|
- });
|
|
|
- clipboard.on('error', function() {
|
|
|
- swal.fire({
|
|
|
- title: '{{trans('common.copy.failed')}}',
|
|
|
- icon: 'error',
|
|
|
- timer: 1500,
|
|
|
- showConfirmButton: false,
|
|
|
+ clipboard.on("error", function() {
|
|
|
+ swal.fire({
|
|
|
+ title: '{{ trans('common.copy.failed') }}',
|
|
|
+ icon: "error",
|
|
|
+ timer: 1500,
|
|
|
+ showConfirmButton: false
|
|
|
+ });
|
|
|
});
|
|
|
- });
|
|
|
</script>
|
|
|
@endsection
|