clear code and change theme settings

master
Gustavo Luigi 2021-06-01 17:44:02 -03:00
parent 8c7ac20333
commit 34b1d05f96
16 changed files with 57 additions and 210 deletions

View File

@ -1,11 +1,5 @@
@extends('template.'.config('settings.template').'.content.master') @extends('template.'.config('settings.template').'.content.master')
@section('content') @section('content')






@if (\Route::currentRouteName() != 'author.get') @if (\Route::currentRouteName() != 'author.get')
<div class="row" style="margin-top:50px;"> <div class="row" style="margin-top:50px;">
<div class="mx-auto" style="overflow: scroll"> <div class="mx-auto" style="overflow: scroll">
@ -13,57 +7,46 @@
<label class="btn btn-lg {{ (!isset($categoryModel) and \Request::route()->getName() != 'nachrichten.get' and \Request::route()->getName() != 'author.get') ? 'active btn-primary' : 'btn-outline-primary' }}" onclick="location.href = '{{ url('/') }}';"> <label class="btn btn-lg {{ (!isset($categoryModel) and \Request::route()->getName() != 'nachrichten.get' and \Request::route()->getName() != 'author.get') ? 'active btn-primary' : 'btn-outline-primary' }}" onclick="location.href = '{{ url('/') }}';">
<input type="radio" name="options" id="option1" autocomplete="off" checked=""> <i class="fal fa-bookmark" aria-hidden="true"></i> Home <input type="radio" name="options" id="option1" autocomplete="off" checked=""> <i class="fal fa-bookmark" aria-hidden="true"></i> Home
</label> </label>

@foreach ($categories as $category) @foreach ($categories as $category)
<label class="btn btn-lg {{ (isset($categoryModel) and $category->id == $categoryModel->id) ? 'active btn-primary' : 'btn-outline-primary' }}" onclick="location.href = '{{ url('/' . $category->slug) }}';"> <label class="btn btn-lg {{ (isset($categoryModel) and $category->id == $categoryModel->id) ? 'active btn-primary' : 'btn-outline-primary' }}" onclick="location.href = '{{ url('/' . $category->slug) }}';">
<input type="radio" name="options" id="option3" autocomplete="off"> <input type="radio" name="options" id="option3" autocomplete="off">

@if($category->icon == 'bitcoin') @if($category->icon == 'bitcoin')
<i class="fab fa-{{$category->icon}}"></i> <i class="fab fa-{{$category->icon}}"></i>
@else @else
<i class="fal fa-{{$category->icon}}"></i> <i class="fal fa-{{$category->icon}}"></i>
@endif @endif


{{ $category->name }} {{ $category->name }}
</label> </label>
@endforeach @endforeach
</div> </div>
</div> </div>
</div> </div>

<div class="container"> <div class="container">
<div class="col-12"> <div class="col-12">
@if (isset($categoryModel)) @if (isset($categoryModel))
<br><br> <br><br>
<h1> <h1>

@if($categoryModel->icon == 'bitcoin') @if($categoryModel->icon == 'bitcoin')
<i class="fab fa-{{$categoryModel->icon}}"></i> <i class="fab fa-{{$categoryModel->icon}}"></i>
@else @else
<i class="fal fa-{{$categoryModel->icon}}"></i> <i class="fal fa-{{$categoryModel->icon}}"></i>
@endif @endif

{{ $categoryModel->name }}</h1> {{ $categoryModel->name }}</h1>
@else @else
<br><br> <br><br>
<h1>{{ \Setting::get('name')}}</h1> <h1>{{ config('settings.name')}}</h1>
@endif @endif

<p class="intro"> <p class="intro">
@if (isset($categoryModel)) @if (isset($categoryModel))
{{ $categoryModel->description }} {{ $categoryModel->description }}
@else @else
{{ \Setting::get('description')}} {{ config('settings.description')}}
@endif @endif
<br> <br>


</p> </p>
</div> </div>
</div> </div>
@endif @endif

<div class="container"> <div class="container">
<div class="row"> <div class="row">
@if (\Route::currentRouteName() == 'author.get') @if (\Route::currentRouteName() == 'author.get')
@ -75,28 +58,21 @@
<div class="col-sm-12 col-md-10"> <div class="col-sm-12 col-md-10">
<br><br> <br><br>
<h1>{{ $author->name }}</h1> <h1>{{ $author->name }}</h1>


<p class="intro"> <p class="intro">
{{ $author->description }} {{ $author->description }}
</p> </p>



<div class="row"> <div class="row">
<div class="col-md-7 col-sm-12"> <div class="col-md-7 col-sm-12">
@if (isset($author->social_networks['email'])) @if (isset($author->social_networks['email']))
<a href="mailto:{{ $author->social_networks['email'] }}"><i class="fal fa-envelope"></i></a> <a href="mailto:{{ $author->social_networks['email'] }}"><i class="fal fa-envelope"></i></a>
| |
@endif @endif

@if (isset($author->social_networks['site'])) @if (isset($author->social_networks['site']))
<a href="{{ $author->social_networks['site'] }}">{{ $author->social_networks['site'] }}</a> <a href="{{ $author->social_networks['site'] }}">{{ $author->social_networks['site'] }}</a>
@endif @endif
<br> <br>
<br> <br>
</div> </div>

<div class="col-md-5 col-sm-12 text-center"> <div class="col-md-5 col-sm-12 text-center">
<?php <?php
$social = [ $social = [
@ -115,28 +91,23 @@
'youtube' 'youtube'
]; ];
?> ?>

@foreach ($social as $value) @foreach ($social as $value)
@if (isset($author->social_networks[$value])) @if (isset($author->social_networks[$value]))
<a href="{{ $author->social_networks[$value] }}"><i class="fab fa-{{ $value }}"></i></a> <a href="{{ $author->social_networks[$value] }}"><i class="fab fa-{{ $value }}"></i></a>
@endif @endif
@endforeach @endforeach

<br> <br>
<br> <br>
</div> </div>

</div> </div>
</div> </div>
@endif @endif

@if (\Route::currentRouteName() == 'welcome') @if (\Route::currentRouteName() == 'welcome')
<div class="col-12"> <div class="col-12">
<br> <br>
<br> <br>
<h2 class="h4" class="text-center">{{ __('public.popular-authors') }}</h2> <h2 class="h4" class="text-center">{{ __('public.popular-authors') }}</h2>
</div> </div>

