ADDED card sorting.

ADDED pantheon to each card (duplicate of culture).
ADDED demo cards.
ADDED wikipedia links to most entries.
ADDED Lovecraft Wikia links to all Cthulhu cards.
UPDATED to 0.1.6.
This commit is contained in:
Eric Woodward
2018-01-18 20:10:49 -05:00
parent 1979bd4f97
commit 0f605db8fa
9 changed files with 1663 additions and 545 deletions

View File

@@ -23,10 +23,10 @@
<dt>Release</dt>
<dd><%- release_map[card.num.toLowerCase().substr(0,4)] %></dd>
<% if (card.culture !== '') { %>
<% if (card.pantheon !== '') { %>
<dt>Pantheon</dt>
<dd><img class="card-pantheon" src="/images/pantheons/<%= card.culture.toLowerCase().replace(' ','-') %>.png"
alt="<%= card.culture %>" /></dd>
<dd><img class="card-pantheon" src="/images/pantheons/<%= card.pantheon.toLowerCase().replace(' ','-') %>.png"
alt="<%= card.pantheon %>" /></dd>
<% } %>
@@ -108,6 +108,18 @@
<dt>Flavor</dt>
<dd><em><%- card.flavor %></em></dd>
<% } %>
<% if ((card.wp && card.wp !== '') || (card.lc && card.lc !== '')) { %>
<dt>Learn More</dt>
<dd>
<% if (card.wp && card.wp !== '') { %>
<a href='<%-card.wp%>' title="Wikipedia link for <%=card.name%>">Wikipedia</a>
<% } %>
<% if (card.lc && card.lc !== '') { %>
<a href='<%-card.lc%>' title="Lovecraft Wiki link for <%=card.name%>">Lovecraft Wiki</a>
<% } %>
</dd>
<% } %>
<dt>Copyright</dt>
<dd>&copy; <%= card.copyright_year %> <%= card.copyright_owner %></dd>
</dl>

View File

@@ -8,9 +8,9 @@
<div>
<a href="/cards/<%= card.num.toLowerCase() %>"><%= card.name %>
<% if (card.culture !== '') { %>
<img class="preview-pantheon" src="/images/pantheons/<%= card.culture.toLowerCase().replace(' ','-') %>.png"
alt="<%= card.culture %>" />
<% if (card.pantheon !== '') { %>
<img class="preview-pantheon" src="/images/pantheons/<%= card.pantheon.toLowerCase().replace(' ','-') %>.png"
alt="<%= card.pantheon %>" />
<% } %>
<%= card.num.toUpperCase() %></a><br />
<% if (card.race != '') { %>

View File

@@ -251,9 +251,49 @@
</li>
</ul>
</li>
<li>
<label for='sort_by'>Sort By</label>
<ul>
<li>
<label>
<select name='sort_by'>
<option value='name'
<%- query && ((query.sort_by && query.sort_by === 'name') || !query.sort_by) ? "selected='selected'" : '' %>>Name</option>
<option value='num'
<%- query && (query.sort_by && query.sort_by === 'num') ? "selected='selected'" : '' %>>Card Number</option>
<option value='attack'
<%- query && (query.sort_by && query.sort_by === 'attack') ? "selected='selected'" : '' %>>Attack</option>
<option value='defense'
<%- query && (query.sort_by && query.sort_by === 'defense') ? "selected='selected'" : '' %>>Defense</option>
<option value='power'
<%- query && (query.sort_by && query.sort_by === 'power') ? "selected='selected'" : '' %>>Power</option>
<option value='pantheon'
<%- query && (query.sort_by && query.sort_by === 'pantheon') ? "selected='selected'" : '' %>>Pantheon</option>
<option value='race'
<%- query && (query.sort_by && query.sort_by === 'race') ? "selected='selected'" : '' %>>Race</option>
<option value='type'
<%- query && (query.sort_by && query.sort_by === 'type') ? "selected='selected'" : '' %>>Type</option>
</select>
</label>
</li>
<li>
<label>
<input type='radio' name='sort_order' value='asc'
<%- query && ((query.sort_order && query.sort_order === 'asc') || !query.sort_order) ? "checked='checked'" : '' %>
/>&nbsp;Ascending
</label>
</li>
<li>
<label>
<input type='radio' name='sort_order' value='asc'
<%- query && (query.sort_order && query.sort_order === 'desc') ? "checked='checked'" : '' %>
/>&nbsp;Descending
</label>
</li>
</ul>
</li>
</ul>
</fieldset>
<fieldset class='searchForm-controlSet'>
<legend>Controls</legend>