Skip to content

Commit

Permalink
Fix language icon size on vocabulary pages
Browse files Browse the repository at this point in the history
The language icon was displayed using its original size instead of 30×20.
While most language icons are already 30×20, it should not matter.
  • Loading branch information
jiru committed Feb 5, 2025
1 parent 4d57faf commit 82ed7b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Template/Vocabulary/add.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ $this->set('title_for_layout', $this->Pages->formatTitle($title));
<md-list flex ng-show="ctrl.vocabularyAdded.length > 0">
<md-list-item id="vocabulary_{{item.id}}"
ng-repeat="item in ctrl.vocabularyAdded">
<img class="vocabulary-lang" ng-src="/img/flags/{{item.lang}}.svg"/>
<img class="vocabulary-lang" width="30" height="20"
ng-src="/img/flags/{{item.lang}}.svg"/>
<div class="vocabulary-text" flex>{{item.text}}</div>
<md-icon ng-show="item.duplicate">warning</md-icon>
<md-tooltip md-direction="top" ng-show="item.duplicate">
Expand Down
3 changes: 2 additions & 1 deletion src/View/Helper/VocabularyHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ public function vocabulary($vocab) {
));
}
?>
<img class="vocabulary-lang" src="/img/flags/<?= $lang ?>.svg"/>
<img class="vocabulary-lang" width="30" height="20"
src="/img/flags/<?= $lang ?>.svg"/>
<div class="vocabulary-text" flex><?= $text ?></div>
<md-button ng-cloak class="md-primary" <?= isset($url) ? "href=\"$url\"" : 'ng-disabled="1"' ?>>
<?= $numSentencesLabel ?>
Expand Down

0 comments on commit 82ed7b2

Please sign in to comment.