Skip to content

Commit

Permalink
Remove th123.ttinclude
Browse files Browse the repository at this point in the history
  • Loading branch information
y-iihoshi committed Jan 2, 2024
1 parent 3ac9ac9 commit 308035e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 43 deletions.
22 changes: 0 additions & 22 deletions TemplateGenerator/Templates/th123.ttinclude

This file was deleted.

26 changes: 14 additions & 12 deletions TemplateGenerator/Templates/th123card1.tt
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<#@ template debug="false" hostspecific="false" language="C#" #>
<#@ include file="imports.ttinclude" once="true" #>
<#@ include file="th123.ttinclude" once="true" #>
<#@ include file="footer.ttinclude" once="true" #>
<#@ import namespace="TemplateGenerator.Models.Th123" #>
<#@ output extension=".html" encoding="utf-8" #>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><#= title #> スペルカードデータ</title>
<title><#= Definitions.Title #> スペルカードデータ</title>
<link rel="stylesheet" href="style.css" />
<style>
/* <![CDATA[ */
Expand All @@ -29,7 +30,7 @@
<body>

<header>
<h1><#= title #> スペルカードデータ</h1>
<h1><#= Definitions.Title #> スペルカードデータ</h1>
<hr />
<nav>
<ul>
Expand All @@ -38,7 +39,7 @@
</ul>
<ul>
<#
foreach (var chara in storyCharacters)
foreach (var chara in Definitions.StoryCharacterNames)
{
#>
<li><a href="#<#= chara.Value.Id #>"><#= chara.Value.ShortName #></a></li>
Expand All @@ -56,7 +57,7 @@
<h2 id="Card">御札戦歴</h2>

<#
foreach (var chara in storyCharacters)
foreach (var chara in Definitions.StoryCharacterNames)
{
#>
<table class="rate_per_chara">
Expand All @@ -71,7 +72,7 @@
</thead>
<tbody>
<#
foreach (var card in Enumerable.Range(1, cardsPerChara[chara.Key]))
foreach (var card in Enumerable.Range(1, Definitions.NumCardsPerCharacter[chara.Key]))
{
var cardKey = card.ToString("D2");
#>
Expand Down Expand Up @@ -120,28 +121,29 @@
<tr>
<th></th>
<#
foreach (var levelKey in levelKeyOrderTotalLast)
foreach (var levelKey in Definitions.LevelKeysTotalLast)
{
#>
<th class="level"><#= levelsWithTotal[levelKey] #></th>
<th class="level"><#= Definitions.LevelWithTotalNames[levelKey] #></th>
<#
}
#>
</tr>
</thead>
<tbody>
<#
foreach (var chara in storyCharacters)
var levelKeyTotal = Definitions.LevelKeysTotalFirst.First();
foreach (var chara in Definitions.StoryCharacterNames)
{
#>
<tr>
<td class="character"><#= chara.Value.LongName #></td>
<#
foreach (var levelKey in levelKeyOrderTotalLast)
foreach (var levelKey in Definitions.LevelKeysTotalLast)
{
var numCards = cardsPerChara[chara.Key];
var numCards = Definitions.NumCardsPerCharacter[chara.Key];
if (levelKey != levelKeyTotal)
numCards /= levels.Count;
numCards /= Definitions.LevelNames.Count;
#>
<td class="rate"><#
#>%T123CRG<#= levelKey #><#= chara.Key #>1 / <#
Expand Down
19 changes: 10 additions & 9 deletions TemplateGenerator/Templates/th123card2.tt
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<#@ template debug="false" hostspecific="false" language="C#" #>
<#@ include file="imports.ttinclude" once="true" #>
<#@ include file="th123.ttinclude" once="true" #>
<#@ include file="footer.ttinclude" once="true" #>
<#@ import namespace="TemplateGenerator.Models.Th123" #>
<#@ output extension=".html" encoding="utf-8" #>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><#= title #> スペルカードデータ</title>
<title><#= Definitions.Title #> スペルカードデータ</title>
<link rel="stylesheet" href="style.css" />
<style>
/* <![CDATA[ */
Expand All @@ -25,7 +26,7 @@
<body>

<header>
<h1><#= title #> スペルカードデータ</h1>
<h1><#= Definitions.Title #> スペルカードデータ</h1>
<hr />
<nav>
<ul>
Expand All @@ -34,7 +35,7 @@
</ul>
<ul>
<#
foreach (var chara in characters)
foreach (var chara in Definitions.CharacterNames)
{
#>
<li><a href="#<#= chara.Value.Id #>"><#= chara.Value.ShortName #></a></li>
Expand All @@ -51,7 +52,7 @@
<h2 id="Deck">デッキ用カード蒐集歴</h2>

<#
foreach (var chara in characters)
foreach (var chara in Definitions.CharacterNames)
{
#>
<table class="deck_per_chara">
Expand All @@ -66,9 +67,9 @@
</thead>
<tbody>
<#
foreach (var cardType in cardTypes)
foreach (var cardType in Definitions.CardTypeNames)
{
var numCards = maxNumCardsPerType[cardType.Key];
var numCards = Definitions.MaxNumCardsPerType[cardType.Key];
foreach (var card in Enumerable.Range(1, numCards))
{
var cardKey = card.ToString("D2");
Expand All @@ -82,7 +83,7 @@
<#
}

if (card <= cardsPerCharaAndType[(chara.Key, cardType.Key)])
if (card <= Definitions.NumCardsPerCharacterAndType[(chara.Key, cardType.Key)])
{
#>
<td class="number">No.<#= cardKey #></td>
Expand All @@ -103,7 +104,7 @@
<#
}

if (cardType.Key != cardTypes.Last().Key)
if (cardType.Key != Definitions.CardTypeNames.Last().Key)
WriteLine(string.Empty);
}
#>
Expand Down

0 comments on commit 308035e

Please sign in to comment.