|
184 | 184 | if (format in teambuilder.formatResources) { // already loading, bypass
|
185 | 185 | return;
|
186 | 186 | }
|
187 |
| - console.log(`called for ${format}`); |
188 | 187 | teambuilder.formatResources[format] = true; // true - loading, array - loaded
|
189 | 188 | $.get('https://www.smogon.com/dex/api/formats/by-ps-name/' + format, {}, function (data) {
|
190 | 189 | // if the data doesn't exist, set it to true so it stops trying to load it
|
|
1241 | 1240 | if (i < this.curTeam.capacity) {
|
1242 | 1241 | buf += '<li><button name="addPokemon" class="button big"><i class="fa fa-plus"></i> Add Pokémon</button></li>';
|
1243 | 1242 | }
|
1244 |
| - buf += '<br />'; |
| 1243 | + buf += '</ol>'; |
1245 | 1244 | var formatInfo = this.formatResources[this.curTeam.format];
|
1246 | 1245 | // data's there and loaded
|
1247 | 1246 | if (formatInfo && formatInfo !== true) {
|
1248 | 1247 | if (formatInfo.resources.length || formatInfo.url) {
|
1249 |
| - buf += '<strong>Teambuilding resources for this tier:</strong><br />'; |
| 1248 | + buf += '<div style="padding-left: 5px"><h3 style="font-size: 12px">Teambuilding resources for this tier:</h3></div><ul>'; |
1250 | 1249 | for (var i = 0; i < formatInfo.resources.length; i++) {
|
1251 | 1250 | var resource = formatInfo.resources[i];
|
1252 |
| - // these are not <li> because that adds too much padding around each entry, making the whole thing |
1253 |
| - // take up too much space |
1254 |
| - buf += '<small style="padding: 1">- <a href="' + resource.url + '" target="_blank">' + resource.resource_name + '</a></small><br />'; |
| 1251 | + buf += '<li><p><a href="' + resource.url + '" target="_blank">' + resource.resource_name + '</a></p></li>'; |
1255 | 1252 | }
|
1256 | 1253 | }
|
| 1254 | + buf += '</ul>'; |
1257 | 1255 | var desc = formatInfo.resources.length ? 'more ' : '';
|
1258 |
| - buf += '<small>Find ' + desc + 'helpful resources for this tier on <a href="' + formatInfo.url + '" target="_blank">the Smogon Dex</a>.'; |
1259 |
| - buf += '<br />'; |
| 1256 | + buf += '<div style="padding-left: 5px">Find ' + desc + 'helpful resources for this tier on <a href="' + formatInfo.url + '" target="_blank">the Smogon Dex</a>.</div>'; |
1260 | 1257 | }
|
1261 |
| - buf += '</ol>'; |
1262 | 1258 | buf += '<form id="pokepasteForm" style="display:inline" method="post" action="https://pokepast.es/create" target="_blank">';
|
1263 | 1259 | buf += '<input type="hidden" name="title" id="pasteTitle">';
|
1264 | 1260 | buf += '<input type="hidden" name="paste" id="pasteData">';
|
|
0 commit comments