Skip to content

Commit

Permalink
Merge pull request rauchg#153 from laughinghan/feature.sign-in-link-i…
Browse files Browse the repository at this point in the history
…n-iframe

Add "or sign in" link to iframe too
  • Loading branch information
rauchg committed Mar 4, 2016
2 parents 6b1920a + a0e2ec9 commit b2b481b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export default function slackin({
let { name } = slack.org;
let { active, total } = slack.users;
if (!name) return res.send(404);
let dom = splash({ coc, path, name, channels, active, total, iframe: true });
let dom = splash({ coc, path, name, org, channels, active, total, iframe: true });
res.type('html');
res.send(dom.toHTML());
});
Expand Down
28 changes: 13 additions & 15 deletions lib/splash.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function splash({ path, name, org, coc, logo, active, total, chan
),
dom('button.loading', 'Get my Invite')
),
!iframe && dom('p.signin',
dom('p.signin',
'or ',
dom(`a href=https://${org}.slack.com target=_top`, 'sign in'),
'.'
Expand Down Expand Up @@ -297,22 +297,20 @@ function style({ logo, active, iframe } = {}){
});
}

if (!iframe) {
css.add('p.signin', {
'padding': '10px 0 10px',
'font-size': '11px'
});
css.add('p.signin', {
'padding': '10px 0 10px',
'font-size': '11px'
});

css.add('p.signin a', {
'color': pink,
'text-decoration': 'none'
});
css.add('p.signin a', {
'color': pink,
'text-decoration': 'none'
});

css.add('p.signin a:hover', {
'background-color': '#E01563',
color: '#fff'
});
}
css.add('p.signin a:hover', {
'background-color': '#E01563',
color: '#fff'
});

if (!iframe) {
css.add('footer', {
Expand Down

0 comments on commit b2b481b

Please sign in to comment.