mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Added source file links, have to fix repaints
This commit is contained in:
parent
6f64bcc3e1
commit
a911dd31b3
@ -1,3 +1,6 @@
|
|||||||
|
source: src/assets/javascripts/application.js
|
||||||
|
src/assets/stylesheets/application.scss
|
||||||
|
|
||||||
# Getting started
|
# Getting started
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
1
material/assets/stylesheets/application-646a8e0c44.css
Normal file
1
material/assets/stylesheets/application-646a8e0c44.css
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -32,7 +32,7 @@
|
|||||||
<script src="{{ base_url }}/assets/javascripts/modernizr-56ade86843.js"></script>
|
<script src="{{ base_url }}/assets/javascripts/modernizr-56ade86843.js"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block styles %}
|
{% block styles %}
|
||||||
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-e17eeafcbc.css">
|
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-646a8e0c44.css">
|
||||||
{% if config.extra.palette %}
|
{% if config.extra.palette %}
|
||||||
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-892b79c5c5.palette.css">
|
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-892b79c5c5.palette.css">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -108,14 +108,25 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
<div class="md-content">
|
<div class="md-content">
|
||||||
<article class="md-content__inner md-typeset">
|
<article class="md-content__inner md-typeset">
|
||||||
{% if config.edit_uri %}
|
{% if config.edit_uri %}
|
||||||
<a href="{{ page.edit_url }}" title="{{ lang.t('edit.link.title') }}" class="md-icon md-content__edit">edit</a>
|
<a href="{{ page.edit_url }}" title="{{ lang.t('edit.link.title') }}" class="md-icon md-content__icon">edit</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
{% if page.meta.source %}
|
||||||
|
<a href="{{ page.edit_url }}" title="{{ lang.t('source.link.title') }}" class="md-icon md-content__icon">folder_open</a>
|
||||||
|
{% endif %}
|
||||||
{% if not "\x3ch1" in page.content %}
|
{% if not "\x3ch1" in page.content %}
|
||||||
<h1>{{ page.title | default(config.site_name, true)}}</h1>
|
<h1>{{ page.title | default(config.site_name, true)}}</h1>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ page.content }}
|
{{ page.content }}
|
||||||
|
{% if page.meta.source %}
|
||||||
|
<hr>
|
||||||
|
<ul>
|
||||||
|
{% for file in page.meta.source %}
|
||||||
|
<li><a href="#"><code>{{ file }}</code></a></li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% if config.extra.disqus and not page.is_homepage %}
|
{% if config.extra.disqus and not page.is_homepage %}
|
||||||
<h2>{{ lang.t('comments') }}</h2>
|
<h2>{{ lang.t('comments') }}</h2>
|
||||||
|
@ -27,6 +27,7 @@ site_url: http://squidfunk.github.io/mkdocs-material/
|
|||||||
# Repository
|
# Repository
|
||||||
repo_name: squidfunk/mkdocs-material
|
repo_name: squidfunk/mkdocs-material
|
||||||
repo_url: https://github.com/squidfunk/mkdocs-material
|
repo_url: https://github.com/squidfunk/mkdocs-material
|
||||||
|
edit_uri: tree/master/docs
|
||||||
|
|
||||||
# Copyright
|
# Copyright
|
||||||
copyright: 'Copyright © 2016 - 2017 Martin Donath'
|
copyright: 'Copyright © 2016 - 2017 Martin Donath'
|
||||||
|
@ -26,6 +26,9 @@
|
|||||||
|
|
||||||
// Content container
|
// Content container
|
||||||
.md-content {
|
.md-content {
|
||||||
|
// Hack: setting overflow to hidden induces new layer borders which omits
|
||||||
|
// massive repaints because of the margins of the inner elements
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
// [tablet landscape +]: Add space for table of contents
|
// [tablet landscape +]: Add space for table of contents
|
||||||
@include break-from-device(tablet landscape) {
|
@include break-from-device(tablet landscape) {
|
||||||
@ -35,9 +38,6 @@
|
|||||||
// [screen +]: Add space for table of contents
|
// [screen +]: Add space for table of contents
|
||||||
@include break-from-device(screen) {
|
@include break-from-device(screen) {
|
||||||
margin-left: 24.2rem;
|
margin-left: 24.2rem;
|
||||||
// Hack: setting overflow to auto induces margin collapse which omits
|
|
||||||
// massive repaints because of the margins of the inner elements
|
|
||||||
overflow: auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define spacing
|
// Define spacing
|
||||||
@ -55,20 +55,43 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Icons (edit button)
|
// Icons
|
||||||
&__edit {
|
&__icon {
|
||||||
@extend %md-icon__button;
|
@extend %md-icon__button;
|
||||||
|
|
||||||
|
position: relative;
|
||||||
|
margin-top: 0.8rem;
|
||||||
float: right;
|
float: right;
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
html body .md-typeset & {
|
||||||
|
color: $md-color-black--lighter;
|
||||||
|
}
|
||||||
|
|
||||||
// [tablet portrait -]: Align edit link with search icon
|
// [tablet portrait -]: Align edit link with search icon
|
||||||
@include break-to-device(tablet portrait) {
|
@include break-to-device(tablet portrait) {
|
||||||
margin-right: -0.8rem;
|
margin-right: -0.8rem;
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
& + & {
|
||||||
|
margin-right: 0.4rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hide for print
|
// Hide for print
|
||||||
@media print {
|
@media print {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
& + &::before {
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
top: -0.4rem;
|
||||||
|
right: -0.4rem;
|
||||||
|
height: 4.8rem;
|
||||||
|
border-right: 0.1rem solid $md-color-black--lighter;
|
||||||
|
content: "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
width: 24.2rem;
|
width: 24.2rem;
|
||||||
padding: 2.4rem 0;
|
padding: 2.4rem 0;
|
||||||
float: left;
|
float: left;
|
||||||
overflow: visible;
|
overflow: hidden;
|
||||||
|
|
||||||
// Hide for print
|
// Hide for print
|
||||||
@media print {
|
@media print {
|
||||||
@ -41,7 +41,6 @@
|
|||||||
&[data-md-state="lock"] {
|
&[data-md-state="lock"] {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 5.6rem;
|
top: 5.6rem;
|
||||||
backface-visibility: hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// [tablet -]: Convert navigation to drawer
|
// [tablet -]: Convert navigation to drawer
|
||||||
|
@ -36,6 +36,11 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Hide for print
|
||||||
|
@media print {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
// List of items
|
// List of items
|
||||||
&__list {
|
&__list {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@ -82,6 +87,7 @@
|
|||||||
// Fade-out tabs background upon scrolling
|
// Fade-out tabs background upon scrolling
|
||||||
&[data-md-state="hidden"] {
|
&[data-md-state="hidden"] {
|
||||||
background: $md-color-primary;
|
background: $md-color-primary;
|
||||||
|
pointer-events: none;
|
||||||
|
|
||||||
// Hide tabs upon scrolling - disable transition to minimizes repaints whilte
|
// Hide tabs upon scrolling - disable transition to minimizes repaints whilte
|
||||||
// scrolling down, while scrolling up seems to be okay
|
// scrolling down, while scrolling up seems to be okay
|
||||||
|
@ -211,15 +211,22 @@
|
|||||||
<article class="md-content__inner md-typeset">
|
<article class="md-content__inner md-typeset">
|
||||||
|
|
||||||
<!-- Edit button, if URL was defined -->
|
<!-- Edit button, if URL was defined -->
|
||||||
{% if config.edit_uri %}
|
{% if config.edit_uri %}
|
||||||
<a href="{{ page.edit_url }}"
|
<a href="{{ page.edit_url }}"
|
||||||
title="{{ lang.t('edit.link.title') }}"
|
title="{{ lang.t('edit.link.title') }}"
|
||||||
class="md-icon md-content__edit">edit</a>
|
class="md-icon md-content__icon">edit</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<!-- Block: content -->
|
<!-- Block: content -->
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
|
<!-- Linked source files -->
|
||||||
|
{% if page.meta.source %}
|
||||||
|
<a href="{{ page.edit_url }}"
|
||||||
|
title="{{ lang.t('source.link.title') }}"
|
||||||
|
class="md-icon md-content__icon">folder_open</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Hack: check whether the content contains a h1 headline. If it
|
Hack: check whether the content contains a h1 headline. If it
|
||||||
doesn't, the page title (or respectively site name) is used
|
doesn't, the page title (or respectively site name) is used
|
||||||
@ -231,6 +238,15 @@
|
|||||||
|
|
||||||
<!-- Content -->
|
<!-- Content -->
|
||||||
{{ page.content }}
|
{{ page.content }}
|
||||||
|
|
||||||
|
{% if page.meta.source %}
|
||||||
|
<hr>
|
||||||
|
<ul>
|
||||||
|
{% for file in page.meta.source %}
|
||||||
|
<li><a href="#"><code>{{ file }}</code></a></li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<!-- Disqus integration -->
|
<!-- Disqus integration -->
|
||||||
|
Loading…
Reference in New Issue
Block a user