1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-09-24 11:28:23 +02:00

Merge branch 'master' into chore/setup-gemini-test-environment

This commit is contained in:
squidfunk 2017-02-08 23:30:46 +01:00
commit 07329f4304
10 changed files with 6280 additions and 26 deletions

View File

@ -180,7 +180,6 @@
"z-index"
],
"property-no-vendor-prefix": true,
"root-no-standard-properties": true,
"selector-class-pattern": "^[a-z0-9]+(-[a-z0-9]+)*(__[a-z]+)?(--[a-z]+)?$",
"selector-descendant-combinator-no-non-space": null,
"string-quotes": "double",

View File

@ -23,9 +23,9 @@ sudo: false
# Node.js versions
node_js:
- 4
- 5
- 6
- 7
# Install a C++11 compatible compiler
addons:
@ -47,6 +47,7 @@ git:
# Cache dependencies
cache:
pip: true
yarn: true
directories:
- node_modules
@ -55,4 +56,4 @@ before_script:
- pip install --user -r requirements.txt
# Perform build and tests
script: npm run build
script: yarn run build

View File

@ -110,7 +110,7 @@
<a href="{{ page.edit_url }}" title="{{ lang.t('edit.link.title') }}" class="md-icon md-content__edit">edit</a>
{% endif %}
{% block content %}
{% if not "\x3ch1 id=" in page.content %}
{% if not "\x3ch1" in page.content %}
<h1>{{ page.title | default(config.site_name, true)}}</h1>
{% endif %}
{{ page.content }}

View File

@ -25,10 +25,10 @@
<li class="md-nav__item">
{% set toc_ = page.toc %}
<input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="toc">
{% if "\x3ch1 id=" in page.content %}
{% if toc_ | first is defined %}
{% set toc_ = (toc_ | first).children %}
{% endif %}
{% if toc_ and (toc_ | first) %}
{% if toc_ | first is defined %}
<label class="md-nav__link md-nav__link--active" for="toc">
{{ nav_item.title }}
</label>
@ -36,7 +36,7 @@
<a href="{{ nav_item.url }}" title="{{ nav_item.title }}" class="md-nav__link md-nav__link--active">
{{ nav_item.title }}
</a>
{% if page.toc %}
{% if toc_ | first is defined %}
{% include "partials/toc.html" %}
{% endif %}
</li>

View File

@ -1,10 +1,10 @@
{% import "partials/language.html" as lang %}
<nav class="md-nav md-nav--secondary">
{% set toc_ = page.toc %}
{% if "\x3ch1 id=" in page.content %}
{% if toc_ | first is defined and "\x3ch1 id=" in page.content %}
{% set toc_ = (toc_ | first).children %}
{% endif %}
{% if toc_ and (toc_ | first) %}
{% if toc_ | first is defined %}
<label class="md-nav__title" for="toc">{{ lang.t('toc.title') }}</label>
<ul class="md-nav__list" data-md-scrollfix>
{% for toc_item in toc_ %}

View File

@ -90,9 +90,9 @@
"node-notifier": "^5.0.0",
"postcss-pseudo-classes": "^0.1.0",
"sauce-connect-launcher": "^1.2.0",
"selenium-standalone": "^5.9.1",
"stylelint": "^7.7.1",
"stylelint-config-standard": "^15.0.1",
"selenium-standalone": "^6.0.0",
"stylelint": "^7.8.0",
"stylelint-config-standard": "^16.0.0",
"stylelint-order": "^0.2.2",
"stylelint-scss": "^1.4.1",
"through2": "^2.0.3",

View File

@ -219,11 +219,11 @@
{% block content %}
<!--
This is a nasty hack that checks whether the content contains
a h1 headline. If it doesn't, the page title (or respectively
site name) is used as the main headline.
Hack: check whether the content contains a h1 headline. If it
doesn't, the page title (or respectively site name) is used
as the main headline.
-->
{% if not "\x3ch1 id=" in page.content %}
{% if not "\x3ch1" in page.content %}
<h1>{{ page.title | default(config.site_name, true)}}</h1>
{% endif %}

View File

@ -62,13 +62,13 @@
<input class="md-toggle md-nav__toggle" data-md-toggle="toc"
type="checkbox" id="toc" />
<!-- Nasty hack - see partials/toc.html for more information -->
{% if "\x3ch1 id=" in page.content %}
<!-- Hack: see partials/toc.html for more information -->
{% if toc_ | first is defined %}
{% set toc_ = (toc_ | first).children %}
{% endif %}
<!-- Render table of contents, if not empty -->
{% if toc_ and (toc_ | first) %}
{% if toc_ | first is defined %}
<label class="md-nav__link md-nav__link--active" for="toc">
{{ nav_item.title }}
</label>
@ -79,7 +79,7 @@
</a>
<!-- Show table of contents -->
{% if page.toc %}
{% if toc_ | first is defined %}
{% include "partials/toc.html" %}
{% endif %}
</li>

View File

@ -27,17 +27,17 @@
{% set toc_ = page.toc %}
<!--
This is a nasty hack that checks whether the content contains a h1
headline. If it does, the top-level anchor must be skipped, since it would
be redundant to the link to the current page that is located just above the
anchor. Therefore we directly continue with the children of the anchor.
Hack: check whether the content contains a h1 headline. If it does, the
top-level anchor must be skipped, since it would be redundant to the link
to the current page that is located just above the anchor. Therefore we
directly continue with the children of the anchor.
-->
{% if "\x3ch1 id=" in page.content %}
{% if toc_ | first is defined and "\x3ch1 id=" in page.content %}
{% set toc_ = (toc_ | first).children %}
{% endif %}
<!-- Render item list -->
{% if toc_ and (toc_ | first) %}
{% if toc_ | first is defined %}
<label class="md-nav__title" for="toc">{{ lang.t('toc.title') }}</label>
<ul class="md-nav__list" data-md-scrollfix>
{% for toc_item in toc_ %}

6254
yarn.lock Normal file

File diff suppressed because it is too large Load Diff