1
0
Fork 0

Merge pull request #8 from 4xmen/master

Master
main
Farzad AsA 1 year ago committed by GitHub
commit 4eafd3ab56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,25 @@
<?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use App\Models\Cat;
use App\Models\Product;
use Illuminate\Http\Request;
use Xmen\StarterKit\Models\Post;
class ApiV1Controller extends Controller
{
//
public function index(){
$posts = Post::limit(10)->get();
$products = Product::limit(10)->get();
$categories = Cat::get();
return [
'posts' => $posts,
'products' => $products,
'categories' => $categories
];
}
}

@ -270,6 +270,13 @@ class Product extends Model implements HasMedia
return $def; return $def;
} }
public function getOldPrice()
{
if ($this->getPurePrice() == 0) {
return __('Call us!');
}
return number_format($this->price) . ' ' . config('app.currency_type');
}
public function getPrice() public function getPrice()
{ {
if ($this->getPurePrice() == 0) { if ($this->getPurePrice() == 0) {
@ -290,7 +297,7 @@ class Product extends Model implements HasMedia
function hasDiscount() function hasDiscount()
{ {
return $this->discounts()->where('expire', '>', \DB::raw('NOW()'))->count() > 1; return $this->discounts()->where('expire', '>', \DB::raw('NOW()'))->count() > 0;
} }
public function isFav() public function isFav()

@ -54,6 +54,8 @@ use Xmen\StarterKit\Models\StarterKit;
* @property-read int|null $accesses_count * @property-read int|null $accesses_count
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Product> $products * @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Product> $products
* @property-read int|null $products_count * @property-read int|null $products_count
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Access> $accesses
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Product> $products
* @mixin \Eloquent * @mixin \Eloquent
*/ */
class User extends Authenticatable class User extends Authenticatable

File diff suppressed because it is too large Load Diff

@ -0,0 +1,405 @@
.progress-step{
display: grid;
grid-template-columns: repeat(3,1fr);
.step{
text-align: center;
margin-bottom: 35px;
position: relative;
z-index: 9 ;
&.done{
i,img{
border-color: black;
color: black;
}
}
i,img{
font-size: 45px;
width: 75px;
height: 75px;
border-radius: 50%;
border: 2px solid gray;
display: flex;
align-items: center;
justify-content: center;
color: gray;
margin: 15px auto;
background: #ffffff;
position: relative;
z-index: 10;
cursor: pointer;
}
}
.step:before{
height: 2px;
background: silver;
top: calc(50% - 15px);
position: absolute;
left: 0;
right: 0;
content: ' ';
transform: translateY(-50%);
}
.step.done:before{
background: black;
}
}
#card-steps {
.step{
display: none;
&.active{
display: block;
}
}
}
.product-info {
padding: 0;
list-style: none;
li {
border-top: 1px solid #ddd;
padding: 7px;
&:last-child {
border-bottom: 1px solid #ddd;
}
i {
margin-top: 3px;
margin-left: 10px;
float: right;
color: #0c63e4;
}
b {
color: #0c63e4;
float: left;
}
}
}
/*-768px width*/
@media (max-width: 768px) {
#customer label {
text-align: start !important;
}
}
/*-1000px width*/
@media (max-width: 1000px) {
#top .logo {
max-height: 40px;
}
#main-container {
padding-top: 20px;
}
}
.product-count {
font-size: 0;
:first-child {
color: white;
border-radius: 0 7px 7px 0;
}
:last-child {
border-radius: 7px 0 0 7px;
color: white;
}
* {
display: inline-block;
}
input {
//font-size: initial;
text-align: center;
-moz-appearance: textfield;
width: 50px;
border-radius: 0;
font-size: 16px;
position: relative;
top: 4px;
}
input::-webkit-inner-spin-button {
margin: 0;
-webkit-appearance: none;
}
}
#card {
.table {
vertical-align: middle;
}
}
#sms-code {
display: none;
}
#card {
.meta {
border: 1px solid gray;
margin-bottom: 2px;
border-radius: 5px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 3px;
}
.quantity {
&.active {
background: #0c63e4;
color: white;
}
cursor: pointer;
border: 1px solid gray;
margin-bottom: 2px;
border-radius: 5px;
padding: 3px;
hr {
margin-top: 3px;
margin-bottom: 3px;
}
input {
visibility: hidden;
}
}
}
//@import "css/dark";
.preline {
white-space: pre-line;
}
.border-x {
border: 2px solid gray;
padding: 1em;
}
.ribbon {
position: absolute !important;
text-transform: uppercase;
color: white;
z-index: 99;
top: -36px;
.ribbon1 {
position: absolute;
right: 10px;
color: white;
&:after {
position: absolute;
content: "";
width: 0;
height: 0;
bottom: 0;
left: 0;
z-index: 999;
border-left: 25px solid transparent;
border-right: 25px solid transparent;
border-top: 15px solid #F8463F;
}
span {
position: relative;
display: block;
text-align: center;
background: #F8463F;
font-size: 18px;
font-weight: 600;
line-height: 0;
padding: 18px 5px 12px 8px;
border-top-right-radius: 8px;
width: 50px;
&:before {
height: 6px;
width: 6px;
left: -5px;
top: 0;
background: #F8463F;
}
&:after {
height: 6px;
width: 8px;
left: -8px;
top: 0;
border-radius: 8px 8px 0 0;
background: #C02031;
}
&:before,
&:after {
position: absolute;
content: "";
}
}
}
}
.trust {
box-shadow: 0 5px 5px #86868688;
border: 1px solid #86868688;
list-style: none;
border-radius: 4px;
margin-right: 2em;
width: calc(100% - 4em);
li {
display: flex;
align-items: center;
font-size: 14px;
}
i {
color: #0a53be;
margin-left: 10px;
}
}
.sizeInfo {
width: 100%;
padding: 10px 0;
display: inline-block;
transition: 300ms;
border: 1px solid #f5f5f5;
&:hover {
box-shadow: initial;
border: 1px solid #868686;
}
img {
width: 20px;
height: 20px;
}
a {
line-height: 60px;
color: #868686 !important;
}
}
#child {
height: 80vh;
overflow: hidden;
padding-top: 0;
position: relative;
background: #fdd6ff;
.particles {
width: 10px;
height: 10px;
background: #f00;
border-radius: 50%;
box-shadow: 0 0 4px #f00,
0 0 8px #f00;
position: absolute;
top: -10vh;
opacity: .6;
}
.active {
h1, h2, h3, h4, h5, h6 {
animation: pulse 1.6s infinite;
line-height: 2em;
}
}
.owl-carousel {
padding: 0;
margin: 0;
}
.item {
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
.text {
margin-top: 15vh;
float: left;
padding: 3em;
text-align: center;
width: 50%;
}
img {
opacity: 0;
max-height: 80vh;
width: auto !important;
position: absolute;
bottom: 0;
right: -1000px;
transition: 1000ms;
}
}
.active {
img {
opacity: 1;
right: 5% !important;
}
}
.owl-item {
height: 80vh;
position: relative;
}
.owl-odd {
height: 80vh;
background: #1dd3b0aa;
img {
opacity: 1;
right: 65%;
}
}
.owl-dots {
position: absolute;
bottom: 10px;
z-index: 9;
left: 0;
right: 0;
.owl-dot span {
border-radius: 0 !important;
height: 3px;
width: 20px !important;
}
}
}
@keyframes pulse {
0% {
transform: scale(1);
}
50% {
transform: scale(1.2);
}
100% {
transform: scale(1);
}
}