@foreach ($authors as $author) @foreach ($authors as $author)
<div class="col-4 col-md-2 text-center"> <div class="col-4 col-md-2 text-center">
<br> <br>
@ -145,7 +116,6 @@
</a> </a>
</div> </div>
@endforeach @endforeach

<!--<div class="col-lg-12" style="text-align: center"> <!--<div class="col-lg-12" style="text-align: center">
<br> <br>
<br> <br>
@ -159,27 +129,16 @@
<br> <br>
<br> <br>
</div>--> </div>-->

<div class="col-lg-12"> <div class="col-lg-12">
<br> <br>
<br> <br>
<br> <br>
</div> </div>

@endif @endif
</div> </div>
</div> </div>




<section id="article-section"> <section id="article-section">


<div class="container"> <div class="container">



@if (env('APP_WRITE', false)) @if (env('APP_WRITE', false))
<br> <br>
<br> <br>
@ -187,16 +146,8 @@
<a href="" class="float-right" data-toggle="modal" data-target="#exampleModal"><i class="fal fa-plus"></i> {{ __('public.propose-content') }} Neuen Inhalt einreichen</a> <a href="" class="float-right" data-toggle="modal" data-target="#exampleModal"><i class="fal fa-plus"></i> {{ __('public.propose-content') }} Neuen Inhalt einreichen</a>
<br> <br>
<br> <br>


@endif @endif

@include('template.'.config('settings.template').'.content.includes.create-content')


@include('template.'.\Setting::get('template', 'default').'.content.includes.create-content')



<br> <br>
@if (session()->has('success')) @if (session()->has('success'))
<div class="row justify-content-center"> <div class="row justify-content-center">
@ -215,7 +166,6 @@
</div> </div>
</div> </div>
@endif @endif

@if (session()->has('error')) @if (session()->has('error'))
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-lg-8"> <div class="col-lg-8">
@ -233,20 +183,13 @@
</div> </div>
</div> </div>
@endif @endif

<div class="article-feed"> <div class="article-feed">
@foreach($nachrichten as $nach) @foreach($nachrichten as $nach)

<article class="newsentry" style="width: 100%;" data-slug="{{ $nach->category->slug }}/{{ $nach->slug }}"> <article class="newsentry" style="width: 100%;" data-slug="{{ $nach->category->slug }}/{{ $nach->slug }}">


@if ($nach->paid != 0 and (empty($nach->premium_until) or $nach->premium_until > date('Y-m-d')) and !\Session::get('premium_code')) @if ($nach->paid != 0 and (empty($nach->premium_until) or $nach->premium_until > date('Y-m-d')) and !\Session::get('premium_code'))
<div class="col-lg-12"> <div class="col-lg-12">
<div class="card shadow-lg" id="news-{{$nach->id}}"> <div class="card shadow-lg" id="news-{{$nach->id}}">


<div class="card-body" style="padding-bottom: 0;"> <div class="card-body" style="padding-bottom: 0;">

@if($nach->created_at->diffInHours(date('Y-m-d H:i:s')) < 1) @if($nach->created_at->diffInHours(date('Y-m-d H:i:s')) < 1)
<div class="progress" style="height: 30px;"> <div class="progress" style="height: 30px;">
<div class="progress-bar progress-bar-striped progress-bar-animated bg-warning" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%"> <div class="progress-bar progress-bar-striped progress-bar-animated bg-warning" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%">
@ -255,11 +198,9 @@
</div> </div>
<br> <br>
@endif @endif

<a href="{{ route('nachrichten.get', [$nach->category->slug, $nach->slug]) }}"> <a href="{{ route('nachrichten.get', [$nach->category->slug, $nach->slug]) }}">
<h2 class="card-title">{{$nach->title}}</h2> <h2 class="card-title">{{$nach->title}}</h2>
</a> </a>

<h6 class="card-subtitle mb-2"> <h6 class="card-subtitle mb-2">
@if ($nach->user and $nach->user->public_author == 1) @if ($nach->user and $nach->user->public_author == 1)
<a class="text-dark" href="{{ route('author.get', [$nach->user->slug]) }}""> <a class="text-dark" href="{{ route('author.get', [$nach->user->slug]) }}"">
@ -270,7 +211,6 @@
<span style="font-weight: normal " class="text-dark"">{{date('d.m.Y H:i', strtotime($nach->created_at))}}</span> <span style="font-weight: normal " class="text-dark"">{{date('d.m.Y H:i', strtotime($nach->created_at))}}</span>
@endif @endif
</h6> </h6>

@if ($nach->category) @if ($nach->category)
<a href="{{ route('category.get', [$nach->category->slug]) }}"> <a href="{{ route('category.get', [$nach->category->slug]) }}">
<div class="badge badge-primary"> <div class="badge badge-primary">
@ -278,13 +218,10 @@
</div> </div>
</a> </a>
@endif @endif

@if ($nach->image) @if ($nach->image)
<img src="{{ asset('uploads/' . $nach->image) }}" class="img-responsive" style="max-width: 100%;margin-bottom: 20px; margin-top:20px; display: block;"> <img src="{{ asset('uploads/' . $nach->image) }}" class="img-responsive" style="max-width: 100%;margin-bottom: 20px; margin-top:20px; display: block;">
@endif @endif

</div> </div>

<div class="card-body card-preview-{{ $nach->id }} pay-preview"> <div class="card-body card-preview-{{ $nach->id }} pay-preview">
<div> <div>
<div class="card-text" id="text_news_{{$nach->id}}"> <div class="card-text" id="text_news_{{$nach->id}}">
@ -292,85 +229,58 @@
{!! \Str::limit($nach->nachrichten, 285, ' ...') !!} {!! \Str::limit($nach->nachrichten, 285, ' ...') !!}
</div> </div>
</div> </div>

