Update (ui): fix word break

Update (top rss keyword): do not show known brands
This commit is contained in:
2023-11-23 10:50:43 +08:00
parent 416f06b344
commit e374875015
14 changed files with 46 additions and 45 deletions

View File

@@ -28,8 +28,7 @@ protected function schedule(Schedule $schedule): void
$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');
}

View File

@@ -3,10 +3,9 @@
namespace App\Http\Controllers\Front;
use App\Http\Controllers\Controller;
use App\Models\HybridTopRssPostKeywords;
use App\Models\Post;
use App\Models\RssPost;
use App\Models\HybridTopRssPostKeywords;
use Artesaos\SEOTools\Facades\SEOMeta;
use Artesaos\SEOTools\Facades\SEOTools;
use GrahamCampbell\Markdown\Facades\Markdown;
@@ -27,7 +26,7 @@ public function home(Request $request)
// $query->whereNotIn('id', $featured_posts->pluck('id')->toArray());
// })->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);

View File

@@ -2,16 +2,14 @@
namespace App\Jobs;
use App\Jobs\Tasks\PublishIndexPostTask;
use Exception;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use LaravelFreelancerNL\LaravelIndexNow\Facades\IndexNow;
use LaravelGoogleIndexing;
use Exception;
class PublishRssSearchResultJob implements ShouldQueue
{

View File

@@ -3,8 +3,8 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\DB;
class HybridTopRssPostKeywords extends Model
{
@@ -16,6 +16,7 @@ class HybridTopRssPostKeywords extends Model
// Override the table and primary key as this is an abstract model
protected $table = null;
protected $primaryKey = null;
// 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')
->select('value', 'value_lowercased', DB::raw('COUNT(value_lowercased) as value_count'))
->where('created_at', '>=', now()->subDays($days))
->whereNotIn('value_lowercased', ['techcrunch', 'the verge', 'forbes', 'producthunt', ''])
->groupBy('value', 'value_lowercased')
->orderBy(DB::raw('COUNT(value_lowercased)'), 'desc')
->limit($limit)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@@ -210,7 +210,7 @@
"src": "resources/sass/app-auth.scss"
},
"resources/sass/app-front.scss": {
"file": "assets/app-front-8a16d797.css",
"file": "assets/app-front-b83f66f0.css",
"isEntry": true,
"src": "resources/sass/app-front.scss"
},

Binary file not shown.

View File

@@ -104,4 +104,5 @@ @keyframes shimmer {
.word-wrap-break-word {
word-wrap: break-word;
overflow-wrap: break-word;
}

View File

@@ -20,7 +20,8 @@ class="mb-1 pb-1 d-inline badge bg-secondary border-secondary text-white border
{{ $keyword->value }}
</h4>
@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 }}
</h4>
@endif

View File

@@ -22,7 +22,8 @@
<h2 class="h4 fw-semibold mb-3">Monitoring top tags for the past 24 hours</h2>
@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>
</a>
@endforeach