2022-05-04 10:12:01 +02:00
|
|
|
@if(env('ENABLE_BUTTON_EDITOR') === true)
|
2022-05-04 00:19:29 +02:00
|
|
|
@extends('layouts.sidebar')
|
2022-04-27 20:55:19 +02:00
|
|
|
|
2022-11-28 19:44:02 +01:00
|
|
|
@include('components.favicon')
|
|
|
|
@include('components.favicon-extension')
|
|
|
|
|
2022-05-04 00:19:29 +02:00
|
|
|
@section('content')
|
2023-04-26 15:44:39 +02:00
|
|
|
<div class="conatiner-fluid content-inner mt-n5 py-0">
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
<div class="col-lg-12">
|
|
|
|
<div class="card rounded">
|
|
|
|
<div class="card-body">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-12">
|
|
|
|
|
|
|
|
@push('sidebar-scripts')
|
|
|
|
<?php function strp($urlStrp){return str_replace(array('http://', 'https://'), '', $urlStrp);} ?>
|
|
|
|
<!-- start button editor -->
|
2023-05-15 14:33:33 +02:00
|
|
|
<script>
|
|
|
|
$(document).ready(function() {
|
|
|
|
$('#code').click(function() {
|
|
|
|
var css_text = 'color: ' + button_css.color + ';' + '\nbackground-image: ' + button_css.background_image + ';';
|
2023-04-26 15:44:39 +02:00
|
|
|
$('#sCode').html(css_text);
|
|
|
|
Rainbow.color(div, function() {
|
2023-05-15 14:33:33 +02:00
|
|
|
document.getElementById('output').appendChild(div);
|
|
|
|
});
|
|
|
|
|
2023-04-26 15:44:39 +02:00
|
|
|
$('.modal-profile').fadeIn("slow");
|
|
|
|
$('.modal-lightsout').fadeTo("slow", .9);
|
2023-05-15 14:33:33 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
$('a.modal-close-profile, .modal-lightsout').click(function() {
|
2023-04-26 15:44:39 +02:00
|
|
|
$('.modal-profile').fadeOut("slow");
|
|
|
|
$('.modal-lightsout').fadeOut("slow");
|
2023-05-15 14:33:33 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
var $button = $("#sample");
|
|
|
|
$("#ex1").gradientPicker({
|
2023-04-26 15:44:39 +02:00
|
|
|
change: function(points, styles) {
|
2023-05-15 14:33:33 +02:00
|
|
|
for (i = 1; i < styles.length; ++i) {
|
|
|
|
$button.css("background-image", styles[i]);
|
|
|
|
button_css.background_image = styles[i];
|
|
|
|
}
|
2023-04-26 15:44:39 +02:00
|
|
|
},
|
|
|
|
fillDirection: "45deg",
|
|
|
|
controlPoints: ["white 0%", "#888888 100%"]
|
2023-05-15 14:33:33 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
$('#color').ColorPicker({
|
2023-04-26 15:44:39 +02:00
|
|
|
color: '#000000',
|
|
|
|
onShow: function(colpkr) {
|
2023-05-15 14:33:33 +02:00
|
|
|
$(colpkr).fadeIn(500);
|
|
|
|
return false;
|
2023-04-26 15:44:39 +02:00
|
|
|
},
|
|
|
|
onHide: function(colpkr) {
|
2023-05-15 14:33:33 +02:00
|
|
|
$(colpkr).fadeOut(500);
|
|
|
|
return false;
|
2023-04-26 15:44:39 +02:00
|
|
|
},
|
|
|
|
onChange: function(hsb, hex, rgb) {
|
2023-05-15 14:33:33 +02:00
|
|
|
$('#color').css('background-color', '#' + hex);
|
|
|
|
document.getElementById("sample").style.color = '#' + hex;
|
|
|
|
button_css.color = '#' + hex;
|
2023-04-26 15:44:39 +02:00
|
|
|
}
|
2023-05-15 14:33:33 +02:00
|
|
|
});
|
2023-04-26 15:44:39 +02:00
|
|
|
});
|
2023-05-15 14:33:33 +02:00
|
|
|
// Only include the necessary properties
|
|
|
|
var button_css = {
|
|
|
|
color: 'inherit',
|
|
|
|
background_image: 'inherit'
|
|
|
|
};
|
|
|
|
</script>
|
2023-04-26 15:44:39 +02:00
|
|
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="{{asset('assets/button-editor/styles/button-gen.css')}}">
|
|
|
|
<link rel="stylesheet" href="{{asset('assets/button-editor/styles/jquery.gradientPicker.css')}}" type="text/css" />
|
|
|
|
<link rel="stylesheet" href="{{asset('assets/button-editor/styles/colorpicker_1.css')}}" type="text/css" />
|
|
|
|
<link rel="stylesheet" type="text/css" href="{{asset('assets/button-editor/themes/blackboard.css')}}">
|
|
|
|
<link rel="stylesheet" href="{{asset('assets/linkstack/css/animations.css') }}">
|
|
|
|
<link rel="stylesheet" type="text/css" href="{{asset('assets/button-editor/css/style.css')}}">
|
|
|
|
|
|
|
|
<script src="{{asset('assets/button-editor/js/rainbow.js')}}"></script>
|
|
|
|
<script src="{{asset('assets/button-editor/js/css.js')}}"></script>
|
|
|
|
|
|
|
|
<script src="{{asset('assets/button-editor/js/jquery-1.7.js')}}"></script>
|
|
|
|
<script src="{{asset('assets/button-editor/js/jqueryUI-custom.js')}}"></script>
|
|
|
|
<script src="{{asset('assets/button-editor/js/colorpicker.js')}}"></script>
|
|
|
|
<script src="{{asset('assets/button-editor/js/jquery.gradientPicker.js')}}"></script>
|
|
|
|
<!-- end button editor -->
|
|
|
|
@endpush
|
|
|
|
<script src="{{ asset('assets/external-dependencies/fontawesome.js') }}" crossorigin="anonymous"></script>
|
2023-06-06 09:01:51 +02:00
|
|
|
|
2023-04-26 15:44:39 +02:00
|
|
|
<div>
|
|
|
|
<section class="shadow text-gray-400">
|
2023-06-06 09:01:51 +02:00
|
|
|
<h2 class="mb-4 card-header"><i class="bi bi-pen">{{__('messages.Button Editor')}}</i></h2>
|
2023-04-26 15:44:39 +02:00
|
|
|
<div class="card-body p-0 p-md-3">
|
|
|
|
|
2023-06-06 09:01:51 +02:00
|
|
|
<a class="btn btn-primary" href="{{ url('/studio/links') }}"><i class="bi bi-arrow-left-short"></i>{{__('messages.Back')}}</a><br><br>
|
2023-04-26 15:44:39 +02:00
|
|
|
|
2023-06-06 09:01:51 +02:00
|
|
|
<h2>{{__('messages.Custom Button')}}</h2><br>
|
2023-04-26 15:44:39 +02:00
|
|
|
|
|
|
|
<!-- start button editor -->
|
|
|
|
<div style="left: 10px;">
|
|
|
|
<div class="modal-profile">
|
2023-06-06 09:01:51 +02:00
|
|
|
<h2>{{__('messages.CSS')}}</h2>
|
2023-04-26 15:44:39 +02:00
|
|
|
<a class="modal-close-profile" title="Close profile window" href="#"><img href="{{asset('assets/button-editor/images/close.png')}}" alt="Close profile window" /></a>
|
|
|
|
<div id="output">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="modal-lightsout"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<aside id="panel-right">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</br>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="tool">
|
2023-06-06 09:01:51 +02:00
|
|
|
<heading>{{__('messages.Color')}} <span>{{__('messages.Text')}}</span></heading>
|
2023-04-26 15:44:39 +02:00
|
|
|
</br>
|
|
|
|
<input type="button" id="color" style="background-color:#FFFFFF; border:thin solid white;height:50px;width:50px;margin-left:5px;">
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</br>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="tool">
|
2023-06-06 09:01:51 +02:00
|
|
|
<heading>{{__('messages.background')}} <span>{{__('messages.gradient')}}</span></heading>
|
2023-04-26 15:44:39 +02:00
|
|
|
</br>
|
|
|
|
<div class="grad_ex" id="ex1"></div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</br>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</aside>
|
|
|
|
|
|
|
|
<section id="preview">
|
|
|
|
@if($buttonId == 1)
|
2023-05-15 15:26:02 +02:00
|
|
|
<center><div id="sample" style="border-radius: 8px !important; max-width: 350px; height: 48px; display: flex; align-items: center; justify-content: center;font-size: 18px;" class="button-demo button"><img class="icon-btn hvr-icon" src="{{ asset('\/assets/linkstack/icons\/') . 'custom' }}.svg">{{ $title }}</div></center>
|
2023-04-26 15:44:39 +02:00
|
|
|
@else
|
2023-05-15 15:00:03 +02:00
|
|
|
<center><div id="sample" style="border-radius: 8px !important; max-width: 350px; height: 48px; display: flex; align-items: center; justify-content: center;font-size: 18px;" class="button-demo button"><img class="wicon hvr-icon" src="@if(file_exists(base_path("assets/favicon/icons/").localIcon($id))){{url('assets/favicon/icons/'.localIcon($id))}}@else{{getFavIcon($id)}}@endif">{{ $title }}</div></center>
|
2023-04-26 15:44:39 +02:00
|
|
|
@endif
|
|
|
|
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
<!-- end button editor -->
|
|
|
|
|
|
|
|
<br>
|
|
|
|
<details>
|
2023-06-06 09:01:51 +02:00
|
|
|
<summary>{{__('messages.Show CSS')}}</summary>
|
2023-04-26 15:44:39 +02:00
|
|
|
<div style="padding-left: 15px;">
|
|
|
|
<form action="{{ route('editCSS', $id) }}" method="post">
|
|
|
|
@csrf
|
|
|
|
<div class="form-group col-lg-8"><br>
|
2023-06-06 09:01:51 +02:00
|
|
|
<p>{{__('messages.Custom CSS')}}</p>
|
2023-04-26 15:44:39 +02:00
|
|
|
|
|
|
|
<textarea name="custom_css" rows="9" id="sCode" type="text" value="{{ $custom_css }}" class="form-control" required>{{ $custom_css }}</textarea>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</details>
|
2023-06-06 09:01:51 +02:00
|
|
|
<br><button id="code" class="btn btn-primary">{{__('messages.Save')}}</button><br>
|
2023-04-26 15:44:39 +02:00
|
|
|
</form>
|
|
|
|
|
|
|
|
<form action="{{ route('editCSS', $id) }}" method="post">
|
|
|
|
@csrf
|
|
|
|
<div class="form-group col-lg-8">
|
|
|
|
<textarea style="display: none;" rows="9" type="text" name="custom_css" value="" class="form-control">
|
|
|
|
NULL
|
|
|
|
</textarea>
|
|
|
|
</div>
|
2023-06-06 09:01:51 +02:00
|
|
|
<button type="submit" class="btn btn-danger">{{__('messages.Reset to default')}}</button>
|
2023-04-26 15:44:39 +02:00
|
|
|
</form>
|
|
|
|
|
|
|
|
<br><br><div id="result" style="left: 1%; position: relative; background-color:#2c2d3a; border-radius: 25px; min-width:300px; max-width:950px; height:300px; box-shadow: 0 10px 20px -10px rgba(0,0,0, 0.6);">
|
|
|
|
<div style="position: relative; top: 50%; transform: translateY(-50%);">
|
2023-06-06 09:01:51 +02:00
|
|
|
<h2 align="center" style="color:white">{{__('messages.Result')}}</h2>
|
2023-04-26 15:44:39 +02:00
|
|
|
@if($custom_css === "" or $custom_css === "NULL" and $buttonId == 1)
|
2023-05-15 15:26:02 +02:00
|
|
|
<center><div style="--delay: 1s" class="button-entrance"><div class="button-demo button-custom button hvr-grow hvr-icon-wobble-vertical"><img class="icon-btn hvr-icon fa {{$custom_icon}}">{{ $title }}</div></div></center>
|
2023-04-26 15:44:39 +02:00
|
|
|
@elseif($custom_css === "" or $custom_css === "NULL" and $buttonId == 2)
|
|
|
|
<center><div style="--delay: 1s" class="button-entrance"><div class="button-custom_website button hvr-grow hvr-icon-wobble-vertical"><img class="wicon hvr-icon" src="@if(file_exists(base_path("assets/favicon/icons/").localIcon($id))){{url('assets/favicon/icons/'.localIcon($id))}}@else{{getFavIcon($id)}}@endif">{{ $title }}</div></div></center>
|
|
|
|
@elseif($custom_css != "" and $buttonId == 2)
|
|
|
|
<center><div style="--delay: 1s" class="button-entrance"><div style="{{ $custom_css }}" class="button-custom_website button hvr-grow hvr-icon-wobble-vertical"><img class="wicon hvr-icon" src="@if(file_exists(base_path("assets/favicon/icons/").localIcon($id))){{url('assets/favicon/icons/'.localIcon($id))}}@else{{getFavIcon($id)}}@endif">{{ $title }}</div></div></center>
|
|
|
|
@else
|
2023-05-15 15:26:02 +02:00
|
|
|
<center><div style="--delay: 1s" class="button-entrance"><div style="{{ $custom_css }}" class="button-demo hvr-grow hvr-icon-wobble-vertical"><i style="color: {{$custom_icon}}" class="icon-btn hvr-icon fa {{$custom_icon}}"></i>{{ $title }}</div></div></center>
|
2023-04-26 15:44:39 +02:00
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<br><br>
|
|
|
|
@if($buttonId == 1)
|
|
|
|
<form action="{{ route('editCSS', $id) }}" method="post">
|
|
|
|
@csrf
|
|
|
|
<div class="form-group col-lg-8">
|
2023-06-06 09:01:51 +02:00
|
|
|
<h2>{{__('messages.Custom Icon')}}</h2>
|
2023-04-26 15:44:39 +02:00
|
|
|
<textarea id="textareabox" type="text" name="custom_icon" value="{{ $custom_icon }}" class="form-control" required>{{ $custom_icon }}</textarea>
|
|
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
|
|
// Displays alert if custom icon doesn't contain string "fa-"
|
|
|
|
var textarea = document.getElementById('textareabox');
|
|
|
|
var word = 'fa-';
|
|
|
|
var textValue=textarea.value;
|
|
|
|
if (textValue.indexOf(word)==-1)
|
|
|
|
{
|
2023-06-06 09:01:51 +02:00
|
|
|
alert({{__('messages.Custom Alert')}})
|
2023-04-26 15:44:39 +02:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<details>
|
2023-06-06 09:01:51 +02:00
|
|
|
<p>{{__('messages.cb.description.1-4')}}</p>
|
|
|
|
<p>{{__('messages.cb.description.2-4')}}</p>
|
|
|
|
<p>{{__('messages.cb.description.3-4')}}</p>
|
|
|
|
<p>{{__('messages.cb.description.4-4')}}</p>
|
2023-05-15 15:00:03 +02:00
|
|
|
<br>
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="table table-striped">
|
2023-04-26 15:44:39 +02:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2023-06-06 09:01:51 +02:00
|
|
|
<th scope="col">{{__('messages.Style')}}</th>
|
|
|
|
<th scope="col">{{__('messages.Prefix')}}</th>
|
|
|
|
<th scope="col" style="max-width: 1%">{{__('messages.Icon')}}</th>
|
|
|
|
<th scope="col">{{__('messages.Short Code')}}</th>
|
2023-04-26 15:44:39 +02:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
2023-06-06 09:01:51 +02:00
|
|
|
<td>{{__('messages.Regular')}}</td>
|
2023-04-26 15:44:39 +02:00
|
|
|
<td></td>
|
|
|
|
<td><i class="fa fa-user"></i></td>
|
2023-06-06 09:01:51 +02:00
|
|
|
<td><p>{{__('messages.Fa-user')}}</p></td>
|
2023-04-26 15:44:39 +02:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2023-06-06 09:01:51 +02:00
|
|
|
<td>{{__('messages.Brands')}}</td>
|
|
|
|
<td>{{__('messages.Fab')}}</td>
|
2023-04-26 15:44:39 +02:00
|
|
|
<td><i class="fab fa-github"></i></td>
|
2023-06-06 09:01:51 +02:00
|
|
|
<td><p>{{__('messages.Fab fa-github')}}</p></td>
|
2023-04-26 15:44:39 +02:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2023-06-06 09:01:51 +02:00
|
|
|
<td>{{__('messages.Color')}}</td>
|
|
|
|
<td>{{__('messages.Color name')}};</td>
|
2023-04-26 15:44:39 +02:00
|
|
|
<td><i style="color: red;" class="fa fa-ghost"></i></td>
|
2023-06-06 09:01:51 +02:00
|
|
|
<td><p style="color: red;">{{__('messages.Red fa')}};{{__('messages.Fa ghost')}}</p></td>
|
2023-04-26 15:44:39 +02:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2023-06-06 09:01:51 +02:00
|
|
|
<td>{{__('messages.Color HEX')}}</td>
|
|
|
|
<td>{{__('messages.Color HEX1')}};</td>
|
2023-04-26 15:44:39 +02:00
|
|
|
<td><i style="color: #1DA1F2;" class="fab fa-twitter"></i></td>
|
2023-06-06 09:01:51 +02:00
|
|
|
<td><p style="color: #1DA1F2;">#1DA1F2; {{__('messages.Hex fab fa-twitter')}}</p></td>
|
2023-04-26 15:44:39 +02:00
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2023-05-15 15:00:03 +02:00
|
|
|
</div>
|
2023-04-26 15:44:39 +02:00
|
|
|
</details>
|
|
|
|
|
2023-05-15 15:00:03 +02:00
|
|
|
<br>
|
2023-06-06 09:01:51 +02:00
|
|
|
<button type="submit" class="btn btn-primary">{{__('messages.Update icon')}}</button>
|
|
|
|
<a class="btn btn-primary" href="https://fontawesome.com/search?m=free" target="_blank">{{__('messages.See all icons')}}</a>
|
2023-05-15 15:00:03 +02:00
|
|
|
|
2023-04-26 15:44:39 +02:00
|
|
|
</form><br><br><br><br>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
2023-06-06 09:01:51 +02:00
|
|
|
<a class="btn btn-primary" href="{{ url('/studio/links') }}"><i class="bi bi-arrow-left-short"></i>{{__('messages.Back')}}</a>
|
2023-04-26 15:44:39 +02:00
|
|
|
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-11-08 16:11:59 +01:00
|
|
|
</div>
|
2023-04-26 15:44:39 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-05-04 00:19:29 +02:00
|
|
|
@endsection
|
2022-05-04 10:12:01 +02:00
|
|
|
@endif
|