@if ($nach->type_id == 2) @if ($nach->type_id == 2)
<p class="card-text"> <p class="card-text">
<p style="font-weight:600;">{{ __('public.work-location') }}</p> <p style="font-weight:600;">{{ __('public.work-location') }}</p>
<div id="text_news_workplace_{{$nach->id}}">{{ isset($nach->additional_fields['workplace']) ? \Str::limit($nach->additional_fields['workplace'], 30, ' ...') : '-'}} <div id="text_news_workplace_{{$nach->id}}">{{ isset($nach->additional_fields['workplace']) ? \Str::limit($nach->additional_fields['workplace'], 30, ' ...') : '-'}}
</div> </div>
</p> </p>

<p class="card-text"> <p class="card-text">
<p style="font-weight:600;">{{ __('public.contact-data') }}</p> <p style="font-weight:600;">{{ __('public.contact-data') }}</p>
<div id="text_news_contact_info_{{$nach->id}}">{!! isset($nach->additional_fields['contact_info']) ? \Str::limit($nach->additional_fields['contact_info'], 30, ' ...') : '-' !!} <div id="text_news_contact_info_{{$nach->id}}">{!! isset($nach->additional_fields['contact_info']) ? \Str::limit($nach->additional_fields['contact_info'], 30, ' ...') : '-' !!}
</div> </div>
</p> </p>
@endif @endif

<div id="box_action_{{ $nach->id }}"></div> <div id="box_action_{{ $nach->id }}"></div>
</div> </div>

<div class="card-body payment-request" id="payment-request-{{ $nach->id }}"> <div class="card-body payment-request" id="payment-request-{{ $nach->id }}">

<h2 class="text-center"><i class="far fa-gem fa-2x" style="font-size: 20px;"></i> {{ __('public.premium-content') }}</h2> <h2 class="text-center"><i class="far fa-gem fa-2x" style="font-size: 20px;"></i> {{ __('public.premium-content') }}</h2>

@if (!empty($nach->premium_until) and $nach->premium_until > date('Y-m-d')) @if (!empty($nach->premium_until) and $nach->premium_until > date('Y-m-d'))
<small class="text-center d-block">{{ __('public.article-requires-payment') }}mjn <div id="counter_{{ $nach->id }}" data-id="{{ $nach->id }}" data-date="{{ $nach->premium_until }}" class="counter-class">-</div></small> <small class="text-center d-block">{{ __('public.article-requires-payment') }}mjn <div id="counter_{{ $nach->id }}" data-id="{{ $nach->id }}" data-date="{{ $nach->premium_until }}" class="counter-class">-</div></small>
@endif @endif

<p class="text-center">To read the article <p class="text-center">To read the article

@if (!empty($nach->premium_until) and $nach->premium_until > date('Y-m-d')) @if (!empty($nach->premium_until) and $nach->premium_until > date('Y-m-d'))
{{ __('public.now') }}now {{ __('public.now') }}now
@endif @endif
{{ __('public.please-pay') }} {{ $nach->paid }} sats</p> {{ __('public.please-pay') }} {{ $nach->paid }} sats</p>

<br> <br>
<p class="text-center"> <p class="text-center">
<a href="#ln-invoice-{{ $nach->id }}" data-id="{{ $nach->id }}" class="btn btn-warning get-collapse-invoice"><i class="fas fa-bolt"></i> Pay {{ $nach->paid }} sats</a> <a href="#ln-invoice-{{ $nach->id }}" data-id="{{ $nach->id }}" class="btn btn-warning get-collapse-invoice"><i class="fas fa-bolt"></i> Pay {{ $nach->paid }} sats</a>
<br> <br>
<a href="" class="howtopay" data-toggle="modal" data-target="#exampleModalCode">{{ __('public.use') }} <i class="fal fa-gem"></i> {{ __('public.premium-pass') }}</a> <a href="" class="howtopay" data-toggle="modal" data-target="#exampleModalCode">{{ __('public.use') }} <i class="fal fa-gem"></i> {{ __('public.premium-pass') }}</a>

@include('template.'.config('settings.template').'.content.includes.explain-lightning')
@include('template.'.\Setting::get('template', 'default').'.content.includes.explain-lightning')

<br> <br>
</p> </p>

<div class="row collapse" id="ln-invoice-{{ $nach->id }}"> <div class="row collapse" id="ln-invoice-{{ $nach->id }}">
<div class="col-sm-6 offset-sm-3"> <div class="col-sm-6 offset-sm-3">
<a class="pay-news pay-news-{{ $nach->id }}" data-id="{{$nach->id}}" style="cursor:pointer !important;"></a> <a class="pay-news pay-news-{{ $nach->id }}" data-id="{{$nach->id}}" style="cursor:pointer !important;"></a>

<br> <br>

<div id="pay-news-title-{{ $nach->id }}"> </div> <div id="pay-news-title-{{ $nach->id }}"> </div>
</div> </div>
</div> </div>




</div> </div>



@if (env('APP_COMMENTS', false)) @if (env('APP_COMMENTS', false))
<div class="card-footer" id="comment_button_{{$nach->id}}"> <div class="card-footer" id="comment_button_{{$nach->id}}">

@if(sizeof($nach->comments) > 0) @if(sizeof($nach->comments) > 0)

<a href="#" onclick="showComments(event, {{$nach->id}})"> <span class="badge badge-primary">{{sizeof($nach->comments)}}</span> {{ __('public.display-comments') }}{{ __('public.see-comments') }}</a> <a href="#" onclick="showComments(event, {{$nach->id}})"> <span class="badge badge-primary">{{sizeof($nach->comments)}}</span> {{ __('public.display-comments') }}{{ __('public.see-comments') }}</a>
@else @else
<i>{{ __('public.no-comments-yet') }}</i> <i>{{ __('public.no-comments-yet') }}</i>
@endif @endif

<button class="btn btn-primary btn-sm float-right" data-toggle="modal" data-target="#exampleModal2" onclick="setCommentId({{$nach->id}}),ga('send', 'event', 'Read Comments', 'Website', '{{$nach->title}}');"> <button class="btn btn-primary btn-sm float-right" data-toggle="modal" data-target="#exampleModal2" onclick="setCommentId({{$nach->id}}),ga('send', 'event', 'Read Comments', 'Website', '{{$nach->title}}');">
<i class="fas fa-comment"></i> {{ __('public.comment') }} <i class="fas fa-comment"></i> {{ __('public.comment') }}
</button> </button>
</div> </div>
@endif @endif



