Skip to content

Commit

Permalink
Basic copy of Minecraft Forge's RTD theme with edits and without the …
Browse files Browse the repository at this point in the history
…docs. Colour to be changed later.
  • Loading branch information
iChun committed Jun 20, 2018
1 parent e9412c0 commit f627148
Show file tree
Hide file tree
Showing 15 changed files with 252 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// general
* text auto
*.sh text eol=lf
*.txt eol=lf
*.md eol=lf
*.xml text
*.bat text eol=crlf
*.png binary
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
site/
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Issues and Documentation
This is the primary issue tracker and the Read the Docs documentation repository for Content Creator Integration.

Feel free to submit issue reports or pull requests related to the documentation here.

RTD url: https://content-creator-integration.readthedocs.io/
9 changes: 9 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Content Creator Integration Documentation
============================

This is the official documentation for [Content Creator Integration]

Contribute to the docs at [GitHub].

[Content Creator Integration]: http://url.tbd
[GitHub]: https://github.com/iChun/ContentCreatorIntegration-IssuesAndDocumentation
23 changes: 23 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# If you add a page, you must add it to the index here
pages:
- Home: 'index.md'

# Do not edit in PRs below here
site_name: Content Creator Integration Documentation

markdown_extensions:
- admonition
- smarty
- sane_lists
- pymdownx.superfences
- pymdownx.highlight:
use_pygments: false
- toc:
permalink: ' '

theme:
name: null
custom_dir: theme
# Technically deprecated, but RTD overrides theme.custom_dir with their default style
# They still seem to respect the old option, though
theme_dir: theme
1 change: 1 addition & 0 deletions python-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pymdown-extensions
9 changes: 9 additions & 0 deletions theme/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{% extends "base.html" %}

{% block content %}
<h1>Page not found</h1>
<p>Unfortunately, the requested site does not exist.</p>
{% endblock %}

{% block next_prev %}
{% endblock %}
115 changes: 115 additions & 0 deletions theme/base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title_prefix %}{% endblock %}{% if not page.is_homepage %}{{ page.title }} - {% endif %}{{ config.site_name }}</title>

<meta name="apple-mobile-web-app-title" content="Content Creator Integration Docs">
<meta name="application-name" content="Content Creator Integration Docs">
<meta name="theme-color" content="#ffffff">

<link rel="stylesheet" href="{{ base_url }}/css/styles_light.css?version=1" data-type="themed">

{% for path in extra_css %}
<link href="{{ path }}" rel="stylesheet">
{% endfor %}

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/regular.css" integrity="sha384-EWu6DiBz01XlR6XGsVuabDMbDN6RT8cwNoY+3tIH+6pUCfaNldJYJQfQlbEIWLyA" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/fontawesome.css" integrity="sha384-GVa9GOgVQgOk+TNYXu7S/InPTfSDTtBalSgkgqQ7sCik56N9ztlkoTr2f/T44oKV" crossorigin="anonymous">
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jScrollPane/2.0.23/script/jquery.jscrollpane.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/stickyfill/1.1.4/stickyfill.min.js"></script>
<script type="text/javascript" src="{{ base_url }}/js/theme.js"></script>

<script>var base_url = '{{ base_url }}';</script>
{% for path in extra_javascript %}
<script src="{{ path }}"></script>
{% endfor %}

<!-- HTML5 shim and Respond.js for 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]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->

{% if google_analytics %}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{ google_analytics[0] }}', '{{ google_analytics[1] }}');
ga('send', 'pageview');
</script>
{% endif %}
</head>
<body>
<header>
<div class="wrapper">
<div class="logo">
<a href="#" class="open-sidebar"><i class="fa fa-bars"></i></a>
<a href="{{ base_url }}" class="logo-image">CCI</a>
</div>
{% block search_form %}
<form class="search" action="{{ base_url }}/search.html" method="get">
<input type="submit" value="&#xf002;">
<div class="search-field">
<input type="search" title="Search" name="q" placeholder="Search...">
</div>
</form>
{% endblock %}
</div>
</header>
<main class="wrapper sidebar-wrapper">
<div class="sidebar-left sidebar-sticky">
<aside>
<section class="sidebar-nav">
<h2><a href="#" class="close-sidebar"><i class="fa fa-bars"></i></a> Navigation</h2>
<ul class="section-content scroll-pane">
{% for nav_item in nav %}
{% include "nav.html" %}
{% endfor %}
</ul>
</section>
</aside>
</div>

