Merge branch 'master' of github.com:squidfunk/mkdocs-material

This commit is contained in:
squidfunk
2016-10-10 09:44:01 +02:00
19 changed files with 76 additions and 33 deletions

View File

@@ -5,6 +5,13 @@
A material design theme for [MkDocs](http://www.mkdocs.org). A material design theme for [MkDocs](http://www.mkdocs.org).
**Note: the theme is currently undergoing a complete rewrite for 1.0.0 which should be
released shortly.**
* To get a glimpse, checkout the
[rework](https://github.com/squidfunk/mkdocs-material/tree/rework) branch
* To give feedback on the rework version, please see issues [#46](https://github.com/squidfunk/mkdocs-material/issues/46)
[![iOS](docs/images/screen.png)](http://squidfunk.github.io/mkdocs-material/) [![iOS](docs/images/screen.png)](http://squidfunk.github.io/mkdocs-material/)
## Quick start ## Quick start
@@ -48,7 +55,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE. IN THE SOFTWARE.
[travis-image]: https://travis-ci.org/squidfunk/mkdocs-material.svg [travis-image]: https://travis-ci.org/squidfunk/mkdocs-material.svg?branch=master
[travis-link]: https://travis-ci.org/squidfunk/mkdocs-material [travis-link]: https://travis-ci.org/squidfunk/mkdocs-material
[pypi-v-image]: https://img.shields.io/pypi/v/mkdocs-material.png [pypi-v-image]: https://img.shields.io/pypi/v/mkdocs-material.png
[pypi-v-link]: https://pypi.python.org/pypi/mkdocs-material [pypi-v-link]: https://pypi.python.org/pypi/mkdocs-material

View File

@@ -20,7 +20,7 @@
"classlist": "^2014.12.13", "classlist": "^2014.12.13",
"fastclick": "^1.0.6", "fastclick": "^1.0.6",
"lunr.js": "^0.6.0", "lunr.js": "^0.6.0",
"pegasus": "^0.3.2", "pegasus": "0.3.3",
"respond": "^1.4.2" "respond": "^1.4.2"
}, },
"devDependencies": { "devDependencies": {

View File

@@ -103,6 +103,25 @@ extra:
logo: 'images/logo.png' logo: 'images/logo.png'
``` ```
### Link to GitHub releases page
If your project has a GitHub url configured, the default behavior is that a
downlink button is displayed, linking to the source download of the given
`extra.version` or `master` branch. To link to the releases page instead,
set `extra.github.download_release` to `true`. It will link to the release of
the given `extra.version` or when no `extra.version` is given, the latest
release:
``` yaml
repo_name: GitHub
repo_url: https://github.com/squidfunk/mkdocs-material
extra:
github:
download_release: true
```
### Changing the color palette ### Changing the color palette
Material defines a default hue for every primary and accent color on Google's Material defines a default hue for every primary and accent color on Google's

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,8 +1,8 @@
<!DOCTYPE html> <!DOCTYPE html>
<!--[if lt IE 7 ]><html class="no-js ie6"><![endif]--> <!--[if lt IE 7 ]> <html class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]><html class="no-js ie7"><![endif]--> <!--[if IE 7 ]> <html class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]><html class="no-js ie8"><![endif]--> <!--[if IE 8 ]> <html class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]><html class="no-js ie9"><![endif]--> <!--[if IE 9 ]> <html class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js"> <!--<![endif]--> <!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js"> <!--<![endif]-->
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
@@ -53,9 +53,9 @@
font-style: normal; font-style: normal;
} }
</style> </style>
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-a422ff04cc.css"> <link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-e576885f03.css">
{% if config.extra.palette %} {% if config.extra.palette %}
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/palettes-05ab2406df.css"> <link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/palettes-2d6c5d2926.css">
{% endif %} {% endif %}
{% if config.extra.font != "none" %} {% if config.extra.font != "none" %}
{% set text = config.extra.get("font", {}).text | default("Ubuntu") %} {% set text = config.extra.get("font", {}).text | default("Ubuntu") %}
@@ -74,7 +74,7 @@
{% for path in extra_css %} {% for path in extra_css %}
<link rel="stylesheet" href="{{ path }}"> <link rel="stylesheet" href="{{ path }}">
{% endfor %} {% endfor %}
<script src="{{ base_url }}/assets/javascripts/modernizr-4ab42b99fd.js"></script> <script src="{{ base_url }}/assets/javascripts/modernizr-2216498cab.js"></script>
{% block extrahead %}{% endblock %} {% block extrahead %}{% endblock %}
</head> </head>
{% set palette = config.extra.get("palette", {}) %} {% set palette = config.extra.get("palette", {}) %}
@@ -139,7 +139,7 @@
var base_url = '{{ base_url }}'; var base_url = '{{ base_url }}';
var repo_id = '{{ repo_id }}'; var repo_id = '{{ repo_id }}';
</script> </script>
<script src="{{ base_url }}/assets/javascripts/application-997097ee0c.js"></script> <script src="{{ base_url }}/assets/javascripts/application-82b5011116.js"></script>
{% for path in extra_javascript %} {% for path in extra_javascript %}
<script src="{{ path }}"></script> <script src="{{ path }}"></script>
{% endfor %} {% endfor %}