<div style="display:none" id="comments_{{$nach->id}}"> <div style="display:none" id="comments_{{$nach->id}}">
<div class="card-footer bg-primary"> <div class="card-footer bg-primary">
<a class="text-white"> <span class="badge badge-light">{{sizeof($nach->comments)}}</span> {{ __('public.no-comments-yet') }}</a> <a class="text-white"> <span class="badge badge-light">{{sizeof($nach->comments)}}</span> {{ __('public.no-comments-yet') }}</a>
@ -385,7 +295,6 @@
<i class="fas fa-user" style="color: #007BFF"></i> {{$comment->name}}: <i class="fas fa-user" style="color: #007BFF"></i> {{$comment->name}}:
<!-- For now taking that out, time is wrong... --> <!-- For now taking that out, time is wrong... -->
<span class="float-right" title="{{date('d.m.Y | H:i', strtotime($comment->created_at))}} Uhr">{{date('d.m.Y H:i', strtotime($comment->created_at))}} Uhr</span> <span class="float-right" title="{{date('d.m.Y | H:i', strtotime($comment->created_at))}} Uhr">{{date('d.m.Y H:i', strtotime($comment->created_at))}} Uhr</span>

</div> </div>
<div class="card-body comment-text"> <div class="card-body comment-text">
<p class="card-text"> <p class="card-text">
@ -396,18 +305,14 @@
@endforeach @endforeach
</table> </table>
</div> </div>

</div> </div>
</div> </div>

@else @else
<div class="col-lg-12"> <div class="col-lg-12">
<div class="card shadow-lg" id="news-{{$nach->id}}"> <div class="card shadow-lg" id="news-{{$nach->id}}">

@if(\Session::get('premium_code') and $nach->paid != 0 and (empty($nach->premium_until) or $nach->premium_until > date('Y-m-d'))) @if(\Session::get('premium_code') and $nach->paid != 0 and (empty($nach->premium_until) or $nach->premium_until > date('Y-m-d')))
<div class="bg-ci text-center top-border-radius" style="font-size: 12px;"><i class="fal fa-gem"></i> Premium content</div> <div class="bg-ci text-center top-border-radius" style="font-size: 12px;"><i class="fal fa-gem"></i> Premium content</div>
@endif @endif

<div class="card-body"> <div class="card-body">
@if($nach->created_at->diffInHours(date('Y-m-d H:i:s')) < 1) @if($nach->created_at->diffInHours(date('Y-m-d H:i:s')) < 1)
<div class="progress" style="height: 30px;"> <div class="progress" style="height: 30px;">
@ -417,11 +322,9 @@
</div> </div>
<br> <br>
@endif @endif

<a href="{{ route('nachrichten.get', [$nach->category->slug, $nach->slug]) }}"> <a href="{{ route('nachrichten.get', [$nach->category->slug, $nach->slug]) }}">
<h2 class="card-title">{{$nach->title}}</h2> <h2 class="card-title">{{$nach->title}}</h2>
</a> </a>

<h6 class="card-subtitle mb-2"> <h6 class="card-subtitle mb-2">
@if ($nach->user and $nach->user->public_author == 1) @if ($nach->user and $nach->user->public_author == 1)
<a class="text-dark" href="{{ route('author.get', [$nach->user->slug]) }}"> <a class="text-dark" href="{{ route('author.get', [$nach->user->slug]) }}">
@ -431,7 +334,6 @@
<span style="font-weight: normal " class="text-dark"">{{date('d.m.Y H:i', strtotime($nach->created_at))}}</span> <span style="font-weight: normal " class="text-dark"">{{date('d.m.Y H:i', strtotime($nach->created_at))}}</span>
@endif @endif
</h6> </h6>

@if ($nach->category) @if ($nach->category)
<a href="{{ route('category.get', [$nach->category->slug]) }}"> <a href="{{ route('category.get', [$nach->category->slug]) }}">
<div class="badge badge-primary"> <div class="badge badge-primary">
@ -439,104 +341,70 @@
</div> </div>
</a> </a>
@endif @endif

@if ($nach->image) @if ($nach->image)
<img src="{{ asset('uploads/' . $nach->image) }}" class="img-responsive" style="max-width: 100%;margin-bottom: 20px; margin-top:20px; display: block;"> <img src="{{ asset('uploads/' . $nach->image) }}" class="img-responsive" style="max-width: 100%;margin-bottom: 20px; margin-top:20px; display: block;">
@endif @endif


<p class="card-text"> <p class="card-text">
{!! $nach->nachrichten !!} {!! $nach->nachrichten !!}
</p> </p>

@if ($nach->type_id == 2) @if ($nach->type_id == 2)
<p class="card-text"> <p class="card-text">
<p style="font-weight:600;">{{ __('public.work-location') }}</p> {{ isset($nach->additional_fields['workplace']) ? $nach->additional_fields['workplace'] : '-'}} <p style="font-weight:600;">{{ __('public.work-location') }}</p> {{ isset($nach->additional_fields['workplace']) ? $nach->additional_fields['workplace'] : '-'}}
</p> </p>

<p class="card-text"> <p class="card-text">
<p style="font-weight:600;">{{ __('public.contact-data') }}</p> {!! isset($nach->additional_fields['contact_info']) ? $nach->additional_fields['contact_info'] : '-' !!} <p style="font-weight:600;">{{ __('public.contact-data') }}</p> {!! isset($nach->additional_fields['contact_info']) ? $nach->additional_fields['contact_info'] : '-' !!}
</p> </p>
@endif @endif

@if($nach->type_id == 3) @if($nach->type_id == 3)
<hr> <hr>

<div class="row"> <div class="row">

@if($nach->show_total_paid_action == 1) @if($nach->show_total_paid_action == 1)

@if ($nach->actions->count() > 1) @if ($nach->actions->count() > 1)

<div class="col-12"> <div class="col-12">

