Commit 284e7400 authored by nanahira's avatar nanahira

better example

parent 643e7174
Pipeline #19396 passed with stage
in 43 seconds
...@@ -182,7 +182,7 @@ export class YGOProCard implements YGOProCardLike { ...@@ -182,7 +182,7 @@ export class YGOProCard implements YGOProCardLike {
return config.renderUrl(view); return config.renderUrl(view);
} }
getDescription(config: YGOCardConfig, view = this.getView(config.getLang())) { getMetaText(config: YGOCardConfig, view = this.getView(config.getLang())) {
const lines: string[] = []; const lines: string[] = [];
const isMonster = this.isType('TYPE_MONSTER'); const isMonster = this.isType('TYPE_MONSTER');
let typeString = `[${view.displayType}]`; let typeString = `[${view.displayType}]`;
...@@ -205,8 +205,7 @@ export class YGOProCard implements YGOProCardLike { ...@@ -205,8 +205,7 @@ export class YGOProCard implements YGOProCardLike {
} }
lines.push(monsterStatus); lines.push(monsterStatus);
} }
lines.push('');
lines.push(view.desc);
return lines.join('\n'); return lines.join('\n');
} }
...@@ -217,7 +216,9 @@ export class YGOProCard implements YGOProCardLike { ...@@ -217,7 +216,9 @@ export class YGOProCard implements YGOProCardLike {
lines.push(segment.image(this.getPic(config, view)).toString()); lines.push(segment.image(this.getPic(config, view)).toString());
} }
lines.push(`${view.name}[${view.id}]`); lines.push(`${view.name}[${view.id}]`);
lines.push(this.getDescription(config, view)); lines.push(this.getMetaText(config, view));
lines.push('');
lines.push(view.desc);
return lines.join('\n'); return lines.join('\n');
} }
......
...@@ -129,7 +129,8 @@ export default class YGOCardPlugin ...@@ -129,7 +129,8 @@ export default class YGOCardPlugin
{card.name} {card.id} {card.name} {card.id}
</div> </div>
<div> <div>
<p>{card.getDescription(this.config)}</p> <p>{card.getMetaText(this.config)}</p>
<p>{card.desc}</p>
</div> </div>
</body> </body>
</html> </html>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment