WIP: started implementing shop, multi-language
This commit is contained in:
63
resources/views/shop/category.blade.php
Normal file
63
resources/views/shop/category.blade.php
Normal file
@ -0,0 +1,63 @@
|
||||
@extends('layouts.shop')
|
||||
|
||||
@section('content')
|
||||
<div id="mainContent">
|
||||
<h1>{{ $category->name }}</h1>
|
||||
<div class="dynContent" style="position:relative">
|
||||
@foreach ($category->items as $item)
|
||||
<div class="item">
|
||||
<div class="itemDesc">
|
||||
<div @class(["thumbnailBgSmall", "discount thumbnailBgSmall-discount-ie6" => $item->old_price > 0])>
|
||||
<a href="{{ route('shop.item', ['id' => $item->id]) }}" title="More information" class="openinformation">
|
||||
<img src="{{ asset("assets/shop/img/item/{$item->image}.png") }}" onerror="this.src='{{ asset('assets/shop/img/error.png') }}';" width="63px" height="63px" alt="More information"/>
|
||||
</a>
|
||||
|
||||
@if ($item->old_price)
|
||||
<div class="discountPercentCategory">
|
||||
<a href="{{ route('shop.item', ['id' => $item->id]) }}" title="More information" class="openinformation"></a>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<a href="{{ route('shop.item', ['id' => $item->id]) }}" title="More information" class="openinformation">
|
||||
<span class="itemTitle">{ data.name|raw }</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('shop.item', ['id' => $item->id]) }}"
|
||||
title="More information"
|
||||
@class(["purchaseInfo", "openinformation", "discount purchaseInfo-discount-ie6" => $item->old_price])
|
||||
>
|
||||
Details
|
||||
</a>
|
||||
<br class="clearfloat" />
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="endContent"></div>
|
||||
</div>
|
||||
@endsection
|
56
resources/views/shop/home.blade.php
Normal file
56
resources/views/shop/home.blade.php
Normal file
@ -0,0 +1,56 @@
|
||||
@extends('layouts.shop')
|
||||
|
||||
@section('content')
|
||||
<div id="wideMainContent">
|
||||
<div class="landing wheelLanding">
|
||||
<h1>Item suggestions:</h1>
|
||||
|
||||
{% for id, data in items %}
|
||||
<div @class([
|
||||
'promotedItem',
|
||||
'withDescription' => isset($item->description),
|
||||
])>
|
||||
<h4>{ data.name|raw }</h4>
|
||||
<div class="promotedItemImg">
|
||||
<a href="?action=detail&id={ id }" class="openinformation" title="More information">
|
||||
<img src="img/item/{ data.image }.png" onerror="this.src='{{ asset('assets/shop/img/error.png') }}';" alt="" />
|
||||
</a>
|
||||
</div>
|
||||
{% if data.oldPrice != 0 %}
|
||||
<div class="discountPercentPromoted">
|
||||
<a href="?action=detail&id={ id }" class="openinformation" title="More information"></a>
|
||||
</div>
|
||||
<div class="discountPercentCirclePromoted"></div>
|
||||
<p class="discountOldPricePromoted">{ data.oldPrice } { data.pricing }</p>
|
||||
{% endif %}
|
||||
<div class="promotedItemBtns{% if data.oldPrice != 0 %} promotedItemBtns-discount{% endif %}">
|
||||
{% if data.oldPrice != 0 %}
|
||||
<p class="pdiscount">
|
||||
{ data.count } pcs: <span class="price discount price-discount-ie6">{ data.price } { data.pricing }</span>
|
||||
</p>
|
||||
<div class="divdiscount">
|
||||
<a href="?action=detail&id={ id }" title="More information" class="detail-discount openinformation">Details</a>
|
||||
</div>
|
||||
{% else %}
|
||||
<p>{ data.count } pcs. only: <span class="price">{ data.price } { data.pricing }</span></p>
|
||||
<a href="?action=detail&id={ id }" title="More information" class="detail openinformation">Details</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if data.description is defined %}<p class="promotedItemDescr">{ data.description }</p>{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<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('shop/wheel') }}" class="goToWheel">To the Wheel</a>
|
||||
</div>
|
||||
|
||||
<a class="buyDR" href="{{ url('shop/faq', ['section' => 'donate']) }}">You don't have Dragon Coins?</a>
|
||||
</div>
|
||||
<div class="endContent"></div>
|
||||
</div>
|
||||
@endsection
|
85
resources/views/shop/item/show.blade.php
Normal file
85
resources/views/shop/item/show.blade.php
Normal file
@ -0,0 +1,85 @@
|
||||
<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">{ data.name|raw }}</h1>
|
||||
|
||||
<div class="dynContent detail">
|
||||
<div class="box boxLeft visual">
|
||||
<img src="{{ asset("assets/shop/img/item/{$item->image}.png") }}" onerror="this.src='{{ asset('assets/shop/img/error.png') }}';" alt="{ data.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>{ data.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('shop.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\ShopItemPricingEnum::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">
|
||||
{% for id, info in suggestions %}
|
||||
<li class="thumbnailBgSmall{% if loop.last %} last{% endif %}">
|
||||
<a id="suggestion{ id }}" class="suggestion" href="?action=detail&id={ id }}" title="{ info.name }}">
|
||||
<img src="img/item/{ info.image }}.png" width="63" height="63" onerror="this.src='{{ asset('assets/shop/img/error.png') }}';" alt="{ info.name }}"/>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
56
resources/views/shop/userdata.blade.php
Normal file
56
resources/views/shop/userdata.blade.php
Normal file
@ -0,0 +1,56 @@
|
||||
@extends('layouts.shop')
|
||||
|
||||
@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/shop/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/shop/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/shop/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