<i class="text-center">{{ __('public.vote-distribution') }}</i> <i class="text-center">{{ __('public.vote-distribution') }}</i>
<div class="progress"> <div class="progress">
@foreach ($nach->actions as $action) @foreach ($nach->actions as $action)
<div class="progress-bar bg-{{ $action->color }}" role="progressbar" style="width: {{ !empty($nach->total_paid_actions()) ? round(($action->payments()->where('status', 1)->sum('amount') * 100) / $nach->total_paid_actions()) : 0 }}%" aria-valuenow="66" aria-valuemin="0" aria-valuemax="100" title="{{ $action->payments()->where('status', 1)->sum('amount') }} sats">{{ !empty($nach->total_paid_actions()) ? round(($action->payments()->where('status', 1)->sum('amount') * 100) / $nach->total_paid_actions()) : 0 }}% </div> <div class="progress-bar bg-{{ $action->color }}" role="progressbar" style="width: {{ !empty($nach->total_paid_actions()) ? round(($action->payments()->where('status', 1)->sum('amount') * 100) / $nach->total_paid_actions()) : 0 }}%" aria-valuenow="66" aria-valuemin="0" aria-valuemax="100" title="{{ $action->payments()->where('status', 1)->sum('amount') }} sats">{{ !empty($nach->total_paid_actions()) ? round(($action->payments()->where('status', 1)->sum('amount') * 100) / $nach->total_paid_actions()) : 0 }}% </div>

@endforeach @endforeach
</div> </div>
<br> <br>

</div> </div>
@endif @endif
@endif @endif






@foreach ($nach->actions as $action) @foreach ($nach->actions as $action)

<div class="col"> <div class="col">

<small>{{ $action->description }}</small> <small>{{ $action->description }}</small>
<br> <br>

@if ($action->type == 2) @if ($action->type == 2)
<br> <br>
<textarea class="form-control" id="message_action_{{ $action->id }}" rows="3" placeholder="Write here your message.."></textarea> <textarea class="form-control" id="message_action_{{ $action->id }}" rows="3" placeholder="Write here your message.."></textarea>
@endif @endif

<!-- @if($nach->show_total_paid_action == 1) <!-- @if($nach->show_total_paid_action == 1)
<br> <br>

@if($action->type == 5) @if($action->type == 5)

<i class="text-center">Donation Goal: 10000 sats.</i> <i class="text-center">Donation Goal: 10000 sats.</i>

<div class="progress"> <div class="progress">
<div class="progress-bar bg-{{ $action->color }}" role="progressbar" aria-valuenow="{{ $action->payments()->where('status', 1)->sum('amount') }}" aria-valuemin="0" aria-valuemax="1000">{{ $action->payments()->where('status', 1)->sum('amount') }} sats</div> <div class="progress-bar bg-{{ $action->color }}" role="progressbar" aria-valuenow="{{ $action->payments()->where('status', 1)->sum('amount') }}" aria-valuemin="0" aria-valuemax="1000">{{ $action->payments()->where('status', 1)->sum('amount') }} sats</div>
</div> </div>

@else @else
<i class="text-center">Total paid: {{ $nach->actions->first()->payments()->where('status', 1)->sum('amount') }} sats</i> <i class="text-center">Total paid: {{ $nach->actions->first()->payments()->where('status', 1)->sum('amount') }} sats</i>
@endif @endif

@endif--> @endif-->

</div> </div>
@endforeach @endforeach
</div> </div>

<div class="row"> <div class="row">
@foreach ($nach->actions as $action) @foreach ($nach->actions as $action)

<div class="col"> <div class="col">
<a href="" style="margin-top: 20px;" id="action{{ $action->id }}" class="btn btn-{{ $action->color }} mx-0 d-block get-action-invoice" data-id="{{ $action->id }}" data-type="{{ $action->type }}" data-execute="0"><i class="fal fa-{{ $action->icon }}"></i> {{ $action->name }} for {{ $action->amount }} sats.</a> <a href="" style="margin-top: 20px;" id="action{{ $action->id }}" class="btn btn-{{ $action->color }} mx-0 d-block get-action-invoice" data-id="{{ $action->id }}" data-type="{{ $action->type }}" data-execute="0"><i class="fal fa-{{ $action->icon }}"></i> {{ $action->name }} for {{ $action->amount }} sats.</a>
</div> </div>
@endforeach @endforeach
</div> </div>
@endif @endif

@if(sizeof($nach->files) > 0) @if(sizeof($nach->files) > 0)
<br> <br>
<h5>{{ __('public.files-download') }}</h5> <h5>{{ __('public.files-download') }}</h5>
<div class="row"> <div class="row">


@foreach ($nach->files as $file) @foreach ($nach->files as $file)
<div class="col-lg-12"> <div class="col-lg-12">
<a href="{{ asset($file->url)}}" class="btn btn-primary" onclick="ga('send', 'event', 'File Download', 'User', '{{$file->filename}}');" > <a href="{{ asset($file->url)}}" class="btn btn-primary" onclick="ga('send', 'event', 'File Download', 'User', '{{$file->filename}}');" >
@ -549,31 +417,19 @@
@endforeach @endforeach
</div> </div>
@endif @endif

</div> </div>





@if (env('APP_COMMENTS', false)) @if (env('APP_COMMENTS', false))
<div class="card-footer" id="comment_button_{{$nach->id}}"> <div class="card-footer" id="comment_button_{{$nach->id}}">

@if(sizeof($nach->comments) > 0) @if(sizeof($nach->comments) > 0)

<a href="#" onclick="showComments(event, {{$nach->id}})"> <span class="badge badge-primary">{{sizeof($nach->comments)}}</span> {{ __('public.see-comments') }}</a> <a href="#" onclick="showComments(event, {{$nach->id}})"> <span class="badge badge-primary">{{sizeof($nach->comments)}}</span> {{ __('public.see-comments') }}</a>
@else @else
<i>{{ __('public.no-comments-yet') }}</i> <i>{{ __('public.no-comments-yet') }}</i>
@endif @endif

<button class="btn btn-primary btn-sm float-right" data-toggle="modal" data-target="#exampleModal2" onclick="setCommentId({{$nach->id}}),ga('send', 'event', 'Read Comments', 'Website', '{{$nach->title}}');"> <button class="btn btn-primary btn-sm float-right" data-toggle="modal" data-target="#exampleModal2" onclick="setCommentId({{$nach->id}}),ga('send', 'event', 'Read Comments', 'Website', '{{$nach->title}}');">
<i class="fas fa-comment"></i> {{ __('public.comment') }} <i class="fas fa-comment"></i> {{ __('public.comment') }}
</button> </button>
</div> </div>
@endif @endif



