Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

style: New font, supports accents, locally stored #63

Merged
merged 1 commit into from
Apr 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
style: New font, supports accents, locally stored
JordanViknar committed Apr 13, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit bc8875d2427a8bdc9a41dfc2c5e6af2e04074367
9 changes: 9 additions & 0 deletions public/css/application.css
Original file line number Diff line number Diff line change
@@ -8,6 +8,15 @@ body {
font-family: 'Minecraft', sans-serif
}

/* Custom font */

@font-face {
font-family: 'Minecraft';
src: url("../fonts/MinecraftRegular-Bmg3.otf");
font-weight: normal;
font-style: normal;
}

.hidden {
display: none !important;
}
Binary file added public/fonts/MinecraftRegular-Bmg3.otf
Binary file not shown.
6 changes: 4 additions & 2 deletions public/js/catalog.js
Original file line number Diff line number Diff line change
@@ -13,13 +13,14 @@ async function getProducts(category) {
const container = document.getElementById("container")
for (let i = 0; i < jsonResponse.length; i++) {
const product = jsonResponse[i]
const product_name = product.name.charAt(0).toUpperCase() + product.name.slice(1)
const productCard =
`
<div class="product" onclick="showProduct(${product.id})">
<div class="imgbox">
<img src="/product/${product.icon}" alt="icon"/>
</div>
<label class="infproduct">${product.name}</label>
<label class="infproduct">${product_name}</label>
<label class="infproduct">${product.unit_price}€</label>
<label class="infproduct" id="amount_${product.id}">En stock: ${product.amount - (product.in_cart === "???" ? 0 : product.in_cart)}</label>
</div>
@@ -59,7 +60,8 @@ async function showProduct(id) {

details.hidden = false
icon.src = `/product/${product.icon}`
name.innerHTML = product.name
const product_name = product.name.charAt(0).toUpperCase() + product.name.slice(1)
name.innerHTML = product_name
price.innerHTML = `${product.unit_price}€`
available.innerHTML = product.amount
inCart.innerHTML = product.in_cart
4 changes: 2 additions & 2 deletions resources/views/about.blade.php
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<h1>A propos de HurrShop...</h1>
<p>Je n'ai pas ete assez imaginatif pour placer un placeholder drole ici, donc prenez ce message.</p>
<h1>À propos de HurrShop...</h1>
<p>Je n'ai pas été assez imaginatif pour placer un placeholder drôle ici, donc prenez ce message.</p>
3 changes: 2 additions & 1 deletion resources/views/admin_products.blade.php
Original file line number Diff line number Diff line change
@@ -52,11 +52,12 @@ function loadCategoryProducts(category) {
product_table_list_container.innerHTML = "";

products.forEach(product => {
const product_name = product.name.charAt(0).toUpperCase() + product.name.slice(1)
product_table_list_container.innerHTML += `
<tr onclick="showProduct(${product.id})" class="product_row">
<td>${product.id}</td>
<td><img src="/product/${product.icon}" alt="icon" class="product_icon"/></td>
<td>${product.name}</td>
<td>${product_name}</td>
<td>${product.amount}</td>
<td>${product.unit_price}€</td>
</tr>
11 changes: 5 additions & 6 deletions resources/views/application.blade.php
Original file line number Diff line number Diff line change
@@ -7,7 +7,6 @@
<link rel="stylesheet" href="{{ asset('css/application.css') }}">
<script type="text/javascript" src="{{asset("js/app.js")}}"></script>
<script type="text/javascript" src="{{asset("js/util.js")}}"></script>
<link href="https://fonts.cdnfonts.com/css/minecraft-4" rel="stylesheet">

<!-- Style de la zone main -->
@if(file_exists(public_path("css/" . ($page_to_load ?? "error") . ".css")))
@@ -30,12 +29,12 @@
<ul id="product_list">
<h3>Produits</h3>
@foreach(\App\Models\Category::all()->sortBy('name') as $category)
<li><a href="/catalog?category={{$category->id}}"><img src="{{ asset("category/" . $category['icon']) }}" alt="{{$category->name}} category image"/>{{ Illuminate\Support\Str::ascii($category['name']) }}</a></li>
<li><a href="/catalog?category={{$category->id}}"><img src="{{ asset("category/" . $category['icon']) }}" alt="{{$category->name}} category image"/>{{ ucfirst($category['name']) }}</a></li>
@endforeach
</ul>
<hr>
<ul>
<li><a href="/about">A propos</a></li>
<li><a href="/about">À propos</a></li>
<li><a>FAQ</a></li>
<li><a href="/contact">Contact</a></li>
</ul>
@@ -55,7 +54,7 @@
@auth
<a href="/profile">{{ Auth::user()->name }}</a>
-
<a href="/auth/logout">Se deconnecter</a>
<a href="/auth/logout">Se déconnecter</a>
@else
<a href="/login">Se connecter</a>
@endauth
@@ -82,12 +81,12 @@
<a>Plan du site</a>
</div>
<div class="footer_column">
<a href="/about">A propos</a>
<a href="/about">À propos</a>
<a href="/contact">Contact</a>
<a>FAQ</a>
</div>
<div class="footer_column">
<a href="https://minecraft.wiki/w/Villager">Reseaux sociaux</a>
<a href="https://minecraft.wiki/w/Villager">Réseaux sociaux</a>
</div>
<div class="footer_column">
<a class="emerald">Emerald.net</a>
2 changes: 1 addition & 1 deletion resources/views/catalog.blade.php
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
</script>
<div class="box">
<div id="container">
<div id="title">Catalogue: {{$category_name}}</div>
<div id="title">Catalogue : {{ ucfirst($category_name) }}</div>
<hr/>
</div>
<div id="details" hidden>