<div class="sidebar-sticky-wrapper-content">
<article class="docs-entry">
{% block content %}
{{ page.content }}
{% endblock %}
</article>
{%- block next_prev %}
{% if next_page or previous_page %}
<div class="docs-entry-footer-buttons" role="navigation" aria-label="footer navigation">
{% if previous_page %}
<a href="{{ page.previous_page.url }}" title="{{ page.previous_page.title }}" class="btn"><span class="fa fa-arrow-left"></span> Previous</a>
{% endif %}
{% if next_page %}
<a href="{{ page.next_page.url }}" title="{{ page.next_page.title }}" class="float-right btn">Next <span class="fa fa-arrow-right"></span></a>
{% endif %}
</div>
{% endif %}
{%- endblock %}
</div>
</main>
<div class="wrapper">
<footer>
Built with <a href="http://www.mkdocs.org">MkDocs</a> using a custom theme. Hosted by <a href="https://readthedocs.org">Read the Docs</a>.
<div class="theme-switch-wrapper">
Enable Dark Theme
<label class="theme-switch">
<input type="checkbox">
<span class="slider round"></span>
</label>
</div>
</footer>
</div>
</body>
</html>
3 changes: 3 additions & 0 deletions theme/css/styles_dark.css

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions theme/css/styles_light.css

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions theme/js/theme.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions theme/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{% extends "base.html" %}

{#
The entry point for the ReadTheDocs Theme.

Any theme customisations should override this file to redefine blocks defined in
the various templates. The custom theme should only need to define a main.html
which `{% extends "base.html" %}` and defines various blocks which will replace
the blocks defined in base.html and its included child templates.
#}
Empty file added theme/mkdocs_theme.yml
Empty file.
34 changes: 34 additions & 0 deletions theme/nav.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{% if not nav_item.children %}
<li {% if nav_item.active %}class="elem-active{% if page.toc %} elem-toc{% endif %}" {% endif %}>
{% if nav_item.active %}
<a href="{{ (page.toc|first).url }}" class="elem-text">{{ nav_item.title }}</a>
{% else %}
<a href="{{ nav_item.url }}" class="elem-text">{{ nav_item.title }}</a>
{% endif %}
{% if nav_item.active %}
<ul class="table-of-contents">
{% for toc_item in page.toc %}
{% if toc_item != (page.toc|first) %}
<li class="toc-item"><a href="{{ toc_item.url }}">{{ toc_item.title }}</a></li>
{% endif %}
{% for toc_item in toc_item.children %}
<li class="toc-subitem"><a href="{{ toc_item.url }}">{{ toc_item.title }}</a></li>
{% endfor %}
{% endfor %}
</ul>
{% endif %}
</li>
{% else %}
<li class="elem-parent">
{% if nav_item.children.active %}
<a href="{{ (page.toc|first).url }}" class="elem-text">{{ nav_item.title }}</a>
{% else %}
<a href="#" class="elem-text toggle-collapsible"><span class="fa fa-plus collapsible-icon"></span> {{ nav_item.title }}</a>
{% endif %}
<ul class="nav-collapsible {% if nav_item.active %}nav-collapsible-open{% endif %}">
{% for nav_item in nav_item.children %}
{% include "nav.html" %}
{% endfor %}
</ul>
</li>
{% endif %}
25 changes: 25 additions & 0 deletions theme/search.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{% extends "base.html" %}

{% block title_prefix %}Search Results{% endblock %}

{% block search_form %}
<form class="search" id="content_search" action="search.html">
<span role="status" aria-live="polite" class="ui-helper-hidden-accessible"></span>
<input type="submit" value="&#xf002;">
<div class="search-field">
<input type="search" title="Search" name="q" id="mkdocs-search-query"
class="search_input search-query ui-autocomplete-input" autocomplete="off" placeholder="Search...">
</div>
</form>
{% endblock %}

{% block content %}
<h1 id="search">Search Results</h1>

<div id="mkdocs-search-results">
Searching...
</div>
{% endblock %}

{% block next_prev %}
{% endblock %}

0 comments on commit f627148

Please sign in to comment.