Skip to content

Commit

Permalink
tweak: no svg
Browse files Browse the repository at this point in the history
  • Loading branch information
Sorosliu1029 committed Nov 29, 2021
1 parent e60a144 commit 27bdc06
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 54 deletions.
29 changes: 3 additions & 26 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

11 changes: 4 additions & 7 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,10 @@ async function run() {
return
}

// const { followers, unfollowers } = getFollowersChange(
// previousFollowers,
// currentFollowers,
// )

const followers = currentFollowers.slice(0, 3)
const unfollowers = currentFollowers.slice(3, 6)
const { followers, unfollowers } = getFollowersChange(
previousFollowers,
currentFollowers,
)

core.info(
`Follower change: \u001b[38;5;10m${followers.length} new followers, \u001b[38;5;11m${unfollowers.length} unfollowers`,
Expand Down
22 changes: 2 additions & 20 deletions src/output/html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,10 @@ function toUserSection(sectionTitle: string, users: Follower[]): string {
? `<div style="margin-top: 0; margin-bottom: 8px; font-size: 12px; color: #57606a;"><div>${user.bio}</div></div>`
: ''
const companySection = user.company
? `
<span style="margin-right: 16px;">
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" style="display: inline-block; fill: currentColor; vertical-align: text-bottom;">
<path fill-rule="evenodd"
d="M1.5 14.25c0 .138.112.25.25.25H4v-1.25a.75.75 0 01.75-.75h2.5a.75.75 0 01.75.75v1.25h2.25a.25.25 0 00.25-.25V1.75a.25.25 0 00-.25-.25h-8.5a.25.25 0 00-.25.25v12.5zM1.75 16A1.75 1.75 0 010 14.25V1.75C0 .784.784 0 1.75 0h8.5C11.216 0 12 .784 12 1.75v12.5c0 .085-.006.168-.018.25h2.268a.25.25 0 00.25-.25V8.285a.25.25 0 00-.111-.208l-1.055-.703a.75.75 0 11.832-1.248l1.055.703c.487.325.779.871.779 1.456v5.965A1.75 1.75 0 0114.25 16h-3.5a.75.75 0 01-.197-.026c-.099.017-.2.026-.303.026h-3a.75.75 0 01-.75-.75V14h-1v1.25a.75.75 0 01-.75.75h-3zM3 3.75A.75.75 0 013.75 3h.5a.75.75 0 010 1.5h-.5A.75.75 0 013 3.75zM3.75 6a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM3 9.75A.75.75 0 013.75 9h.5a.75.75 0 010 1.5h-.5A.75.75 0 013 9.75zM7.75 9a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM7 6.75A.75.75 0 017.75 6h.5a.75.75 0 010 1.5h-.5A.75.75 0 017 6.75zM7.75 3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5z">
</path>
</svg>
${user.company}
</span>
`
? `<span style="margin-right: 16px;">Work at: ${user.company}</span>`
: ''
const locationSection = user.location
? `
<span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" style="display: inline-block; fill: currentColor; vertical-align: text-bottom;">
<path fill-rule="evenodd"
d="M11.536 3.464a5 5 0 010 7.072L8 14.07l-3.536-3.535a5 5 0 117.072-7.072v.001zm1.06 8.132a6.5 6.5 0 10-9.192 0l3.535 3.536a1.5 1.5 0 002.122 0l3.535-3.536zM8 9a2 2 0 100-4 2 2 0 000 4z">
</path>
</svg>
${user.location}
</span>
`
? `<span>Live at: ${user.location}</span>`
: ''

userSection += `
Expand Down

0 comments on commit 27bdc06

Please sign in to comment.