committing new version of jekyll doc theme -- 5.0, with some refinements to come with the documentation

This commit is contained in:
tomjohnson1492
2016-03-19 00:13:09 -07:00
parent e267cce513
commit 7a869d7cd4
206 changed files with 16935 additions and 37629 deletions

View File

@ -1,40 +0,0 @@
<!-- this is an experimental of algolia search -->
<div class="search">
<input type="text" placeholder="search...">
</div>
<div class="results">
<ul id="users"></ul>
</div>
<script src="http://cdn.jsdelivr.net/algoliasearch/3/algoliasearch.min.js"></script>
<script>
$(document).ready(function() {
var client = algoliasearch('{{site.algolia_application_id}}', '{{site.algolia_search_only_api_key}}');
var index = client.initIndex('{{site.algolia_index_name}}');
var $input = $('input');
$input.keyup(function() {
index.search($input.val(), {
hitsPerPage: 10,
facets: '*'
}, searchCallback);
}).focus();
});
function searchCallback(err, content) {
console.log(content);
if (err) {
console.error(err);
return;
}
var $users = $('#users');
$users.empty();
for (var i = 0; i < content.hits.length; i++) {
$users.append('<li> <a href="' + content.hits[i].url + '">' + content.hits[i].title + '</a> ' + content.hits[i]._highlightResult.body.value + '</li>');
}
};
</script>

View File

