Add game sharing options
This commit is contained in:
parent
2de1451bc9
commit
785d9e4847
|
@ -56,4 +56,5 @@ chat = roomHtml.map(round.room(_))) {
|
|||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">var lichess_data = @Html(roundPlayerJsData(pov, version))</script>
|
||||
@round.share(game)
|
||||
}
|
||||
|
|
14
app/views/round/share.scala.html
Normal file
14
app/views/round/share.scala.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
@(game: DbGame)(implicit ctx: Context)
|
||||
|
||||
@defining("http://lichess.org/" + routes.Round.watcher(game.id, "white")) { url =>
|
||||
<div class="game_share">
|
||||
<div class="game_share_top">
|
||||
<div class="game_share_widgets clearfix">
|
||||
<div class="facebook_placeholder"></div>
|
||||
<div class="twitter_placeholder"><a href="http://twitter.com/share" class="twitter-share-button" data-text="I like this Chess game! @url" data-count="none" data-url="http://lichess.org">Tweet this game</a></div>
|
||||
<div class="plusone_placeholder"></div>
|
||||
</div>
|
||||
<a title="@trans.shareThisUrlToLetSpectatorsSeeTheGame()" class="game_permalink blank_if_play" href="@url">@url</a>
|
||||
</div>
|
||||
</div>
|
||||
}
|
|
@ -82,4 +82,5 @@
|
|||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">var lichess_data = @Html(roundWatcherJsData(pov, version))</script>
|
||||
@round.share(game)
|
||||
}
|
||||
|
|
|
@ -189,7 +189,7 @@ $(function() {
|
|||
$soundToggle.addClass('unavailable');
|
||||
}
|
||||
|
||||
if (false || lichess.onProduction) {
|
||||
if (true || lichess.onProduction) {
|
||||
var homeUrl = $('#site_title').attr('href');
|
||||
setTimeout(function() {
|
||||
if ($gameSharing = $('div.game_share_widgets').orNot()) {
|
||||
|
|
|
@ -443,7 +443,6 @@ div.lichess_social div.addtochrome {
|
|||
}
|
||||
div.lichess_facebook iframe {
|
||||
border:none;
|
||||
width: 110px;
|
||||
height: 22px;
|
||||
margin-left: 5px;
|
||||
overflow: hidden;
|
||||
|
|
|
@ -1,42 +1,45 @@
|
|||
div.game_share {
|
||||
margin-top: 30px;
|
||||
width: 512px;
|
||||
box-shadow: 0 0 7px #d0d0d0;
|
||||
-moz-box-shadow: 0 0 7px #d0d0d0;
|
||||
-webkit-box-shadow: 0 0 7px #d0d0d0;
|
||||
border: 1px solid #c0c0c0;
|
||||
border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
margin-top: 30px;
|
||||
width: 512px;
|
||||
box-shadow: 0 0 7px #d0d0d0;
|
||||
-moz-box-shadow: 0 0 7px #d0d0d0;
|
||||
-webkit-box-shadow: 0 0 7px #d0d0d0;
|
||||
border: 1px solid #c0c0c0;
|
||||
border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
}
|
||||
div.game_share_top {
|
||||
width: 92%;
|
||||
height: 25px;
|
||||
padding: 10px 4% 6px 4%;
|
||||
width: 92%;
|
||||
height: 25px;
|
||||
padding: 10px 4% 6px 4%;
|
||||
}
|
||||
div.game_share_top a.game_permalink {
|
||||
float: left;
|
||||
display: block;
|
||||
margin-top: 3px;
|
||||
float: left;
|
||||
display: block;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
div.game_share_widgets {
|
||||
float: right;
|
||||
opacity: 0.7;
|
||||
width: 270px;
|
||||
float: right;
|
||||
opacity: 0.7;
|
||||
width: 270px;
|
||||
}
|
||||
div.game_share_widgets:hover {
|
||||
opacity: 1;
|
||||
opacity: 1;
|
||||
}
|
||||
div.game_share_widgets > div {
|
||||
float: right;
|
||||
display: none;
|
||||
margin-left: 10px;
|
||||
float: right;
|
||||
display: none;
|
||||
margin-left: 10px;
|
||||
}
|
||||
div.game_share_widgets iframe, div.game_share_widgets div.lichess_plusone > div {
|
||||
max-width: 70px;
|
||||
max-width: 70px;
|
||||
}
|
||||
div.lichess_facebook iframe {
|
||||
max-width: 92px;
|
||||
}
|
||||
div.game_share_widgets.loaded > div {
|
||||
display: block;
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
|
2
todo
2
todo
|
@ -22,6 +22,8 @@ http://codetunes.com/2012/05/09/scala-dsl-tutorial-writing-web-framework-router
|
|||
use POST instead of GET where it makes sense
|
||||
endgame sound http://en.lichess.org/forum/lichess-feedback/checkmate-sound-feature?page=1#1
|
||||
translation contributions
|
||||
wiki
|
||||
assets versions
|
||||
|
||||
next deploy:
|
||||
bin/migrate
|
||||
|
|
Loading…
Reference in a new issue