Skip to content

Commit

Permalink
Remove th12.ttinclude
Browse files Browse the repository at this point in the history
  • Loading branch information
y-iihoshi committed Jan 2, 2024
1 parent afb3bde commit 3ac9ac9
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 83 deletions.
32 changes: 0 additions & 32 deletions TemplateGenerator/Templates/th12.ttinclude

This file was deleted.

48 changes: 27 additions & 21 deletions TemplateGenerator/Templates/th12card.tt
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
<#@ template debug="false" hostspecific="false" language="C#" #>
<#@ include file="imports.ttinclude" once="true" #>
<#@ include file="th12.ttinclude" once="true" #>
<#@ include file="footer.ttinclude" once="true" #>
<#@ import namespace="TemplateGenerator.Models.Th12" #>
<#@ output extension=".html" encoding="utf-8" #>
<#
var levelKeyTotal = Definitions.LevelKeysTotalFirst.First();
var stageKeyTotal = Definitions.StageKeysTotalFirst.First();
var numCards = Definitions.NumCardsPerLevel.Values.Sum();
#>
<!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 @@ -27,7 +33,7 @@
<body>

<header>
<h1><#= title #> スペルカードデータ</h1>
<h1><#= Definitions.Title #> スペルカードデータ</h1>
<hr />
<nav>
<ul>
Expand Down Expand Up @@ -56,10 +62,10 @@
<th class="number">No.</th>
<th class="card">スペルカード名<br />(難易度)</th>
<#
foreach (var charaKey in charaKeyOrderTotalFirst)
foreach (var charaKey in Definitions.CharacterKeysTotalFirst)
{
#>
<th class="character"><#= charactersWithTotal[charaKey] #></th>
<th class="character"><#= Definitions.CharacterWithTotalNames[charaKey] #></th>
<#
}
#>
Expand All @@ -76,7 +82,7 @@
<td class="number">No.<#= cardStr #></td>
<td class="card">%T12CARD<#= cardKey #>N<br />(%T12CARD<#= cardKey #>R)</td>
<#
foreach (var charaKey in charaKeyOrderTotalFirst)
foreach (var charaKey in Definitions.CharacterKeysTotalFirst)
{
#>
<td class="rate">%T12C<#= cardKey #><#= charaKey #>1 / %T12C<#= cardKey #><#= charaKey #>2</td>
Expand All @@ -99,7 +105,7 @@
<tr>
<td colspan="2"><#= cardStrTotal #></td>
<#
foreach (var charaKey in charaKeyOrderTotalFirst)
foreach (var charaKey in Definitions.CharacterKeysTotalFirst)
{
#>
<td class="rate">%T12C<#= cardKeyTotal #><#= charaKey #>1 / %T12C<#= cardKeyTotal #><#= charaKey #>2</td>
Expand All @@ -119,30 +125,30 @@
<tr>
<th class="level">難易度</th>
<#
foreach (var charaKey in charaKeyOrderTotalFirst)
foreach (var charaKey in Definitions.CharacterKeysTotalFirst)
{
#>
<th class="character"><#= charactersWithTotal[charaKey] #></th>
<th class="character"><#= Definitions.CharacterWithTotalNames[charaKey] #></th>
<#
}
#>
</tr>
</thead>
<tbody>
<#
foreach (var level in levels)
foreach (var level in Definitions.LevelNames)
{
#>
<tr>
<td class="level"><#= level.Value #></td>
<#
foreach (var charaKey in charaKeyOrderTotalFirst)
foreach (var charaKey in Definitions.CharacterKeysTotalFirst)
{
#>
<td class="rate"><#
#>%T12CRG<#= level.Key #><#= charaKey #><#= stageKeyTotal #>1 / <#
#>%T12CRG<#= level.Key #><#= charaKey #><#= stageKeyTotal #>2 / <#
#><#= cardsPerLevel[level.Key] #><#
#><#= Definitions.NumCardsPerLevel[level.Key] #><#
#></td>
<#
}
Expand All @@ -154,9 +160,9 @@
</tbody>
<tfoot>
<tr>
<td><#= levelsWithTotal[levelKeyTotal] #></td>
<td><#= Definitions.LevelWithTotalNames[levelKeyTotal] #></td>
<#
foreach (var charaKey in charaKeyOrderTotalFirst)
foreach (var charaKey in Definitions.CharacterKeysTotalFirst)
{
#>
<td class="rate"><#
Expand All @@ -177,32 +183,32 @@
<tr>
<th class="stage">ステージ</th>
<#
foreach (var charaKey in charaKeyOrderTotalFirst)
foreach (var charaKey in Definitions.CharacterKeysTotalFirst)
{
#>
<th class="character"><#= charactersWithTotal[charaKey] #></th>
<th class="character"><#= Definitions.CharacterWithTotalNames[charaKey] #></th>
<#
}
#>
</tr>
</thead>
<tbody>
<#
foreach (var stage in stages)
foreach (var stage in Definitions.StageNames)
{
var stageKey = (stage.Key == "X") ? stageKeyTotal : stage.Key;
var levelKey = (stage.Key == "X") ? stage.Key : levelKeyTotal;
#>
<tr>
<td class="stage"><#= stage.Value #></td>
<#
foreach (var charaKey in charaKeyOrderTotalFirst)
foreach (var charaKey in Definitions.CharacterKeysTotalFirst)
{
#>
<td class="rate"><#
#>%T12CRG<#= levelKey #><#= charaKey #><#= stageKey #>1 / <#
#>%T12CRG<#= levelKey #><#= charaKey #><#= stageKey #>2 / <#
#><#= cardsPerStage[stage.Key] #><#
#><#= Definitions.NumCardsPerStage[stage.Key] #><#
#></td>
<#
}
Expand All @@ -214,9 +220,9 @@
</tbody>
<tfoot>
<tr>
<td><#= stagesWithTotal[stageKeyTotal] #></td>
<td><#= Definitions.StageWithTotalNames[stageKeyTotal] #></td>
<#
foreach (var charaKey in charaKeyOrderTotalFirst)
foreach (var charaKey in Definitions.CharacterKeysTotalFirst)
{
#>
<td class="rate"><#
Expand Down
34 changes: 19 additions & 15 deletions TemplateGenerator/Templates/th12score1.tt
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
<#@ template debug="false" hostspecific="false" language="C#" #>
<#@ include file="imports.ttinclude" once="true" #>
<#@ include file="th12.ttinclude" once="true" #>
<#@ include file="footer.ttinclude" once="true" #>
<#@ import namespace="TemplateGenerator.Models.Th12" #>
<#@ output extension=".html" encoding="utf-8" #>
<#
var charaKeyTotal = Definitions.CharacterKeysTotalFirst.First();
#>
<!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 @@ -28,7 +32,7 @@
<body>

<header>
<h1><#= title #> スコアデータ</h1>
<h1><#= Definitions.Title #> スコアデータ</h1>
<hr />
<nav>
<ul>
Expand All @@ -39,7 +43,7 @@
</ul>
<ul>
<#
foreach (var level in levels)
foreach (var level in Definitions.LevelNames)
{
#>
<li><a href="#<#= level.Value #>"><#= level.Value #></a></li>
Expand All @@ -58,7 +62,7 @@
<h2>難易度別スコア</h2>

<#
foreach (var level in levels)
foreach (var level in Definitions.LevelNames)
{
#>
<table class="score_per_level">
Expand All @@ -75,7 +79,7 @@
</thead>
<tbody>
<#
foreach (var chara in characters)
foreach (var chara in Definitions.CharacterNames)
{
#>
<tr>
Expand Down Expand Up @@ -112,26 +116,26 @@
</tr>
<tr>
<#
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 characters)
foreach (var chara in Definitions.CharacterNames)
{
#>
<tr>
<td class="character"><#= chara.Value #></td>
<td class="count">%T12CHARA<#= chara.Key #>1</td>
<td class="time">%T12CHARA<#= chara.Key #>2</td>
<#
foreach (var levelKey in levelKeyOrderTotalLast)
foreach (var levelKey in Definitions.LevelKeysTotalLast)
{
#>
<td class="level">%T12CHARAEX<#= levelKey #><#= chara.Key #>3</td>
Expand All @@ -145,11 +149,11 @@
</tbody>
<tfoot>
<tr>
<td class="character"><#= charactersWithTotal[charaKeyTotal] #></td>
<td class="character"><#= Definitions.CharacterWithTotalNames[charaKeyTotal] #></td>
<td class="count">%T12CHARA<#= charaKeyTotal #>1</td>
<td class="time">%T12CHARA<#= charaKeyTotal #>2</td>
<#
foreach (var levelKey in levelKeyOrderTotalLast)
foreach (var levelKey in Definitions.LevelKeysTotalLast)
{
#>
<td class="level">%T12CHARAEX<#= levelKey #><#= charaKeyTotal #>3</td>
Expand All @@ -171,7 +175,7 @@
<tr>
<th class="character">Character</th>
<#
foreach (var level in levels)
foreach (var level in Definitions.LevelNames)
{
#>
<th class="level"><#= level.Value #></th>
Expand All @@ -182,13 +186,13 @@
</thead>
<tbody>
<#
foreach (var chara in characters)
foreach (var chara in Definitions.CharacterNames)
{
#>
<tr>
<td class="character"><#= chara.Value #></td>
<#
foreach (var level in levels)
foreach (var level in Definitions.LevelNames)
{
#>
<td class="stage">%T12CLEAR<#= level.Key #><#= chara.Key #></td>
Expand Down
15 changes: 8 additions & 7 deletions TemplateGenerator/Templates/th12score2.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="th12.ttinclude" once="true" #>
<#@ include file="footer.ttinclude" once="true" #>
<#@ import namespace="TemplateGenerator.Models.Th12" #>
<#@ 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 @@ -26,7 +27,7 @@
<body>

<header>
<h1><#= title #> スコアデータ</h1>
<h1><#= Definitions.Title #> スコアデータ</h1>
<hr />
<nav>
<ul>
Expand All @@ -37,7 +38,7 @@
</ul>
<ul>
<#
foreach (var level in levels)
foreach (var level in Definitions.LevelNames)
{
#>
<li><a href="#<#= level.Value #>"><#= level.Value #></a></li>
Expand All @@ -51,14 +52,14 @@
<main>

<#
foreach (var level in levels)
foreach (var level in Definitions.LevelNames)
{
#>
<section>
<h2 id="<#= level.Value #>"><#= level.Value #></h2>

<#
foreach (var chara in characters)
foreach (var chara in Definitions.CharacterNames)
{
#>
<table class="score_per_level">
Expand Down Expand Up @@ -99,7 +100,7 @@
</section>

<#
if (level.Key != levels.Last().Key)
if (level.Key != Definitions.LevelNames.Last().Key)
{
#>
<hr />
Expand Down
Loading

0 comments on commit 3ac9ac9

Please sign in to comment.