Skip to content

Commit

Permalink
Unify icons
Browse files Browse the repository at this point in the history
  • Loading branch information
danon committed Oct 14, 2024
1 parent 6f6af70 commit bdf1fa3
Show file tree
Hide file tree
Showing 8 changed files with 107 additions and 66 deletions.
3 changes: 2 additions & 1 deletion app/Domain/Icon/FontAwesomeFree.php
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,8 @@ public function icons(): array
"jobOfferPublishDate" => "fas fa-calendar-days",
"jobOfferRemove" => "fas fa-trash-can",
"jobOfferReport" => "fas fa-flag",
"jobOfferRequirementProgress" => "fas fa-circle",
"jobOfferRequirementRank" => 'fas fa-circle',
"jobOfferRequirementRanked" => 'fas fa-circle',
"jobOfferSeniority" => "fas fa-fw fa-chart-line",
"jobOfferSubscribe" => "fa-regular fa-bell",
"jobOfferSubscribed" => "fa-solid fa-bell",
Expand Down
100 changes: 51 additions & 49 deletions app/Domain/Icon/FontAwesomePro.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ public function icons(): array
'loginGithub' => 'fa-brand fa-github',

// homepage
'microblogsPopular' => 'fa-light fa-comments',
'reputationRanking' => 'fa-light fa-star',
'forumNews' => 'fa-light fa-star',
'microblogsPopular' => 'fa-light fa-fire-flame-curved',
'reputationRanking' => 'fa-light fa-trophy',
'forumNews' => 'fa-light fa-inbox-in',
'viewersOnlineLocal' => 'fa-light fa-eye',
'viewersOnlineGlobal' => 'fa-light fa-users',
'homepageActivityMicroblog' => 'fa-light fa-person',
Expand All @@ -40,42 +40,42 @@ public function icons(): array
'homepageActivityPost' => 'fa-light fa-file-lines',

// microblog page
'recommendedUsers' => 'fa-light fa-tag',
'recommendedUsers' => 'fa-light fa-user-tag',

// microblog
'microblogNew' => 'fa-light fa-plus',
'microblogMine' => 'fa-light fa-address-book',
'microblogReport' => 'fa-light fa-flag',
'microblogShare' => 'fa-light fa-share-nodes',
'microblogAddComment' => 'fa-light fa-comment',
'microblogVote' => 'fa-light fa-thumbs-up',
'microblogVoted' => 'fa-solid fa-thumbs-up',
'microblogVote' => 'fa-light fa-heart',
'microblogVoted' => 'fa-solid fa-heart',
'microblogSubscribe' => 'fa-light fa-bell',
'microblogSubscribed' => 'fa-solid fa-bell',
'microblogFoldedUnfold' => 'fa-light fa-circle-right',
'microblogFoldedUnfold' => 'fa-light fa-circle-ellipsis',
'microblogCommentsFoldedUnfold' => 'fa-light fa-comments',
'microblogBlockAuthor' => 'fa-light fa-user-slash',
'microblogEdit' => 'fa-light fa-pen-to-square',
'microblogBlockAuthor' => 'fa-light fa-lock',
'microblogEdit' => 'fa-light fa-edit',
'microblogDelete' => 'fa-light fa-trash-can',
'microblogRestore' => 'fa-light fa-trash-arrow-up',
'microblogSponsored' => 'fa-light fa-dollar-sign',
'microblogRestore' => 'fa-light fa-trash-can-undo',
'microblogSponsored' => 'fa-light fa-circle-dollar',
'microblogMenuDropdown' => $genericDropdown,

// microblog comment
'microblogCommentEdit' => 'fa-light fa-pen-to-square',
'microblogCommentEdit' => 'fa-light fa-edit',
'microblogCommentDelete' => 'fa-light fa-trash-can',
'microblogCommentRestore' => 'fa-light fa-trash-arrow-up',
'microblogCommentBlockAuthor' => 'fa-light fa-user-slash',
'microblogCommentNewSave' => 'fa-light fa-share-from-square',
'microblogCommentMenuEditRemove' => 'fa-light fa-bars',
'microblogCommentMenuAnswerFlag' => $genericDropdown,
'microblogCommentRestore' => 'fa-light fa-trash-can-undo',
'microblogCommentBlockAuthor' => 'fa-light fa-lock',
'microblogCommentNewSave' => 'fa-light fa-floppy-disk-pen',
'microblogCommentMenuEditRemove' => 'fa-light fa-bars', // deprecated
'microblogCommentMenuAnswerFlag' => 'fa-regular fa-ellipsis',