@ -1,42 +0,0 @@
{% comment %}
__ __ _ _
\ \ / / __(_) |_ ___ _ __ ___
\ \ /\ / / '__| | __/ _ \ '__/ __|
\ V V /| | | | || __/ | \__ \
\_/\_/ |_| |_|\__\___|_| |___/
{% endcomment %}
{% if site.project == "mydoc_writers" %}
{% assign audience = "writers" %}
{% assign sidebar = site.data.mydoc.mydoc_sidebar.entries %}
{% assign topnav = site.data.mydoc.mydoc_topnav.topnav %}
{% assign topnav_dropdowns = site.data.mydoc.mydoc_topnav.topnav_dropdowns %}
{% assign version = "all" %}
{% assign product = "all" %}
{% assign platform = "all" %}
{% assign projectTags = site.data.mydoc.mydoc_tags.allowed-tags %}
{% assign projectFolder = "mydoc" %}
{% endif %}
{% comment %}
____ _
| _ \ ___ ___(_) __ _ _ __ ___ _ __ ___
| | | |/ _ \/ __| |/ _` | '_ \ / _ \ '__/ __|
| |_| | __/\__ \ | (_| | | | | __/ | \__ \
|____/ \___||___/_|\__, |_| |_|\___|_| |___/
|___/
{% endcomment %}
{% if site.project == "mydoc_designers" %}
{% assign audience = "designers" %}
{% assign sidebar = site.data.mydoc.mydoc_sidebar.entries %}
{% assign topnav = site.data.mydoc.mydoc_topnav.topnav %}
{% assign topnav_dropdowns = site.data.mydoc.mydoc_topnav.topnav_dropdowns %}
{% assign version = "all" %}
{% assign product = "all" %}
{% assign platform = "all" %}
{% assign projectTags = site.data.mydoc.mydoc_tags.allowed-tags %}
{% assign projectFolder = "mydoc" %}
{% endif %}

View File

@ -1,12 +0,0 @@
{% comment %} Note that in the preview server, this code won't work because the preview sites are using different ports. These links are all relative and assume the same port. However, when you publish the built sites onto the same server, then this toggle works fine. {% endcomment %}
<li class="dropdown">
<a href="#" class="dropdown-toggle otherProgLangs" data-toggle="dropdown">Custom Menu<b class="caret"></b></a>
<ul class="dropdown-menu">
<li {% if site.audience == "writers" %}class="dropdownActive"{% endif %}><a href="{% if page.homepage == true or page.switch == false %}../mydoc_writers/">Writer docs</a> {% else %} ../mydoc_writers{{page.url}}">Writer docs</a>{% endif %}</li>
<li {% if site.audience == "designers" %}class="dropdownActive"{% endif %}><a href="{% if page.homepage == true or page.switch == false %}../mydoc_designers/">Designer docs</a> {% else %} ../mydoc_designers{{page.url}}">Designer docs</a>{% endif %}</li>
</ul>
</li>

View File

@ -1,7 +1,7 @@
<p>{% assign series_pages = site.tags.series_acme %}
{% for p in pages %}
{% if p.series == "ACME series" %}
{% assign nextTopic = page.weight | plus: "0.1" %}
{% assign nextTopic = page.weight | plus: "1" %}
{% if p.weight == nextTopic %}
<a href="{{p.url | prepend: '..'}}"><button type="button" class="btn btn-primary">Next: {{p.weight}} {{p.title}}</button></a>
{% endif %}

View File

@ -0,0 +1,36 @@
{% if page.sidebar == "home_sidebar" %}
{% assign sidebar = site.data.sidebars.home_sidebar.entries %}
{% elsif page.sidebar == "product1_sidebar" %}
{% assign sidebar = site.data.sidebars.product1_sidebar.entries %}
{% elsif page.sidebar == "product2_sidebar" %}
{% assign sidebar = site.data.sidebars.product2_sidebar.entries %}
{% elsif page.sidebar == "mydoc_sidebar" %}
{% assign sidebar = site.data.sidebars.mydoc_sidebar.entries %}
{% elsif page.sidebar == "tags_sidebar" %}
{% assign sidebar = site.data.sidebars.tags_sidebar.entries %}
{% else %}
{% assign sidebar = site.data.sidebars.home_sidebar.entries %}
{% endif %}
{% comment %}
sidebar configuration for print files
{% endcomment %}
{% if site.product == "mydoc" %}
{% assign sidebar_pdf = site.data.sidebars.mydoc_sidebar.entries %}
{% endif %}
{% if site.product == "product1" %}
{% assign sidebar_pdf = site.data.sidebars.product1_sidebar.entries %}
{% endif %}
{% if site.product == "product2" %}
{% assign sidebar_pdf = site.data.sidebars.product2_sidebar.entries %}
{% endif %}

View File

@ -3,7 +3,7 @@
<div class="col-lg-12 footer">
&copy;{{ site.time | date: "%Y" }} {{site.company_name}}. All rights reserved. <br />
{% if page.last_updated %}<p>Page last updated:</span> {{page.last_updated}}<br/>{% endif %} Site last generated: {{ site.time | date: "%b %-d, %Y" }} <br />
<p><img src="{{site.footer_image_location}}"/></p>
<p><img src="{{ "/images/company_logo.png" | prepend: site.baseurl }}"/></p>
</div>
</div>
</footer>

View File

@ -1,25 +0,0 @@
<script language="JavaScript" type="text/javascript">
$( document ).ready(function() {
// Handler for .ready() called.
if (top.location == location) {
$(".escapeMe").remove();
}
});
function breakout_of_frame() {
if (top.location != location) {
//top.location.href = document.location.href;
window.open(window.location.href, '_blank');
}
}
</script>
<li class="escapeMe">
<a href="#" onclick="breakout_of_frame()" ><i class="fa fa-sign-out"></i> Pop-out</a>
</li>

View File

@ -4,21 +4,28 @@
<meta name="description" content="{% if page.summary %}{{ page.summary | strip_html | strip_newlines | truncate: 160 }}{% endif %}">
<meta name="keywords" content="{{page.tags}}{% if page.tags %}, {% endif %} {{page.keywords}}">
<title>{% if page.homepage == true %} {{site.homepage_title}} {% elsif page.title %}{{ page.title }}{% endif %} | {{ site.site_title }}</title>
<link rel="stylesheet" type="text/css" href="../css/syntax.css">
<link rel="stylesheet" type="text/css" href="../css/font-awesome.min.css">
<!--<link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css">-->
<link rel="stylesheet" type="text/css" href="../css/modern-business.css">
<link rel="stylesheet" type="text/css" href="../css/lavish-bootstrap.css">
<link rel="stylesheet" type="text/css" href="../css/customstyles.css">
<link rel="stylesheet" type="text/css" href="../css/{{site.theme_file}}">
<link rel="stylesheet" href="{{ "/css/syntax.css" | prepend: site.baseurl }}">
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<!--<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">-->
<link rel="stylesheet" href="{{ "/css/modern-business.css" | prepend: site.baseurl }}">
<link rel="stylesheet" href="{{ "/css/lavish-bootstrap.css" | prepend: site.baseurl }}">
<link rel="stylesheet" href="{{ "/css/customstyles.css" | prepend: site.baseurl }}">
<link rel="stylesheet" href="{{ "/css/theme-green.css" | prepend: site.baseurl }}">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
<script src="../js/jquery.navgoco.min.js"></script>
<script src="{{ "/js/jquery.navgoco.min.js" | prepend: site.baseurl }}"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/2.0.0/anchor.min.js"></script>
<script src="../js/toc.js"></script>
<script src="../js/customscripts.js"></script>
<link rel="shortcut icon" href="../common_images/favicon.ico" type="image/x-icon">
<script src="{{ "/js/toc.js" | prepend: site.baseurl }}"></script>
<script src="{{ "/js/customscripts.js" | prepend: site.baseurl }}"></script>
<link rrel="shortcut icon" href="{{ "/images/favicon.ico" | prepend: site.baseurl }}">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
@ -26,8 +33,7 @@
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}">

View File

@ -12,7 +12,7 @@
<link rel="stylesheet" href="{{ "/css/modern-business.css" | prepend: site.baseurl | prepend: site.url }}">
<link rel="stylesheet" href="{{ "/css/lavish-bootstrap.css" | prepend: site.baseurl | prepend: site.url }}">
<link rel="stylesheet" href="{{ "/css/customstyles.css" | prepend: site.baseurl | prepend: site.url }}">
<link rel="stylesheet" type="text/css" href="{{site.url}}/{{site.baseurl}}/css/{{site.theme_file}}">
<link rel="stylesheet" href="{{ "/css/theme-green.css" | prepend: site.baseurl | prepend: site.url }}">
<link rel="stylesheet" href="{{ "/css/syntax.css" | prepend: site.baseurl | prepend: site.url }}">
<link rel="stylesheet" href="{{ "/css/printstyles.css" | prepend: site.baseurl }}">

View File

@ -1,130 +0,0 @@
<script type="text/javascript">
$(document).ready(function() {
$('#toc').toc({ minimumHeaders: 0, listType: 'ul', showSpeed: 0, headers: 'h2,h3,h4' });
});
</script>
<!-- shuffle -->
<script>
var shuffleme = (function( $ ) {
'use strict';
var $grid = $('#grid'),
$filterOptions = $('.filter-options'),
$sizer = $grid.find('.shuffle_sizer'),
init = function() {
// None of these need to be executed synchronously
setTimeout(function() {
listen();
setupFilters();
}, 100);
// instantiate the plugin
$grid.shuffle({
itemSelector: '[class*="col-"]',
sizer: $sizer
});
},
// Set up button clicks
setupFilters = function() {
var $btns = $filterOptions.children();
$btns.on('click', function() {
var $this = $(this),
isActive = $this.hasClass( 'active' ),
group = isActive ? 'all' : $this.data('group');
// Hide current label, show current label in title
if ( !isActive ) {
$('.filter-options .active').removeClass('active');
}
$this.toggleClass('active');
// Filter elements
$grid.shuffle( 'shuffle', group );
});
$btns = null;
},
// Re layout shuffle when images load. This is only needed
// below 768 pixels because the .picture-item height is auto and therefore
// the height of the picture-item is dependent on the image
// I recommend using imagesloaded to determine when an image is loaded
// but that doesn't support IE7
listen = function() {
var debouncedLayout = $.throttle( 300, function() {
$grid.shuffle('update');
});
// Get all images inside shuffle
$grid.find('img').each(function() {
var proxyImage;
// Image already loaded
if ( this.complete && this.naturalWidth !== undefined ) {
return;
}
// If none of the checks above matched, simulate loading on detached element.
proxyImage = new Image();
$( proxyImage ).on('load', function() {
$(this).off('load');
debouncedLayout();
});
proxyImage.src = this.src;
});
// Because this method doesn't seem to be perfect.
setTimeout(function() {
debouncedLayout();
}, 500);
};
return {
init: init
};
}( jQuery ));
$(document).ready(function() {
shuffleme.init();
});
</script>
<!-- new attempt-->
<script>
$(document).ready(function() {
/* initialize shuffle plugin */
var $grid = $('#grid');
$grid.shuffle({
itemSelector: '.item' // the selector for the items in the grid
});
});</script>
<script>
$('#filter a').click(function (e) {
e.preventDefault();
// set active class
$('#filter a').removeClass('active');
$(this).addClass('active');
// get group name from clicked item
var groupName = $(this).attr('data-group');
// reshuffle grid
$grid.shuffle('shuffle', groupName );
});</script>

View File

@ -1,28 +0,0 @@
<hr />
<!-- code doesn't work -- tags work much better, but leaving this here in case i figure out the issue. -->
<h3>Related Pages</h3>
<ul id="related_pages">
{% assign currentTitle = page.title %}
{% for tag in page.tags %}
{% assign counter = '0' %}
{% for page in site.pages %}
{% if page.tags contains tag and page.title != currentTitle and counter < '10' %}
{% capture counter %}{{ counter | plus:'1' }}{% endcapture %}
{% assign pageList = "" | split: "|" %}
{{ pageList | push: page.title }}
{% endif %}
{% endfor %}
{% assign unique_pageList = pageList | uniq %}
{% for item in unique_pageList %}
<li><a href="{{ item.url}}">{{item.title}}</a></li>
{% endfor %}
{% if counter == '0' %}<span class="noOtherPages"><p>No other pages.</p></span>
{% endif %}
{% endfor %}
</ul>

View File

@ -38,40 +38,40 @@
</script>
{% include custom/conditions.html %}
<ul id="mysidebar" class="nav">
<span class="siteTagline">{{site.sidebar_tagline}}</span>
<span class="versionTagline">{{site.sidebar_version}}</span>
{% include custom/sidebarconfigs.html %}
{% for entry in sidebar %}
{% for subcategory in entry.subcategories %}
{% if subcategory.audience contains audience and subcategory.product contains product and subcategory.platform contains platform and subcategory.version contains version and subcategory.output contains "web" %}
<span class="siteTagline">{{sidebar[0].product}}</span>
<span class="versionTagline">{{sidebar[0].version}}</span>
{% for entry in sidebar %}
{% for subcategory in entry.subcategories %}
{% if subcategory.output contains "web" %}
<li><a href="#">{{ subcategory.title }}</a>
<ul>
{% for item in subcategory.items %}
{% if item.audience contains audience and item.product contains product and item.platform contains platform and item.version contains version and item.output contains "web" %}
{% if item.output contains "web" %}
{% if item.external_url %}
<li><a href="{{item.external_url}}" target="_blank">{{subcategory.title}}</a></li>
{% elsif page.url == item.url %}
<li class="active"><a href="{{item.url | prepend: ".."}}">{{item.title}}</a></li>
<li class="active"><a href="{{item.url | prepend: site.baseurl}}">{{item.title}}</a></li>
{% else %}
<li><a href="{{item.url | prepend: ".."}}">{{item.title}}</a></li>
<li><a href="{{item.url | prepend: site.baseurl}}">{{item.title}}</a></li>
{% endif %}
{% for thirdlevel in item.thirdlevel %}
{% if thirdlevel.audience contains audience and thirdlevel.product contains product and thirdlevel.platform contains platform and thirdlevel.version contains version and thirdlevel.output contains "web" %}
{% if thirdlevel.output contains "web" %}
<li class="thirdlevel"><a href="#">{{ thirdlevel.title }}</a>
<ul>
{% for deeplevel in thirdlevel.thirdlevelitems %}
{% if deeplevel.audience contains audience and deeplevel.product contains product and deeplevel.platform contains platform and deeplevel.version contains version and deeplevel.output contains "web" %}
{% if deeplevel.output contains "web" %}
{% if deeplevel.external_url %}
<li><a href="{{deeplevel.external_url}}" target="_blank">{{deeplevel.title}}</a></li>
{% elsif page.url == deeplevel.url %}
<li class="active"><a href="{{deeplevel.url | prepend: ".."}}">{{deeplevel.title}}</a></li>
<li class="active"><a href="{{deeplevel.url | prepend: site.baseurl}}">{{deeplevel.title}}</a></li>
{% else %}
<li><a href="{{deeplevel.url | prepend: ".."}}">{{deeplevel.title}}</a></li>
<li><a href="{{deeplevel.url | prepend: site.baseurl}}">{{deeplevel.title}}</a></li>
{% endif %}
{% endif %}
@ -89,6 +89,8 @@
{% endfor %}
<!-- if you aren't using the accordion, uncomment this block:
<p class="external">

View File

@ -1,16 +1,33 @@
<p>The following pages are tagged with <button type="button" style="cursor: default" class="btn btn-default navbar-btn">{{page.tagName}}</button></p>
<table><thead><tr><th>Page</th><th>Excerpt</th></tr></thead>
<p>The following pages and posts are tagged with <button type="button" style="cursor: default" class="btn btn-default navbar-btn">{{page.tagName}}</button></p>
<table><thead><tr><th>Title</th><th>Type</th><th>Excerpt</th></tr></thead>
<tbody>
{% assign thisTag = page.tagName %}
{% for page in site.pages %}
{% for tag in page.tags %}
{% if tag == thisTag %}
<tr><td><a href="{{ page.url | prepend: '..'}}">{{page.title}}</a></td>
<tr><td><a href="{{ page.url | prepend: site.baseurl }}">{{page.title}}</a></td>
<td><span class="label label-default">Page</span></td>
<td>{% if page.summary %} {{ page.summary | strip_html | strip_newlines | truncate: 160 }} {% else %} {{ page.content | truncatewords: 50 | strip_html }} {% endif %}</td>
</tr>
{% endif %}
{% endfor %}
{% endfor %}
</tbody>
</table>
{% endfor %}
{% assign thisTag = page.tagName %}
{% for post in site.posts %}
{% for tag in post.tags %}
{% if tag == thisTag %}
<tr><td><a href="{{ post.url | prepend: site.baseurl }}">{{post.title}}</a></td>
<td><span class="label label-primary">Post</span></td>
<td>{% if post.summary %} {{ post.summary | strip_html | strip_newlines | truncate: 160 }} {% else %} {{ post.content | truncatewords: 50 | strip_html }} {% endif %}</td>
</tr>
{% endif %}
{% endfor %}
{% endfor %}
</tbody>
</table>
</tbody>
</table>

View File

@ -9,25 +9,21 @@
<span class="icon-bar"></span>
</button>
<a class="fa fa-home fa-lg navbar-brand" href="home.html">&nbsp;<span class="projectTitle"> {{site.topnav_title}}</span></a>
<a class="fa fa-home fa-lg navbar-brand" href="{{site.baseurl}}/">&nbsp;<span class="projectTitle"> {{site.topnav_title}}</span></a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<!-- entries without drop-downs appear here -->
<!-- conditional logic to control which topnav appears for the audience defined in the configuration file.-->
{% include custom/conditions.html %}
{% for entry in topnav %}
{% for entry in site.data.topnav.topnav %}
{% for subcategory in entry.subcategories %}
{% if subcategory.audience contains audience and subcategory.product contains product and subcategory.platform contains platform and subcategory.version contains version and subcategory.output contains "web" %}
{% if subcategory.external_url %}
<li><a href="{{subcategory.external_url}}" target="_blank">{{subcategory.title}}</a></li>
{% elsif page.url == subcategory.url %}
<li class="active"><a href="{{subcategory.url | prepend: ".."}}">{{subcategory.title}}</a></li>
{% elsif page.url contains subcategory.url %}
<li class="active"><a href="{{subcategory.url | prepend: site.baseurl}}">{{subcategory.title}}</a></li>
{% else %}
<li><a href="{{subcategory.url | prepend: ".."}}">{{subcategory.title}}</a></li>
{% endif %}
<li><a href="{{subcategory.url | prepend: site.baseurl }}">{{subcategory.title}}</a></li>
{% endif %}
{% endfor %}
{% endfor %}
@ -36,53 +32,42 @@
<!-- entries with drop-downs appear here -->
<!-- conditional logic to control which topnav appears for the audience defined in the configuration file.-->
<li class="dropdown">
{% for entry in topnav_dropdowns %}
{% for entry in site.data.topnav.topnav_dropdowns %}
{% for subcategory in entry.subcategories %}
{% if subcategory.audience contains audience and subcategory.product contains product and subcategory.platform contains platform and subcategory.version contains version and subcategory.output contains "web" %}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ subcategory.title }}<b class="caret"></b></a>
<ul class="dropdown-menu">
{% for subitem in subcategory.items %}
{% if subitem.audience contains audience and subitem.product contains product and subitem.platform contains platform and subcategory.version contains version and subitem.output contains "web" %}
{% if subitem.external_url %}
<li><a href="{{subitem.external_url}}" target="_blank">{{subitem.title}}</a></li>
{% elsif page.url contains subitem.url %}
<li class="dropdownActive"><a href="{{subitem.url}}">{{subitem.title}}</a></li>
<li class="dropdownActive"><a href="{{subitem.url | prepend: site.baseurl}}">{{subitem.title}}</a></li>
{% else %}
<li><a href="{{subitem.url | replace: "/",""}}">{{subitem.title}}</a></li>
{% endif %}
<li><a href="{{subitem.url | prepend: site.baseurl}}">{{subitem.title}}</a></li>
{% endif %}
{% endfor %}
{% endif %}
</ul>
</li>
{% endfor %}
{% endfor %}
<!-- special insertion -->
{% if site.project == "mydoc_designers" or site.project == "mydoc_writers" %}
{% comment %}
{% include custom/mydoc/custom_menu.html %}
{% endcomment %}
{% endif %}
{% include feedback.html %}
<!--uncomment this block if you want simple search instead of algolia-->
<!--comment out this block if you want to hide search-->
<li>
<!--start search-->
<div id="search-demo-container">
<input type="text" id="search-input" placeholder="{{site.data.strings.search_placeholder_text}}">
<ul id="results-container"></ul>
</div>
<script src="../js/jekyll-search.js" type="text/javascript"></script>
<script src="{{ "/js/jekyll-search.js" | prepend: site.baseurl }}" type="text/javascript"></script>
<script type="text/javascript">
SimpleJekyllSearch.init({
searchInput: document.getElementById('search-input'),
resultsContainer: document.getElementById('results-container'),
dataSource: '../search.json',
dataSource: '{{ "/search.json" | prepend: site.baseurl }}',
searchResultTemplate: '<li><a href="{url}" title="{{page.title | replace: "'", "\"}}">{title}</a></li>',
noResultsText: '{{site.data.strings.search_no_results_text}}',
limit: 10,
@ -92,9 +77,7 @@
<!--end search-->
</li>
{% comment %}
{% include frameescape.html %}
{% endcomment %}
</div>
<!-- /.container -->
</nav>