je fais du sale (1/2)

This commit is contained in:
Boris 2022-11-18 01:35:24 +01:00
parent d5980664c3
commit 5f8b116aea
156 changed files with 2664 additions and 1 deletions

@ -1 +0,0 @@
Subproject commit 1621fbcbc0525eb5b3c6ef80525d66c2e388dd68

393
minelife2/app.js Normal file
View File

@ -0,0 +1,393 @@
async function getCrafts() {
const res = await fetch("./data/crafts.json");
const data = await res.json();
return data;
};
async function getCollections() {
const res = await fetch("./data/collections.json");
const data = await res.json();
return data;
};
function updateSelectedCollection (selected = 0) {
var previouslySelectedCollection = document.querySelector('#collections nav ul li.selected');
if (previouslySelectedCollection != null) {
previouslySelectedCollection.classList.remove('selected');
}
var collections = document.querySelectorAll('#collections nav ul li');
console.log(collections);
var newlySelectedCollection = collections[selected];
console.log(newlySelectedCollection);
newlySelectedCollection.classList.add('selected');
}
async function printCollections (crafts, collections) {
var collectionsElt = document.getElementById('collections');
var collectionsNavElt = collectionsElt.querySelector('nav ul');
collectionsNavElt.innerHTML = '';
var cssClass = '';
collections.forEach(function (collection, index) {
if (collection.items != undefined) {
cssClass = '';
collectionsNavElt.innerHTML +=
'<li' + cssClass + '>' +
'<a href="#" ' +
'title="' + collection.name + '" ' +
'>' +
'<img src="data/img/' + collection.img + '" ' +
'alt="' + collection.name + '" ' +
'/>' +
'</a>' +
'</li>';
}
});
displayCollection(crafts, collections);
collectionsElt.querySelectorAll('li').forEach(function (elt, index) {
elt.addEventListener('click', function () {
console.log(index);
displayCollection(crafts, collections, index);
});
});
}
async function displayCollection (crafts, collections, collectionId = 0) {
updateSelectedCollection(collectionId);
itemsListElt = document.querySelector('#collections .items-list');
itemsListElt.innerHTML = '';
collections[collectionId].items.forEach(function (itemId){
itemsListElt.innerHTML +=
'<li>' +
'<a href="#" ' +
'onclick="displayRecipe('+ itemId + ', 0)" ' +
'title="' + crafts[itemId].name + '" ' +
'>' +
'<img src="data/img/' + crafts[itemId].img + '" ' +
'alt="' + crafts[itemId].name + '" ' +
'/>' +
'</a>' +
'</li>';
});
}
async function printItemsList () {
crafts = await getCrafts();
itemsListElt = document.getElementById('items-list');
crafts.forEach(function (item, index) {
if (item.recipes != undefined) {
itemsListElt.innerHTML +=
'<li>' +
'<a href="#" ' +
'onclick="displayRecipe('+ index + ', 0)" ' +
'title="' + item.name + '" ' +
'>' +
'<img src="data/img/' + item.img + '" ' +
'alt="' + item.name + '" ' +
'/>' +
'</a>' +
'</li>';
}
});
}
function padIngredient (nbIngredients, str) {
if (nbIngredients <= 1 ||
nbIngredients == 4 ||
nbIngredients == 9 ||
nbIngredients == 16) {
return '';
} else if (nbIngredients < 4) {
return str.repeat(4 - nbIngredients);
} else if (nbIngredients < 9) {
return str.repeat(9 - nbIngredients);
} else if (nbIngredients < 16) {
return str.repeat(16 - nbIngredients);
} else if (nbIngredients < 25) {
return str.repeat(25 - nbIngredients);
}
}
async function displayRecipe (itemId, recipeId = 0, elementId = 'recipe-main', bc_item = null, bc_recipe = null) {
crafts = await getCrafts();
recipeElt = document.getElementById(elementId);
ingredientsElt = recipeElt.querySelector('.ingredients');
actionElt = recipeElt.querySelector('.action');
resultElt = recipeElt.querySelector('.result');
itemNameElt = recipeElt.querySelector('.item-name');
otherRecipesElt = recipeElt.querySelector('.other-recipes ul');
detailsElt = recipeElt.querySelector('.recipe-details');
detailsContentElt = detailsElt.querySelector('div');
actionElt.innerHTML = '<a href="#">&nbsp;</a>';
resultElt.innerHTML = "&nbsp;";
otherRecipesElt.innerHTML = "";
detailsContentElt.innerHTML = "";
recipeElt.style.visibility = 'visible';
detailsElt.style.visibility = 'hidden';
itemNameElt.innerHTML = '' + crafts[itemId].name + '';
resultElt_content =
'<img src="data/img/' + crafts[itemId].img + '" ' +
'alt="' + crafts[itemId].name + '" ' +
'title="' + crafts[itemId].name + '" ' +
'/>';
if (elementId == 'recipe-aux' && bc_item != null) {
resultElt_content =
'<a href="#" ' +
'onclick="displayRecipe(' + bc_item + ', ' + bc_recipe +', \'recipe-aux\')" ' +
'>' +
resultElt_content +
'</a>';
}
resultElt.innerHTML = resultElt_content;
blackHoleStr = '<li class="ingredient"><img src="data/img/black-hole.png" /></li>';
if (crafts[itemId].recipes == undefined) {
ingredientsElt.innerHTML = blackHoleStr;
} else {
recipes = crafts[itemId].recipes;
ingredients = recipes[recipeId].ingredients;
if (ingredients == undefined) {
ingredientsElt.innerHTML = blackHoleStr;
} else {
ingredientsElt.innerHTML = '';
nbIngredients = ingredients.length;
ingredientsElt.className = 'ingredients ';
if (nbIngredients > 16) {
ingredientsElt.className += "grid-25";
} else if (nbIngredients > 9) {
ingredientsElt.className += "grid-16";
} else if (nbIngredients > 4) {
ingredientsElt.className += "grid-9";
} else if (nbIngredients > 1) {
ingredientsElt.className += "grid-4";
} else {
ingredientsElt.className += "";
}
var i = 1;
console.log(ingredients);
ingredients.forEach (function (ingredient) {
unit = (ingredient.unit != undefined) ? (' ' + ingredient.unit) : '';
qty = (ingredient.qty == undefined) ? '' : '<span class="qty">' + ingredient.qty + '</span>';
title =
(ingredient.qty == undefined) ?
crafts[ingredient.ref].name : (
(ingredient.unit == undefined) ?
ingredient.qty + ' ' + crafts[ingredient.ref].name :
ingredient.qty + ' ' + ingredient.unit + ' de ' + crafts[ingredient.ref].name
);
// displayOn = (elementId == 'recipe-main') ? 'recipe-aux' : 'recipe-main';
displayOn = 'recipe-aux';
if (elementId == 'recipe-aux') {
bc_item = itemId;
bc_recipe = recipeId;
} else {
bc_item = null;
bc_recipe = null;
}
ingredientsElt.innerHTML +=
'<li class="ingredient">' +
qty +
'<a href="#" ' +
'onclick="displayRecipe('+ ingredient.ref + ', 0, \'' + displayOn + '\', '+ bc_item +', '+ bc_recipe + ')"' +
'title="' + title + '"' +
'>' +
'<img src="data/img/' + crafts[ingredient.ref].img + '" ' +
'alt="' + crafts[ingredient.ref].name + '" ' +
'/>' +
'</a>' +
'</li>';
i++;
});
ingredientsElt.innerHTML += padIngredient(nbIngredients, '<li class="ingredient"></li>');
}
action = (recipes[recipeId].action == undefined) ? '' : recipes[recipeId].action;
if (recipes[recipeId].details != undefined) {
actionElt.className += ' has-details';
}
actionElt.innerHTML =
'<a href="#" ' +
'onclick="showDetails(\'' + elementId + '\', \'' + recipeId + '\')" ' +
'>'+
action +
'</a>';
if ((details = crafts[itemId].recipes[recipeId].details) != undefined) {
detailsContentElt.innerHTML = details;
}
nbRecipes = recipes.length;
if (nbRecipes == 1) {
if (recipes[0].name != undefined) {
otherRecipesElt.innerHTML +=
'<li>' +
'<strong>' +
recipes[0].name +
'</strong>' +
'</li>';
}
} else if (nbRecipes > 1) {
for (i = 0; i < nbRecipes; i++) {
otherRecipeName = (recipes[i].name != undefined) ?
recipes[i].name :
"recette n°" + (i + 1);
if (i == recipeId) {
otherRecipesElt.innerHTML +=
'<li>' +
'<strong>' +
otherRecipeName +
'</strong>' +
'</li>';
} else {
otherRecipesElt.innerHTML +=
'<li>' +
'<a href="#" ' +
'onclick="displayRecipe(' + itemId + ', ' + i + ', \''+ elementId + '\')">' +
otherRecipeName +
'</a>'
'</li>';
}
}
}
}
}
showDetails = function (elementId) {
detailsElt = document.querySelector('#' + elementId + ' .recipe-details');
detailsElt.style.visibility = "visible";
}
// printItemsList();
window.addEventListener('load', async function () {
const crafts = await getCrafts();
const collections = await getCollections();
printCollections(crafts, collections);
});

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,93 @@
Copyright 2014 The Comic Neue Project Authors (https://github.com/crozynski/comicneue)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

View File

@ -0,0 +1,93 @@
Copyright (c) 2010, Kimberly Geswein (kimberlygeswein.com)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,93 @@
Copyright (c) 2010-2012 Patrick Wagesreiter (mail@patrickwagesreiter.at)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

View File

@ -0,0 +1,499 @@
:root {
--item-size: 32px;
--marron: hsl(350, 20%, 25%);
--marron-medium: hsl(30, 50%, 50%);
--marron-clair: hsl(30, 70%, 66%);
--marron-transparent: hsla(350, 20%, 25%, 0.80);
--blanc: hsl(0, 100%, 100%);
--noir: hsl(0, 100%, 0%);
--vert-pomme: hsl(100, 70%, 90%);
}
@font-face {
font-family: 'Comic Neue';
src: url("../../fonts/Comic_Neue/ComicNeue-Regular.ttf") format('truetype');
}
@font-face {
font-family: 'Comic Neue';
src: url("../../fonts/Comic_Neue/ComicNeue-Bold.ttf") format('truetype');
font-weight: 700;
}
@font-face {
font-family: 'Patrick Hand';
src: url("../../fonts/Patrick_Hand/PatrickHand-Regular.ttf") format('truetype');
}
@font-face {
font-family: 'MinecraftFifty';
src: url("../../fonts/MinecraftFifty-Solid.otf") format('opentype');
}
body {
font-family: 'Comic Neue', fantasy;
}
h1 {
font-family: 'MinecraftFifty', 'Comic Neue', fantasy;
}
#usp {
font-family: 'Patrick Hand', fantasy;
}
q:after {
content: " »";
}
q:before {
content: "« ";
}
body > footer {
margin-top: 10rem;
display: flex;
justify-content: center;
}
body > footer blockquote {
font-family: cursive;
font-size: 1.5rem;
color: hsl(30, 15%, 90%);
}
body > footer blockquote cite {
display: block;
text-align: right;
margin-top: 0.5rem;
}
body > footer blockquote cite:before {
content: "― ";
}
iframe {
max-width: 100%;
}
.recipe-name:before {
content: "« ";
}
.recipe-name:after {
content: " »";
}
main {
display: flex;
width: 100%;
flex-wrap: wrap;
}
#recipe-main,
#recipe-aux {
visibility: hidden;
}
@media screen and (max-width: 39.999rem) {
main {
flex-direction: column;
}
#recipe-main {
order: 1;
}
#recipe-aux {
order: 2;
}
#collections {
order: 3;
}
}
@media screen and (min-width: 40rem) {
.recipe {
width: 48%;
padding: 0% 2% 0% 0%;
}
#collections {
width: 100%;
padding: 0% 0% 0% 2%;
}
}
@media screen and (min-width: 60rem) {
.recipe {
width: 31.333%;
padding: 0% 2% 0% 0%;
}
#collections {
width: 31.334%;
padding: 0% 0% 0% 2%;
}
}
.recipe > .recipe-signature {
display: flex;
align-items: center;
}
@keyframes blinking {
0% {
text-shadow: 0 0 0px transparent;
}
50% {
text-shadow: 0 0 5px var(--vert-pomme),
0 0 10px var(--vert-pomme),
0 0 15px var(--vert-pomme),
0 0 20px var(--vert-pomme),
0 0 25px var(--vert-pomme);
}
100% {
text-shadow: 0 0 0px transparent;
}
}
.recipe .action {
padding: 0 2rem;
text-align: center;
}
.recipe .action a,
.recipe .action a:visited {
text-decoration: none;
color: var(--noir);
background-color: var(--blanc);
transition: text-shadow 0.666s;
}
.recipe .action.has-details a,
.recipe .action.has-details a:visited {
animation: blinking 3s infinite;
}
.recipe .action:hover a,
.recipe .action:hover a:before {
}
.recipe .action *:before {
content: "⇒";
display: block;
font-size: 2rem;
font-weight: bolder;
}
.recipe .ingredients {
list-style-type: none;
padding: 0;
margin: 0;
display: grid;
grid-gap: 0;
border: 2px solid var(--marron);
}
.recipe .ingredients.grid-4 {
grid-template-columns: 50% 50%;
max-width: calc(2 * (var(--item-size) + 24px + 4px * 2));
}
.recipe .ingredients.grid-9 {
grid-template-columns: 33.333% 33.333% 33.333%;
max-width: calc(3 * (var(--item-size) + 24px + 4px * 2));
}
.recipe .ingredients.grid-16 {
grid-template-columns: 25% 25% 25% 25%;
max-width: calc(4 * (var(--item-size) + 24px + 4px * 2));
}
.recipe .ingredients.grid-25 {
grid-template-columns: 20% 20% 20% 20% 20%;
max-width: calc(5 * (var(--item-size) + 24px + 4px * 2));
}
.result {
border: 4px solid var(--marron);
}
#items-list,
.items-list,
#collections nav ul {
list-style-type: none;
padding: 0;
margin: 0;
display: flex;
flex-wrap: wrap;
}
#collections nav {
display: flex;
}
#collections nav ul {
margin-bottom: 1rem;
border: 0.25rem solid var(--marron);
border-radius: 1rem;
overflow: hidden;
}
#collections nav ul li.selected {
background-color: var(--marron-clair);
}
/*
#collections nav ul li {
border-left: 0.5rem solid var(--marron);
border-right: 0.5rem solid var(--marron);
margin: 0;
padding: 0;
}
#collections nav ul li:first-child {
border-left: 0;
}
#collections nav ul li:last-child {
border-right: 0;
}
*/
.recipe .ingredients .ingredient,
#items-list li,
.items-list li {
border: 2px solid var(--marron);
margin: 0;
padding: 0;
}
#items-list li,
.items-list li,
#collections nav ul li {
height: 48px;
width: 48px;
}
.recipe .ingredients .ingredient a,
#items-list li a,
.items-list li a,
#collections nav ul li a {
z-index: 10;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.recipe .ingredients .ingredient:hover a,
#items-list li:hover a,
.items-list li:hover a,
#collections nav ul li:hover a {
background-color: var(--marron-clair);
}
.recipe .ingredients .ingredient:hover a {
border: 2px solid var(--marron-medium);
}
.recipe .ingredients .ingredient,
.recipe .result,
#items-list li,
#collections nav ul li {
position: relative;
display: flex;
justify-content: center;
align-items: center;
}
.recipe .ingredients .ingredient {
}
.recipe .ingredients .ingredient img {
flex-basis: var(--item-size);
flex-grow: 0;
}
.recipe .ingredients .ingredient .qty {
position: absolute;
right: 0;
bottom: 0;
z-index: 100;
font-weight: bold;
font-size: 1.25rem;
background-color: var(--marron-transparent);
color: var(--blanc);
padding-left: 0.375rem;
padding-right: 0.125rem;
padding-top: 0.25rem;
border-top-left-radius: 0.33em;
}
.recipe .ingredients .ingredient,
.recipe .result {
height: 64px;
width: 64px;
}
.other-recipes ul {
list-style: none;
padding: 0;
padding-top: 0px;
margin: 0;
display: flex;
}
.other-recipes ul {
list-style: none;
padding: 0;
margin: 0;
display: flex;
height: 2.5rem;
padding-top: 1rem;
width: auto;
width: auto;
overflow-y: hidden;
overflow-x: visible;
flex-wrap: nowrap;
}
.other-recipes li {
margin: 0;
margin-right: 0.5rem;
padding: 0;
display: inline;
flex-basis: auto;
flex-shrink: 0;
}
.other-recipes li > * {
width: 2rem;
text-align: center;
height: 2rem;
display: inline;
padding: 0.25rem 0.5em;
border-radius: 1rem;
text-decoration: none;
border-width: 2px;
border-style: solid;
border-color: var(--marron);
background-color: var(--blanc);
color: var(--marron);
}
.other-recipes li *:not(a) {
border-color: var(--marron);
color: var(--blanc);
background-color: var(--marron);
}
.recipe-details {
visibility: hidden;
}

