-
-
Notifications
You must be signed in to change notification settings - Fork 782
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
89 changed files
with
324 additions
and
22,173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,308 @@ | ||
<template> | ||
<ul id="team-members"> | ||
<li class="profile-container" v-for="profile in team"> | ||
<div class="avatar"> | ||
<img | ||
v-if="profile.github" | ||
:src="'https://github.com/' + profile.github + '.png'" | ||
:alt="profile.name" | ||
width="80" | ||
height="80" | ||
/> | ||
</div> | ||
<div class="profile"> | ||
<h3 :data-official-title="profile.title"> | ||
{{ profile.name }} | ||
<!-- <sup v-if="profile.title" v-html="profile.title"></sup> --> | ||
</h3> | ||
<dl> | ||
<template v-if="profile.work"> | ||
<dt> | ||
<i class="fa fa-briefcase"></i> | ||
<span class="sr-only">Work</span> | ||
</dt> | ||
<dd v-html="workHtml(profile)"></dd> | ||
</template> | ||
<template v-if="profile.city"> | ||
<dt> | ||
<i class="fa fa-map-marker"></i> | ||
<span class="sr-only">City</span> | ||
</dt> | ||
<dd> | ||
{{ profile.city }} | ||
</dd> | ||
</template> | ||
<template v-if="profile.links"> | ||
<dt> | ||
<i class="fa fa-link"></i> | ||
<span class="sr-only">Links</span> | ||
</dt> | ||
<dd> | ||
<ul> | ||
<li v-for="link in profile.links"> | ||
<a :href="link" target="_blank">{{ minimizeLink(link) }}</a> | ||
</li> | ||
</ul> | ||
</dd> | ||
</template> | ||
<footer v-if="hasSocialLinks(profile)" class="social"> | ||
<a | ||
class="github" | ||
v-if="profile.github" | ||
:href="githubUrl(profile.github)" | ||
> | ||
<i class="fab fa-github"></i> | ||
<span class="sr-only">Github</span> | ||
</a> | ||
<a | ||
class="twitter" | ||
v-if="profile.twitter" | ||
:href="'https://twitter.com/' + profile.twitter" | ||
> | ||
<i class="fab fa-twitter"></i> | ||
<span class="sr-only">Twitter</span> | ||
</a> | ||
</footer> | ||
</dl> | ||
</div> | ||
</li> | ||
</ul> | ||
</template> | ||
|
||
<script> | ||
let team = [ | ||
{ | ||
name: 'Kiro Risk', | ||
// title: 'Benevolent Dictator For Life', | ||
city: 'San Francisco, CA, USA', | ||
github: 'krisk', | ||
twitter: 'kirorisk', | ||
work: { | ||
role: 'Creator', | ||
org: 'Fuse.js' | ||
}, | ||
links: [ | ||
'https://github.com/sponsors/krisk', | ||
'https://www.patreon.com/kirorisk' | ||
] | ||
} | ||
] | ||
export default { | ||
name: 'Team', | ||
data: () => ({ | ||
team | ||
}), | ||
computed: {}, | ||
methods: { | ||
workHtml(profile) { | ||
console.log(profile) | ||
var work = profile.work | ||
var html = '' | ||
if (work.orgUrl) { | ||
html += '<a href="' + work.orgUrl + '" target="_blank">' | ||
if (work.org) { | ||
html += work.org | ||
} else { | ||
this.minimizeLink(work.orgUrl) | ||
} | ||
html += '</a>' | ||
} else if (work.org) { | ||
html += work.org | ||
} | ||
if (work.role) { | ||
if (html.length > 0) { | ||
html = work.role + ' @ ' + html | ||
} else { | ||
html = work.role | ||
} | ||
} | ||
return html | ||
}, | ||
hasSocialLinks(profile) { | ||
return profile.github || profile.twitter | ||
}, | ||
/** | ||
* Generate a GitHub URL using a repo and a handle. | ||
*/ | ||
githubUrl(handle, repo) { | ||
if (repo && repo.url) { | ||
return repo.url | ||
} | ||
if (repo && repo.indexOf('/') !== -1) { | ||
// If the repo name has a slash, it must be an organization repo. | ||
// In such a case, we discard the (personal) handle. | ||
return 'https://github.com/' + repo.replace(/\/\*$/, '') | ||
} | ||
return 'https://github.com/' + handle + '/' + (repo || '') | ||
}, | ||
minimizeLink(link) { | ||
return link | ||
.replace(/^https?:\/\/(www\.)?/, '') | ||
.replace(/\/$/, '') | ||
.replace(/^mailto:/, '') | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="css"> | ||
#team-members .sort-by-distance-button { | ||
display: inline-block; | ||
padding: 0.4em 0.7em 0.45em; | ||
font-weight: bold; | ||
font-size: 0.5em; | ||
text-transform: uppercase; | ||
line-height: 1; | ||
border: none; | ||
background: #304455; | ||
color: #fff; | ||
border-radius: 3px; | ||
position: relative; | ||
cursor: pointer; | ||
float: right; | ||
margin-top: 0.3em; | ||
} | ||
#team-members .sort-by-distance-button i { | ||
margin-right: 0.25em; | ||
} | ||
#team-members .sort-by-distance-button i:last-child { | ||
margin-right: 0; | ||
} | ||
#team-members .sort-by-distance-button[disabled] { | ||
opacity: 0.7; | ||
cursor: default; | ||
} | ||
#team-members .profile-container { | ||
display: flex; | ||
padding: 25px 0; | ||
border-bottom: 1px dotted #ddd; | ||
} | ||
#team-members .profile-container:first-of-type { | ||
margin-top: 15px; | ||
} | ||
#team-members .profile-container:last-of-type { | ||
border-bottom: none; | ||
} | ||
#team-members .profile-container .avatar { | ||
flex: 0 0 80px; | ||
} | ||
#team-members .profile-container .avatar img { | ||
border-radius: 50%; | ||
object-fit: cover; | ||
} | ||
#team-members .profile-container .profile { | ||
padding-left: 26px; | ||
flex: 1; | ||
} | ||
#team-members .profile-container .profile h3 { | ||
margin: 0; | ||
font-size: 1.3em; | ||
} | ||
#team-members .profile-container .profile h3::before, | ||
#team-members .profile-container .profile h3::after { | ||
display: none; | ||
} | ||
#team-members .profile-container .profile h3 > sup { | ||
text-transform: uppercase; | ||
font-size: 0.7em; | ||
letter-spacing: 0.3px; | ||
padding: 2px 5px; | ||
margin-left: 10px; | ||
color: rgba(0, 0, 0, 0.6); | ||
background: #f9f7f5; | ||
border-radius: 5px; | ||
} | ||
#team-members .profile-container .profile .user-match { | ||
cursor: help; | ||
color: #4682b4; | ||
} | ||
#team-members .profile-container .profile .user-match:after { | ||
content: '\f06a'; | ||
font-family: FontAwesome; | ||
font-size: 0.75em; | ||
vertical-align: super; | ||
margin-left: 4px; | ||
margin-right: 2px; | ||
position: relative; | ||
} | ||
#team-members .profile-container .profile dl { | ||
margin: 0.6em 0 0; | ||
} | ||
#team-members .profile-container .profile dt, | ||
#team-members .profile-container .profile dd, | ||
#team-members .profile-container .profile ul, | ||
#team-members .profile-container .profile li { | ||
display: inline; | ||
padding: 0; | ||
margin: 0; | ||
line-height: 1.3; | ||
} | ||
#team-members .profile-container .profile dt { | ||
text-transform: uppercase; | ||
font-size: 0.84em; | ||
font-weight: 600; | ||
} | ||
#team-members .profile-container .profile dt::after { | ||
content: ''; | ||
margin-right: 7px; | ||
} | ||
#team-members .profile-container .profile dt i { | ||
width: 14px; | ||
text-align: center; | ||
} | ||
#team-members .profile-container .profile dt i.fa-map-marker { | ||
font-size: 1.15em; | ||
} | ||
#team-members .profile-container .profile dt i.fa-globe { | ||
font-size: 1.2em; | ||
} | ||
#team-members .profile-container .profile dt i.fa-link { | ||
font-size: 1.05em; | ||
} | ||
#team-members .profile-container .profile dd { | ||
font-weight: 600; | ||
} | ||
#team-members .profile-container .profile dd::after { | ||
display: block; | ||
content: ' '; | ||
margin-top: 0.6em; | ||
} | ||
#team-members .profile-container .profile li { | ||
display: inline-block; | ||
} | ||
#team-members .profile-container .profile li::after { | ||
display: inline-block; | ||
content: '·'; | ||
margin: 0 8px; | ||
} | ||
#team-members .profile-container .profile li:last-child::after { | ||
content: ''; | ||
} | ||
#team-members .profile-container .profile .social a { | ||
display: inline-block; | ||
line-height: 1; | ||
vertical-align: middle; | ||
margin-right: 4px; | ||
} | ||
#team-members .profile-container .profile .social a.github, | ||
#team-members .profile-container .profile .social a.codepen { | ||
color: #000; | ||
} | ||
#team-members .profile-container .profile .social a.twitter { | ||
color: #1da1f3; | ||
} | ||
#team-members .profile-container .profile .social a.linkedin { | ||
color: #0077b5; | ||
} | ||
#team-members .profile-container .profile .social i { | ||
vertical-align: text-bottom; | ||
font-size: 1.3em; | ||
} | ||
@media (max-width: 640px) { | ||
#team-members .profile-container .profile h3 sup { | ||
display: inline-block; | ||
margin-left: 0; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.