Update (ui): fix word break
Update (top rss keyword): do not show known brands
This commit is contained in:
@@ -28,8 +28,7 @@ protected function schedule(Schedule $schedule): void
|
|||||||
|
|
||||||
$top_rss_keywords = HybridTopRssPostKeywords::get(1, 20);
|
$top_rss_keywords = HybridTopRssPostKeywords::get(1, 20);
|
||||||
|
|
||||||
foreach ($top_rss_keywords as $rss_keyword)
|
foreach ($top_rss_keywords as $rss_keyword) {
|
||||||
{
|
|
||||||
PublishRssSearchResultJob::dispatch($rss_keyword->value_lowercased)->onQueue('default')->onConnection('default');
|
PublishRssSearchResultJob::dispatch($rss_keyword->value_lowercased)->onQueue('default')->onConnection('default');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,9 @@
|
|||||||
namespace App\Http\Controllers\Front;
|
namespace App\Http\Controllers\Front;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Models\HybridTopRssPostKeywords;
|
||||||
use App\Models\Post;
|
use App\Models\Post;
|
||||||
use App\Models\RssPost;
|
use App\Models\RssPost;
|
||||||
use App\Models\HybridTopRssPostKeywords;
|
|
||||||
|
|
||||||
use Artesaos\SEOTools\Facades\SEOMeta;
|
use Artesaos\SEOTools\Facades\SEOMeta;
|
||||||
use Artesaos\SEOTools\Facades\SEOTools;
|
use Artesaos\SEOTools\Facades\SEOTools;
|
||||||
use GrahamCampbell\Markdown\Facades\Markdown;
|
use GrahamCampbell\Markdown\Facades\Markdown;
|
||||||
@@ -27,7 +26,7 @@ public function home(Request $request)
|
|||||||
// $query->whereNotIn('id', $featured_posts->pluck('id')->toArray());
|
// $query->whereNotIn('id', $featured_posts->pluck('id')->toArray());
|
||||||
// })->where('status', 'publish')->where('published_at', '<=', now())->orderBy('published_at', 'desc')->limit(10)->get();
|
// })->where('status', 'publish')->where('published_at', '<=', now())->orderBy('published_at', 'desc')->limit(10)->get();
|
||||||
|
|
||||||
$top_rss_keywords = HybridTopRssPostKeywords::get(1, 10);
|
$top_rss_keywords = HybridTopRssPostKeywords::get(1, 16);
|
||||||
|
|
||||||
$rss_posts = RssPost::with('entities_keywords')->where('status', 'published')->orderBy('published_at', 'desc')->paginate(15);
|
$rss_posts = RssPost::with('entities_keywords')->where('status', 'published')->orderBy('published_at', 'desc')->paginate(15);
|
||||||
|
|
||||||
|
|||||||
@@ -2,16 +2,14 @@
|
|||||||
|
|
||||||
namespace App\Jobs;
|
namespace App\Jobs;
|
||||||
|
|
||||||
use App\Jobs\Tasks\PublishIndexPostTask;
|
use Exception;
|
||||||
use Illuminate\Bus\Queueable;
|
use Illuminate\Bus\Queueable;
|
||||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
use Illuminate\Foundation\Bus\Dispatchable;
|
use Illuminate\Foundation\Bus\Dispatchable;
|
||||||
use Illuminate\Queue\InteractsWithQueue;
|
use Illuminate\Queue\InteractsWithQueue;
|
||||||
use Illuminate\Queue\SerializesModels;
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|
||||||
use LaravelFreelancerNL\LaravelIndexNow\Facades\IndexNow;
|
use LaravelFreelancerNL\LaravelIndexNow\Facades\IndexNow;
|
||||||
use LaravelGoogleIndexing;
|
use LaravelGoogleIndexing;
|
||||||
use Exception;
|
|
||||||
|
|
||||||
class PublishRssSearchResultJob implements ShouldQueue
|
class PublishRssSearchResultJob implements ShouldQueue
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Support\Facades\DB;
|
|
||||||
use Illuminate\Support\Facades\Cache;
|
use Illuminate\Support\Facades\Cache;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
class HybridTopRssPostKeywords extends Model
|
class HybridTopRssPostKeywords extends Model
|
||||||
{
|
{
|
||||||
@@ -16,6 +16,7 @@ class HybridTopRssPostKeywords extends Model
|
|||||||
|
|
||||||
// Override the table and primary key as this is an abstract model
|
// Override the table and primary key as this is an abstract model
|
||||||
protected $table = null;
|
protected $table = null;
|
||||||
|
|
||||||
protected $primaryKey = null;
|
protected $primaryKey = null;
|
||||||
|
|
||||||
// Disable incrementing as this is an abstract model
|
// Disable incrementing as this is an abstract model
|
||||||
@@ -30,6 +31,7 @@ public static function get($days = 1, $limit = 10)
|
|||||||
$queryResults = DB::table('rss_post_keywords')
|
$queryResults = DB::table('rss_post_keywords')
|
||||||
->select('value', 'value_lowercased', DB::raw('COUNT(value_lowercased) as value_count'))
|
->select('value', 'value_lowercased', DB::raw('COUNT(value_lowercased) as value_count'))
|
||||||
->where('created_at', '>=', now()->subDays($days))
|
->where('created_at', '>=', now()->subDays($days))
|
||||||
|
->whereNotIn('value_lowercased', ['techcrunch', 'the verge', 'forbes', 'producthunt', ''])
|
||||||
->groupBy('value', 'value_lowercased')
|
->groupBy('value', 'value_lowercased')
|
||||||
->orderBy(DB::raw('COUNT(value_lowercased)'), 'desc')
|
->orderBy(DB::raw('COUNT(value_lowercased)'), 'desc')
|
||||||
->limit($limit)
|
->limit($limit)
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Binary file not shown.
9
public/build/assets/app-front-b83f66f0.css
Normal file
9
public/build/assets/app-front-b83f66f0.css
Normal file
File diff suppressed because one or more lines are too long
BIN
public/build/assets/app-front-b83f66f0.css.gz
Normal file
BIN
public/build/assets/app-front-b83f66f0.css.gz
Normal file
Binary file not shown.
@@ -210,7 +210,7 @@
|
|||||||
"src": "resources/sass/app-auth.scss"
|
"src": "resources/sass/app-auth.scss"
|
||||||
},
|
},
|
||||||
"resources/sass/app-front.scss": {
|
"resources/sass/app-front.scss": {
|
||||||
"file": "assets/app-front-8a16d797.css",
|
"file": "assets/app-front-b83f66f0.css",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"src": "resources/sass/app-front.scss"
|
"src": "resources/sass/app-front.scss"
|
||||||
},
|
},
|
||||||
|
|||||||
Binary file not shown.
@@ -104,4 +104,5 @@ @keyframes shimmer {
|
|||||||
|
|
||||||
.word-wrap-break-word {
|
.word-wrap-break-word {
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
|
overflow-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ class="mb-1 pb-1 d-inline badge bg-secondary border-secondary text-white border
|
|||||||
{{ $keyword->value }}
|
{{ $keyword->value }}
|
||||||
</h4>
|
</h4>
|
||||||
@else
|
@else
|
||||||
<h4 class="mb-1 pb-1 d-inline badge text-bg-light border me-1 small fw-normal">
|
<h4
|
||||||
|
class="mb-1 pb-1 d-inline badge text-bg-light border me-1 small fw-normal">
|
||||||
{{ $keyword->value }}
|
{{ $keyword->value }}
|
||||||
</h4>
|
</h4>
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
@@ -22,7 +22,8 @@
|
|||||||
<h2 class="h4 fw-semibold mb-3">Monitoring top tags for the past 24 hours</h2>
|
<h2 class="h4 fw-semibold mb-3">Monitoring top tags for the past 24 hours</h2>
|
||||||
|
|
||||||
@foreach ($top_rss_keywords as $rss_keyword)
|
@foreach ($top_rss_keywords as $rss_keyword)
|
||||||
<a href="{{ get_route_search_result($rss_keyword->value_lowercased) }}" class="mb-1 pb-1 badge text-bg-light border me-1 fw-bold shadow">
|
<a href="{{ get_route_search_result($rss_keyword->value_lowercased) }}"
|
||||||
|
class="mb-1 pb-1 badge text-bg-light border me-1 fw-bold shadow">
|
||||||
<span class="h6">#{{ $rss_keyword->value }}</span>
|
<span class="h6">#{{ $rss_keyword->value }}</span>
|
||||||
</a>
|
</a>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|||||||
Reference in New Issue
Block a user