|
15 | 15 | @endif
|
16 | 16 |
|
17 | 17 | @push('sidebar-stylesheets')
|
| 18 | +<script src="{{ asset('studio/external-dependencies/fontawesome.js') }}" crossorigin="anonymous"></script> |
| 19 | +<link rel="stylesheet" href="{{ asset('studio/external-dependencies/fontawesome.css') }}" /> |
18 | 20 | <style>
|
19 | 21 | @media only screen and (max-width: 1500px) {
|
20 | 22 | .pre-side{display:none!important;}
|
|
28 | 30 | .pre-bottom{display:none!important;}
|
29 | 31 | }
|
30 | 32 | </style>
|
| 33 | +<style>.delete{position:relative; color:transparent; background-color:tomato; border-radius:5px; left:5px; padding:5px 12px; cursor: pointer;}.delete:hover{color:transparent;background-color:#f13d1d;}html,body{max-width:100%;overflow-x:hidden;}</style> |
31 | 34 | @endpush
|
32 | 35 |
|
33 | 36 | @include('components.favicon')
|
|
55 | 58 |
|
56 | 59 | <div id="links-table-body" data-page="{{request('page', 1)}}" data-per-page="{{$pagePage ? $pagePage : 0}}">
|
57 | 60 | @foreach($links as $link)
|
| 61 | + @php $button = Button::find($link->button_id); if(isset($button->name)){$buttonName = $button->name;}else{$buttonName = 0;} @endphp |
| 62 | + @if($button->name !== 'icon') |
58 | 63 | <div class='row h-100 pb-0 mb-2 border rounded hvr-glow ' data-id="{{$link->id}}">
|
59 | 64 |
|
60 | 65 |
|
|
63 | 68 | </div>
|
64 | 69 |
|
65 | 70 |
|
66 |
| - |
67 | 71 | <div class='col border-left h-100'>
|
68 | 72 |
|
69 | 73 | <div class='row h-100'>
|
70 | 74 | <div class='col-12 p-2' style="max-width:300px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="{{ $link->title }}">
|
71 | 75 | <span class='h6'>
|
72 |
| - <?php $button = Button::find($link->button_id); if(isset($button->name)){$buttonName = $button->name;}else{$buttonName = 0;} ?> |
73 | 76 | @if($button->name == "custom_website")
|
74 | 77 | <span style="border: 1px solid #d0d4d7 !important;border-radius:5px;background-color:#6c757d;width:25px!important;height:25px!important;"><img style="margin-bottom:3px;margin-left:4px;margin-right:4px;max-width:15px;max-height:15px;" alt="button-icon" class="icon hvr-icon" src="@if(file_exists(base_path("studio/favicon/icons/").localIcon($link->id))){{url('studio/favicon/icons/'.localIcon($link->id))}}@else{{getFavIcon($link->id)}}@endif"></span>
|
75 | 78 | @elseif($button->name == "space")
|
|
134 | 137 | </div>
|
135 | 138 | </div>
|
136 | 139 | </div>
|
| 140 | + @endif |
137 | 141 | @endforeach
|
138 | 142 | </div>
|
139 | 143 |
|
|
160 | 164 | </div>
|
161 | 165 |
|
162 | 166 | <br>
|
163 |
| -<section style="width:100%!important;" class='pre-bottom shadow text-gray-400 pre-side'> |
| 167 | +<section style="margin-left:-15px;margin-right:-15px;" style="width:100%!important;" class='pre-bottom shadow text-gray-400 pre-side'> |
164 | 168 | <h3 class="card-header"><i class="bi bi-window-fullscreen" style="font-style:normal!important;"> Preview:</i></h3>
|
165 | 169 | <div class='card-body p-0 p-md-3'>
|
166 | 170 | <center><iframe allowtransparency="true" id="frPreview2" style=" border-radius:0.25rem !important; background: #FFFFFF; min-height:600px; height:100%; width:100% !important;" class='w-100' src="{{ url('') }}/@<?= Auth::user()->littlelink_name ?>">Your browser isn't compatible</iframe></center>
|
167 | 171 | </div>
|
| 172 | +</section><br> |
| 173 | + |
| 174 | +<section style="margin-left:-15px;margin-right:-15px;" class='shadow text-gray-400'> |
| 175 | +<a name="icons"></a> |
| 176 | +<h3 class="mb-4 card-header"><i class="fa-solid fa-icons"></i> Page Icons</i></h3> |
| 177 | +<div class="card-body p-0 p-md-3"> |
| 178 | + |
| 179 | +<form action="{{ route('editIcons') }}" enctype="multipart/form-data" method="post"> |
| 180 | + @csrf |
| 181 | + <div class="form-group col-lg-8"> |
| 182 | + |
| 183 | + @php |
| 184 | + function iconLink($icon){ |
| 185 | + $iconLink = DB::table('links') |
| 186 | + ->where('user_id', Auth::id()) |
| 187 | + ->where('title', $icon) |
| 188 | + ->where('button_id', 94) |
| 189 | + ->value('link'); |
| 190 | + if (is_null($iconLink)){ |
| 191 | + return false; |
| 192 | + } else { |
| 193 | + return $iconLink;}} |
| 194 | + function searchIcon($icon) |
| 195 | + {$iconId = DB::table('links') |
| 196 | + ->where('user_id', Auth::id()) |
| 197 | + ->where('title', $icon) |
| 198 | + ->where('button_id', 94) |
| 199 | + ->value('id'); |
| 200 | + if(is_null($iconId)){return false;}else{return $iconId;}} |
| 201 | +
|
| 202 | + function icon($name, $label){ echo ' |
| 203 | + <label>'.$label.'</label> |
| 204 | + <div class="input-group"> |
| 205 | + <div class="input-group-prepend"> |
| 206 | + <div class="input-group-text"><i class="fa-brands fa-'.$name.'"></i></div> |
| 207 | + </div> |
| 208 | + <input type="url" class="form-control" name="'.$name.'" value="'.iconLink($name).'" >'; |
| 209 | + if(searchIcon($name) != NULL){echo '<a href="'. route("deleteLink", searchIcon($name) ) .'" class="delete"><i style="color:#fff" class="bi bi-trash-fill"></i></a>';} |
| 210 | + echo '</div><br>';} |
| 211 | + @endphp |
| 212 | + <style>input{border-top-right-radius: 0.25rem!important; border-bottom-right-radius: 0.25rem!important;}</style> |
| 213 | + |
| 214 | + |
| 215 | + {!!icon('mastodon', 'Mastodon')!!} |
| 216 | + |
| 217 | + {!!icon('instagram', 'Instagram')!!} |
| 218 | + |
| 219 | + {!!icon('twitter', 'Twitter')!!} |
| 220 | + |
| 221 | + {!!icon('github', 'GitHub')!!} |
| 222 | + |
| 223 | + {!!icon('linkedin', 'LinkedIn')!!} |
| 224 | + |
| 225 | + |
| 226 | + <button type="submit" class="mt-3 ml-3 btn btn-info">Save links</button> |
| 227 | +</form> |
| 228 | + |
| 229 | + |
| 230 | +</div> |
168 | 231 | </section>
|
169 | 232 |
|
| 233 | + |
170 | 234 | <script src="{{ asset('studio/external-dependencies/jquery-1.12.4.min.js') }}"></script>
|
171 | 235 | <script type="text/javascript">$("iframe").load(function() { $("iframe").contents().find("a").each(function(index) { $(this).on("click", function(event) { event.preventDefault(); event.stopPropagation(); }); }); });</script>
|
172 | 236 |
|
|
0 commit comments