<div style="display:none" id="comments_{{$nach->id}}"> <div style="display:none" id="comments_{{$nach->id}}">
<div class="card-footer bg-primary"> <div class="card-footer bg-primary">
<a class="text-white"> <span class="badge badge-light">{{sizeof($nach->comments)}}</span> {{ __('public.comments') }}</a> <a class="text-white"> <span class="badge badge-light">{{sizeof($nach->comments)}}</span> {{ __('public.comments') }}</a>
@ -588,7 +444,6 @@
<i class="fas fa-user" style="color: #007BFF"></i> {{$comment->name}}: <i class="fas fa-user" style="color: #007BFF"></i> {{$comment->name}}:
<!-- For now taking that out, time is wrong... --> <!-- For now taking that out, time is wrong... -->
<span class="float-right" title="{{date('d.m.Y | H:i', strtotime($comment->created_at))}} Uhr">{{date('d.m.Y H:i', strtotime($comment->created_at))}} Uhr</span> <span class="float-right" title="{{date('d.m.Y | H:i', strtotime($comment->created_at))}} Uhr">{{date('d.m.Y H:i', strtotime($comment->created_at))}} Uhr</span>

</div> </div>
<div class="card-body comment-text"> <div class="card-body comment-text">
<p class="card-text"> <p class="card-text">
@ -599,21 +454,13 @@
@endforeach @endforeach
</table> </table>
</div> </div>

</div> </div>
</div> </div>
@endif @endif

</article> </article>

@endforeach @endforeach

{{ $nachrichten->links() }} {{ $nachrichten->links() }}
</div> </div>
</div> </div>
</section> </section>




@stop @stop

View File

@ -1,4 +1,4 @@
@extends('template.'.\Setting::get('template', 'default').'.content.dashboard.app') @extends('template.'.config('settings.template').'.content.dashboard.app')
@section('content') @section('content')


<div class="admin-header"> <div class="admin-header">

View File

@ -1,4 +1,4 @@
@extends('template.'.\Setting::get('template', 'default').'.content.dashboard.app') @extends('template.'.config('settings.template').'.content.dashboard.app')


@section('content') @section('content')
<div class="admin-header"> <div class="admin-header">
@ -172,7 +172,7 @@
@endif @endif
</div> </div>


@if (\Setting::get('lnd_status')) @if (config('settings.lnd_status'))
<h6 class="ci-color"><i class="fal fa-gem"></i> Define as Premium Content</h6> <h6 class="ci-color"><i class="fal fa-gem"></i> Define as Premium Content</h6>


<div class="form-group" style="margin-bottom: 55px;margin-top:15px;"> <div class="form-group" style="margin-bottom: 55px;margin-top:15px;">

View File

@ -1,4 +1,4 @@
@extends('template.'.\Setting::get('template', 'default').'.content.dashboard.app') @extends('template.'.config('settings.template').'.content.dashboard.app')


@section('content') @section('content')
<div class="container"> <div class="container">

View File

@ -1,4 +1,4 @@
@extends('template.'.\Setting::get('template', 'default').'.content.dashboard.app') @extends('template.'.config('settings.template').'.content.dashboard.app')


@section('content') @section('content')
<div class="container"> <div class="container">

View File

@ -1,4 +1,4 @@
@extends('template.'.\Setting::get('template', 'default').'.content.dashboard.app') @extends('template.'.config('settings.template').'.content.dashboard.app')


@section('content') @section('content')
<div class="container"> <div class="container">

View File

@ -1,4 +1,4 @@
@extends('template.'.\Setting::get('template', 'default').'.content.dashboard.app') @extends('template.'.config('settings.template').'.content.dashboard.app')


@section('content') @section('content')
<div class="container"> <div class="container">

View File

@ -1,4 +1,4 @@
@extends('template.'.\Setting::get('template', 'default').'.content.dashboard.app') @extends('template.'.config('settings.template').'.content.dashboard.app')


@section('content') @section('content')
<div class="container"> <div class="container">

View File

@ -1,4 +1,4 @@
@extends('template.'.\Setting::get('template', 'default').'.content.dashboard.app') @extends('template.'.config('settings.template').'.content.dashboard.app')


@section('content') @section('content')
<div class="container"> <div class="container">

View File

@ -1,4 +1,4 @@
@extends('template.'.\Setting::get('template', 'default').'.content.dashboard.app') @extends('template.'.config('settings.template').'.content.dashboard.app')


@section('content') @section('content')


@ -154,7 +154,7 @@
</div> </div>




@if (\Setting::get('lnd_status')) @if (config('settings.lnd_status'))


<h6 class="ci-color"><i class="fal fa-gem"></i> Define as Premium Content</h6> <h6 class="ci-color"><i class="fal fa-gem"></i> Define as Premium Content</h6>



View File

@ -1,4 +1,4 @@
@extends('template.'.\Setting::get('template', 'default').'.content.dashboard.app') @extends('template.'.config('settings.template').'.content.dashboard.app')


@section('content') @section('content')



View File

@ -1,4 +1,4 @@
@extends('template.'.\Setting::get('template', 'default').'.content.dashboard.app') @extends('template.'.config('settings.template').'.content.dashboard.app')
@section('content') @section('content')


<div class="admin-header"> <div class="admin-header">

View File

@ -1,7 +1,7 @@
@if(App::environment('production')) @if(App::environment('production'))




@if (!empty(\Setting::get('facebook', ''))) @if (!empty(config('settings.facebook')))




<script> <script>
@ -13,24 +13,24 @@
t.src=v;s=b.getElementsByTagName(e)[0]; t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script', s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js'); 'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '{{\Setting::get('facebook') }}'); fbq('init', '{{config('settings.facebook') }}');
fbq('track', 'PageView'); fbq('track', 'PageView');
</script> </script>
<noscript><img height="1" width="1" style="display:none" <noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id={{\Setting::get('facebook') }}&ev=PageView&noscript=1" src="https://www.facebook.com/tr?id={{config('settings.facebook') }}&ev=PageView&noscript=1"
/></noscript> /></noscript>