View File

@@ -26,10 +26,17 @@
{% if repo_name == "GitHub" and repo_url %} {% if repo_name == "GitHub" and repo_url %}
<ul class="repo"> <ul class="repo">
<li class="repo-download"> <li class="repo-download">
{% set version = config.extra.version | default("master") %} {% if config.extra.github and config.extra.github.download_release %}
<a href="{{ repo_url }}/archive/{{ version }}.zip" target="_blank" title="Download" data-action="download"> {% set version = config.extra.version | default("../latest") %}
<i class="icon icon-download"></i> Download <a href="{{ repo_url }}/releases/tag/{{ version }}" target="_blank" title="Download" data-action="download">
</a> <i class="icon icon-download"></i> Download
</a>
{% else %}
{% set version = config.extra.version | default("master") %}
<a href="{{ repo_url }}/archive/{{ version }}.zip" target="_blank" title="Download" data-action="download">
<i class="icon icon-download"></i> Download
</a>
{% endif %}
</li> </li>
<li class="repo-stars"> <li class="repo-stars">
<a href="{{ repo_url }}/stargazers" target="_blank" title="Stargazers" data-action="star"> <a href="{{ repo_url }}/stargazers" target="_blank" title="Stargazers" data-action="star">

View File

@@ -44,7 +44,7 @@
</div> </div>
<div class="stretch"> <div class="stretch">
<div class="field"> <div class="field">
<input class="query" type="text" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck> <input class="query" type="text" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false">
</div> </div>
</div> </div>
<div class="button button-reset" role="button" aria-label="Search"> <div class="button button-reset" role="button" aria-label="Search">

View File

@@ -1,7 +1,7 @@
{ {
"assets/images/favicon.ico": "assets/images/favicon-e565ddfa3b.ico", "assets/images/favicon.ico": "assets/images/favicon-e565ddfa3b.ico",
"assets/javascripts/application.js": "assets/javascripts/application-997097ee0c.js", "assets/javascripts/application.js": "assets/javascripts/application-82b5011116.js",
"assets/javascripts/modernizr.js": "assets/javascripts/modernizr-4ab42b99fd.js", "assets/javascripts/modernizr.js": "assets/javascripts/modernizr-2216498cab.js",
"assets/stylesheets/application.css": "assets/stylesheets/application-a422ff04cc.css", "assets/stylesheets/application.css": "assets/stylesheets/application-e576885f03.css",
"assets/stylesheets/palettes.css": "assets/stylesheets/palettes-05ab2406df.css" "assets/stylesheets/palettes.css": "assets/stylesheets/palettes-2d6c5d2926.css"
} }

View File

@@ -38,6 +38,8 @@ theme_dir: material
extra: extra:
version: 0.2.4 version: 0.2.4
logo: images/logo.png logo: images/logo.png
github:
download_release: true
author: author:
github: squidfunk github: squidfunk
twitter: squidfunk twitter: squidfunk

View File

@@ -41,11 +41,19 @@
{% if repo_name == "GitHub" and repo_url %} {% if repo_name == "GitHub" and repo_url %}
<ul class="repo"> <ul class="repo">
<li class="repo-download"> <li class="repo-download">
{% set version = config.extra.version | default("master") %} {% if config.extra.github and config.extra.github.download_release %}
<a href="{{ repo_url }}/archive/{{ version }}.zip" target="_blank" {% set version = config.extra.version | default("../latest") %}
title="Download" data-action="download"> <a href="{{ repo_url }}/releases/tag/{{ version }}" target="_blank"
<i class="icon icon-download"></i> Download title="Download" data-action="download">
</a> <i class="icon icon-download"></i> Download
</a>
{% else %}
{% set version = config.extra.version | default("master") %}
<a href="{{ repo_url }}/archive/{{ version }}.zip" target="_blank"
title="Download" data-action="download">
<i class="icon icon-download"></i> Download
</a>
{% endif %}
</li> </li>
<li class="repo-stars"> <li class="repo-stars">
<a href="{{ repo_url }}/stargazers" target="_blank" <a href="{{ repo_url }}/stargazers" target="_blank"