Skip to content
This repository has been archived by the owner on May 10, 2018. It is now read-only.

Commit

Permalink
Docs UI Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
magwalk committed Sep 8, 2015
1 parent e234dfb commit f272ead
Show file tree
Hide file tree
Showing 25 changed files with 2,316 additions and 21 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@
*.pickle

build/

**/.sass-cache
**/.sass-cache/*
*.css.map
*.css_t.map
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
BUILDDIR = build
S3BUCKET = chef-docs
S3OPTIONS = --acl-public --exclude='.doctrees/*' --exclude='chef/.doctrees/*' --config ~/.s3cfg-chef-docs --add-header "Cache-Control: max-age=900"
BUILD_COMMAND = sphinx-build
BUILD_COMMAND = sphinx-build -a
PARALLEL_BUILD:=
BUILD_COMMAND_AND_ARGS = $(BUILD_COMMAND) $(PARALLEL_BUILD)

Expand Down Expand Up @@ -221,4 +221,4 @@ upload: release
# private_chef:
# mkdir -p $(BUILDDIR)/release/private_chef/
# $(BUILD_COMMAND_AND_ARGS) release_private_chef/source $(BUILDDIR)/release/private_chef/
#
#
47 changes: 31 additions & 16 deletions _templates/layout.html
Original file line number Diff line number Diff line change
@@ -1,24 +1,39 @@
{% extends "!layout.html" %}


{% block rootrellink %}
<li><a href="https://docs.chef.io/resources.html">Resources</a>&#149;</li>
<li><a href="https://docs.chef.io/client/">Chef Client</a>&#149;</li>
<li><a href="https://docs.chef.io/server/">Chef Server</a>&#149;</li>
<li><a href="https://docs.chef.io/analytics/">Chef Analytics</a>&#149;</li>
<li><a href="https://docs.chef.io/releases.html">Docs Releases</a>&#149;</li>
<li><a href="https://docs.chef.io/search.html">Search the Docs</a>&#149;</li>
<li><a href="https://docs.chef.io/">Home</a> &raquo;</li>
{% endblock %}
{% block nav_main %}


<nav class="nav-main" role="navigation" data-topbar>
<div class="left">
<h1>
<a href="/">
Chef <span>Downloads</span>
</a>
</h1>
</div>

{% block relbar1 %}
<div style="background-color: #221E1F; text-align: left; padding: 0px 0px 0px 0px">
<a href="https://docs.chef.io"><img src="{{
pathto("_static/chef_html_logo.png", 1) }}" border="0" alt="Chef"/></a>
</div>
<i id="nav-icon" class="fa fa-bars"></i>
<a href="https://www.chef.io/">
<img id="logo" src="_static/chef_logo_v2.svg" onerror="_static/chef_logo_v2.png"/>
</a>

<ul class="nav-links links-main">
<li class="nav-link">
<a href="https://learn.chef.io/">Tutorials</a>
</li>
<li class="nav-link">
<a href="https://learn.chef.io/skills/">Skills Library</a>
</li>
<li class="nav-link is-active">
<a href="http://docs.chef.io/">Docs</a>
</li>
<li class="nav-link">
<a href="https://www.chef.io/training/">Training</a>
</li>
</ul>
</nav>

{{ super() }}

{% endblock %}


Expand Down
4 changes: 2 additions & 2 deletions _themes/chef/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
{% extends "basic/layout.html" %}

{# put the sidebar before the body #}
{% block sidebar1 %}{{ sidebar() }}{% endblock %}
{% block sidebar2 %}{% endblock %}
{#{% block sidebar1 %}{{ sidebar() }}{% endblock %}#}
{#{% block sidebar2 %}{% endblock %}#}

{%- block extrahead %}

Expand Down
5 changes: 5 additions & 0 deletions _themes/chefv2/css.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
{%- for cssfile in css_files %}
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
{%- endfor %}
13 changes: 13 additions & 0 deletions _themes/chefv2/javascripts.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '{{ url_root }}',
VERSION: '{{ release|e }}',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '{{ '' if no_search_suffix else file_suffix }}',
HAS_SOURCE: {{ has_source|lower }}
};
</script>
{%- for scriptfile in script_files %}
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
{%- endfor %}
<script type="text/javascript" src="_static/script.js"></script>
115 changes: 115 additions & 0 deletions _themes/chefv2/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
{#
basic/layout.html
~~~~~~~~~~~~~~~~~

Master layout template for Sphinx themes.

:copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- block doctype -%}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
{%- endblock %}
{%- set reldelim1 = reldelim1 is not defined and ' &raquo;' or reldelim1 %}
{%- set reldelim2 = reldelim2 is not defined and ' |' or reldelim2 %}
{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and
(sidebars != []) %}
{%- set url_root = pathto('', 1) %}
{%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
{%- if not embedded and docstitle %}
{%- set titlesuffix = " &mdash; "|safe + docstitle|e %}
{%- else %}
{%- set titlesuffix = "" %}
{%- endif %}

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={{ encoding }}" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
{{ metatags }}
{%- block htmltitle %}
<title>{{ title|striptags|e }}{{ titlesuffix }}</title>
{%- endblock %}
{% include 'css.html' %}
{%- if not embedded %}
{% include 'javascripts.html' %}
{%- if use_opensearch %}
<link rel="search" type="application/opensearchdescription+xml"
title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"
href="{{ pathto('_static/opensearch.xml', 1) }}"/>
{%- endif %}
{%- if favicon %}
<link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/>
{%- endif %}
{%- endif %}
{%- block linktags %}
{%- if hasdoc('about') %}
<link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
{%- endif %}
{%- if hasdoc('genindex') %}
<link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" />
{%- endif %}
{%- if hasdoc('search') %}
<link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
{%- endif %}
{%- if hasdoc('copyright') %}
<link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
{%- endif %}
<link rel="top" title="{{ docstitle|e }}" href="{{ pathto(master_doc) }}" />
{%- if parents %}
<link rel="up" title="{{ parents[-1].title|striptags|e }}" href="{{ parents[-1].link|e }}" />
{%- endif %}
{%- if next %}
<link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" />
{%- endif %}
{%- if prev %}
<link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" />
{%- endif %}
{%- endblock %}
{%- block extrahead %} {% endblock %}
</head>
<body role="document">
<div class="body-wrap">

{%- block nav_main %}{% endblock %}

{%- block content %}

<div class="document chef-docs">
{%- block document %}
{% include 'nav-docs.html' %}
<div class="documentwrapper">
{%- if render_sidebar %}{% include 'sidebar.html' %}{%- endif %}
<div class="bodywrapper">
<div class="body" role="main">
{% block body %} {% endblock %}
</div>
</div>
</div>
{%- endblock %}

<div class="clearer"></div>
</div>
{%- endblock %}

{%- block footer %}
<div class="footer" role="contentinfo">
{%- if show_copyright %}
{%- if hasdoc('copyright') %}
{% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
{%- else %}
{% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}
{%- endif %}
{%- endif %}
{%- if last_updated %}
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
{%- endif %}
{%- if show_sphinx %}
{% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
{%- endif %}
</div>
{%- endblock %}
</div>
</body>
</html>
103 changes: 103 additions & 0 deletions _themes/chefv2/nav-docs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<nav class="nav-docs">
<ul class="nav-docs-items">
<li class="main-item dark-item">
<i class="fa fa-search icon-left"></i>
<input type="text" placeholder="Search" id="docs-search">
</li>
<li class="version-picker">
Product: Version
{% include 'version-picker.html' %}
</li>
<li class="main-item has-sub-items is-open">
<div class="has-sub-items-content" title="Start Here">
<i class="fa fa-home icon-left"></i>Start Here
<i class="fa fa-chevron-down"></i>
</div>
<ul class="sub-items">
<li>
<a href="#" class="is-active" title="Getting Started">
Getting Started
</a>
</li>
<li class="has-sub-items">
<div class="has-sub-items-content" title="Overview">
Overview
<i class="fa fa-chevron-down"></i>
</div>
<ul class="sub-items level-2">
<li class="has-sub-items">
<div class="has-sub-items-content" title="Example">
Example
<i class="fa fa-chevron-down"></i>
</div>
<ul class="sub-items level-3">
<li><a href="#" title="This is an example of a really long title in case that happens">This is an example of a really long title in case that happens</a></li>
<li><a href="#" title="Example">Example</a></li>
<li><a href="#" title="Example">Example</a></li>
</ul>
</li>
<li><a href="#" title="Example">Example</a></li>
<li><a href="#" title="Example">Example</a></li>
<li><a href="#" title="Example">Example</a></li>
</ul>
</li>
<li>
<a href="#" title="Another example of a really long title just in case">Another example of a really long title just in case</a>
</li>
<li>
<a href="#" title="Why Ruby?">Why Ruby?</a>
</li>
<li>
<a href="#" title="Community">Community</a>
</li>
</ul>
</li>
<li class="main-item has-sub-items">
<div class="has-sub-items-content" title="Theory &amp; Concepts">
<i class="fa fa-star-o icon-left"></i>Theory &amp; Concepts
<i class="fa fa-chevron-down"></i>
</div>
<ul class="sub-items">
<li>
<a href="#" title="Getting Started">Getting Started</a>
</li>
<li>
<a href="#" title="Overview">Overview</a>
</li>
<li>
<a href="#" title="Why Chef?">Why Chef?</a>
</li>
<li>
<a href="#" title="Why Ruby?">Why Ruby?</a>
</li>
<li>
<a href="#" title="Community">Community</a>
</li>
</ul>
</li>
<li class="main-item dark-item">
<a href="https://github.com/chef/chef-docs" title="Available on Github">
<i class="fa fa-github icon-left"></i>
Available on Github
</a>
</li>
<li class="main-item dark-item">
<a href="https://docs.chef.io/feedback.html">
<i class="fa fa-question-circle icon-left"></i>
Send Feedback
</a>
</li>
<li class="main-item dark-item">
<a href="https://www.chef.io/chef/get-chef">
<i class="fa fa-download icon-left"></i>
Get Chef
</a>
</li>
<li class="main-item dark-item">
<a href="https://www.chef.io/support/">
<i class="fa fa-support icon-left"></i>
Support
</a>
</li>
</ul>
</nav>
10 changes: 10 additions & 0 deletions _themes/chefv2/sidebar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
{%- if sidebars != None %}
{#- new style sidebar: explicitly include/exclude templates #}
{%- for sidebartemplate in sidebars %}
{%- include sidebartemplate %}
{%- endfor %}
{%- endif %}
</div>
</div>
Binary file added _themes/chefv2/static/chef.ico
Binary file not shown.
Binary file added _themes/chefv2/static/chef_logo_v2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions _themes/chefv2/static/chef_logo_v2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit f272ead

Please sign in to comment.