Skip to content

Instantly share code, notes, and snippets.

@BinaryMoon
Created April 5, 2017 15:48
Show Gist options
  • Save BinaryMoon/c6c8e1b7ee13b2271566e6f5cd1f92a4 to your computer and use it in GitHub Desktop.
Save BinaryMoon/c6c8e1b7ee13b2271566e6f5cd1f92a4 to your computer and use it in GitHub Desktop.
include variables
{% assign width=include.game.game_width | round %}
{% if width < 500 %}
{% assign width=500 %}
{% endif %}
<style>
.game-container {
max-width: {{ width }}px;
}
.game-container-inner {
padding-bottom: {{ include.game.game_height | times: 100 | divided_by: include.game.game_width }}%;
}
</style>
<div class="game-wrapper">
<div class="game-container">
<div class="toolbar">
<button class="fave icon" data-game-id="{{ include.game.game_id }}">Favourite</button>
<button class="fullscreen icon">Fullscreen</button>
</div>
<div class="game-container-inner">
<iframe
src="https://games.gamepix.com/play/{{ include.game.game_id }}?sid=80185"
frameborder="0"
scrolling="no"></iframe>
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment