Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
1d55545e
Commit
1d55545e
authored
Jul 16, 2022
by
boojack
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update github badge style
parent
9b5a555d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
28 deletions
+23
-28
GitHubBadge.tsx
web/src/components/GitHubBadge.tsx
+6
-7
github-badge.less
web/src/less/github-badge.less
+17
-21
No files found.
web/src/components/GitHubBadge.tsx
View file @
1d55545e
...
...
@@ -13,18 +13,17 @@ const GitHubBadge: React.FC<Props> = () => {
});
},
[]);
const
handleClick
=
()
=>
{
window
.
location
.
href
=
"https://github.com/usememos/memos"
;
};
return
(
<
div
className=
"github-badge-container"
onClick=
{
handleClick
}
>
<
a
className=
"github-badge-container"
href=
"https://github.com/usememos/memos"
>
<
div
className=
"github-icon"
>
<
img
className=
"icon-img"
src=
"/github.webp"
alt=
""
/>
Star
</
div
>
<
span
className=
{
`count-text ${starCount || "pulse"}`
}
>
{
starCount
||
"🌟"
}
</
span
>
</
div
>
<
div
className=
"count-text"
>
{
starCount
||
""
}
<
span
className=
"icon-text"
>
🌟
</
span
>
</
div
>
</
a
>
);
};
...
...
web/src/less/github-badge.less
View file @
1d55545e
...
...
@@ -10,29 +10,25 @@
}
> .count-text {
@apply px-3 text-xs font-bold text-gray-800;
@apply
w-auto h-full flex flex-row justify-center items-center
px-3 text-xs font-bold text-gray-800;
&.pulse
{
@apply text-sm;
animation: 1s linear 0s infinite pulse;
> .icon-text
{
@apply text-sm
ml-1
;
animation: 1
.6
s linear 0s infinite pulse;
}
}
}
@keyframes pulse {
0% {
margin-bottom: 0px;
}
30% {
margin-bottom: 2px;
}
60% {
margin-bottom: 6px;
}
70% {
margin-bottom: 3px;
}
100% {
margin-bottom: 0px;
}
}
@keyframes pulse {
0% {
transform: scale(0.95);
}
70% {
transform: scale(1.2);
}
100% {
transform: scale(0.95);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment