mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Prototyped options menu
This commit is contained in:
parent
3aca698aa4
commit
d56ab36000
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,10 +1,10 @@
|
||||
{
|
||||
"assets/javascripts/bundle.js": "assets/javascripts/bundle.7ea61618.min.js",
|
||||
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.7ea61618.min.js.map",
|
||||
"assets/javascripts/bundle.js": "assets/javascripts/bundle.e2842e12.min.js",
|
||||
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.e2842e12.min.js.map",
|
||||
"assets/javascripts/vendor.js": "assets/javascripts/vendor.0c35f0aa.min.js",
|
||||
"assets/javascripts/vendor.js.map": "assets/javascripts/vendor.0c35f0aa.min.js.map",
|
||||
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.2613054f.min.js",
|
||||
"assets/javascripts/worker/search.js.map": "assets/javascripts/worker/search.2613054f.min.js.map",
|
||||
"assets/stylesheets/main.css": "assets/stylesheets/main.a59423ce.min.css",
|
||||
"assets/stylesheets/palette.css": "assets/stylesheets/palette.4444686e.min.css"
|
||||
"assets/stylesheets/main.css": "assets/stylesheets/main.2331f4ab.min.css",
|
||||
"assets/stylesheets/palette.css": "assets/stylesheets/palette.e9ae9b85.min.css"
|
||||
}
|
1
material/assets/stylesheets/main.2331f4ab.min.css
vendored
Normal file
1
material/assets/stylesheets/main.2331f4ab.min.css
vendored
Normal file
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
1
material/assets/stylesheets/palette.e9ae9b85.min.css
vendored
Normal file
1
material/assets/stylesheets/palette.e9ae9b85.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -41,9 +41,9 @@
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block styles %}
|
||||
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.a59423ce.min.css' | url }}">
|
||||
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.2331f4ab.min.css' | url }}">
|
||||
{% if palette.primary or palette.accent %}
|
||||
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.4444686e.min.css' | url }}">
|
||||
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.e9ae9b85.min.css' | url }}">
|
||||
{% endif %}
|
||||
{% if palette.primary %}
|
||||
{% import "partials/palette.html" as map %}
|
||||
@ -178,7 +178,7 @@
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script src="{{ 'assets/javascripts/vendor.0c35f0aa.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/bundle.7ea61618.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/bundle.e2842e12.min.js' | url }}"></script>
|
||||
{%- set translations = {} -%}
|
||||
{%- for key in [
|
||||
"clipboard.copy",
|
||||
|
@ -32,6 +32,10 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<label class="md-header-nav__button md-icon" for="__more">
|
||||
{% include ".icons/material/dots-vertical" ~ ".svg" %}
|
||||
</label>
|
||||
{% include "partials/more.html" %}
|
||||
{% if "search" in config["plugins"] %}
|
||||
<label class="md-header-nav__button md-icon" for="__search">
|
||||
{% include ".icons/material/magnify.svg" %}
|
||||
|
11
material/partials/more.html
Normal file
11
material/partials/more.html
Normal file
@ -0,0 +1,11 @@
|
||||
{#-
|
||||
This file was automatically generated - do not edit
|
||||
-#}
|
||||
<div class="md-more">
|
||||
<input class="md-toggle" data-md-toggle="more" type="checkbox" id="__more" autocomplete="off">
|
||||
<ul class="md-more__list">
|
||||
<li class="md-more__item">Item 1</li>
|
||||
<li class="md-more__item">Item 2</li>
|
||||
<li class="md-more__item">Item 3</li>
|
||||
</ul>
|
||||
</div>
|
@ -53,22 +53,32 @@
|
||||
// Code block color shades
|
||||
--md-code-bg-color: hsla(0, 0%, 96%, 1);
|
||||
--md-code-fg-color: hsla(200, 18%, 26%, 1);
|
||||
|
||||
// // Drop shadow
|
||||
// --md-drop-shadow:
|
||||
// 0 px2rem(4px) px2rem(10px) hsla(0, 0%, 0%, 0.05),
|
||||
// 0 0 px2rem(1px) hsla(0, 0%, 0%, 0.1);
|
||||
}
|
||||
|
||||
// :root [data-md-color-scheme="dark"] {
|
||||
:root {
|
||||
// // :root [data-md-color-scheme="dark"] {
|
||||
// :root {
|
||||
|
||||
// Default color shades
|
||||
--md-default-fg-color: hsla(0, 0%, 100%, 1);
|
||||
--md-default-fg-color--light: hsla(0, 0%, 100%, 0.7);
|
||||
--md-default-fg-color--lighter: hsla(0, 0%, 100%, 0.3);
|
||||
--md-default-fg-color--lightest: hsla(0, 0%, 100%, 0.12);
|
||||
--md-default-bg-color: hsla(232, 15%, 21%, 1);
|
||||
// --md-default-bg-color--light: hsla(0, 0%, 0%, 0.54);
|
||||
// --md-default-bg-color--lighter: hsla(0, 0%, 0%, 0.26);
|
||||
// --md-default-bg-color--lightest: hsla(0, 0%, 0%, 0.07);
|
||||
// // Default color shades
|
||||
// --md-default-fg-color: hsla(0, 0%, 100%, 1);
|
||||
// --md-default-fg-color--light: hsla(0, 0%, 100%, 0.7);
|
||||
// --md-default-fg-color--lighter: hsla(0, 0%, 100%, 0.3);
|
||||
// --md-default-fg-color--lightest: hsla(0, 0%, 100%, 0.12);
|
||||
// --md-default-bg-color: hsla(232, 15%, 21%, 1);
|
||||
// // --md-default-bg-color--light: hsla(0, 0%, 0%, 0.54);
|
||||
// // --md-default-bg-color--lighter: hsla(0, 0%, 0%, 0.26);
|
||||
// // --md-default-bg-color--lightest: hsla(0, 0%, 0%, 0.07);
|
||||
|
||||
// Code block color shades
|
||||
--md-code-bg-color: hsla(232, 15%, 18%, 1);
|
||||
--md-code-fg-color: hsla(60, 30%, 96%, 1);
|
||||
}
|
||||
// // Code block color shades
|
||||
// --md-code-bg-color: hsla(232, 15%, 18%, 1);
|
||||
// --md-code-fg-color: hsla(60, 30%, 96%, 1);
|
||||
|
||||
// // Drop shadow
|
||||
// --md-drop-shadow:
|
||||
// 0 px2rem(4px) px2rem(10px) hsla(0, 0%, 0%, 0.2),
|
||||
// 0 0 px2rem(1px) hsla(0, 0%, 0%, 0.4);
|
||||
// }
|
||||
|
@ -75,6 +75,7 @@
|
||||
&__button {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: block;
|
||||
margin: px2rem(4px);
|
||||
padding: px2rem(8px);
|
||||
cursor: pointer;
|
||||
@ -148,7 +149,7 @@
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 0 px2rem(20px);
|
||||
padding-left: px2rem(20px);
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
@ -156,6 +157,12 @@
|
||||
transform 400ms cubic-bezier(0.1, 0.7, 0.1, 1),
|
||||
opacity 150ms;
|
||||
|
||||
// Adjust for right-to-left languages
|
||||
[dir="rtl"] & {
|
||||
padding-right: px2rem(20px);
|
||||
padding-left: initial;
|
||||
}
|
||||
|
||||
// Page title
|
||||
& + & {
|
||||
z-index: -1;
|
||||
|
70
src/assets/stylesheets/layout/_options.scss
Normal file
70
src/assets/stylesheets/layout/_options.scss
Normal file
@ -0,0 +1,70 @@
|
||||
////
|
||||
/// Copyright (c) 2016-2020 Martin Donath <martin.donath@squidfunk.com>
|
||||
///
|
||||
/// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
/// copy of this software and associated documentation files (the "Software"),
|
||||
/// to deal in the Software without restriction, including without limitation
|
||||
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
/// and/or sell copies of the Software, and to permit persons to whom the
|
||||
/// Software is furnished to do so, subject to the following conditions:
|
||||
///
|
||||
/// The above copyright notice and this permission notice shall be included in
|
||||
/// all copies or substantial portions of the Software.
|
||||
///
|
||||
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
/// 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
|
||||
////
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Variables
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Active (toggled) search
|
||||
$md-toggle__search--checked:
|
||||
"[data-md-toggle=\"search\"]:checked ~ .md-header";
|
||||
|
||||
// Active (toggled) options dialog
|
||||
$md-toggle__more--checked:
|
||||
"[data-md-toggle=\"more\"]:checked";
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Rules
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Options dialog
|
||||
.md-more {
|
||||
position: relative;
|
||||
|
||||
&__list {
|
||||
position: absolute;
|
||||
display: none;
|
||||
margin: 0;
|
||||
background: red;
|
||||
}
|
||||
|
||||
#{$md-toggle__more--checked} + &__list {
|
||||
display: block;
|
||||
background: blue;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[for="__more"] {
|
||||
padding: px2rem(8px) px2rem(4px); // reduce padding
|
||||
transition:
|
||||
visibility 0ms 250ms,
|
||||
opacity 125ms 250ms;
|
||||
}
|
||||
|
||||
// hide, if search is active... do not display none though...
|
||||
#{$md-toggle__search--checked} [for="__more"] {
|
||||
width: 0;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
transition: visibility 0ms;
|
||||
}
|
@ -51,6 +51,7 @@
|
||||
@import "layout/hero";
|
||||
@import "layout/footer";
|
||||
@import "layout/nav";
|
||||
@import "layout/options";
|
||||
@import "layout/search";
|
||||
@import "layout/sidebar";
|
||||
@import "layout/source";
|
||||
|
39
src/partials/more.html
Normal file
39
src/partials/more.html
Normal file
@ -0,0 +1,39 @@
|
||||
<!--
|
||||
Copyright (c) 2016-2020 Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
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
|
||||
IN THE SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- Options dialog -->
|
||||
<div class="md-more">
|
||||
<input
|
||||
class="md-toggle"
|
||||
data-md-toggle="more"
|
||||
type="checkbox"
|
||||
id="__more"
|
||||
autocomplete="off"
|
||||
/>
|
||||
|
||||
<!-- Options -->
|
||||
<ul class="md-more__list">
|
||||
<li class="md-more__item">Item 1</li>
|
||||
<li class="md-more__item">Item 2</li>
|
||||
<li class="md-more__item">Item 3</li>
|
||||
</ul>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user