This repository has been archived by the owner on Jul 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
62 changed files
with
4,342 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.html linguist-language=javascript | ||
*.css linguist-language=javascript | ||
*.js linguist-language=javascript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
# manual-less | ||
# Less | ||
|
||
Less 是一种动态层叠样式表语言。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Summary | ||
|
||
* [Less](README.md) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"root": "", | ||
"structure": { | ||
"readme": "README.md", | ||
"summary": "SUMMARY.md" | ||
}, | ||
"title": "Less", | ||
"description": "Less 手册", | ||
"author": "Kuriv Vesti", | ||
"isbn": "", | ||
"language": "zh-hans", | ||
"direction": "ltr", | ||
"gitbook": ">=3.0.0", | ||
"plugins": [ | ||
"back-to-top-button", "chapter-fold", "favicon", "hide-element", "lightbox", "-highlight", "prism", "-lunr", "-search", "search-pro", "splitter" | ||
], | ||
"pluginsConfig": { | ||
"favicon": { | ||
"shortcut": "favicon.ico", | ||
"bookmark": "favicon.ico", | ||
"appleTouch": "favicon.png", | ||
"appleTouchMore": { | ||
"120x120": "favicon-120x120.png", | ||
"180x180": "favicon-180x180.png" | ||
} | ||
}, | ||
"hide-element": { | ||
"elements": [".gitbook-link"] | ||
}, | ||
"prism": { | ||
"css": ["prismjs/themes/prism-okaidia.css"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.html linguist-language=javascript | ||
*.css linguist-language=javascript | ||
*.js linguist-language=javascript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 Kuriv Vesti | ||
|
||
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 NONINFRINGEMENT. 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. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
.back-to-top { | ||
position: fixed; | ||
bottom: 25px; | ||
right: 25px; | ||
background: rgba(0, 0, 0, 0.5); | ||
width: 50px; | ||
height: 50px; | ||
display: block; | ||
text-decoration: none; | ||
-webkit-border-radius: 35px; | ||
-moz-border-radius: 35px; | ||
border-radius: 35px; | ||
display: none; | ||
} | ||
.back-to-top i { | ||
color: #fff; | ||
margin: 0; | ||
position: relative; | ||
left: 15px; | ||
top: 14px; | ||
font-size: 22px; | ||
} | ||
.back-to-top:hover { | ||
background: rgba(0, 0, 0, 0.9); | ||
cursor: pointer; | ||
} | ||
.book.color-theme-1 .back-to-top { | ||
background: rgba(112, 66, 20, 0.5); | ||
} | ||
.book.color-theme-1 .back-to-top i { | ||
color: #f3eacb; | ||
} | ||
.book.color-theme-1 .back-to-top:hover { | ||
background: rgba(112, 66, 20, 0.9); | ||
} | ||
.book.color-theme-2 .back-to-top { | ||
background: rgba(189, 202, 219, 0.5); | ||
} | ||
.book.color-theme-2 .back-to-top i { | ||
color: #1C1F2B; | ||
} | ||
.book.color-theme-2 .back-to-top:hover { | ||
background: rgba(189, 202, 219, 0.9); | ||
} | ||
|
||
@media only screen | ||
and (min-device-width: 320px) | ||
and (max-device-width: 480px) | ||
and (-webkit-min-device-pixel-ratio: 2) | ||
and (orientation: portrait) { | ||
.back-to-top { | ||
bottom: 10px; | ||
right: 10px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
var gitbook = window.gitbook; | ||
|
||
gitbook.events.on('page.change', function() { | ||
|
||
var back_to_top_button = ['<div class="back-to-top"><i class="fa fa-arrow-up"></i></div>'].join(""); | ||
$(".book").append(back_to_top_button) | ||
|
||
$(".back-to-top").hide(); | ||
|
||
$('.book-body,.body-inner').on('scroll', function () { | ||
if ($(this).scrollTop() > 100) { | ||
$('.back-to-top').fadeIn(); | ||
} else { | ||
$('.back-to-top').fadeOut(); | ||
} | ||
}); | ||
|
||
$('.back-to-top').click(function () { | ||
$('.book-body,.body-inner').animate({ | ||
scrollTop: 0 | ||
}, 800); | ||
return false; | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
.book .book-summary .chapter > .articles { | ||
overflow: hidden; | ||
max-height: 0px; | ||
} | ||
|
||
.book .book-summary .chapter.expanded > .articles { | ||
max-height: 9999px; | ||
} | ||
|
||
.book .book-summary .exc-trigger { | ||
position: absolute; | ||
left: 12px; | ||
top: 12px; | ||
} | ||
|
||
.book .book-summary ul.summary li a, | ||
.book .book-summary ul.summary li span { | ||
padding-left: 30px; | ||
} | ||
|
||
.book .book-summary .exc-trigger:before { | ||
content: "\f105"; | ||
} | ||
|
||
.book .book-summary .expanded > a .exc-trigger:before, | ||
.book .book-summary .expanded > span .exc-trigger:before { | ||
content: "\f107"; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
require(['gitbook', 'jQuery'], function(gitbook, $) { | ||
var TOGGLE_CLASSNAME = 'expanded', | ||
CHAPTER = '.chapter', | ||
ARTICLES = '.articles', | ||
TRIGGER_TEMPLATE = '<i class="exc-trigger fa"></i>', | ||
LS_NAMESPACE = 'expChapters'; | ||
var init = function () { | ||
// adding the trigger element to each ARTICLES parent and binding the event | ||
var chapterLink = $(ARTICLES).parent(CHAPTER).children('a'); | ||
chapterLink.append($(TRIGGER_TEMPLATE)); | ||
chapterLink.on('click', function (e) { | ||
e.preventDefault(); | ||
//e.stopPropagation(); | ||
toggle($(e.target).closest(CHAPTER)); | ||
}); | ||
|
||
expand(lsItem()); | ||
//expand current selected chapter with it's parents | ||
collapse($(CHAPTER)); | ||
var activeChapter = $(CHAPTER + '.active'); | ||
expand(activeChapter); | ||
expand(activeChapter.parents(CHAPTER)); | ||
} | ||
//on page.change will happend the function. | ||
|
||
var toggle = function ($chapter) { | ||
if ($chapter.hasClass('expanded')) { | ||
collapse($chapter); | ||
} else { | ||
expand($chapter); | ||
//$chapter.addClass('active').siblings().removeClass('active'); | ||
} | ||
} | ||
var collapse = function ($chapter) { | ||
if ($chapter.length && $chapter.hasClass(TOGGLE_CLASSNAME)) { | ||
$chapter.removeClass(TOGGLE_CLASSNAME); | ||
lsItem($chapter); | ||
} | ||
} | ||
var expand = function ($chapter) { | ||
if ($chapter.length && !$chapter.hasClass(TOGGLE_CLASSNAME)) { | ||
$chapter.addClass(TOGGLE_CLASSNAME); | ||
lsItem($chapter); | ||
} | ||
} | ||
var lsItem = function () { | ||
var map = JSON.parse(localStorage.getItem(LS_NAMESPACE)) || {} | ||
if (arguments.length) { | ||
var $chapters = arguments[0]; | ||
$chapters.each(function (index, element) { | ||
var level = $(this).data('level'); | ||
var value = $(this).hasClass(TOGGLE_CLASSNAME); | ||
map[level] = value; | ||
}) | ||
localStorage.setItem(LS_NAMESPACE, JSON.stringify(map)); | ||
} else { | ||
return $(CHAPTER).map(function(index, element){ | ||
if (map[$(this).data('level')]) { | ||
return this; | ||
} | ||
}) | ||
} | ||
} | ||
gitbook.events.bind('page.change', function() { | ||
init() | ||
}); | ||
}); |
Oops, something went wrong.