@endif @endif


@if (!empty(\Setting::get('analytics', ''))) @if (!empty(config('settings.analytics')))


<script async src="https://www.googletagmanager.com/gtag/js?id={{\Setting::get('analytics') }}"></script> <script async src="https://www.googletagmanager.com/gtag/js?id={{config('settings.analytics') }}"></script>
<script> <script>
window.dataLayer = window.dataLayer || []; window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);} function gtag(){dataLayer.push(arguments);}
gtag('js', new Date()); gtag('js', new Date());


gtag('config', '{{\Setting::get('analytics') }}'); gtag('config', '{{config('settings.analytics') }}');
</script> </script>
@endif @endif



View File

@ -37,7 +37,7 @@
} }
</style> </style>


@if (\Setting::get('stripe_status', 0)) @if (config('settings.stripe_status'))
<a class="lnd-pay-card" data-premium-id=""> <a class="lnd-pay-card" data-premium-id="">
<small title="Alternative: Pay with Credit Card"> <small title="Alternative: Pay with Credit Card">
Alternative: Pay with Credit Card Alternative: Pay with Credit Card
@ -75,7 +75,7 @@


<form method="post" id="formStripePremium"> <form method="post" id="formStripePremium">
<input type="hidden" id="stripe_premium_code_id" name="premium_code_id" value="" /> <input type="hidden" id="stripe_premium_code_id" name="premium_code_id" value="" />
<input type="hidden" id="amountBtc" name="amount_btc" value="{{ \Setting::get('btc_price', 10000.00) }}" /> <input type="hidden" id="amountBtc" name="amount_btc" value="{{ config('settings.btc_price') }}" />


<div class="col-12"> <div class="col-12">
<div class="row"> <div class="row">

View File

@ -74,10 +74,10 @@
} }
</style> </style>


@if (\Setting::get('image') and !isset($categoryModel) or (isset($categoryModel) and !$categoryModel->image)) @if (config('settings.image') and !isset($categoryModel) or (isset($categoryModel) and !$categoryModel->image))
<style> <style>
.jumbotron-ln { .jumbotron-ln {
background-image: url({{ asset('uploads/' . \Setting::get('image')) }}); background-image: url({{ asset('uploads/' . config('settings.image')) }});
} }
</style> </style>
@endif @endif
@ -97,9 +97,9 @@
<div class="container brand"> <div class="container brand">
<br> <br>


<a href="{{url('/')}}" >{{ \Setting::get('name')}}</a> <a href="{{url('/')}}" >{{ config('settings.name')}}</a>
<br> <br>
<span style="font-size: 50%;">{{ \Setting::get('tagline')}}</span> <span style="font-size: 50%;">{{ config('settings.tagline')}}</span>


</div> </div>


@ -110,7 +110,7 @@


@if(\Session::get('premium_code')) @if(\Session::get('premium_code'))
<div class="bg-ci text-center bg-premium-code" style="font-size: 12px;display:none; cursor: pointer;" title="View your Code and expiration"><i class="fal fa-gem"></i> {{ __('public.premium-active') }}</div> <div class="bg-ci text-center bg-premium-code" style="font-size: 12px;display:none; cursor: pointer;" title="View your Code and expiration"><i class="fal fa-gem"></i> {{ __('public.premium-active') }}</div>
@include('template.'.\Setting::get('template', 'default').'.content.includes.premium-banner') @include('template.'.config('settings.template').'.content.includes.premium-banner')
@endif @endif


@if (!\Session::get('premium_code')) @if (!\Session::get('premium_code'))
@ -132,7 +132,7 @@


<div class="modal-body" style="padding-left: 0px; padding-right: 0px;"> <div class="modal-body" style="padding-left: 0px; padding-right: 0px;">


@include('template.'.\Setting::get('template', 'default').'.content.includes.premium-pass') @include('template.'.config('settings.template').'.content.includes.premium-pass')


<style> <style>
.modal section{ .modal section{
@ -230,14 +230,14 @@
{{ $categoryModel->name }}</h1> {{ $categoryModel->name }}</h1>
@else @else
<br><br> <br><br>
<h1>{{ \Setting::get('name')}}</h1> <h1>{{ config('settings.name')}}</h1>
@endif @endif


<p class="intro"> <p class="intro">
@if (isset($categoryModel)) @if (isset($categoryModel))
{{ $categoryModel->description }} {{ $categoryModel->description }}
@else @else
{{ \Setting::get('description')}} {{ config('settings.description')}}
@endif @endif
<br> <br>


@ -376,7 +376,7 @@






@include('template.'.\Setting::get('template', 'default').'.content.includes.create-content') @include('template.'.config('settings.template').'.content.includes.create-content')






@ -514,7 +514,7 @@
<br> <br>
<a href="" class="howtopay" data-toggle="modal" data-target="#exampleModalCode">{{ __('public.use') }} <i class="fal fa-gem"></i> {{ __('public.premium-pass') }}</a> <a href="" class="howtopay" data-toggle="modal" data-target="#exampleModalCode">{{ __('public.use') }} <i class="fal fa-gem"></i> {{ __('public.premium-pass') }}</a>


@include('template.'.\Setting::get('template', 'default').'.content.includes.explain-lightning') @include('template.'.config('settings.template').'.content.includes.explain-lightning')


<br> <br>
</p> </p>
@ -854,16 +854,16 @@






@include('template.'.\Setting::get('template', 'default').'.content.includes.type-iptt') @include('template.'.config('settings.template').'.content.includes.type-iptt')
@include('template.'.\Setting::get('template', 'default').'.content.includes.new-comment') @include('template.'.config('settings.template').'.content.includes.new-comment')
@include('template.'.\Setting::get('template', 'default').'.content.includes.premium-pass-qr') @include('template.'.config('settings.template').'.content.includes.premium-pass-qr')


@if(!\Session::get('premium_code')) @if(!\Session::get('premium_code'))
@if (env('PAYMENT', false)) @if (env('PAYMENT', false))
@include('template.'.\Setting::get('template', 'default').'.content.includes.premium-pass') @include('template.'.config('settings.template').'.content.includes.premium-pass')
@endif @endif
@else @else
@include('template.'.\Setting::get('template', 'default').'.content.includes.premium-referral') @include('template.'.config('settings.template').'.content.includes.premium-referral')


@endif @endif
@stop @stop
@ -982,7 +982,7 @@


$('.btn-sub-stripe').append('<i class="fa fa-spinner fa-spinner-bt fa-spin fa-3x fa-fw" style="font-size:20px;margin-left:10px;"></i>'); $('.btn-sub-stripe').append('<i class="fa fa-spinner fa-spinner-bt fa-spin fa-3x fa-fw" style="font-size:20px;margin-left:10px;"></i>');


Stripe.setPublishableKey('{{ \Setting::get('stripe_publish_key') }}'); Stripe.setPublishableKey('{{ config('settings.stripe_publish_key') }}');


var valid = $('[name="card_valid"]').val(); var valid = $('[name="card_valid"]').val();
var valid = valid.split('-'); var valid = valid.split('-');

View File

@ -74,10 +74,10 @@
} }
</style> </style>


