mirror of
https://github.com/kihashi/stardew_community_checklist.git
synced 2025-10-19 08:03:17 +00:00
2.0 Update
This commit is contained in:
parent
a910441645
commit
88021d3cb5
21
LICENSE
21
LICENSE
@ -1,21 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 John Cleaver
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
71
README.md
71
README.md
@ -1,71 +0,0 @@
|
||||
# Stardew Community Checklist
|
||||
|
||||
A checklist for the Community Center Bundles in Stardew Valley
|
||||
|
||||
SCC is an application for keeping track of the community center bundles in Stardew Valley. When I started playing the
|
||||
game, I spent a decent amount of time searching the wiki trying to figure out what items I needed for the community
|
||||
center and keeping track of which ones I had already turned in. I started working on this as a way to help myself out
|
||||
playing the game. Of course, I finished the community center bundles before I finished the site, but I figured that
|
||||
maybe someone else would get some use out of it.
|
||||
|
||||
A live version of the site is available at the following link:
|
||||
|
||||
---
|
||||
# http://www.stardewcommunitychecklist.com/
|
||||
---
|
||||
|
||||
Note: The layout makes pretty big use of [Flexbox](https://www.w3.org/TR/css-flexbox-1/), which is not quite finalized.
|
||||
I've tested the site in Chrome, Firefox, and Safari. IE seems to have
|
||||
[some problems with text layout](http://i.imgur.com/smeMuAi.png), though.
|
||||
|
||||
# Features
|
||||
|
||||
* View items by bundle, alphabetically, by season, or by the skill involved in getting the item.
|
||||
* View Bundle and Room completion rates.
|
||||
* Filter out completed items and bundles.
|
||||
* Spoiler Free Mode -- Hide the text, season, and skill information for items as well as bundle rewards.
|
||||
* Item Search -- Want to see if an item is in a bundle? Search for it in the Alphabetical list!
|
||||
* Save your progress -- Whenever you make a change to the checklist, it is saved to your browser's local storage.
|
||||
* Import and Export -- Want to take your data to another computer? Export the data string and import it at another
|
||||
computer.
|
||||
|
||||
## Item Information
|
||||
|
||||
An item block looks like this:
|
||||
|
||||

|
||||
|
||||
In it, you can see the item name, where it can be obtained, which bundles it is in (and whether you have it checked off
|
||||
for those bundles), which seasons it can be obtained in, and which skills can be used in getting it. Want to check it
|
||||
off? Simply click the button for the appropriate bundle.
|
||||
|
||||
# Things to come
|
||||
|
||||
I have some planned features listed below, but I am open to feature requests.
|
||||
If you think of something, please, list it below or
|
||||
[open an issue](https://github.com/kihashi/stardew_community_checklist/issues/new).
|
||||
|
||||
* Season Completion Rate
|
||||
* Skill Completion Rate
|
||||
* Season Exclusive Toggle -- In the Season tab, shows items that can only be obtained in the selected season.
|
||||
* (Maybe) Import data from Stardew Valley Save Files
|
||||
|
||||
# Development
|
||||
|
||||
SCC is a single page application, so all it needs is a web server. You can use any web server that you like, but I
|
||||
prefer to use the built-in python web server, which is available on any platform with Python installed.
|
||||
|
||||
```
|
||||
# Python 3.5
|
||||
python -m http.server
|
||||
```
|
||||
|
||||
Libraries and Frameworks used:
|
||||
|
||||
* [vuejs](http://vuejs.org/)
|
||||
* [Bulma](http://bulma.io/)
|
||||
|
||||
Feature requests and pull requests are certainly welcome. I still need to clean up a lot of things in the repository
|
||||
(For example, I changed naming styles part way through and the item "cards" need to be made into a vue component so they
|
||||
aren't repeated), but the code should *mostly* be easy to figure out. I suspect there are optimizations to be done in
|
||||
the searching and filtering logic as well.
|
||||
1276
bundles.json
1276
bundles.json
File diff suppressed because it is too large
Load Diff
@ -1,57 +0,0 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"id": "Version 1.4",
|
||||
"date": "2016-04-16",
|
||||
"link": "Version-1.4",
|
||||
"changes": [
|
||||
"Fixed a bug where items skills were always being hidden",
|
||||
"Updated Season and Skill tabs to sort alphabetically",
|
||||
"Updated to Bulma 0.0.20",
|
||||
"Added a text decoration to completed bundles",
|
||||
"Fixed a bug with side-panel styling",
|
||||
"Reduced the margin size of the room names so they all fit properly in their container.",
|
||||
"Updated the bundles nav to be included in 'Hide Completed'",
|
||||
"Hide Completed and Hide Spoilers settings are now saved.",
|
||||
"Added a more thorough readme."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "Version 1.3",
|
||||
"date": "2016-04-15",
|
||||
"link": "Version-1.3",
|
||||
"changes": [
|
||||
"Bundles rewards are now hidden with other spoilers.",
|
||||
"Added a settings page to allow the user to define what information constitutes spoilers.",
|
||||
"Small Layout Changes"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "Version 1.2",
|
||||
"date": "2016-04-14",
|
||||
"link": "Version-1.2",
|
||||
"changes": [
|
||||
"Added an 'All Season' nav item in the Seasons tab. This shows items that are available in all seasons. Other season tabs now show items that are available in that season and at most 2 others. (#39)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "Version 1.1",
|
||||
"date": "2016-04-14",
|
||||
"link": "Version-1.1",
|
||||
"changes": [
|
||||
"Added bundle completion numbers (#40)",
|
||||
"'Hide Completed' toggle now hides items in completed bundles, even if the item is not checked. (#44)",
|
||||
"Buttons for items in bundles that have been completed, but are not checked are now transparent. (#46)",
|
||||
"Updated scripts to load via HTTPS so that users loading Github via HTTPS can use the page (#47)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "Version 1.0",
|
||||
"date": "2016-04-13",
|
||||
"link": "Version-1.0",
|
||||
"changes": [
|
||||
"Initial Version"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
favicon.ico
BIN
favicon.ico
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
BIN
favicon.png
BIN
favicon.png
Binary file not shown.
|
Before Width: | Height: | Size: 46 KiB |
634
index.html
634
index.html
@ -1,633 +1 @@
|
||||
<!doctype HTML>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Stardew Valley Community Checklist</title>
|
||||
<link type="text/css" rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.0.20/css/bulma.min.css"/>
|
||||
<link type="text/css" rel="stylesheet"
|
||||
href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"/>
|
||||
<link type="text/css" rel="stylesheet" href="main.css"/>
|
||||
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
|
||||
<link rel="icon" href="/favicon.ico" type="image/x-icon">
|
||||
</head>
|
||||
|
||||
<body id="app">
|
||||
<section class="hero is-info is-left is-bold">
|
||||
<div class="hero-header">
|
||||
<div class="header">
|
||||
<div class="container">
|
||||
<div class="header-left">
|
||||
<div class="header-item">
|
||||
<a href="./"><h1 class="title">Stardew Community Checklist</h1></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<span class="header-item">
|
||||
<a href="#" id="save-button" class="button is-info is-outlined is-inverted"
|
||||
v-on:click.stop="enterSaveMode">
|
||||
<span class="icon">
|
||||
<i class="fa fa-download"></i>
|
||||
</span>
|
||||
<span>Export Data</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class="header-item">
|
||||
<a href="#" id="load-button" class="button is-info is-outlined is-inverted"
|
||||
v-on:click.stop="enterLoadMode">
|
||||
<span class="icon">
|
||||
<i class="fa fa-upload"></i>
|
||||
</span>
|
||||
<span>Import Data</span>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<nav class="header has-shadow">
|
||||
<div class="container">
|
||||
<div class="header-left">
|
||||
<a id="bundles-nav" class="header-tab" href="#" v-on:click.stop="change_page('bundles')"
|
||||
v-bind:class="['bundles' == active_page ? 'is-active' : '']">
|
||||
Bundles
|
||||
</a>
|
||||
<a id="ab-nav" class="header-tab" href="#" v-on:click.stop="change_page('ab-list')"
|
||||
v-bind:class="['ab-list' == active_page ? 'is-active' : '']">
|
||||
Alphabetical
|
||||
</a>
|
||||
<a id="seasons-nav" class="header-tab" href="#" v-on:click.stop="change_page('seasons')"
|
||||
v-bind:class="['seasons' == active_page ? 'is-active' : '']">
|
||||
Seasons
|
||||
</a>
|
||||
<a id="skills-nav" class="header-tab" href="#" v-on:click.stop="change_page('skills')"
|
||||
v-bind:class="['skills' == active_page ? 'is-active' : '']">
|
||||
Skills
|
||||
</a>
|
||||
<a id="change-nav" class="header-tab" href="#" v-on:click.stop="change_page('changelog')"
|
||||
v-bind:class="['changelog' == active_page ? 'is-active' : '']">
|
||||
Change Log
|
||||
</a>
|
||||
</div>
|
||||
<div class="header-right header-menu">
|
||||
<span class="header-item">
|
||||
<a class="button" v-on:click="toggleHideCompleted">
|
||||
<span class="icon">
|
||||
<i class="fa" v-bind:class="[hideCompleted ? 'fa-check-square-o' : 'fa-square-o']"></i>
|
||||
</span>
|
||||
<span>
|
||||
Hide Completed
|
||||
</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class="header-item">
|
||||
<p class="control has-addons">
|
||||
<a class="button" v-on:click="toggleHideSpoilers">
|
||||
<span class="icon">
|
||||
<i class="fa" v-bind:class="[hideSpoilers ? 'fa-check-square-o' : 'fa-square-o']"></i>
|
||||
</span>
|
||||
<span>
|
||||
Hide Spoilers
|
||||
</span>
|
||||
</a>
|
||||
<a class="button is-info is-marginless" v-on:click="enterSpoilerSettings">
|
||||
<span class="icon">
|
||||
<i class="fa fa-cogs"></i>
|
||||
</span>
|
||||
</a>
|
||||
</p>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Save Modal -->
|
||||
<div id="save-model" class="modal" v-bind:class="[save_mode ? 'is-active' : '']">
|
||||
<div class="modal-background" v-on:click="exitSaveMode"></div>
|
||||
<div class="modal-container">
|
||||
<div class="modal-content">
|
||||
<div class="box">
|
||||
<div class="notification is-success">
|
||||
Your data has been saved locally. This data string is provided in case you want to make a backup or
|
||||
take your data to another computer.
|
||||
</div>
|
||||
<p class="control has-addons">
|
||||
<input id="user-data-serialized" disabled class="input" type="text" placeholder="Save Data"
|
||||
value="{{ user_data_serialized }}">
|
||||
<a class="button is-info copy" data-clipboard-target="#user-data-serialized">
|
||||
<span class="icon">
|
||||
<i class="fa fa-clipboard"></i>
|
||||
</span>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="modal-close" v-on:click="exitSaveMode"></button>
|
||||
</div>
|
||||
|
||||
<!-- Load Modal -->
|
||||
<div id="load-model" class="modal" v-bind:class="[load_mode ? 'is-active' : '']">
|
||||
<div class="modal-background" v-on:click="exitLoadMode"></div>
|
||||
<div class="modal-container">
|
||||
<div class="modal-content">
|
||||
<div class="box">
|
||||
<div class="notification is-warning">
|
||||
If you previously saved your data on this computer, it should already be loaded. This utility is
|
||||
only for loading a data string from a backup or another computer.
|
||||
</div>
|
||||
<p class="control has-addons">
|
||||
<input class="input" type="text" placeholder="Load Data" v-model="enteredData">
|
||||
<a class="button is-info" v-on:click="loadData(enteredData)">
|
||||
Load Data
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="modal-close" v-on:click="exitLoadMode"></button>
|
||||
</div>
|
||||
|
||||
<!-- Spoilers Settings Modal -->
|
||||
<div id="spoilers-modal" class="modal" v-bind:class="[pick_spoilers ? 'is-active' : '']">
|
||||
<div class="modal-background" v-on:click="exitSpoilerSettings"></div>
|
||||
<div class="modal-container">
|
||||
<div class="modal-content">
|
||||
<div class="box">
|
||||
<div class="content">
|
||||
<p class="notification is-info">
|
||||
These settings control which elements are hidden when Hide Spoilers is enabled.
|
||||
</p>
|
||||
<p class="control">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" v-model="temp_spoilers.bundle_rewards">
|
||||
Bundle Rewards
|
||||
</label>
|
||||
</p>
|
||||
<p class="control">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" v-model="temp_spoilers.item_source">
|
||||
Item Source Information
|
||||
</label>
|
||||
</p>
|
||||
<p class="control">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" v-model="temp_spoilers.item_seasons">
|
||||
Item Seasons
|
||||
</label>
|
||||
</p>
|
||||
<p class="control">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" v-model="temp_spoilers.item_skills">
|
||||
Item Skills
|
||||
</label>
|
||||
</p>
|
||||
<a class="button is-info is-pulled-right" v-on:click="saveSpoilerSettings">
|
||||
<span class="icon">
|
||||
<i class="fa fa-save"></i>
|
||||
</span>
|
||||
<span>
|
||||
Save
|
||||
</span>
|
||||
</a>
|
||||
<div class="is-clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="modal-close" v-on:click="exitSpoilerSettings"></button>
|
||||
</div>
|
||||
|
||||
<!-- BUNDLE TAB -->
|
||||
<section id="bundle-section" class="section" v-if="active_page == 'bundles'">
|
||||
<div class="container is-fluid">
|
||||
<div class="columns">
|
||||
<div class="column is-2">
|
||||
<nav class="panel">
|
||||
<p class="panel-heading">
|
||||
Bundles
|
||||
</p>
|
||||
<p class="panel-tabs">
|
||||
<a href="#" v-for="room in static.rooms" id="panel-room-{{ room.id }}"
|
||||
class="has-text-centered"
|
||||
v-bind:class="[room.id == active_room ? 'is-active' : '']"
|
||||
v-on:click.stop="change_room(room.id)">
|
||||
{{ room.name }}
|
||||
</a>
|
||||
</p>
|
||||
<template v-for="bundle in static.bundles | filterBy active_room in 'room'">
|
||||
<a class="panel-block" href="#"
|
||||
id="panel-bundle-{{ bundle.id }}" v-bind:class="[bundle.id == active_bundle ? 'is-active' : '']"
|
||||
v-on:click.stop="change_bundle(bundle.id)" v-if="!(hideCompleted && isBundleComplete(bundle.id))">
|
||||
|
||||
<span class="panel-icon">
|
||||
<i class="fa fa-archive"></i>
|
||||
</span>
|
||||
<span v-bind:class="[isBundleComplete(bundle.id) ? 'bundle-complete' : '']">{{ bundle.name }}</span>
|
||||
</a>
|
||||
</template>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<h3 class="title">
|
||||
{{ static.bundles[active_bundle].name }}
|
||||
<span class="is-pulled-right">
|
||||
{{ user_data[active_bundle].length }} / {{ static.bundles[active_bundle].items_required }}
|
||||
</span>
|
||||
</h3>
|
||||
<h5 class="subtitle" v-if="!(hideSpoilers && spoilers.bundle_rewards)">{{ static.bundles[active_bundle].reward }}</h5>
|
||||
<h5 class="subtitle" v-else> </h5>
|
||||
<progress class="progress is-info"
|
||||
value="{{ user_data[active_bundle].length }}"
|
||||
max="{{ static.bundles[active_bundle].items_required }}"></progress>
|
||||
</div>
|
||||
<div class="column">
|
||||
<h3 class="title">
|
||||
{{ static.rooms[static.bundles[active_bundle].room].name }}
|
||||
<span class="is-pulled-right">
|
||||
{{ getRoomItemsChecked(static.bundles[active_bundle].room) }} / {{ getRoomItemsRequired(static.bundles[active_bundle].room) }}
|
||||
</span>
|
||||
</h3>
|
||||
<h5 class="subtitle">{{ static.rooms[static.bundles[active_bundle].room].reward }}</h5>
|
||||
<progress class="progress is-info"
|
||||
value="{{ getRoomItemsChecked(static.bundles[active_bundle].room) }}"
|
||||
max="{{ getRoomItemsRequired(static.bundles[active_bundle].room) }}"
|
||||
>
|
||||
|
||||
</progress>
|
||||
</div>
|
||||
</div>
|
||||
<div class="columns is-multiline">
|
||||
<template v-for="item in static.items | inBundle active_bundle">
|
||||
<div class="column is-3 is-flex" v-if="!(hideCompleted && isCompleted(item))">
|
||||
<div class="card is-fullwidth is-flex eq-line">
|
||||
<header class="card-header">
|
||||
<p class="card-header-title">
|
||||
{{ item.name }}
|
||||
</p>
|
||||
</header>
|
||||
<div class="card-content eq-line is-flex">
|
||||
<div class="content is-flex">
|
||||
<div class="columns source">
|
||||
<div class="column">
|
||||
<div v-if="!(hideSpoilers && spoilers.item_source)">{{ item.source }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<p class="control">
|
||||
<a class="button is-fullwidth" v-for="bundle_id in item.bundles"
|
||||
v-on:click="toggleItemInBundle(bundle_id, item.id, $index)"
|
||||
v-bind:class="[isItemInBundle(bundle_id, item.id, $index) ? 'is-success' : '',
|
||||
!isItemInBundle(bundle_id, item.id, $index) && !isBundleComplete(bundle_id) ? 'is-danger' : '' ]">
|
||||
<span class="icon">
|
||||
<i class="fa"
|
||||
v-bind:class="[isItemInBundle(bundle_id, item.id, $index) ? 'fa-check-square-o' : 'fa-square-o']"></i>
|
||||
</span>
|
||||
<span>{{ static.bundles[bundle_id].name }}</span>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="card-footer" v-if="!(hideSpoilers && spoilers.item_seasons)">
|
||||
<div class="card-footer-item">
|
||||
<span class="icon is-small"><i class="fa fa-calendar-check-o"></i></span>
|
||||
<span class="tag is-primary is-text-centered"
|
||||
v-for="season in static.seasons | filterByArray item.seasons">
|
||||
{{ season.name }}
|
||||
</span>
|
||||
</div>
|
||||
</footer>
|
||||
<footer class="card-footer" v-if="!(hideSpoilers && spoilers.item_skills)">
|
||||
<div class="card-footer-item">
|
||||
<span class="icon is-small"><i class="fa fa-tree"></i></span>
|
||||
<span class="tag is-info is-text-centered"
|
||||
v-for="skill in static.skills | filterByArray item.skills">
|
||||
{{ skill.name }}
|
||||
</span>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- AB TAB -->
|
||||
<section id="ab-section" class="section" v-if="active_page == 'ab-list'">
|
||||
<div class="container is-fluid">
|
||||
<div class="columns">
|
||||
<div class="column is-4">
|
||||
<div class="control is-horizontal">
|
||||
<div class="control-label">
|
||||
<label class="label">Search: </label>
|
||||
</div>
|
||||
<div class="control">
|
||||
<input class="input" type="text" placeholder="Search" v-model="search_term">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="columns is-multiline">
|
||||
<template v-for="item in static.items | filterBy search_term in 'name' | orderBy 'name'">
|
||||
<div class="column is-3 is-flex" v-if="!(hideCompleted && isCompleted(item))">
|
||||
<div class="card is-fullwidth is-flex eq-line">
|
||||
<header class="card-header">
|
||||
<p class="card-header-title">
|
||||
{{ item.name }}
|
||||
</p>
|
||||
</header>
|
||||
<div class="card-content eq-line is-flex">
|
||||
<div class="content is-flex">
|
||||
<div class="columns source">
|
||||
<div class="column">
|
||||
<div v-if="!(hideSpoilers && spoilers.item_source)">{{ item.source }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<p class="control">
|
||||
<a class="button is-fullwidth" v-for="bundle_id in item.bundles"
|
||||
v-on:click="toggleItemInBundle(bundle_id, item.id, $index)"
|
||||
v-bind:class="[isItemInBundle(bundle_id, item.id, $index) ? 'is-success' : '',
|
||||
!isItemInBundle(bundle_id, item.id, $index) && !isBundleComplete(bundle_id) ? 'is-danger' : '' ]">
|
||||
<span class="icon">
|
||||
<i class="fa"
|
||||
v-bind:class="[isItemInBundle(bundle_id, item.id, $index) ? 'fa-check-square-o' : 'fa-square-o']"></i>
|
||||
</span>
|
||||
<span>{{ static.bundles[bundle_id].name }}</span>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="card-footer" v-if="!(hideSpoilers && spoilers.item_seasons)">
|
||||
<div class="card-footer-item">
|
||||
<span class="icon is-small"><i class="fa fa-calendar-check-o"></i></span>
|
||||
<span class="tag is-primary is-text-centered"
|
||||
v-for="season in static.seasons | filterByArray item.seasons">
|
||||
{{ season.name }}
|
||||
</span>
|
||||
</div>
|
||||
</footer>
|
||||
<footer class="card-footer" v-if="!(hideSpoilers && spoilers.item_skills)">
|
||||
<div class="card-footer-item">
|
||||
<span class="icon is-small"><i class="fa fa-tree"></i></span>
|
||||
<span class="tag is-info is-text-centered"
|
||||
v-for="skill in static.skills | filterByArray item.skills">
|
||||
{{ skill.name }}
|
||||
</span>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Seasons Tab -->
|
||||
<section id="seasons-tab" class="section" v-if="active_page == 'seasons'">
|
||||
<div class="container is-fluid">
|
||||
<div class="columns">
|
||||
<div class="column is-2">
|
||||
<nav class="panel">
|
||||
<p class="panel-heading">
|
||||
Seasons
|
||||
</p>
|
||||
<a class="panel-block" href="#" v-for="season in static.seasons" id="panel-season-{{ season.id }}"
|
||||
v-bind:class="[season.id == active_season ? 'is-active' : '']"
|
||||
v-on:click.stop="change_season(season.id)">
|
||||
<span class="panel-icon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</span> {{ season.name }}
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="column">
|
||||
<h3 class="title">{{ getSeasonName(active_season) }}</h3>
|
||||
<progress class="progress is-info" value="" max=""></progress>
|
||||
<div class="columns is-multiline">
|
||||
<template v-for="item in static.items | seasonFilter active_season | orderBy 'name'">
|
||||
<div class="column is-3 is-flex" v-if="!(hideCompleted && isCompleted(item))">
|
||||
<div class="card is-fullwidth is-flex eq-line">
|
||||
<header class="card-header">
|
||||
<p class="card-header-title">
|
||||
{{ item.name }}
|
||||
</p>
|
||||
</header>
|
||||
<div class="card-content eq-line is-flex">
|
||||
<div class="content is-flex">
|
||||
<div class="columns source">
|
||||
<div class="column">
|
||||
<div v-if="!(hideSpoilers && spoilers.item_source)">{{ item.source }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<p class="control">
|
||||
<a class="button is-fullwidth" v-for="bundle_id in item.bundles"
|
||||
v-on:click="toggleItemInBundle(bundle_id, item.id, $index)"
|
||||
v-bind:class="[isItemInBundle(bundle_id, item.id, $index) ? 'is-success' : '',
|
||||
!isItemInBundle(bundle_id, item.id, $index) && !isBundleComplete(bundle_id) ? 'is-danger' : '' ]">
|
||||
<span class="icon">
|
||||
<i class="fa"
|
||||
v-bind:class="[isItemInBundle(bundle_id, item.id, $index) ? 'fa-check-square-o' : 'fa-square-o']"></i>
|
||||
</span>
|
||||
<span>{{ static.bundles[bundle_id].name }}</span>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="card-footer" v-if="!(hideSpoilers && spoilers.item_seasons)">
|
||||
<div class="card-footer-item">
|
||||
<span class="icon is-small"><i class="fa fa-calendar-check-o"></i></span>
|
||||
<span class="tag is-primary is-text-centered"
|
||||
v-for="season in static.seasons | filterByArray item.seasons">
|
||||
{{ season.name }}
|
||||
</span>
|
||||
</div>
|
||||
</footer>
|
||||
<footer class="card-footer" v-if="!(hideSpoilers && spoilers.item_skills)">
|
||||
<div class="card-footer-item">
|
||||
<span class="icon is-small"><i class="fa fa-tree"></i></span>
|
||||
<span class="tag is-info is-text-centered"
|
||||
v-for="skill in static.skills | filterByArray item.skills">
|
||||
{{ skill.name }}
|
||||
</span>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Skills Tab -->
|
||||
<section id="skills-tab" class="section" v-if="active_page == 'skills'">
|
||||
<div class="container is-fluid">
|
||||
<div class="columns">
|
||||
<div class="column is-2">
|
||||
<nav class="panel">
|
||||
<p class="panel-heading">
|
||||
Skills
|
||||
</p>
|
||||
<a class="panel-block" href="#" v-for="skill in static.skills" id="panel-skill-{{ skill.id }}"
|
||||
v-bind:class="[skill.id == active_skill ? 'is-active' : '']"
|
||||
v-on:click.stop="change_skill(skill.id)">
|
||||
<span class="panel-icon">
|
||||
<i class="fa fa-tree"></i>
|
||||
</span> {{ skill.name }}
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="column">
|
||||
<h3 class="title">{{ getSkillName(active_skill) }}</h3>
|
||||
<progress class="progress is-info" value="" max=""></progress>
|
||||
<div class="columns is-multiline">
|
||||
<template v-for="item in static.items | filterBy active_skill in 'skills' | orderBy 'name'">
|
||||
<div class="column is-3 is-flex" v-if="!(hideCompleted && isCompleted(item))">
|
||||
<div class="card is-fullwidth is-flex eq-line">
|
||||
<header class="card-header">
|
||||
<p class="card-header-title">
|
||||
{{ item.name }}
|
||||
</p>
|
||||
</header>
|
||||
<div class="card-content eq-line is-flex">
|
||||
<div class="content is-flex">
|
||||
<div class="columns source">
|
||||
<div class="column">
|
||||
<div v-if="!(hideSpoilers && spoilers.item_source)">{{ item.source }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<p class="control">
|
||||
<a class="button is-fullwidth" v-for="bundle_id in item.bundles"
|
||||
v-on:click="toggleItemInBundle(bundle_id, item.id, $index)"
|
||||
v-bind:class="[isItemInBundle(bundle_id, item.id, $index) ? 'is-success' : '',
|
||||
!isItemInBundle(bundle_id, item.id, $index) && !isBundleComplete(bundle_id) ? 'is-danger' : '' ]">
|
||||
<span class="icon">
|
||||
<i class="fa"
|
||||
v-bind:class="[isItemInBundle(bundle_id, item.id, $index) ? 'fa-check-square-o' : 'fa-square-o']"></i>
|
||||
</span>
|
||||
<span>{{ static.bundles[bundle_id].name }}</span>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="card-footer" v-if="!(hideSpoilers && spoilers.item_seasons)">
|
||||
<div class="card-footer-item">
|
||||
<span class="icon is-small"><i class="fa fa-calendar-check-o"></i></span>
|
||||
<span class="tag is-primary is-text-centered"
|
||||
v-for="season in static.seasons | filterByArray item.seasons">
|
||||
{{ season.name }}
|
||||
</span>
|
||||
</div>
|
||||
</footer>
|
||||
<footer class="card-footer" v-if="!(hideSpoilers && spoilers.item_skills)">
|
||||
<div class="card-footer-item">
|
||||
<span class="icon is-small"><i class="fa fa-tree"></i></span>
|
||||
<span class="tag is-info is-text-centered"
|
||||
v-for="skill in static.skills | filterByArray item.skills">
|
||||
{{ skill.name }}
|
||||
</span>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section" v-if="active_page == 'changelog'">
|
||||
<div class="container">
|
||||
<h1 class="title">Change Log</h1>
|
||||
<div class="card is-fullwidth" v-for="version in changelog">
|
||||
<header class="card-header">
|
||||
<p class="card-header-title">
|
||||
{{ version.id }}
|
||||
</p>
|
||||
</header>
|
||||
<div class="card-content">
|
||||
<div class="content">
|
||||
<ul>
|
||||
<li v-for="change in version.changes">{{ change }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<p class="card-footer-item">
|
||||
Release Date: {{ version.date }}
|
||||
</p>
|
||||
<a href="https://github.com/kihashi/stardew_community_checklist/releases/tag/{{ version.link }}" class="card-footer-item">
|
||||
<span class="icon">
|
||||
<i class="fa fa-github-square" aria-hidden="true"></i>
|
||||
</span>
|
||||
<span>
|
||||
Github Release
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<div class="content has-text-centered">
|
||||
<p>
|
||||
<strong>Stardew Community Checklist</strong> by <a href="http://johncleaver.com">John Cleaver</a>. The source code is licensed
|
||||
<a href="http://opensource.org/licenses/mit-license.php">MIT</a>.
|
||||
</p>
|
||||
<p>
|
||||
Bundle and Item information is from the <a href="http://stardewvalleywiki.com/Stardew_Valley_Wiki">Stardew Valley Wiki</a>
|
||||
and is used under the <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">CC BY-NC-SA 3.0 License</a>.
|
||||
</p>
|
||||
<p>
|
||||
<a href="http://stardewvalley.net/">Stardew Valley</a> © <a href="">Chucklefish LTD</a>.
|
||||
Developed by <a href="https://twitter.com/ConcernedApe">ConcernedApe</a>.
|
||||
</p>
|
||||
<p>
|
||||
<a class="icon" href="https://github.com/kihashi/stardew_community_checklist">
|
||||
<i class="fa fa-github"></i>
|
||||
</a>
|
||||
<a class="icon" href="https://www.reddit.com/r/StardewValley/comments/4ell1b/stardew_community_checklist_a_site_to_keep_track/">
|
||||
<i class="fa fa-reddit"></i>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- Javascript -->
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.17/vue.min.js"></script>
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/vue-resource/0.1.16/vue-resource.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.5.8/clipboard.min.js"></script>
|
||||
<script type="text/javascript" src="main.js"></script>
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-76473334-1', 'auto');
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel="shortcut icon" type=image/png href=/static/favicon.png><title>Stardew Community Checklist</title><link href=/static/css/app.262e899ec487b8c8ddb8bf12fd79c078.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.2ae2e69a05c33dfc65f8.js></script><script type=text/javascript src=/static/js/vendor.8f247703fe729476c36e.js></script><script type=text/javascript src=/static/js/app.bbb6e93a26e2b9d8dc8e.js></script></body></html>
|
||||
28
main.css
28
main.css
@ -1,28 +0,0 @@
|
||||
.eq-line {
|
||||
flex: 1 0 auto;
|
||||
}
|
||||
|
||||
.card {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.card-content{
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.card-footer-item{
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.button{
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.panel-tabs a {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.bundle-complete {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
233
main.js
233
main.js
@ -1,233 +0,0 @@
|
||||
var v = new Vue({
|
||||
el: '#app',
|
||||
data:{
|
||||
changelog: null,
|
||||
static: null,
|
||||
user_data: [],
|
||||
active_page: "bundles",
|
||||
active_room: 0,
|
||||
active_bundle: 0,
|
||||
active_season: "spring",
|
||||
active_skill: "farming",
|
||||
save_mode: false,
|
||||
load_mode: false,
|
||||
pick_spoilers: false,
|
||||
hideCompleted: false,
|
||||
hideSpoilers: false,
|
||||
spoilers: {
|
||||
bundle_rewards: true,
|
||||
item_source: true,
|
||||
item_seasons: true,
|
||||
item_skills: true
|
||||
},
|
||||
temp_spoilers: {}
|
||||
|
||||
},
|
||||
ready: function(){
|
||||
this.fetchData();
|
||||
this.fetchChangeLog();
|
||||
new Clipboard('.copy');
|
||||
storedUserData = localStorage.getItem('user_data');
|
||||
if(storedUserData !== null && storedUserData !== ""){
|
||||
this.loadData(storedUserData);
|
||||
}
|
||||
spoilers = localStorage.getItem('spoilers');
|
||||
if(spoilers !== null && spoilers !== ""){
|
||||
this.spoilers = JSON.parse(spoilers);
|
||||
}
|
||||
hideCompleted = localStorage.getItem('hideCompleted');
|
||||
if(hideCompleted !== null && hideCompleted !== ""){
|
||||
this.hideCompleted = JSON.parse(hideCompleted);
|
||||
}
|
||||
hideSpoilers = localStorage.getItem('hideSpoilers');
|
||||
if(hideSpoilers !== null && hideSpoilers !== ""){
|
||||
this.hideSpoilers = JSON.parse(hideSpoilers);
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
user_data_serialized: function(){
|
||||
return btoa(JSON.stringify(this.user_data));
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
fetchData: function(){
|
||||
this.$http.get('bundles.json', function(data, status, response){
|
||||
if(status == 200){
|
||||
this.static = data;
|
||||
if(this.user_data.length <= 0){
|
||||
for(i=0; i<this.static.bundles.length;i++){
|
||||
this.user_data.push([]);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
fetchChangeLog: function() {
|
||||
this.$http.get('changelog.json', function(data, status){
|
||||
if(status == 200){
|
||||
this.changelog = data.versions
|
||||
}
|
||||
});
|
||||
},
|
||||
enterLoadMode: function(){
|
||||
this.load_mode = true;
|
||||
},
|
||||
exitLoadMode: function(){
|
||||
this.load_mode = false;
|
||||
},
|
||||
loadData: function(data){
|
||||
this.user_data = JSON.parse(atob(data));
|
||||
this.exitLoadMode();
|
||||
},
|
||||
enterSaveMode: function(){
|
||||
this.save_mode = true;
|
||||
localStorage.setItem('user_data', this.user_data_serialized);
|
||||
},
|
||||
exitSaveMode: function(){
|
||||
this.save_mode = false;
|
||||
},
|
||||
enterSpoilerSettings: function(){
|
||||
this.temp_spoilers = JSON.parse(JSON.stringify(this.spoilers));
|
||||
this.pick_spoilers = true;
|
||||
},
|
||||
saveSpoilerSettings: function(){
|
||||
this.spoilers = JSON.parse(JSON.stringify(this.temp_spoilers));
|
||||
localStorage.setItem('spoilers', JSON.stringify(this.spoilers));
|
||||
this.exitSpoilerSettings();
|
||||
},
|
||||
exitSpoilerSettings: function(){
|
||||
this.pick_spoilers = false
|
||||
},
|
||||
change_page: function(new_page){
|
||||
this.active_page = new_page;
|
||||
},
|
||||
change_bundle: function(new_bundle){
|
||||
this.active_bundle = new_bundle;
|
||||
},
|
||||
change_room: function(new_room){
|
||||
this.active_room = new_room;
|
||||
},
|
||||
change_season: function(new_season){
|
||||
this.active_season = new_season;
|
||||
},
|
||||
change_skill: function(new_skill){
|
||||
this.active_skill = new_skill;
|
||||
},
|
||||
toggleHideCompleted: function(){
|
||||
this.hideCompleted = !this.hideCompleted;
|
||||
localStorage.setItem('hideCompleted', JSON.stringify(this.hideCompleted));
|
||||
},
|
||||
toggleHideSpoilers: function(){
|
||||
this.hideSpoilers = !this.hideSpoilers;
|
||||
localStorage.setItem('hideSpoilers', JSON.stringify(this.hideSpoilers));
|
||||
},
|
||||
addItemToBundle: function(bundleId, itemId, itemPosition){
|
||||
this.user_data[bundleId].push({item: itemId, position: itemPosition});
|
||||
},
|
||||
removeItemFromBundle: function(bundleId, itemId, itemPosition){
|
||||
for(i = 0; i < this.user_data[bundleId].length; i++){
|
||||
if(this.user_data[bundleId][i].item === itemId && this.user_data[bundleId][i].position === itemPosition){
|
||||
this.user_data[bundleId].splice(i, 1);
|
||||
}
|
||||
}
|
||||
},
|
||||
toggleItemInBundle: function(bundleId, itemId, itemPosition){
|
||||
if(this.isItemInBundle(bundleId, itemId, itemPosition)){
|
||||
this.removeItemFromBundle(bundleId, itemId, itemPosition);
|
||||
}
|
||||
else{
|
||||
this.addItemToBundle(bundleId, itemId, itemPosition);
|
||||
}
|
||||
localStorage.setItem('user_data', this.user_data_serialized);
|
||||
},
|
||||
isItemInBundle: function(bundleId, itemId, itemPosition){
|
||||
if(this.user_data[bundleId].filter(function(element){
|
||||
return element.item === itemId && element.position === itemPosition;
|
||||
}).length > 0){
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
},
|
||||
getSeasonName: function(seasonId){
|
||||
for(i = 0; i < this.static.seasons.length; i++){
|
||||
if(this.static.seasons[i].id === seasonId){
|
||||
return this.static.seasons[i].name;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
},
|
||||
getSkillName: function(skillId){
|
||||
for(i = 0; i < this.static.skills.length; i++){
|
||||
if(this.static.skills[i].id === skillId){
|
||||
return this.static.skills[i].name;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
},
|
||||
getRoomItemsRequired: function(roomId) {
|
||||
return this.static.bundles.reduce(function(previousValue, nextValue){
|
||||
if(nextValue.room === roomId){
|
||||
return previousValue + nextValue.items_required;
|
||||
}
|
||||
else{
|
||||
return previousValue;
|
||||
}
|
||||
}, 0)
|
||||
},
|
||||
getRoomItemsChecked: function(roomId){
|
||||
return this.static.bundles
|
||||
.filter(function(b){ return b.room === roomId; })
|
||||
.reduce(function(p, c){ return p + Math.min(v.user_data[c.id].length, c.items_required); }, 0);
|
||||
},
|
||||
isCompleted: function (item) {
|
||||
for(i=0; i < item.bundles.length; i++){
|
||||
if(!(this.isItemInBundle(item.bundles[i], item.id, i) || this.isBundleComplete(item.bundles[i]))){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
isBundleComplete: function(bundle_id){
|
||||
return this.user_data[bundle_id].length >= this.static.bundles[bundle_id].items_required;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Vue.filter('inBundle', function(value, id){
|
||||
return value.filter(function(element){
|
||||
if(element.bundles.indexOf(id) > -1){
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Vue.filter('filterByArray', function(array1, array2){
|
||||
return array1.filter(function(element){
|
||||
if(array2.indexOf(element.id) > -1){
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Vue.filter('seasonFilter', function(items, season_id){
|
||||
return items.filter(function(element){
|
||||
if(season_id == "allseasons" && element.seasons.length > 3){
|
||||
return true;
|
||||
}
|
||||
else if(element.seasons.length < 4 && element.seasons.indexOf(season_id) > -1){
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user