forked from metin2/web
Shop improvements, renamed "shop" to "mall", support for Argon2ID
This commit is contained in:
78
resources/views/mall/category.blade.php
Normal file
78
resources/views/mall/category.blade.php
Normal file
@ -0,0 +1,78 @@
|
||||
@extends('layouts.mall')
|
||||
|
||||
@section('content')
|
||||
<div id="mainContent">
|
||||
<h1>{{ $category->name }}</h1>
|
||||
<div class="dynContent" style="position:relative">
|
||||
@forelse ($category->items->sortBy('id') as $item)
|
||||
<div class="item">
|
||||
<div class="itemDesc">
|
||||
<div @class(["thumbnailBgSmall", "discount thumbnailBgSmall-discount-ie6" => $item->old_price > 0])>
|
||||
<a href="{{ route('mall.item', ['id' => $item->id]) }}" title="More information" class="openinformation">
|
||||
<img src="{{ route('mall.item.image', ['id' => $item->id]) }}" width="63px" height="63px" alt="More information"/>
|
||||
</a>
|
||||
|
||||
@if ($item->old_price)
|
||||
<div class="discountPercentCategory">
|
||||
<a href="{{ route('mall.item', ['id' => $item->id]) }}"
|
||||
title="More information" class="openinformation"></a>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<a href="{{ route('mall.item', ['id' => $item->id]) }}" title="More information" class="openinformation">
|
||||
<span class="itemTitle">{{ $item->proto->locale_name }}</span>
|
||||
</a>
|
||||
<span class="line"></span>
|
||||
|
||||
{{ $item->description ?? "No description is currently available for this item." }}
|
||||
|
||||
<br class="clearfloat"/>
|
||||
</p>
|
||||
</div>
|
||||
<div class="purchaseOptionsWrapper">
|
||||
<div @class(["itemPrice", "discount itemPrice-discount-ie6" => $item->old_price])>
|
||||
<div @class(["priceValue", "discount discount priceValue-discount-ie6" => $item->old_price])>
|
||||
{{ $item->quantity }} pcs. for:
|
||||
|
||||
@if (!$item->old_price)
|
||||
<span class="price">{{ $item->price }} {{ $item->pricing->description() }}</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if ($item->old_price)
|
||||
<div class="price discount price-discount-ie6">{{ $item->price }} {{ $item->pricing->description() }}</div>
|
||||
<div class="discountOldPriceCategory">{{ $item->old_price }} {{ $item->pricing ->description() }}</div>
|
||||
<div class="discountPercentCircleCategory"></div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<a href="{{ route('mall.item', ['id' => $item->id]) }}" title="More information" @class(["purchaseInfo", "openinformation", "discount purchaseInfo-discount-ie6" => $item->old_price])>
|
||||
Details
|
||||
</a>
|
||||
<br class="clearfloat"/>
|
||||
</div>
|
||||
</div>
|
||||
@empty
|
||||
<div class="item" id="confirmBox">
|
||||
<div class="itemDesc confirmDesc">
|
||||
<div class="thumbnailBgSmall">
|
||||
<img src="{{ asset('assets/mall/img/warning.png') }}" width="63px" height="63px"
|
||||
alt="Error"/>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<span class="confirmTitle">Empty category</span>
|
||||
</p>
|
||||
|
||||
<p>This category does not contain any items.</p>
|
||||
|
||||
<br class="clearfloat"/>
|
||||
</div>
|
||||
</div>
|
||||
@endforelse
|
||||
</div>
|
||||
<div class="endContent"></div>
|
||||
</div>
|
||||
@endsection
|
58
resources/views/mall/home.blade.php
Normal file
58
resources/views/mall/home.blade.php
Normal file
@ -0,0 +1,58 @@
|
||||
@extends('layouts.mall')
|
||||
|
||||
@section('content')
|
||||
<div id="wideMainContent">
|
||||
<div class="landing wheelLanding">
|
||||
<h1>Item suggestions:</h1>
|
||||
|
||||
@foreach ($suggestions as $item)
|
||||
<div @class(['promotedItem', 'withDescription' => $item->other == 'recommend_desc'])>
|
||||
<h4>{{ $item->proto->locale_name }}</h4>
|
||||
<div class="promotedItemImg">
|
||||
<a href="{{ route('mall.item', ['id' => $item->id]) }}" class="openinformation" title="More information">
|
||||
<img src="{{ route('mall.item.image', ['id' => $item->id]) }}" alt="{{ $item->proto->locale_name }}" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@if ($item->old_price)
|
||||
<div class="discountPercentPromoted">
|
||||
<a href="{{ route('mall.item', ['id' => $item->id]) }}" class="openinformation" title="More information"></a>
|
||||
</div>
|
||||
<div class="discountPercentCirclePromoted"></div>
|
||||
<p class="discountOldPricePromoted">{{ $item->old_price }} {{ $item->pricing->description() }}</p>
|
||||
@endif
|
||||
|
||||
<div @class(['promotedItemBtns', 'promotedItemBtns-discount' => $item->old_price])>
|
||||
@if ($item->old_price)
|
||||
<p class="pdiscount">
|
||||
{{ $item->quantity }} pcs: <span class="price discount price-discount-ie6">{{ $item->price }} {{ $item->pricing->description() }}</span>
|
||||
</p>
|
||||
<div class="divdiscount">
|
||||
<a href="{{ route('mall.item', ['id' => $item->id]) }}" title="More information" class="detail-discount openinformation">Details</a>
|
||||
</div>
|
||||
@else
|
||||
<p>{{ $item->quantity }} pcs. only: <span class="price">{{ $item->price }} {{ $item->pricing->description() }}</span></p>
|
||||
<a href="{{ route('mall.item', ['id' => $item->id]) }}" title="More information" class="detail openinformation">Details</a>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if ($item->description && $item->other == 'recommend_desc')
|
||||
<p class="promotedItemDescr">{{ $item->description }}</p>
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
<div id="wheelLandingButton" class="ad">
|
||||
<h2 style="margin-top: 100px">The Wheel of Fortune</h2>
|
||||
<p>
|
||||
Try your luck and turn the Wheel of Fortune.
|
||||
Get your hand on some of the best items for your character!
|
||||
</p>
|
||||
<a href="{{ url('mall/wheel') }}" class="goToWheel">To the Wheel</a>
|
||||
</div>
|
||||
|
||||
<a class="buyDR" href="{{ url('mall/faq', ['section' => 'donate']) }}">You don't have Dragon Coins?</a>
|
||||
</div>
|
||||
<div class="endContent"></div>
|
||||
</div>
|
||||
@endsection
|
86
resources/views/mall/item/show.blade.php
Normal file
86
resources/views/mall/item/show.blade.php
Normal file
@ -0,0 +1,86 @@
|
||||
<script type="text/javascript">
|
||||
function changePrice(details) {
|
||||
var detailValues = details.split(':');
|
||||
price = detailValues[0];
|
||||
oldPrice = detailValues[1];
|
||||
amount = detailValues[2];
|
||||
document.getElementById('priceAmount').innerHTML = price;
|
||||
document.getElementById('mileageAmount').innerHTML = amount * 99;
|
||||
document.getElementById('buyItemLink').href = document.getElementById('buyItemLink').href.replace(/\/\d+?\?/, '/' + amount + '?');
|
||||
}
|
||||
|
||||
function disableLink(link, id) {
|
||||
link.style.display = 'none';
|
||||
document.getElementById(id).style.display = 'inline';
|
||||
}
|
||||
</script>
|
||||
|
||||
<h1 class="mainHeadline">{{ $item->proto->locale_name }}</h1>
|
||||
|
||||
<div class="dynContent detail">
|
||||
<div class="box boxLeft visual">
|
||||
<img src="{{ route('mall.item.image-large', ['id' => $item->id]) }}" alt="{{ $item->proto->locale_name }}"/>
|
||||
|
||||
@if ($item->old_price)
|
||||
<div id="discountPercent"></div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="box desc descOnlyItem">
|
||||
<div class="detailBadge">
|
||||
<div class="detailBadgeInner"></div>
|
||||
</div>
|
||||
<h2>{{ $item->proto->locale_name }}</h2>
|
||||
<div class="scrollpane scrollpaneOnlyItem">
|
||||
<p>{{ $item->description ?? "No description is currently available for this item." }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div @class(["box", "boxRight", "buy", "discount" => $item->old_price, "onlyItem"])>
|
||||
<div class="priceSelect">
|
||||
@if ($item->old_price)
|
||||
<div class="discountPercentCircle">
|
||||
<div id="discountPercentCircle"></div>
|
||||
</div>
|
||||
<div class="sprice-discount">
|
||||
<div id="oldPriceAmountDiv">
|
||||
<span id="oldPriceAmount">{{ $item->old_price }}</span> {{ $item->pricing->description() }}
|
||||
</div>
|
||||
Price: <span id="priceAmount">{{$item->price }}</span> {{ $item->pricing->description() }}
|
||||
</div>
|
||||
@else
|
||||
<div class="sprice">
|
||||
Price: <span id="priceAmount">{{ $item->price }}</span> {{ $item->pricing->description() }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if ($item->userCanBuy())
|
||||
<a id="buyItemLink" href="{{ route('mall.item.buy', ['id' => $item->id]) }}" title="Buy item"
|
||||
onclick="disableLink(this, 'linkBlank')">Buy item</a>
|
||||
<a id="linkBlank" class="blank" style="display:none" href="#">Buy item</a>
|
||||
@else
|
||||
<a id="buyItemLink" class="blank" href="#" style="cursor: default">Not
|
||||
enough {{ $item->pricing->description() }}</a>
|
||||
@endif
|
||||
|
||||
@if ($item->pricing == \App\Models\Enums\MallItemPricingEnum::CASH)
|
||||
<div class="buyInfo">
|
||||
You'll recieve <span id="mileageAmount">{{ $item->price }}</span> DM after buying this item!
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="box suggestions">
|
||||
<h2>You might be interested in:</h2>
|
||||
<ol id="suggestions">
|
||||
@foreach($suggestions as $suggestion)
|
||||
<li @class(['thumbnailBgSmall', 'last' => $loop->last])>
|
||||
<a id="suggestion-{{ $suggestion->id }}" class="suggestion" href="{{ route('mall.item', ['id' => $suggestion->id]) }}" title="{{ $suggestion->proto->locale_name }}">
|
||||
<img src="{{ route('mall.item.image', ['id' => $suggestion->id]) }}" width="63" height="63" alt="{{ $suggestion->proto->locale_name }}"/>
|
||||
</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
56
resources/views/mall/userdata.blade.php
Normal file
56
resources/views/mall/userdata.blade.php
Normal file
@ -0,0 +1,56 @@
|
||||
@extends('layouts.mall')
|
||||
|
||||
@section('content')
|
||||
<div id="mainContent">
|
||||
<div class="userdataHeadline">
|
||||
<h1>User information</h1>
|
||||
</div>
|
||||
<div class="dynContent">
|
||||
<div class="userdataContainer">
|
||||
<div class="userdataLine">
|
||||
<div class="titleIcon">
|
||||
<img alt="Informatii" src="{{ asset('assets/mall/img/storage.png') }}"/>
|
||||
</div>
|
||||
<div class="userdataText">
|
||||
<div class="title">
|
||||
Obiecte depozitate ({{ $storageCount }})
|
||||
<a class="helpSmallTopic tip" href="?p=faq" title="Mergi la pagina de ajutor aici."></a>
|
||||
</div>
|
||||
<div class="lineBottom">
|
||||
<a @class(["userdataButton" => $storageCount == 0, "userdataButtonGreen" => $storageCount > 0]) href="?p=distribution">Distribuie</a>
|
||||
<div class="description">Deschide depozitul contului tau pentru a transfera obiectele pe serverul si caracterul ales.</div>
|
||||
</div>
|
||||
<br class="clearfloat"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="userdataLine">
|
||||
<div class="titleIcon">
|
||||
<img alt="Information" src="{{ asset('assets/mall/img/purchases.png') }}"/>
|
||||
</div>
|
||||
<div class="userdataText">
|
||||
<div class="title">My purchases ({{ $boughtCount }})</div>
|
||||
<div class="lineBottom">
|
||||
<a @class(["userdataButton" => $boughtCount == 0, "userdataButtonGreen" => $boughtCount > 0]) href="?p=purchases">Go</a>
|
||||
<div class="description">View your purchase history in the last month.</div>
|
||||
</div>
|
||||
<br class="clearfloat"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="userdataLine">
|
||||
<div class="titleIcon">
|
||||
<img alt="Informatii" src="{{ asset('assets/mall/img/faq.png') }}"/>
|
||||
</div>
|
||||
<div class="userdataText">
|
||||
<div class="title">FAQ - Frequently Asked Questions</div>
|
||||
<div class="lineBottom">
|
||||
<a class="userdataButton" href="?p=faq">Go</a>
|
||||
<div class="description">Here you can find answers to the most frequently asked questions.</div>
|
||||
</div>
|
||||
<br class="clearfloat"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="endContent"></div>
|
||||
</div>
|
||||
@endsection
|
Reference in New Issue
Block a user