Add email tool tracking

This commit is contained in:
2023-12-07 12:49:45 +08:00
parent 46b07de8b8
commit 84a96833ff
48 changed files with 320 additions and 114 deletions

View File

@@ -4,8 +4,8 @@
<div class="container-xl">
<ul class="navbar-nav">
<li class="nav-item @if (request()->routeIs('home')) active @endif">
<a class="nav-link" href="{{ route('home') }}">
<li class="nav-item @if (request()->routeIs('front.home')) active @endif">
<a class="nav-link" href="{{ route('front.home') }}">
<span
class="nav-link-icon d-md-none d-lg-inline-block"><!-- Download SVG icon from http://tabler-icons.io/i/home -->
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-door-exit"
@@ -44,7 +44,7 @@ class="nav-link-icon d-md-none d-lg-inline-block"><!-- Download SVG icon from ht
</a>
</li>
--}}
<li class="nav-item @if (request()->routeIs('posts.manage')) active @endif">
{{-- <li class="nav-item @if (request()->routeIs('posts.manage')) active @endif">
<a class="nav-link" href="{{ route('posts.manage') }}">
<span
class="nav-link-icon d-md-none d-lg-inline-block"><!-- Download SVG icon from http://tabler-icons.io/i/home -->
@@ -64,7 +64,7 @@ class="nav-link-icon d-md-none d-lg-inline-block"><!-- Download SVG icon from ht
{{ __('Posts') }}
</span>
</a>
</li>
</li> --}}
{{--
<li class="nav-item @if (request()->routeIs('users.index')) active @endif">
<a class="nav-link" href="{{ route('users.index') }}">

View File

@@ -0,0 +1,117 @@
@extends('admin.layouts.app')
@section('content')
<div class="container py-5">
@if ($view == 'all')
<h1>All AI Tool List ({{ $counts->all }})</h1>
@elseif ($view == 'emailed')
<h1>Emailed AI Tool List ({{ $counts->emailed }})</h1>
@elseif ($view == 'not_emailed')
<h1>Not Emailed AI Tool List ({{ $counts->not_emailed }})</h1>
@endif
<p>Please do not share this list to others.</p>
<div class="d-flex justify-content-center mb-5 gap-2">
<a class="btn btn-light border-primary {{ $view == 'all' ? 'fw-bolder' : '' }}"
href="{{ route('ba.ai-tool-list', ['view' => 'all']) }}">All AI Tools ({{ $counts->all }})</a>
<a class="btn btn-light border-primary {{ $view == 'emailed' ? 'fw-bolder' : '' }}"
href="{{ route('ba.ai-tool-list', ['view' => 'emailed']) }}">Emailed ({{ $counts->emailed }})</a>
<a class="btn btn-light border-primary {{ $view == 'not_emailed' ? 'fw-bolder' : '' }}"
href="{{ route('ba.ai-tool-list', ['view' => 'not_emailed']) }}">Not Emailed
({{ $counts->not_emailed }})</a>
</div>
<div class="row">
@if ($ai_tool_list->count() > 0)
@foreach ($ai_tool_list as $ai_tool)
<div class="col-12">
<div class="card mb-2">
<div class="card-body">
<div class="row">
<div class="col">
<a style="font-size: 1.3em;" class="fw-bold mb-4" rel="noopener noreferrer nofollow"
target="_blank"
href="{{ route('front.aitool.show', ['ai_tool_slug' => $ai_tool->slug]) }}">{{ $ai_tool->tool_name }}</a><br>
<b>ID</b>: {{ $ai_tool->id }}<br>
<b>Added</b>: {{ $ai_tool->created_at->toDateTimeString() }}
</div>
@if ($ai_tool->has_emailed)
<div class="col d-flex">
<span class="align-self-center text-success">
Already emailed
</span>
</div>
<div class="col d-flex">
<span class="align-self-center text-success">
{{ $ai_tool->email }}
</span>
</div>
@else
<div class="col d-flex">
<span class="align-self-center text-danger">
Not yet emailed
</span>
</div>
<div class="col d-inline-flex justify-content-end">
<!-- Button trigger modal -->
<button type="button" class="btn btn-outline-primary d-inline"
data-bs-toggle="modal" data-bs-target="#staticBackdrop{{ $ai_tool->id }}">
Set to emailed
</button>
<!-- Modal -->
<form class="align-self-center" action="{{ route('ba.ai-tool-list.post') }}"
method="POST">
@csrf
<input type="hidden" name="id" value="{{ $ai_tool->id }}">
<div class="modal fade" id="staticBackdrop{{ $ai_tool->id }}"
data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1"
aria-labelledby="staticBackdropLabel{{ $ai_tool->id }}"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5"
id="staticBackdropLabel{{ $ai_tool->id }}">Set to
Emailed</h1>
<button type="button" class="btn-close"
data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<input required type="text" class="form-control"
name="email"
placeholder="Enter AI Tool Email (aitoolemail@email.com)">
</div>
<div class="modal-footer">
<button class="btn btn-outline-primary" type="submit">I
have emailed, Save</button>
</div>
</div>
</div>
</div>
</form>
</div>
@endif
</div>
</div>
</div>
</div>
@endforeach
@else
<div class="col-12">
<div class="card">
<div class="card-body p-5 text-center">
<p>No records found.</p>
</div>
</div>
</div>
@endif
</div>
</div>
@endsection

View File

@@ -14,7 +14,7 @@ class="btn btn-link d-inline-flex text-decoration-none hover-grow text-center ga
</a>
</div>
{{-- <div class="align-self-center">
{{-- <div class="align-self-center">
<a href="{{ route('front.submit-tool') }}">Submit your AI Tool <span
class="badge text-bg-primary text-white">FREE!</span></a>
</div> --}}

View File

@@ -20,7 +20,8 @@
<p class="mb-3">Perks of a new AI tool directory: <span
class="bg-highlighter-pink py-1 px-2 fw-bold ">free tool submission!</span> We are grateful
for your initial support and we wish to reward our early adopters with AI tool submission at
<span class="bg-highlighter-yellow py-1 px-2 fw-bold">$0 charge.</span></p>
<span class="bg-highlighter-yellow py-1 px-2 fw-bold">$0 charge.</span>
</p>
<p class="mb-3">
While our platform is still relatively new, we are commited to becoming one of the leading AI

View File

@@ -1,6 +1,6 @@
@php
$class = '';
if ('center' === $data['alignment']) {
$class = 'text-center';
} elseif ('left' === $data['alignment']) {

View File

@@ -1,17 +1,17 @@
<image:image>
@if (! empty($image->url))
<image:loc>{{ url($image->url) }}</image:loc>
@endif
@if (! empty($image->caption))
<image:caption>{{ $image->caption }}</image:caption>
@endif
@if (! empty($image->geo_location))
<image:geo_location>{{ $image->geo_location }}</image:geo_location>
@endif
@if (! empty($image->title))
<image:title>{{ $image->title }}</image:title>
@endif
@if (! empty($image->license))
<image:license>{{ $image->license }}</image:license>
@endif
@if (!empty($image->url))
<image:loc>{{ url($image->url) }}</image:loc>
@endif
@if (!empty($image->caption))
<image:caption>{{ $image->caption }}</image:caption>
@endif
@if (!empty($image->geo_location))
<image:geo_location>{{ $image->geo_location }}</image:geo_location>
@endif
@if (!empty($image->title))
<image:title>{{ $image->title }}</image:title>
@endif
@if (!empty($image->license))
<image:license>{{ $image->license }}</image:license>
@endif
</image:image>

View File

@@ -5,7 +5,7 @@
</news:publication>
<news:title>{{ $news->title }}</news:title>
<news:publication_date>{{ $news->publicationDate->toW3cString() }}</news:publication_date>
@foreach($news->options as $tag => $value)
<news:{{$tag}}>{{$value}}</news:{{$tag}}>
@endforeach
</news:news>
@foreach ($news->options as $tag => $value)
<news:{{ $tag }}>{{ $value }}</news:{{ $tag }}>
@endforeach
</news:news>

View File

@@ -1,6 +1,9 @@
<?= '<'.'?'.'xml version="1.0" encoding="UTF-8"?>'."\n"; ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9">
@foreach($tags as $tag)
@include('sitemap::' . $tag->getType())
@endforeach
<?= '<' . '?' . 'xml version="1.0" encoding="UTF-8"?>' . "\n" ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"
xmlns:news="http://www.google.com/schemas/sitemap-news/0.9">
@foreach ($tags as $tag)
@include('sitemap::' . $tag->getType())
@endforeach
</urlset>

View File

@@ -1,6 +1,6 @@
<?= '<'.'?'.'xml version="1.0" encoding="UTF-8"?>'."\n" ?>
<?= '<' . '?' . 'xml version="1.0" encoding="UTF-8"?>' . "\n" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
@foreach($tags as $tag)
@include('sitemap::sitemapIndex/' . $tag->getType())
@endforeach
@foreach ($tags as $tag)
@include('sitemap::sitemapIndex/' . $tag->getType())
@endforeach
</sitemapindex>

View File

@@ -1,8 +1,8 @@
<sitemap>
@if (! empty($tag->url))
<loc>{{ url($tag->url) }}</loc>
@if (!empty($tag->url))
<loc>{{ url($tag->url) }}</loc>
@endif
@if (! empty($tag->lastModificationDate))
<lastmod>{{ $tag->lastModificationDate->format(DateTime::ATOM) }}</lastmod>
@if (!empty($tag->lastModificationDate))
<lastmod>{{ $tag->lastModificationDate->format(DateTime::ATOM) }}</lastmod>
@endif
</sitemap>

View File

@@ -1,19 +1,19 @@
<url>
@if (! empty($tag->url))
<loc>{{ url($tag->url) }}</loc>
@if (!empty($tag->url))
<loc>{{ url($tag->url) }}</loc>
@endif
@if (count($tag->alternates))
@foreach ($tag->alternates as $alternate)
<xhtml:link rel="alternate" hreflang="{{ $alternate->locale }}" href="{{ url($alternate->url) }}" />
@endforeach
@endif
@if (! empty($tag->lastModificationDate))
<lastmod>{{ $tag->lastModificationDate->format(DateTime::ATOM) }}</lastmod>
@endif
@if (! empty($tag->changeFrequency))
<changefreq>{{ $tag->changeFrequency }}</changefreq>
@if (count($tag->alternates))
@foreach ($tag->alternates as $alternate)
<xhtml:link rel="alternate" hreflang="{{ $alternate->locale }}" href="{{ url($alternate->url) }}" />
@endforeach
@endif
<priority>{{ number_format($tag->priority,1) }}</priority>
@if (!empty($tag->lastModificationDate))
<lastmod>{{ $tag->lastModificationDate->format(DateTime::ATOM) }}</lastmod>
@endif
@if (!empty($tag->changeFrequency))
<changefreq>{{ $tag->changeFrequency }}</changefreq>
@endif
<priority>{{ number_format($tag->priority, 1) }}</priority>
@each('sitemap::image', $tag->images, 'image')
@each('sitemap::video', $tag->videos, 'video')
@each('sitemap::news', $tag->news, 'news')

View File

@@ -2,22 +2,22 @@
<video:thumbnail_loc>{{ $video->thumbnailLoc }}</video:thumbnail_loc>
<video:title>{{ $video->title }}</video:title>
<video:description>{{ $video->description }}</video:description>
@if ($video->contentLoc)
<video:content_loc>{{ $video->contentLoc }}</video:content_loc>
@endif
@if ($video->playerLoc)
<video:player_loc>{{ $video->playerLoc }}</video:player_loc>
@endif
@foreach($video->options as $tag => $value)
<video:{{$tag}}>{{$value}}</video:{{$tag}}>
@endforeach
@foreach($video->allow as $tag => $value)
<video:{{$tag}} relationship="allow">{{$value}}</video:{{$tag}}>
@endforeach
@foreach($video->deny as $tag => $value)
<video:{{$tag}} relationship="deny">{{$value}}</video:{{$tag}}>
@endforeach
@foreach($video->tags as $tag)
<video:tag>{{ $tag }}</video:tag>
@endforeach
@if ($video->contentLoc)
<video:content_loc>{{ $video->contentLoc }}</video:content_loc>
@endif
@if ($video->playerLoc)
<video:player_loc>{{ $video->playerLoc }}</video:player_loc>
@endif
@foreach ($video->options as $tag => $value)
<video:{{ $tag }}>{{ $value }}</video:{{ $tag }}>
@endforeach
@foreach ($video->allow as $tag => $value)
<video:{{ $tag }} relationship="allow">{{ $value }}</video:{{ $tag }}>
@endforeach
@foreach ($video->deny as $tag => $value)
<video:{{ $tag }} relationship="deny">{{ $value }}</video:{{ $tag }}>
@endforeach
@foreach ($video->tags as $tag)
<video:tag>{{ $tag }}</video:tag>
@endforeach
</video:video>