// navigation dropdown
'sponsorProfile' => 'fa-light fa-medal',
'userProfile' => 'fa-light fa-user',
'privateMessages' => 'fa-light fa-envelope',
'userAccount' => 'fa-light fa-gear',
'help' => 'fa-light fa-circle-info',
'help' => 'fa-light fa-square-question',
'adminPanel' => 'fa-light fa-user-tie',
'logout' => 'fa-light fa-right-from-bracket',

Expand Down Expand Up @@ -116,7 +116,7 @@ public function icons(): array
'userAccount.accountDelete' => 'fa-light fa-trash-can',

// following user
'userFollow' => $faTick,
'userFollow' => 'fa-light fa-bell',

// report
'reportType.spam' => 'fa-light fa-envelopes-bulk',
Expand Down Expand Up @@ -144,14 +144,15 @@ public function icons(): array
// autocomplete
'autocompleteUserShowProfile' => 'fa-light fa-user',
'autocompleteUserPrivateMessage' => 'fa-light fa-comment',
'autocompleteUserFindPosts' => 'fa-light fa-magnifying-glass',
'autocompleteUserFindPosts' => 'fa-light fa-user-magnifying-glass',
'autocompleteUserNoAvatar' => 'fa-light fa-user',
'autocompleteSearch' => 'fa-light fa-magnifying-glass',

// tags
'tag' => 'fa-light fa-tag',
'tagRemove' => $genericClose,
'tagRank' => 'fa-light fa-circle',
'tagRanked' => 'fa-solid fa-circle',
'tagPopularInclude' => 'fa-light fa-plus',
'tagPopularMore' => 'fa-light fa-plus',

Expand All @@ -176,21 +177,21 @@ public function icons(): array
'editorMarkdownHelp' => 'fa-brand fa-markdown',
'editorAssetUpload' => 'fa-light fa-image',
'editorAssetUploading' => $genericUploading,
'editorControlBold' => 'fa-light fa-bold',
'editorControlItalics' => 'fa-light fa-italic',
'editorControlUnderline' => 'fa-light fa-underline',
'editorControlStrikeThrough' => 'fa-light fa-strikethrough',
'editorControlHyperlink' => 'fa-light fa-link',
'editorControlCodeBlock' => 'fa-light fa-code',
'editorControlImage' => 'fa-light fa-image',
'editorControlKeyStroke' => 'fa-light fa-keyboard',
'editorControlListOrdered' => 'fa-light fa-list-ol',
'editorControlListUnordered' => 'fa-light fa-list-ul',
'editorControlQuote' => 'fa-light fa-quote-left',
'editorControlTable' => 'fa-light fa-table',
'editorControlIndentMore' => 'fa-light fa-indent',
'editorControlIndentLess' => 'fa-light fa-outdent',
'editorControlEmoji' => 'fa-light fa-face-smile-beam',
'editorControlBold' => 'fa-solid fa-bold',
'editorControlItalics' => 'fa-solid fa-italic',
'editorControlUnderline' => 'fa-solid fa-underline',
'editorControlStrikeThrough' => 'fa-solid fa-strikethrough',
'editorControlHyperlink' => 'fa-solid fa-link',
'editorControlCodeBlock' => 'fa-solid fa-code',
'editorControlImage' => 'fa-solid fa-image',
'editorControlKeyStroke' => 'fa-solid fa-keyboard',
'editorControlListOrdered' => 'fa-solid fa-list-ol',
'editorControlListUnordered' => 'fa-solid fa-list-ul',
'editorControlQuote' => 'fa-solid fa-quote-left',
'editorControlTable' => 'fa-solid fa-table',
'editorControlIndentMore' => 'fa-solid fa-indent',
'editorControlIndentLess' => 'fa-solid fa-outdent',
'editorControlEmoji' => 'fa-solid fa-face-smile-beam',
'editorEmojiPickerClose' => $genericClose,
'editorMarkdownHelpKeyArrowUp' => 'fa-light fa-arrow-up',
'editorMarkdownHelpKeyArrowDown' => 'fa-light fa-arrow-down',
Expand Down Expand Up @@ -218,10 +219,10 @@ public function icons(): array
'errorPageNeedHelp' => 'fa-light fa-asterisk',

