diff --git a/assets/tour.js b/assets/tour.js index f005074..da4951a 100644 --- a/assets/tour.js +++ b/assets/tour.js @@ -12,7 +12,8 @@ var STEPS = [ { p: "index.html", t: "Welcome to KCD Tools", x: "A quick tour of the whole site, about two minutes. It visits each page in turn. You can leave at any time with Esc or Skip, and start it again from the Tour button at the top right." }, - { p: "index.html", s: ".tiles", t: "Three tools", x: "Crafting works out what things cost to make and what to sell them for. Farming ranks crops by how much they earn. Loadouts builds full sets of armour and a weapon and prices them. Each shows a short summary of your current numbers once you have used it." }, + { p: "index.html", s: "#hf", t: "Find any piece", x: "Type part of a name, such as cuirass or ale, and pick a result to open it in Crafting with its cost and profit." }, + { p: "index.html", s: ".tools", t: "Three tools", x: "Crafting works out what things cost to make and what to sell them for. Farming ranks crops by how much they earn. Loadouts builds full sets of armour and a weapon and prices them. Each shows a short summary of your current numbers once you have used it." }, { p: "index.html", s: "#menu > summary", t: "Settings and backup", x: "Switch between light and dark here, and make a backup file of everything you have entered. You can restore it later or on another device. Everything is kept in this browser only, nothing is sent anywhere." }, { p: "crafting.html", s: "#fsum", t: "Crafting: choose what to show", x: "Tap this bar to pick a craft, a type and a level, then tap Show pieces." }, diff --git a/changelog.json b/changelog.json index 097b9fb..4045e8a 100644 --- a/changelog.json +++ b/changelog.json @@ -1,5 +1,14 @@ { "entries": [ + { + "date": "2026-11-17", + "title": "New home page", + "changes": [ + "The home page now starts with a search box: type part of a name to find any of the 1,211 pieces and open it in Crafting.", + "Quick links jump straight to Swords, Helmets, Potions, Footwear or your favourites.", + "A market strip shows this week’s suggested prices for common materials." + ] + }, { "date": "2026-11-16", "title": "Suggested prices refreshed", diff --git a/crafting.html b/crafting.html index aae9762..1626c79 100644 --- a/crafting.html +++ b/crafting.html @@ -297,6 +297,11 @@

Materials to buy

Mate $("cl").onclick=e=>{const b=e.target.closest("button[data-cd]");if(!b)return;const i=custom.findIndex(c=>c.k==b.dataset.cd);if(i<0)return;const c=custom[i];if(!confirm("Remove your recipe “"+c.n+"”?"))return; custom.splice(i,1);delete ORD[kk(c)];saveO();FAV.delete(kk(c));saveF();if(!all().some(x=>x.c==S.tab)&&S.tab!="★"){S.tab="Smithing";S.cat=""}save();$("msg").textContent="Removed “"+c.n+"”.";clist();render()}; clist(); +// Links from the home page: crafting.html?q=cuirass or crafting.html?tab=Smithing&cat=Swords +{const U=new URLSearchParams(location.search),t=U.get("tab"),q=(U.get("q")||"").trim(); + if(t){S.tab=t;S.cat=U.get("cat")||"";S.q="";$("q").value=""} + if(q.length>=2){S.q=q.slice(0,80);$("q").value=S.q} + if(t||q){S.lv=0;S.lim=LIM;$("lvs").querySelectorAll(".chip").forEach(x=>x.classList.toggle("on",x.dataset.l=="0"));history.replaceState(null,"",location.pathname)}} if(!all().some(i=>i.c==S.tab)&&S.tab!="★")S.tab="Smithing"; if(S.cat&&!catList(S.tab).includes(S.cat))S.cat=""; render(); diff --git a/docs/screenshots/home.png b/docs/screenshots/home.png index 830ae6c..50ff0cd 100644 Binary files a/docs/screenshots/home.png and b/docs/screenshots/home.png differ diff --git a/index.html b/index.html index 0117a71..3796a79 100644 --- a/index.html +++ b/index.html @@ -7,18 +7,45 @@ KCD Tools – Crafting, Farming and Loadouts - +

KCD Tools

-

Calculators for Kingdom Come: Deliverance II roleplay. Enter your own prices, pick a craft or crop, and see what is worth your time.

- +
+
+

What do you want to make?

+

Search every piece across every craft. See the cost, the profit and what to buy.

+ +

+ +

Try:SwordsHelmetsPotionsFootwearMy favourites

+
+ +

What’s new

Loading the latest changes…

Good to know

  • Everything you enter stays in your own browser, so nothing is shared between devices. Use Settings → Back up my data to move it.
  • Material prices are filled in with auction house averages until you type your own.
  • The site keeps working offline once it has loaded, and updates itself when a new version is published.
@@ -29,4 +56,30 @@ var F=g("kcd-farm");if(F&&F.lv)set("sf","Last view: level "+F.lv+(F.ww?", weeded & watered":"")+", "+(F.st||1)+" strip"+((F.st||1)>1?"s":"")); fetch("changelog.json").then(function(r){return r.json()}).then(function(d){var b=document.getElementById("wnb"),es=(d.entries||[]).slice(0,3);if(!es.length)throw 0;b.textContent="";es.forEach(function(e){var h=document.createElement("h3"),sm=document.createElement("small"),p=document.createElement("p"),t=new Date(e.date+"T12:00:00");h.textContent=e.title+" ";sm.textContent=isNaN(t)?e.date:t.toLocaleDateString("en-GB",{day:"numeric",month:"short"});h.appendChild(sm);p.textContent=(e.changes||[])[0]||"";b.appendChild(h);b.appendChild(p)});}).catch(function(){var l=document.getElementById("wnl");if(l)l.textContent="Use the What’s new button at the top to see recent changes."}); var L=g("kcd-lo");if(L&&L.length)set("sl",L.length+" loadout"+(L.length>1?"s":"")+" saved");})(); + + diff --git a/sw.js b/sw.js index bff79f6..66e117c 100644 --- a/sw.js +++ b/sw.js @@ -4,7 +4,7 @@ // changed it saves the new copies and tells the open page, which reloads itself (or offers a // Refresh button if you are in the middle of typing). Nothing here touches localStorage, so saved // prices, loadouts, favourites, orders and settings are never cleared by an update. -const CACHE = "kcd-tools-v6"; +const CACHE = "kcd-tools-v7"; const FILES = ["./", "index.html", "crafting.html", "farming.html", "loadouts.html", "404.html", "assets/site.css", "assets/site.js", "assets/recipes.js", "assets/market.js", "assets/categories.js", "assets/tour.js", "assets/changelog.js", "changelog.json"]; const fresh = f => new Request(f, { cache: "no-cache" }); // always ask the server, never the browser's own cache