progress on home page
This commit is contained in:
parent
f83ec9ba45
commit
ab668caca9
BIN
public/img/sp/melipayamak.png
Normal file
BIN
public/img/sp/melipayamak.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
BIN
public/img/sp/parspack-logo.png
Normal file
BIN
public/img/sp/parspack-logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
public/img/sp/raddata.png
Normal file
BIN
public/img/sp/raddata.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
BIN
public/uploaded/ae8df0c4-7d20-45f8-9ba9-1177a1b7185d.webp
Normal file
BIN
public/uploaded/ae8df0c4-7d20-45f8-9ba9-1177a1b7185d.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 585 KiB |
BIN
public/uploaded/da1a81e5-f2fc-4f12-81cd-f428e32ccc9e.webp
Normal file
BIN
public/uploaded/da1a81e5-f2fc-4f12-81cd-f428e32ccc9e.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 462 KiB |
BIN
public/uploaded/e85efd21-e115-4103-b596-b91583928367.webp
Normal file
BIN
public/uploaded/e85efd21-e115-4103-b596-b91583928367.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 311 KiB |
|
@ -12,9 +12,11 @@ use Symfony\Component\Routing\Attribute\Route;
|
||||||
class GeneralController extends AbstractController
|
class GeneralController extends AbstractController
|
||||||
{
|
{
|
||||||
#[Route('/', name: 'app_home')]
|
#[Route('/', name: 'app_home')]
|
||||||
public function app_home(): Response
|
public function app_home(EntityManagerInterface $em): Response
|
||||||
{
|
{
|
||||||
return $this->render('general/home.html.twig');
|
return $this->render('general/home.html.twig', [
|
||||||
|
'posts' => $em->getRepository(Post::class)->findBycat('blog', 3)
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[Route('/sitemap.xml', name: 'app_sitemap')]
|
#[Route('/sitemap.xml', name: 'app_sitemap')]
|
||||||
|
@ -23,8 +25,8 @@ class GeneralController extends AbstractController
|
||||||
$response = new Response();
|
$response = new Response();
|
||||||
$response->headers->set('Content-Type', 'text/xml');
|
$response->headers->set('Content-Type', 'text/xml');
|
||||||
$posts = $em->getRepository(Post::class)->findAll();
|
$posts = $em->getRepository(Post::class)->findAll();
|
||||||
return $this->render('general/sitemap.html.twig',[
|
return $this->render('general/sitemap.html.twig', [
|
||||||
'posts'=>$posts
|
'posts' => $posts
|
||||||
],$response);
|
], $response);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,6 +68,9 @@ class Post
|
||||||
#[ORM\OneToMany(targetEntity: Comment::class, mappedBy: 'post', orphanRemoval: true)]
|
#[ORM\OneToMany(targetEntity: Comment::class, mappedBy: 'post', orphanRemoval: true)]
|
||||||
private Collection $comments;
|
private Collection $comments;
|
||||||
|
|
||||||
|
#[ORM\Column(type: Types::TEXT, nullable: true)]
|
||||||
|
private ?string $intro = null;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->tree = new ArrayCollection();
|
$this->tree = new ArrayCollection();
|
||||||
|
@ -276,4 +279,16 @@ class Post
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getIntro(): ?string
|
||||||
|
{
|
||||||
|
return $this->intro;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setIntro(?string $intro): static
|
||||||
|
{
|
||||||
|
$this->intro = $intro;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,4 +45,16 @@ class PostRepository extends ServiceEntityRepository
|
||||||
->getOneOrNullResult()
|
->getOneOrNullResult()
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
public function findBycat($cat='blog' , $count = 3): array
|
||||||
|
{
|
||||||
|
return $this->createQueryBuilder('p')
|
||||||
|
->innerJoin('p.cat', 'c')
|
||||||
|
->where('c.code = :cat')
|
||||||
|
->setParameter('cat', $cat)
|
||||||
|
->setMaxResults($count)
|
||||||
|
->orderBy('p.dateSubmit','DESC')
|
||||||
|
->getQuery()
|
||||||
|
->getResult()
|
||||||
|
;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<body>
|
<body>
|
||||||
<nav class="navbar navbar-expand-lg border-bottom bg-body-tertiary">
|
<nav class="navbar navbar-expand-lg border-bottom bg-body-tertiary">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<a class="navbar-brand" href="{{path('app_home')}}">
|
<a class="navbar-brand text-primary" href="{{path('app_home')}}">
|
||||||
<img src="{{asset('/favicon/favicon.svg')}}" alt="نرم افزار حسابداری آنلاین حسابیکس" width="30" height="30">
|
<img src="{{asset('/favicon/favicon.svg')}}" alt="نرم افزار حسابداری آنلاین حسابیکس" width="30" height="30">
|
||||||
حسابیکس
|
حسابیکس
|
||||||
</a>
|
</a>
|
||||||
|
@ -63,16 +63,22 @@
|
||||||
<footer class="py-3 my-4">
|
<footer class="py-3 my-4">
|
||||||
<ul class="nav justify-content-center border-bottom pb-3 mb-3">
|
<ul class="nav justify-content-center border-bottom pb-3 mb-3">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="{{path('app_page',{'url':'hsx'})}}" class="nav-link px-2 text-body-secondary">توکن HSX</a>
|
<a href="{{path('app_page',{'url':'hsx'})}}" class="nav-link px-2">توکن HSX</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="{{path('app_page',{'url':'contact'})}}" class="nav-link px-2 text-body-secondary">مستندات API</a>
|
<a href="{{path('app_page',{'url':'contact'})}}" class="nav-link px-2">مستندات API</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="{{path('app_page',{'url':'terms'})}}" class="nav-link px-2 text-body-secondary">قوانین ارائه خدمات</a>
|
<a href="https://github.com/morrning" target="_blank" class="nav-link px-2">مخازن کد</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="{{path('app_page',{'url':'privacy'})}}" class="nav-link px-2 text-body-secondary">حریم خصوصی</a>
|
<a href="{{path('app_page',{'url':'open-source'})}}" class="nav-link px-2">متنباز</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="{{path('app_page',{'url':'terms'})}}" class="nav-link px-2">قوانین ارائه خدمات</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="{{path('app_page',{'url':'privacy'})}}" class="nav-link px-2">حریم خصوصی</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p class="text-center text-body-secondary">
|
<p class="text-center text-body-secondary">
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 my-3">
|
<div class="col-12 my-3">
|
||||||
<div class="p-1 mb-4 bg-body-primary rounded-3">
|
<div class="p-1 mb-4">
|
||||||
<div class="container-fluid py-5">
|
<div class="container-fluid pt-md-5 pt-sm-2">
|
||||||
<div class="row align-items-center">
|
<div class="row align-items-center">
|
||||||
<div class="col-sm-12 col-md-7 mb-3 text-center">
|
<div class="col-sm-12 col-md-7 mb-3 text-center">
|
||||||
<h1 class="fs-2 fw-bold text-primary">شروعی ساده و آسان
|
<h1 class="fs-2 fw-bold text-primary">شروعی ساده و آسان
|
||||||
|
@ -26,11 +26,11 @@
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="card text-bg-light mb-3">
|
<div class="card text-bg-light mb-3">
|
||||||
<div class="card-body text-center">
|
<div class="card-body text-center">
|
||||||
<p class="card-text">
|
<p class="card-text text-body-secondary">
|
||||||
حسابیکس یک پلتفرم مدیریت کسبوکار که پاسخگوی تمام اهداف تجاری شما از یک فروشگاه کوچک تا یک مجتمع بازگانی بزرگ است
|
حسابیکس یک پلتفرم مدیریت کسبوکار که پاسخگوی تمام اهداف تجاری شما از یک فروشگاه کوچک تا یک مجتمع بازگانی بزرگ است
|
||||||
<br>
|
<br>
|
||||||
کافی است گام اول را بردارید،جهت پیشبرد اهدافتان ما در کنار شما هستیم.
|
کافی است گام اول را بردارید،جهت پیشبرد اهدافتان در کنار شما هستیم.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -38,9 +38,31 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-12 mb-4">
|
||||||
|
<div class="container bg-body-tertiary rounded-3 p-4">
|
||||||
|
<h4 class="text-center mb-4 text-primary">حامیان حسابیکس</h1>
|
||||||
|
<div class="row row-cols-2 row-cols-md-4 g-4 justify-content-center">
|
||||||
|
<div class="col">
|
||||||
|
<div class="card h-100 border-0 shadow-sm">
|
||||||
|
<img src="{{asset('img/sp/parspack-logo.png')}}" class="card-img-top p-3" alt="Sponsor 1 Logo">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<div class="card h-100 border-0 shadow-sm">
|
||||||
|
<img src="{{asset('img/sp/melipayamak.png')}}" class="card-img-top p-3" alt="Sponsor 1 Logo">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<div class="card h-100 border-0 shadow-sm">
|
||||||
|
<img src="{{asset('img/sp/raddata.png')}}" class="card-img-top p-3" alt="Sponsor 1 Logo">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="p-1 mb-4">
|
<div class="p-1 mb-4">
|
||||||
<div class="container-fluid py-5">
|
<div class="container-fluid">
|
||||||
<div class="row align-items-center">
|
<div class="row align-items-center">
|
||||||
<div class="col-sm-12 col-md-3 mb-3 text-center">
|
<div class="col-sm-12 col-md-3 mb-3 text-center">
|
||||||
<img src="{{asset('img/viewMobile.png')}}" class="img-fluid" alt="نرم افزار حسابداری حسابیکس"/>
|
<img src="{{asset('img/viewMobile.png')}}" class="img-fluid" alt="نرم افزار حسابداری حسابیکس"/>
|
||||||
|
@ -63,6 +85,31 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="p-1 mb-4">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<h3 class="text-primary fs-2 text-center py-3">از وبلاگ حسابیکس</h3>
|
||||||
|
<div class="row">
|
||||||
|
{% for post in posts %}
|
||||||
|
<div class="col-sm-12 col-md-4 mb-3">
|
||||||
|
<div class="card d-flex position-relative">
|
||||||
|
<img src="{{asset('uploaded/' ~ post.mainPic )}}" class="card-img-top" alt="{{ post.title}}">
|
||||||
|
<div class="card-body">
|
||||||
|
<h3 class="card-title text-primary fs-4">{{post.title}}</h3>
|
||||||
|
<p class="card-text">{{ post.intro }}</p>
|
||||||
|
<div class="card-text text-start align-items-center">
|
||||||
|
<small class="text-body-secondary float-end">{{ Jdate.jdate('Y/n/d',post.dateSubmit) }}</small>
|
||||||
|
<a href="{{path('app_blog_post',{'url':post.url})}}" class="float-start btn btn-primary btn-sm rounded-4 stretched-link">ادامه مطلب</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
{{ item.plain | raw}}
|
{{ item.plain | raw}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if item.body is not null %}
|
{% if item.body is not null %}
|
||||||
<div class="container">
|
<div class="container mt-3">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<h1 class="text-primary">{{item.title}}</h1>
|
<h1 class="text-primary py-4">{{item.title}}</h1>
|
||||||
{{ item.body | raw}}
|
{{ item.body | raw}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue