Browse Source

Add fixes to partial file & add license

* Moved theme-switcher code to scripts partial file
+ Add author's MIT license to featherlight javascript
pull/1161/head
Still Hsu 7 years ago
parent
commit
081c4cabaa
No known key found for this signature in database GPG Key ID: 8601A145FDA95209
4 changed files with 27 additions and 5 deletions
  1. +0
    -1
      docs/_template/light-dark-theme/partials/head.tmpl.partial
  2. +2
    -1
      docs/_template/light-dark-theme/partials/scripts.tmpl.partial
  3. +22
    -0
      docs/_template/light-dark-theme/styles/plugin-featherlight.js
  4. +3
    -3
      docs/docfx.json

+ 0
- 1
docs/_template/light-dark-theme/partials/head.tmpl.partial View File

@@ -21,5 +21,4 @@
{{#_noindex}}<meta name="searchOption" content="noindex">{{/_noindex}} {{#_noindex}}<meta name="searchOption" content="noindex">{{/_noindex}}
{{#_enableSearch}}<meta property="docfx:rel" content="{{_rel}}">{{/_enableSearch}} {{#_enableSearch}}<meta property="docfx:rel" content="{{_rel}}">{{/_enableSearch}}
{{#_enableNewTab}}<meta property="docfx:newtab" content="true">{{/_enableNewTab}} {{#_enableNewTab}}<meta property="docfx:newtab" content="true">{{/_enableNewTab}}
<script type="text/javascript" src="{{_rel}}styles/styleswitcher.js"></script>
</head> </head>

+ 2
- 1
docs/_template/light-dark-theme/partials/scripts.tmpl.partial View File

@@ -7,4 +7,5 @@
<script type="text/javascript" src="{{_rel}}styles/plugin-featherlight.js"></script> <script type="text/javascript" src="{{_rel}}styles/plugin-featherlight.js"></script>
<script type="text/javascript" src="{{_rel}}styles/styleswitcher.js"></script> <script type="text/javascript" src="{{_rel}}styles/styleswitcher.js"></script>
<script type="text/javascript" src="//malsup.github.io/jquery.corner.js"></script> <script type="text/javascript" src="//malsup.github.io/jquery.corner.js"></script>
<script type="text/javascript" src="{{_rel}}styles/cornerify.js"></script>
<script type="text/javascript" src="{{_rel}}styles/cornerify.js"></script>
<script type="text/javascript" src="{{_rel}}styles/styleswitcher.js"></script>

+ 22
- 0
docs/_template/light-dark-theme/styles/plugin-featherlight.js View File

@@ -1,3 +1,25 @@
// MIT License

// Copyright (c) 2017 Roel Fauconnier

// 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.

$(document).ready(function() { $(document).ready(function() {
//find all images, but not the logo, and add the lightbox //find all images, but not the logo, and add the lightbox
$('img').not('#logo').each(function(){ $('img').not('#logo').each(function(){


+ 3
- 3
docs/docfx.json View File

@@ -36,12 +36,12 @@
"template": [ "template": [
"default", "default",
"_template/light-dark-theme", "_template/light-dark-theme",
"_template/lastmodified"
"_template/lastmodified"
], ],
"postProcessors": [ "ExtractSearchIndex", "LastModifiedPostProcessor" ],
"postProcessors": ["ExtractSearchIndex", "LastModifiedPostProcessor"],
"overwrite": "_overwrites/**/**.md", "overwrite": "_overwrites/**/**.md",
"globalMetadata": { "globalMetadata": {
"_appTitle": "Discord.Net Documentation",
"_appTitle": "Discord.Net Documentation",
"_appFooter": "Discord.Net (c) 2015-2018 2.0.0-beta", "_appFooter": "Discord.Net (c) 2015-2018 2.0.0-beta",
"_enableSearch": true "_enableSearch": true
}, },


Loading…
Cancel
Save