View File

@ -0,0 +1,75 @@
[
{
"name": "habitat",
"img": "carpenter.png",
"items": [
4,
0,
1,
12,
7,
11,
13,
58
]
}
,{
"name": "culture",
"img": "farmer.png",
"items": [
28,
36,
57,
56,
42,
43,
3,
59,
35,
49,
86
]
}
,{
"name": "cuisine",
"img": "chef.png",
"items": [
33,
17,
44,
87
]
}
,{
"name": "vêtement",
"img": "sewing.png",
"items": [
54
]
}
,{
"name": "soin",
"img": "arm-plaster.png",
"items": [
101,
83,
67,
68,
69,
70,
71,
72,
73,
74,
75,
77,
100
]
}
]

1133
minelife2/data/crafts.json Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
minelife2/data/img/ash.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
minelife2/data/img/beef.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
minelife2/data/img/beer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 965 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
minelife2/data/img/chef.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
minelife2/data/img/coal.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 870 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
minelife2/data/img/cow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
minelife2/data/img/egg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
minelife2/data/img/euro.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
minelife2/data/img/hen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
minelife2/data/img/hut.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
data-v-876504b2=""
data-name="Layer 1"
viewBox="0 0 32 32"
class="w-32 h-20 fill-current icon"
version="1.1"
id="svg16"
sodipodi:docname="ipfs.svg"
width="32"
height="32"
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)">
<metadata
id="metadata22">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs20" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1369"
inkscape:window-height="480"
id="namedview18"
showgrid="false"
inkscape:zoom="7.5902095"
inkscape:cx="-0.64976023"
inkscape:cy="19.546449"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg16" />
<path
d="m 1.8034405,22.854421 13.9916695,6.97483 13.99167,-6.97483 V 8.9047512 L 15.79511,1.9299211 1.8034405,8.9047512 Z"
id="path4"
inkscape:connector-curvature="0"
style="fill:#469ea2;stroke-width:0.15477157" />
<path
d="M 14.36263,3.5981311 4.2020167,8.6602712 a 3.0298632,2.6159216 0 0 1 0,0.47458 L 14.34597,14.196991 a 2.4235574,2.0924497 0 0 1 2.88162,0 L 27.371553,9.1348512 a 3.0298632,2.6159216 0 0 1 0,-0.47458 L 17.24425,3.5981311 a 2.4235574,2.0924497 0 0 1 -2.88162,0 z m 13.99167,6.9316899 -10.160614,5.11966 a 2.4535396,2.1183356 0 0 1 -1.43248,2.15718 l 0.01663,10.06676 a 2.5934563,2.2391369 0 0 1 0.466393,0.2301 l 10.143962,-5.06215 a 2.4535396,2.1183356 0 0 1 1.43248,-2.15716 v -10.1243 a 3.3313504,2.8762195 0 0 1 -0.466392,-0.23009 z m -25.1183787,0.0575 a 2.5934563,2.2391369 0 0 1 -0.466389,0.23009 v 10.1243 a 2.3952409,2.0680018 0 0 1 1.4324844,2.15716 l 10.1439533,5.06215 a 2.5934563,2.2391369 0 0 1 0.466393,-0.2301 v -10.12429 a 2.3952409,2.0680018 0 0 1 -1.432481,-2.15717 z"
id="path6"
inkscape:connector-curvature="0"
style="fill:#6acad1;stroke-width:0.15477157" />
<path
d="M 15.79511,3.4399411 28.304329,9.6813312 V 22.149741 l -12.509219,6.2414 -12.5092183,-6.2414 V 9.6669512 L 15.79511,3.4399411 m 0,-1.48126 L 1.8034405,8.9335212 V 22.883181 l 13.9916695,6.97483 13.99167,-6.97483 V 8.9335212 Z"
id="path8"
inkscape:connector-curvature="0"
style="fill:#469ea2;stroke-width:0.15477157" />
<path
d="m 15.895053,18.252471 h -0.199885 a 2.6084474,2.2520799 0 0 1 -2.615104,-2.25783 v -0.17258 a 2.6084474,2.2520799 0 0 1 2.615104,-2.25783 h 0.199885 a 2.6084474,2.2520799 0 0 1 2.615112,2.25783 v 0.17258 a 2.6084474,2.2520799 0 0 1 -2.615112,2.25783 z m 0,9.2758 h -0.199885 a 2.6067817,2.2506417 0 0 0 -2.281974,1.15049 l 2.381916,1.17925 2.381916,-1.17925 a 2.6067817,2.2506417 0 0 0 -2.281973,-1.15049 z M 29.80344,20.553441 H 29.7035 a 2.6084474,2.2520799 0 0 0 -2.615104,2.25783 v 0.17258 a 2.5201666,2.17586 0 0 0 0.33313,1.09296 l 2.381916,-1.19363 z M 27.421524,7.7542612 a 2.5651398,2.214689 0 0 0 -0.33313,1.09297 v 0.17257 a 2.6084474,2.2520799 0 0 0 2.615104,2.2578298 h 0.09994 V 8.9335212 Z M 15.79511,1.9586811 l -2.381916,1.17925 a 2.6201071,2.2621467 0 0 0 2.281974,1.1648701 h 0.199885 A 2.6067817,2.2506417 0 0 0 18.177026,3.1523211 Z M 4.1853567,7.7398912 1.8034405,8.9335212 v 2.3441098 h 0.099941 A 2.6084474,2.2520799 0 0 0 4.518487,9.0198012 v -0.17257 A 2.7700179,2.3915765 0 0 0 4.1853567,7.7398912 Z M 1.9033812,20.553441 h -0.099941 v 2.32974 l 2.3819162,1.19363 a 2.5651398,2.214689 0 0 0 0.33313,-1.09296 v -0.17258 a 2.6084474,2.2520799 0 0 0 -2.6151052,-2.25783 z"
id="path10"
inkscape:connector-curvature="0"
style="fill:#469ea2;stroke-width:0.15477157" />
<path
d="M 15.79511,29.929921 V 15.965881 L 1.8034405,8.9910412 V 22.955091 Z"
id="path12"
inkscape:connector-curvature="0"
style="fill:#083b54;fill-opacity:0.15;stroke-width:0.15477157" />
<path
d="M 29.80344,22.825661 V 8.8759912 L 15.81177,15.850821 v 13.96405 z"
id="path14"
inkscape:connector-curvature="0"
style="fill:#083b54;fill-opacity:0.05;stroke-width:0.15477157" />
</svg>

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Some files were not shown because too many files have changed in this diff Show More