'index' => 'boolean',
'requirements' => 'array',
'rulesets' => 'array',
+ 'title_icons' => 'array',
];
protected $with = [
--- /dev/null
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table('techniques', function(Blueprint $table) {
+ $table->text('title_icons')->nullable()->default(null);
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::table('techniques', function(Blueprint $table) {
+ $table->dropColumn('title_icons');
+ });
+ }
+};
const invert = name.startsWith('not-');
const strippedName = invert ? name.substr(4) : name;
+ const src = getIconURL(strippedName);
const title = t(`icon.zelda.${name}`);
return <span className="zelda-icon">
- <img
- alt={title}
- src={getIconURL(strippedName)}
- title={title}
- />
+ {src ?
+ <img
+ alt={title}
+ src={src}
+ title={title}
+ />
+ : null}
{invert ?
<span className="strike">
<Icon.SLASH title="" />
import { Card, ListGroup } from 'react-bootstrap';
import { Link } from 'react-router-dom';
+import ZeldaIcon from '../common/ZeldaIcon';
+
import {
getLink,
getRelations,
title={getTranslation(r, 'short', i18n.language)}
>
<Link to={getLink(r)}>
+ {r.title_icons ?
+ <span className="tech-title-icons">
+ {r.title_icons.map(icon =>
+ <ZeldaIcon key={icon} name={icon} />
+ )}
+ </span>
+ : null}
{getTranslation(r, 'title', i18n.language)}
</Link>
</ListGroup.Item>
moonpearl: 'Moonpearl',
mushroom: 'Mushroom',
'not-flippers': 'Keine Flippers',
+ 'not-mirror': 'Kein Mirror',
'not-moonpearl': 'Keine Moonpearl',
powder: 'Powder',
quake: 'Quake',
moonpearl: 'Moonpearl',
mushroom: 'Mushroom',
'not-flippers': 'No Flippers',
+ 'not-mirror': 'No Mirror',
'not-moonpearl': 'No Moonpearl',
powder: 'Powder',
quake: 'Quake',
&.hidden {
display: none;
}
+
+ .tech-title-icons {
+ margin-right: 1ex;
+ }
}
.pin-list {
}
}
+.tech-title-icons {
+ display: inline-flex;
+ vertical-align: middle;
+}
+
.tech-outline {
float: right;
}