Skip to content

Commit

Permalink
added elm and rust
Browse files Browse the repository at this point in the history
All kudos go to @brandly
  • Loading branch information
anvaka committed Apr 3, 2020
1 parent 9dbb5ea commit 169945b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,20 @@ of [galactic-data](https://github.com/anvaka/galactic-data).
<a href="https://anvaka.github.io/pm/#/galaxy/fedora?cx=1539&cy=409&cz=7141&lx=0.0164&ly=0.1453&lz=-0.0027&lw=0.9892&ml=150&s=1.75&l=1">demo</a>
</td>
<td align="center">
<h3>Your graph?</h3>
Open issue to <a href="https://github.com/anvaka/pm/issues">request your own graph</a>
<h3>Rust Crates</h3>
<a href="https://anvaka.github.io/pm/#/galaxy/crates?cx=6617&cy=467&cz=353&lx=0.0169&ly=0.7328&lz=0.0495&lw=0.6785&ml=200&s=1.75&l=1&v=2020-02-19T00-00-00Z">
<img src="https://i.imgur.com/vAPK5lT.png">
</a><br />
<a href="https://github.com/brandly/allcrates">indexer</a> |
<a href="https://anvaka.github.io/pm/#/galaxy/crates?cx=6617&cy=467&cz=353&lx=0.0169&ly=0.7328&lz=0.0495&lw=0.6785&ml=200&s=1.75&l=1&v=2020-02-19T00-00-00Z">demo</a>
</td>
<td align="center">
<h3>Your graph?</h3>
Open issue to <a href="https://github.com/anvaka/pm/issues">request your own graph</a>
<h3>Elm</h3>
<a href="https://anvaka.github.io/pm/#/galaxy/elm?cx=-247&cy=-1794&cz=1804&lx=0.4062&ly=0.1564&lz=-0.3016&lw=0.8483&ml=150&s=1.75&l=1&v=2020-02-21T00-00-00Z">
<img src="https://i.imgur.com/44Sj8Js.png">
</a><br />
<a href="https://github.com/brandly/allelm">indexer</a> |
<a href="https://anvaka.github.io/pm/#/galaxy/elm?cx=-247&cy=-1794&cz=1804&lx=0.4062&ly=0.1564&lz=-0.3016&lw=0.8483&ml=150&s=1.75&l=1&v=2020-02-21T00-00-00Z">demo</a>
</td>
</tr>
</tbody>
Expand Down
3 changes: 3 additions & 0 deletions src/destination.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ export default class Destination extends React.Component {
let isHover = x.state ? x.state.hover : false;
let imageSrc = prefix + props.media;
if (isHover) imageSrc = imageSrc.replace(/_first\.png/, '_150.gif');
if (props.static && props.dynamic) {
imageSrc = isHover ? props.dynamic : props.static;
}

return (
<a className='media col-md-6 col-lg-4' href={props.href}
Expand Down
12 changes: 12 additions & 0 deletions src/welcome.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,18 @@ export default class WelcomePage extends React.Component {
href='#/galaxy/brew?cx=-803&cy=-3622&cz=-1640&lx=0.3774&ly=-0.7360&lz=0.4338&lw=0.3573&ml=200&s=2.75&l=1'
media='brew_fly_first.png'
name='Brew'/>

<Destination description='Rust package repository (crates.io)'
href='#/galaxy/crates?cx=6617&cy=467&cz=353&lx=0.0169&ly=0.7328&lz=0.0495&lw=0.6785&ml=200&s=1.75&l=1&v=2020-02-19T00-00-00Z'
static='https://i.imgur.com/vAPK5lT.png'
dynamic='https://i.imgur.com/BRcE24z.gif'
name='Rust'/>

<Destination description='A delightful language'
href='#/galaxy/elm?cx=-247&cy=-1794&cz=1804&lx=0.4062&ly=0.1564&lz=-0.3016&lw=0.8483&ml=150&s=1.75&l=1&v=2020-02-21T00-00-00Z'
static='https://i.imgur.com/44Sj8Js.png'
dynamic='https://i.imgur.com/zfQTac3.gif'
name='Elm'/>
</div>
</div>
);
Expand Down

0 comments on commit 169945b

Please sign in to comment.