// tags
'tagsSubscribed' => 'fa-light fa-tag',
'tagsSubscribed' => 'fa-light fa-tags',
'tagsSubscribedEdit' => 'fa-light fa-gear',
'tagsPopularForum' => 'fa-light fa-tag',
'tagsPopularMicroblog' => 'fa-light fa-tag',
'tagsPopularForum' => 'fa-light fa-tags',
'tagsPopularMicroblog' => 'fa-light fa-tags',
'tagsPopularLanguage' => 'fa-light fa-wrench',

// forum
Expand All @@ -235,15 +236,15 @@ public function icons(): array
// topic
'topicSubscribe' => 'fa-light fa-bell',
'topicSubscribed' => 'fa-solid fa-bell',
'topicLog' => 'fa-light fa-chart-pie',
'topicLog' => 'fa-light fa-list-check',
'topicGoToBeginning' => 'fa-light fa-backward-fast',
'topicLogBackToTopic' => 'fa-light fa-backward-step',
'topicActionRename' => 'fa-light fa-pencil',
'topicActionRename' => 'fa-light fa-pen-line',
'topicActionMove' => 'fa-light fa-circle-arrow-right',
'topicActionLock' => 'fa-light fa-lock',
'topicActionUnlock' => 'fa-light fa-unlock',
'topicAccepted' => $faTick,
'topicReported' => 'fa-light fa-fire',
'topicReported' => 'fa-light fa-flag',
'topicStateSticky' => 'fa-light fa-thumbtack',
'topicStateLocked' => 'fa-light fa-lock',
'topicStateStandard' => 'fa-light fa-comments',
Expand All @@ -270,10 +271,10 @@ public function icons(): array
'postDelete' => 'fa-light fa-trash-can',
'postRestore' => 'fa-light fa-arrow-rotate-left',
'postMentionAuthor' => 'fa-light fa-at',
'postAnswerQuote' => 'fa-light fa-quote-left',
'postAnswerQuote' => 'fa-light fa-comment',
'postReport' => 'fa-light fa-flag',
'postMenuDropdown' => $genericDropdown,
'postMergeWithPrevious' => 'fa-light fa-compress',
'postMergeWithPrevious' => 'fa-light fa-arrow-up-from-bracket',
'postBanAuthor' => 'fa-light fa-user-slash',
'postDeleted' => 'fa-light fa-trash-can',
'postAuthorBlocked' => 'fa-light fa-user-slash',
Expand Down Expand Up @@ -307,12 +308,12 @@ public function icons(): array
'profileReputationLose' => 'fa-light fa-level-down',
'profileActions' => 'fa-light fa-handshake-simple',
'profileUserSendMessage' => 'fa-light fa-envelope',
'profileUserFindPosts' => 'fa-light fa-magnifying-glass',
'profileUserFindPosts' => 'fa-light fa-user-magnifying-glass',
'profileUserBan' => 'fa-light fa-user-lock',
'profileUserShowInAdmin' => 'fa-light fa-eye',
'profileMenuDropdown' => $genericDropdown,
'profileUserBlock' => 'fa-light fa-user-slash',
'profileUserUnblock' => 'fa-light fa-user',
'profileUserBlock' => 'fa-light fa-lock',
'profileUserUnblock' => 'fa-light fa-unlock',
'profileUserResidence' => 'fa-light fa-location-dot',
'profileUserWebsite' => 'fa-light fa-globe',
'profileUserGithub' => 'fa-brand fa-github',
Expand Down Expand Up @@ -362,10 +363,11 @@ public function icons(): array
"jobOfferPublishDate" => "fa-light fa-calendar-days",
"jobOfferRemove" => "fa-light fa-trash-can",
"jobOfferReport" => "fa-light fa-flag",
"jobOfferRequirementProgress" => "fa-light fa-circle",
"jobOfferRequirementRank" => 'fa-light fa-circle',
"jobOfferRequirementRanked" => 'fa-solid fa-circle',
"jobOfferSeniority" => "fa-light fa-fw fa-chart-line",
"jobOfferSubscribe" => "fa-light fa-bell",
"jobOfferSubscribed" => "fa-solid fa-bell",
"jobOfferSubscribe" => "fa-light fa-heart",
"jobOfferSubscribed" => "fa-solid fa-heart",
"jobOfferViews" => "fa-light fa-eye",
"jobOfferCompanyEmployees" => "fa-light fa-users",
"jobOfferCompanyEstablishmentYear" => "fa-light fa-calendar",
Expand Down
6 changes: 3 additions & 3 deletions app/Domain/Icon/Icons.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ public function iconSpin(string $iconName): Html
private function iconWithClass(string $iconName, string $modifierClass): Html
{
$class = $this->iconClass($iconName);
return $this->iconTag("$class $modifierClass");
return $this->iconTag("$class $modifierClass", $iconName);
}

