Skip to content

Commit

Permalink
Update navigation and only show image if exists
Browse files Browse the repository at this point in the history
  • Loading branch information
maban committed Sep 11, 2015
1 parent f7c1e43 commit e98069d
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 27 deletions.
3 changes: 2 additions & 1 deletion _includes/nav-secondary.html
Expand Up @@ -24,8 +24,9 @@
<li class="divider"></li>
<li class="nav-header">Smart TVs</li>
<li><a href="/device/vizio-costar">Vizio Co-Star</a></li>
<li><a href="/device/panasonic-viera">Panasonic Viera</a></li>
<li class="divider"></li>
<li class="nav-header">Waiting for official release</li>
<li class="nav-header">Waiting for testing or official release</li>
<li class="inactive">Razer Switchblade</li>
<li class="inactive">Razer Edge</li>
<li class="inactive">Nvidia's Project Shield</li>
Expand Down
36 changes: 19 additions & 17 deletions _layouts/device.html
Expand Up @@ -3,61 +3,63 @@
{% include nav-primary.html %}

<div class="container-fluid">

<div class="row-fluid">

<div class="span3">
{% include nav-secondary.html %}
</div>

<div class="span9" role="main">
<h1 class="page-header">{{ page.title }}</h1>
<p class="muted">Last updated: {{ page.date | date_to_long_string }}</p>
{% if page.attribution %}<p class="alert alert-info">{{ page.attribution }}</p>{% endif %}
<p class="lead browser browser-webkit">{{ page.browser }}</p>

<div class="row-fluid">
<p class="lead browser browser-webkit">{{ page.browser }}</p>

{% if page.image %}
<div class="row-fluid">
<img src="{{ page.image }}" alt="{{ page.title }} controller" />
</div>

{% endif %}

<div class="row-fluid">

<div class="span4 well">
<h3>HTML5 Test: {{page.score-html5}}</h3>
<div class="progress progress-danger">
<div class="bar" style="width: {{page.score-html5-percent}}%" role="progressbar" aria-valuenow="{{page.score-html5-percent}}" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<p>As of {{page.score-html5-date}}. Source: <a href="http://html5test.com">html5test.com</a></p>
</div>

<div class="span4 well">
<h3>CSS3 Test: {{page.score-css3}}</h3>
<div class="progress progress-info">
<div class="bar" style="width: {{page.score-css3-percent}}%" aria-valuenow="{{page.score-css3-percent}}" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<p>As of {{page.score-css3-date}}. Source: <a href="http://css3test.com">css3test.com</a></p>
</div>

<div class="span4 well">
<h3>Acid 3 Test: {{page.score-acid3}}</h3>
<div class="progress progress-success">
<div class="bar" style="width: {{page.score-acid3-percent}}%" aria-valuenow="{{page.score-acid3-percent}}" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<p>As of {{page.score-acid3-date}}. Source: <a href="http://acid3.acidtests.org/">acid3.acidtests.org</a></p>
</div>

</div>

<div class="row-fluid">

{{ page.content }}

</div>

</div><!-- .span9 -->

</div><!-- .row-fluid -->

</div>

{% include foot.html %}
{% include foot.html %}
20 changes: 11 additions & 9 deletions _layouts/home.html
Expand Up @@ -5,16 +5,18 @@
<section class="container-fluid" role="main">

<h1 class="page-header">{{ page.title }}</h1>

<ul class="device-thumbnails unstyled">

{% for page in site.pages %}

<li class="row-fluid device-{{ page.slug }}">
<div class="span3 well">
<a href="device/{{ page.slug }}">
<h4>{{ page.title }}</h4>
{% if page.image %}
<p><img src="device/{{ page.slug }}/{{ page.image }}" alt="Picture of the {{ page.title }} controller"></p>
{% endif %}
<p>{{ page.browser }}</p>
<span class="btn">More details</span>
</a>
Expand All @@ -26,15 +28,15 @@ <h4>HTML5 Test: {{page.score-html5}}</h4>
</div>
<p>As of {{page.score-html5-date}}. Source: <a href="http://html5test.com">html5test.com</a></p>
</div>

<div class="span3">
<h4>CSS3 Test: {{page.score-css3}}</h4>
<div class="progress progress-info">
<div class="bar" style="width: {{page.score-css3-percent}}%" role="progressbar" aria-valuenow="{{page.score-css3-percent}}" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<p>As of {{page.score-css3-date}}. Source: <a href="http://css3test.com">css3test.com</a></p>
</div>

<div class="span3">
<h4>Acid 3 Test: {{page.score-acid3}}</h4>
<div class="progress progress-success">
Expand All @@ -43,12 +45,12 @@ <h4>Acid 3 Test: {{page.score-acid3}}</h4>
<p>As of {{page.score-acid3-date}}. Source: <a href="http://acid3.acidtests.org/">acid3.acidtests.org</a></p>
</div>
</li>

{% endfor %}
</ul>



</section>

{% include foot.html %}
{% include foot.html %}

0 comments on commit e98069d

Please sign in to comment.