Change add to slack image to inline svg
This commit is contained in:
parent
104bc217fc
commit
44fd2207fe
@ -18,7 +18,6 @@ class SlackAppController extends Controller
|
||||
|
||||
private const slack_authorise_url = 'https://slack.com/oauth/v2/authorize';
|
||||
private const slack_oauth_url = 'https://slack.com/api/oauth.v2.access';
|
||||
private const slack_button = 'https://platform.slack-edge.com/img/add_to_slack.png';
|
||||
|
||||
/**
|
||||
* Install this app - Slack Button
|
||||
@ -26,10 +25,15 @@ class SlackAppController extends Controller
|
||||
public function button()
|
||||
{
|
||||
return sprintf(
|
||||
'<a href="%s?%s"><img alt="Add to Slack" height="40" width="139" src="%s" srcSet="%s 1x, %s@2x.png 2x" /></a>',
|
||||
'<a href="%s?%s" style="align-items:center;color:#000;background-color:#fff;border:1px solid #ddd;border-radius:4px;display:inline-flex;font-family:Lato, sans-serif;font-size:18px;font-weight:600;height:40px;justify-content:center;text-decoration:none;width:180px">'
|
||||
.'<svg xmlns="http://www.w3.org/2000/svg" style="height:24px;width:24px;margin-right:12px" viewBox="0 0 122.8 122.8">'
|
||||
.'<path d="M25.8 77.6c0 7.1-5.8 12.9-12.9 12.9S0 84.7 0 77.6s5.8-12.9 12.9-12.9h12.9v12.9zm6.5 0c0-7.1 5.8-12.9 12.9-12.9s12.9 5.8 12.9 12.9v32.3c0 7.1-5.8 12.9-12.9 12.9s-12.9-5.8-12.9-12.9V77.6z" fill="#e01e5a"></path>'
|
||||
.'<path d="M45.2 25.8c-7.1 0-12.9-5.8-12.9-12.9S38.1 0 45.2 0s12.9 5.8 12.9 12.9v12.9H45.2zm0 6.5c7.1 0 12.9 5.8 12.9 12.9s-5.8 12.9-12.9 12.9H12.9C5.8 58.1 0 52.3 0 45.2s5.8-12.9 12.9-12.9h32.3z" fill="#36c5f0"></path>'
|
||||
.'<path d="M97 45.2c0-7.1 5.8-12.9 12.9-12.9s12.9 5.8 12.9 12.9-5.8 12.9-12.9 12.9H97V45.2zm-6.5 0c0 7.1-5.8 12.9-12.9 12.9s-12.9-5.8-12.9-12.9V12.9C64.7 5.8 70.5 0 77.6 0s12.9 5.8 12.9 12.9v32.3z" fill="#2eb67d"></path>'
|
||||
.'<path d="M77.6 97c7.1 0 12.9 5.8 12.9 12.9s-5.8 12.9-12.9 12.9-12.9-5.8-12.9-12.9V97h12.9zm0-6.5c-7.1 0-12.9-5.8-12.9-12.9s5.8-12.9 12.9-12.9h32.3c7.1 0 12.9 5.8 12.9 12.9s-5.8 12.9-12.9 12.9H77.6z" fill="#ecb22e"></path>'
|
||||
.'</svg>Add to Slack</a>',
|
||||
self::slack_authorise_url,
|
||||
http_build_query($this->parameters()),
|
||||
self::slack_button,self::slack_button,self::slack_button
|
||||
http_build_query($this->parameters())
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user