@ -1,54 +0,0 @@
.progress-step{
display: grid;
grid-template-columns: repeat(3,1fr);
.step{
text-align: center;
margin-bottom: 35px;
position: relative;
z-index: 9 ;
&.done{
i,img{
border-color: black;
color: black;
}
}
i,img{
font-size: 45px;
width: 75px;
height: 75px;
border-radius: 50%;
border: 2px solid gray;
display: flex;
align-items: center;
justify-content: center;
color: gray;
margin: 15px auto;
background: #ffffff;
position: relative;
z-index: 10;
cursor: pointer;
}
}
.step:before{
height: 2px;
background: silver;
top: calc(50% - 15px);
position: absolute;
left: 0;
right: 0;
content: ' ';
transform: translateY(-50%);
}
.step.done:before{
background: black;
}
}
#card-steps {
.step{
display: none;
&.active{
display: block;
}
}
}

@ -11,7 +11,7 @@
@import "css/icofont/icofont.min.css"; @import "css/icofont/icofont.min.css";
@import "../sass/preloader"; @import "../sass/preloader";
@import "css/style.css"; @import "css/style.css";
@import "card"; @import "../sass/card";
$main-color: #0085a7; $main-color: #0085a7;
$invert-text-color: white; $invert-text-color: white;
@ -21,6 +21,10 @@ $main-menu-bg: #eeeeee;
$is-dark: 'false'; $is-dark: 'false';
@import "~x-mega-menu/src/main-x-mega-menu"; @import "~x-mega-menu/src/main-x-mega-menu";
a{
text-decoration: none !important;
}
// //
//a { //a {
// color: #ea4c89; // color: #ea4c89;
@ -84,356 +88,6 @@ $is-dark: 'false';
// background-color: darkmagenta; // background-color: darkmagenta;
// border-color: dodgerblue; // border-color: dodgerblue;
//} //}
.product-info {
padding: 0;
list-style: none;
li {
border-top: 1px solid #ddd;
padding: 7px;
&:last-child {
border-bottom: 1px solid #ddd;
}
i {
margin-top: 3px;
margin-left: 10px;
float: right;
color: #0c63e4;
}
b {
color: #0c63e4;
float: left;
}
}
}
/*-768px width*/
@media (max-width: 768px) {
#customer label {
text-align: start !important;
}
}
/*-1000px width*/
@media (max-width: 1000px) {
#top .logo {
max-height: 40px;
}
#main-container {
padding-top: 20px;
}
}
.product-count {
font-size: 0;
:first-child {
color: white;
border-radius: 0 7px 7px 0;
}
:last-child {
border-radius: 7px 0 0 7px;
color: white;
}
* {
display: inline-block;
}
input {
//font-size: initial;
text-align: center;
-moz-appearance: textfield;
width: 50px;
border-radius: 0;
font-size: 16px;
position: relative;
top: 4px;
}
input::-webkit-inner-spin-button {
margin: 0;
-webkit-appearance: none;
}
}
#card {
.table {
vertical-align: middle;
}
}
#sms-code {
display: none;
}
#card {
.meta {
border: 1px solid gray;
margin-bottom: 2px;
border-radius: 5px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 3px;
}
.quantity {
&.active {
background: #0c63e4;
color: white;
}
cursor: pointer;
border: 1px solid gray;
margin-bottom: 2px;
border-radius: 5px;
padding: 3px;
hr {
margin-top: 3px;
margin-bottom: 3px;
}
input {
visibility: hidden;
}
}
}
//@import "css/dark";
.preline {
white-space: pre-line;
}
.border-x {
border: 2px solid gray;
padding: 1em;
}
.ribbon {
position: absolute !important;
text-transform: uppercase;
color: white;
z-index: 99;
top: -36px;
.ribbon1 {
position: absolute;
right: 10px;
color: white;
&:after {
position: absolute;
content: "";
width: 0;
height: 0;
bottom: 0;
left: 0;
z-index: 999;
border-left: 25px solid transparent;
border-right: 25px solid transparent;
border-top: 15px solid #F8463F;
}
span {
position: relative;
display: block;
text-align: center;
background: #F8463F;
font-size: 18px;
font-weight: 600;
line-height: 0;
padding: 18px 5px 12px 8px;
border-top-right-radius: 8px;
width: 50px;
&:before {
height: 6px;
width: 6px;
left: -5px;
top: 0;
background: #F8463F;
}
&:after {
height: 6px;
width: 8px;
left: -8px;
top: 0;
border-radius: 8px 8px 0 0;
background: #C02031;
}
&:before,
&:after {
position: absolute;
content: "";
}
}
}
}
.trust {
box-shadow: 0 5px 5px #86868688;
border: 1px solid #86868688;
list-style: none;
border-radius: 4px;
margin-right: 2em;
width: calc(100% - 4em);
li {
display: flex;
align-items: center;
font-size: 14px;
}
i {
color: #0a53be;
margin-left: 10px;
}
}
.sizeInfo {
width: 100%;
padding: 10px 0;
display: inline-block;
transition: 300ms;
border: 1px solid #f5f5f5;
&:hover {
box-shadow: initial;
border: 1px solid #868686;
}
img {
width: 20px;
height: 20px;
}
a {
line-height: 60px;
color: #868686 !important;
}
}
#child {
height: 80vh;
overflow: hidden;
padding-top: 0;
position: relative;
background: #fdd6ff;
.particles {
width: 10px;
height: 10px;
background: #f00;
border-radius: 50%;
box-shadow: 0 0 4px #f00,
0 0 8px #f00;
position: absolute;
top: -10vh;
opacity: .6;
}
.active {
h1, h2, h3, h4, h5, h6 {
animation: pulse 1.6s infinite;
line-height: 2em;
}
}
.owl-carousel {
padding: 0;
margin: 0;
}
.item {
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
.text {
margin-top: 15vh;
float: left;
padding: 3em;
text-align: center;
width: 50%;
}
img {
opacity: 0;
max-height: 80vh;
width: auto !important;
position: absolute;
bottom: 0;
right: -1000px;
transition: 1000ms;
}
}
.active {
img {
opacity: 1;
right: 5% !important;
}
}
.owl-item {
height: 80vh;
position: relative;
}
.owl-odd {
height: 80vh;
background: #1dd3b0aa;
img {
opacity: 1;
right: 65%;
}
}
.owl-dots {
position: absolute;
bottom: 10px;
z-index: 9;
left: 0;
right: 0;
.owl-dot span {
border-radius: 0 !important;
height: 3px;
width: 20px !important;
}
}
}
@keyframes pulse {
0% {
transform: scale(1);
}
50% {
transform: scale(1.2);
}
100% {
transform: scale(1);
}
}
.page-item.active .page-link { .page-item.active .page-link {

@ -26,7 +26,13 @@ Route::get('/clear', function() {
Artisan::call('config:cache'); Artisan::call('config:cache');
Artisan::call('view:clear'); Artisan::call('view:clear');
Artisan::call('route:clear'); Artisan::call('route:clear');
return "Cleared!"; return "Cleared!";
}); });
Route::prefix('v1')->name('v1.')->group(
function () {
Route::get('index', [\App\Http\Controllers\Api\ApiV1Controller::class,'index'])->name('index');
});

Loading…
Cancel
Save