mirror of https://github.com/4xmen/xshop.git
parent
76212ee579
commit
c25e17d6f5
@ -0,0 +1,13 @@
|
||||
@extends('website.inc.website-layout')
|
||||
|
||||
@section('title')
|
||||
{{$title}} - {{config('app.name')}}
|
||||
@endsection
|
||||
@section('content')
|
||||
<main>
|
||||
@foreach(getParts($area) as $part)
|
||||
@php($p = $part->getBladeWithData())
|
||||
@include($p['blade'],['data' => $p['data']])
|
||||
@endforeach
|
||||
</main>
|
||||
@endsection
|
@ -0,0 +1,47 @@
|
||||
<section class='SimplePostList'>
|
||||
<div class="{{gfx()['container']}}">
|
||||
<div class="row pinned-posts">
|
||||
@foreach(\App\Models\Post::where('status',1)->where('is_pinned',1)->limit(2)->get() as $post)
|
||||
<div class="col-md-6 p-1">
|
||||
<div class="post-item">
|
||||
<div class="corner">
|
||||
{{$post->mainGroup->name}}
|
||||
</div>
|
||||
<a href="{{$post->webUrl()}}">
|
||||
<img src="{{$post->orgUrl()}}" alt="{{$post->title}}"
|
||||
title="{{implode(',',$post->tags->pluck('name')->toArray()??'')}}">
|
||||
</a>
|
||||
<div class="detail">
|
||||
<h4>
|
||||
{{$post->title}}
|
||||
</h4>
|
||||
<span>
|
||||
{{$post->created_at->ldate('Y/m/d l')}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<hr>
|
||||
@foreach($posts as $post)
|
||||
<div class="post-list-item">
|
||||
<img src="{{$post->imgUrl()}}" class="float-start me-4" alt="{{$post->title}}">
|
||||
<h4>
|
||||
{{$post->title}}
|
||||
</h4>
|
||||
<div class="text-muted py-2">
|
||||
{{$post->created_at->ldate('Y/m/d l')}}
|
||||
</div>
|
||||
<p>
|
||||
{{$post->subtitle}}
|
||||
<br>
|
||||
<a href="{{$post->webUrl()}}" class="btn btn-outline-primary my-2 btn-sm">
|
||||
{{__("Read more")}}
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
@endforeach
|
||||
{{$posts->links()}}
|
||||
</div>
|
||||
</section>
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "SimplePostList",
|
||||
"version": "1.0",
|
||||
"author": "xStack",
|
||||
"email": "xshop@xstack.ir",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"url": "https:\/\/xstack.ir",
|
||||
"author_url": "https:\/\/4xmen.ir",
|
||||
"packages": []
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Resources\Views\Segments;
|
||||
|
||||
use App\Models\Part;
|
||||
|
||||
class SimplePostList
|
||||
{
|
||||
public static function onAdd(Part $part = null)
|
||||
{
|
||||
|
||||
}
|
||||
public static function onRemove(Part $part = null)
|
||||
{
|
||||
|
||||
}
|
||||
public static function onMount(Part $part = null)
|
||||
{
|
||||
return $part;
|
||||
}
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
.SimplePostList {
|
||||
// scss
|
||||
.pinned-posts{
|
||||
padding: 2rem 0;
|
||||
//column-gap: 2px;
|
||||
//row-gap: 2px;
|
||||
.post-item{
|
||||
position: relative;
|
||||
height: 350px;
|
||||
border-radius: var(--xshop-border-radius) ;
|
||||
overflow: hidden;
|
||||
background: #333;
|
||||
img{
|
||||
border-radius: var(--xshop-border-radius) ;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
transition: 400ms;
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.detail{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 2;
|
||||
padding: 1rem;
|
||||
color: white;
|
||||
span{
|
||||
opacity: .5;
|
||||
}
|
||||
}
|
||||
|
||||
.corner{
|
||||
border-radius: var(--xshop-border-radius) ;
|
||||
position: absolute;
|
||||
inset-inline-start: 0;
|
||||
top: 0;
|
||||
background: var(--xshop-primary);
|
||||
color: var(--xshop-diff);
|
||||
z-index: 2;
|
||||
padding: 4px 1rem;
|
||||
font-size: 17px;
|
||||
|
||||
}
|
||||
|
||||
&:hover{
|
||||
img{
|
||||
transform: scale(1.6);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.post-list-item{
|
||||
border-bottom: #44444433 1px solid;
|
||||
margin-bottom: 1rem;
|
||||
min-height: 200px;
|
||||
img{
|
||||
height: 175px;
|
||||
border-radius: var(--xshop-border-radius);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 304 KiB |
Loading…
Reference in New Issue