private function iconTag(string $class): Html
private function iconTag(string $class, string $iconName): Html
{
return new StringHtml(\sPrintF('<i class="%s"></i>', $class));
return new StringHtml(\sPrintF('<i class="%s" data-icon="%s"></i>', $class, $iconName));
}

private function iconClass(string $iconName): string
Expand Down
14 changes: 7 additions & 7 deletions resources/js/components/forum/post.vue
Original file line number Diff line number Diff line change
Expand Up @@ -236,20 +236,20 @@
<vue-icon name="postSubscribed"/>
</span>
<vue-icon v-else name="postSubscribe"/>
<span class="d-none d-sm-inline">Obserwuj</span>
<span class="d-none d-sm-inline ms-1">Obserwuj</span>
</button>

<button class="btn btn-sm" ref="shareButton">
<vue-icon name="postShare"/>
<span class="d-none d-sm-inline">Udostępnij</span>
<span class="d-none d-sm-inline ms-1">Udostępnij</span>
</button>

<button v-if="!post.is_locked || post.permissions.write" @click="checkAuth(comment)" class="btn btn-sm">
<span v-if="isCommenting" class="text-primary">
<vue-icon name="postCommentActive"/>
</span>
<vue-icon v-else name="postComment"/>
<span class="d-none d-sm-inline">Komentuj</span>
<span class="d-none d-sm-inline ms-1">Komentuj</span>
</button>
</div>

Expand All @@ -261,13 +261,13 @@
<template v-else>
<vue-icon name="postEdit"/>
</template>
<span class="d-none d-sm-inline">Edytuj</span>
<span class="d-none d-sm-inline ms-1">Edytuj</span>
</button>

<template v-if="post.permissions.delete">
<button v-if="!post.deleted_at" @click="deletePost(true)" class="btn btn-sm">
<vue-icon name="postDelete"/>
<span class="d-none d-sm-inline">Usuń</span>
<span class="d-none d-sm-inline ms-1">Usuń</span>
</button>
<button v-else class="btn btn-sm" @click="restore">
<vue-icon name="postRestore"/>
Expand All @@ -282,12 +282,12 @@

<button @click="$emit('reply', post, false)" class="btn btn-sm" title="Dodaj cytat do pola odpowiedzi">
<vue-icon name="postAnswerQuote"/>
<span class="d-none d-sm-inline">Odpowiedz</span>
<span class="d-none d-sm-inline ms-1">Odpowiedz</span>
</button>

<a href="javascript:" :data-metadata="post.metadata" :data-url="post.url" class="btn btn-sm">
<vue-icon name="postReport"/>
<span class="d-none d-sm-inline">Zgłoś</span>
<span class="d-none d-sm-inline ms-1">Zgłoś</span>
</a>
</template>

Expand Down
6 changes: 4 additions & 2 deletions resources/js/components/progress-bar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
<span
v-for="i in max"
:aria-label="tooltips[i - 1]"
:class="[{editable}, valueLocal < i ? 'text-muted' : 'text-primary']"
class="text-primary"
:class="{editable}"
@click="setValue(i)"
data-balloon-pos="down">
<vue-icon name="tagRank"/>
<vue-icon name="tagRank" v-if="valueLocal < i"/>
<vue-icon name="tagRanked" v-else/>
</span>
</div>
</template>
Expand Down
Loading

0 comments on commit bdf1fa3

Please sign in to comment.