@if (\Setting::get('image') and !isset($categoryModel) or (isset($categoryModel) and !$categoryModel->image)) @if (config('settings.image') and !isset($categoryModel) or (isset($categoryModel) and !$categoryModel->image))
<style> <style>
.jumbotron-ln { .jumbotron-ln {
background-image: url({{ asset('uploads/' . \Setting::get('image')) }}); background-image: url({{ asset('uploads/' . config('settings.image')) }});
} }
</style> </style>
@endif @endif
@ -97,9 +97,9 @@
<div class="container brand"> <div class="container brand">
<br> <br>


<a href="{{url('/')}}" >{{ \Setting::get('name')}}</a> <a href="{{url('/')}}" >{{ config('settings.name')}}</a>
<br> <br>
<span style="font-size: 50%;">{{ \Setting::get('tagline')}}</span> <span style="font-size: 50%;">{{ config('settings.tagline')}}</span>


</div> </div>


@ -110,7 +110,7 @@


@if(\Session::get('premium_code')) @if(\Session::get('premium_code'))
<div class="bg-ci text-center bg-premium-code" style="font-size: 12px;display:none; cursor: pointer;" title="View your Code and expiration"><i class="fal fa-gem"></i> {{ __('public.premium-active') }}</div> <div class="bg-ci text-center bg-premium-code" style="font-size: 12px;display:none; cursor: pointer;" title="View your Code and expiration"><i class="fal fa-gem"></i> {{ __('public.premium-active') }}</div>
@include('template.'.\Setting::get('template', 'default').'.content.includes.premium-banner') @include('template.'.config('settings.template').'.content.includes.premium-banner')
@endif @endif


@if (!\Session::get('premium_code')) @if (!\Session::get('premium_code'))
@ -132,7 +132,7 @@


<div class="modal-body" style="padding-left: 0px; padding-right: 0px;"> <div class="modal-body" style="padding-left: 0px; padding-right: 0px;">


@include('template.'.\Setting::get('template', 'default').'.content.includes.premium-pass') @include('template.'.config('settings.template').'.content.includes.premium-pass')


<style> <style>
.modal section{ .modal section{
@ -230,14 +230,14 @@
{{ $categoryModel->name }}</h1> {{ $categoryModel->name }}</h1>
@else @else
<br><br> <br><br>
<h1>{{ \Setting::get('name')}}</h1> <h1>{{ config('settings.name')}}</h1>
@endif @endif


<p class="intro"> <p class="intro">
@if (isset($categoryModel)) @if (isset($categoryModel))
{{ $categoryModel->description }} {{ $categoryModel->description }}
@else @else
{{ \Setting::get('description')}} {{ config('settings.description')}}
@endif @endif
<br> <br>


@ -376,7 +376,7 @@






@include('template.'.\Setting::get('template', 'default').'.content.includes.create-content') @include('template.'.config('settings.template').'.content.includes.create-content')






@ -512,7 +512,7 @@
<br> <br>
<a href="" class="howtopay" data-toggle="modal" data-target="#exampleModalCode">{{ __('public.use') }} <i class="fal fa-gem"></i> {{ __('public.premium-pass') }}</a> <a href="" class="howtopay" data-toggle="modal" data-target="#exampleModalCode">{{ __('public.use') }} <i class="fal fa-gem"></i> {{ __('public.premium-pass') }}</a>


@include('template.'.\Setting::get('template', 'default').'.content.includes.explain-lightning') @include('template.'.config('settings.template').'.content.includes.explain-lightning')


<br> <br>
</p> </p>
@ -848,16 +848,16 @@






@include('template.'.\Setting::get('template', 'default').'.content.includes.type-iptt') @include('template.'.config('settings.template').'.content.includes.type-iptt')
@include('template.'.\Setting::get('template', 'default').'.content.includes.new-comment') @include('template.'.config('settings.template').'.content.includes.new-comment')
@include('template.'.\Setting::get('template', 'default').'.content.includes.premium-pass-qr') @include('template.'.config('settings.template').'.content.includes.premium-pass-qr')


@if(!\Session::get('premium_code')) @if(!\Session::get('premium_code'))
@if (env('PAYMENT', false)) @if (env('PAYMENT', false))
@include('template.'.\Setting::get('template', 'default').'.content.includes.premium-pass') @include('template.'.config('settings.template').'.content.includes.premium-pass')
@endif @endif
@else @else
@include('template.'.\Setting::get('template', 'default').'.content.includes.premium-referral') @include('template.'.config('settings.template').'.content.includes.premium-referral')


@endif @endif
@stop @stop
@ -976,7 +976,7 @@


$('.btn-sub-stripe').append('<i class="fa fa-spinner fa-spinner-bt fa-spin fa-3x fa-fw" style="font-size:20px;margin-left:10px;"></i>'); $('.btn-sub-stripe').append('<i class="fa fa-spinner fa-spinner-bt fa-spin fa-3x fa-fw" style="font-size:20px;margin-left:10px;"></i>');


Stripe.setPublishableKey('{{ \Setting::get('stripe_publish_key') }}'); Stripe.setPublishableKey('{{ config('settings.stripe_publish_key') }}');


var valid = $('[name="card_valid"]').val(); var valid = $('[name="card_valid"]').val();
var valid = valid.split('-'); var valid = valid.split('-');