Skip to content

Commit

Permalink
tryit: Save some vertical space
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
  • Loading branch information
stgraber committed Jan 14, 2017
1 parent e826464 commit 742ceaa
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 70 deletions.
54 changes: 20 additions & 34 deletions content/lxd/try-it.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,46 +65,32 @@
</div>

<div class="panel panel-success" id="tryit_info_panel" style="display:none">
<div class="panel-heading"><a data-toggle="collapse" class="text" href="#tryit_info_collapse">Container information</a></div>
<div class="panel-body collapse in" id="tryit_info_collapse">
<table class="table">
<tr id="tryit_ssh_row">
<th>SSH</th>
<td>ssh <span class="tryit_container_username"></span>@<span class="tryit_container_ip"></span></td>
</tr>

<tr id="tryit_lxd_row">
<th>LXD</th>
<td>lxc remote add tryit <span class="tryit_container_ip"></span></td>
</tr>

<tr id="tryit_password_row">
<th>Password</th>
<td><span class="tryit_container_password"></span></td>
</tr>

<tr id="tryit_clock">
<th>Time</th>
<td><span class="minutes"></span> minutes, <span class="seconds"></span> seconds</td>
</tr>
</table>
</div>
<div class="panel-heading">Container information</div>
<table class="table" style="padding-left: 15px;">
<tr id="tryit_lxd_row">
<th>Remote LXD</th>
<td>lxc remote add tryit <span class="tryit_container_ip"></span> --password=<span class="tryit_container_password"></span></td>
</tr>

<tr id="tryit_clock">
<th>Remaining time</th>
<td><span class="minutes"></span> minutes, <span class="seconds"></span> seconds</td>
</tr>
</table>
</div>

<div class="panel panel-primary" id="tryit_console_panel" style="display:none">
<div class="panel-heading">Console</div>
<div class="panel-body">
<div id="tryit_console" style="background-color:black;"></div>
<div class="panel-heading">Terminal</div>
<div id="tryit_console" style="background-color:black;"></div>

<button class="btn btn-default btn-lg" id="tryit_console_reconnect" type="button" style="display:none">
<span aria-hidden="true" class="glyphicon glyphicon-repeat"></span>
Reconnect
</button>
</div>
<button class="btn btn-default btn-lg" id="tryit_console_reconnect" type="button" style="display:none">
<span aria-hidden="true" class="glyphicon glyphicon-repeat"></span>
Reconnect
</button>
</div>

<div class="panel panel-info" id="tryit_examples_panel" style="display:none">
<div class="panel-heading"><a data-toggle="collapse" class="text" href="#tryit_examples_collapse">Step by step introduction</a> (<a href="#" target="_blank">click here to open a new window</a>)</div>
<div class="panel panel-warning" id="tryit_examples_panel" style="display:none">
<div class="panel-heading"><a data-toggle="collapse" class="text" href="#tryit_examples_collapse">Step by step instructions</a></div>
<div class="panel-body collapse in" id="tryit_examples_collapse">
<div class="panel-group" role="tablist" id="tryit_intro"
aria-multiselectable="true">
Expand Down
52 changes: 19 additions & 33 deletions content/lxd/try-it.ja.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,46 +56,32 @@
</div>

<div class="panel panel-success" id="tryit_info_panel" style="display:none">
<div class="panel-heading"><a data-toggle="collapse" class="text" href="#tryit_info_collapse">コンテナの情報</a> <!-- Container information --></div>
<div class="panel-body collapse in" id="tryit_info_collapse">
<table class="table">
<tr id="tryit_ssh_row">
<th>SSH</th>
<td>ssh <span class="tryit_container_username"></span>@<span class="tryit_container_ip"></span></td>
</tr>

<tr id="tryit_lxd_row">
<th>LXD</th>
<td>lxc remote add tryit <span class="tryit_container_ip"></span></td>
</tr>

<tr id="tryit_password_row">
<th>パスワード</th>
<td><span class="tryit_container_password"></span></td>
</tr>

<tr id="tryit_clock">
<th>残り時間 <!-- Time --></th>
<td><span class="minutes"></span><!-- minutes, --> <span class="seconds"></span><!-- seconds --></td>
</tr>
</table>
</div>
<div class="panel-heading">コンテナの情報 <!-- Container information --></div>
<table class="table" style="padding-left: 15px;">
<tr id="tryit_lxd_row">
<th>LXD</th>
<td>lxc remote add tryit <span class="tryit_container_ip"></span> --password=<span class="tryit_container_password"></span></td>
</tr>

<tr id="tryit_clock">
<th>残り時間 <!-- Time --></th>
<td><span class="minutes"></span><!-- minutes, --> <span class="seconds"></span><!-- seconds --></td>
</tr>
</table>
</div>

<div class="panel panel-primary" id="tryit_console_panel" style="display:none">
<div class="panel-heading">コンソール <!-- Console --></div>
<div class="panel-body">
<div id="tryit_console" style="background-color:black;"></div>
<div id="tryit_console" style="background-color:black;"></div>

<button class="btn btn-default btn-lg" id="tryit_console_reconnect" type="button" style="display:none">
<span aria-hidden="true" class="glyphicon glyphicon-repeat"></span>
再接続 <!-- Reconnect -->
</button>
</div>
<button class="btn btn-default btn-lg" id="tryit_console_reconnect" type="button" style="display:none">
<span aria-hidden="true" class="glyphicon glyphicon-repeat"></span>
再接続 <!-- Reconnect -->
</button>
</div>

<div class="panel panel-info" id="tryit_examples_panel" style="display:none">
<div class="panel-heading"><a data-toggle="collapse" class="text" href="#tryit_examples_collapse">ステップバイステップでの入門</a> <!-- Step by step introduction -->(<a href="#" target="_blank">新しいウィンドウで開きます <!-- click here to open a new window --></a>)</div>
<div class="panel panel-warning" id="tryit_examples_panel" style="display:none">
<div class="panel-heading"><a data-toggle="collapse" class="text" href="#tryit_examples_collapse">ステップバイステップでの入門</a> <!-- Step by step introduction --></div>
<div class="panel-body collapse in" id="tryit_examples_collapse">
<div class="panel-group" role="tablist" id="tryit_intro"
aria-multiselectable="true">
Expand Down
5 changes: 3 additions & 2 deletions static/css/local.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ div.manpage {
max-width: 45em;
}



.dropdown-submenu {
position:relative;
}
Expand Down Expand Up @@ -107,6 +105,9 @@ div.manpage {
border-radius:6px 0 6px 6px;
}

.panel {
margin-bottom: 10px;
}

/* paragraph anchors as generated by markdown toc */
a.headerlink {
Expand Down
2 changes: 1 addition & 1 deletion static/js/tryit.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ $(document).ready(function() {
var cell = createCell(element);
var size = getSize(element, cell);

var height = Math.max(Math.round(window.innerHeight / 50), 20);
var height = Math.max(Math.round(window.innerHeight / 70), 15);
var width = size.cols - 1;

sock = new WebSocket("wss://"+tryit_server+"/1.0/console?id="+id+"&width="+width+"&height="+height);
Expand Down

0 comments on commit 742ceaa

Please sign in to comment.