Browse Source

Add lightbox & categorize templates

pull/988/head
Hsu Still 7 years ago
parent
commit
03dcdca91e
No known key found for this signature in database GPG Key ID: 8601A145FDA95209
7 changed files with 45 additions and 1 deletions
  1. BIN
      docs/_template/bootstrap-modal/plugins/DocFx.Plugin.ImageProcessor.dll
  2. +0
    -0
      docs/_template/dark/styles/docfx.css
  3. +0
    -0
      docs/_template/dark/styles/dracula.css
  4. +20
    -0
      docs/_template/lightbox-featherlight/partials/head.tmpl.partial
  5. +8
    -0
      docs/_template/lightbox-featherlight/partials/scripts.tmpl.partial
  6. +15
    -0
      docs/_template/lightbox-featherlight/styles/plugin-featherlight.js
  7. +2
    -1
      docs/docfx.json

BIN
docs/_template/bootstrap-modal/plugins/DocFx.Plugin.ImageProcessor.dll View File


docs/_template/styles/docfx.css → docs/_template/dark/styles/docfx.css View File


docs/_template/styles/dracula.css → docs/_template/dark/styles/dracula.css View File


+ 20
- 0
docs/_template/lightbox-featherlight/partials/head.tmpl.partial View File

@@ -0,0 +1,20 @@
{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}}

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>{{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}</title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="{{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}">
<meta name="generator" content="docfx {{_docfxVersion}}">
{{#_description}}<meta name="description" content="{{_description}}">{{/_description}}
<link rel="shortcut icon" href="{{_rel}}{{{_appFaviconPath}}}{{^_appFaviconPath}}favicon.ico{{/_appFaviconPath}}">
<link rel="stylesheet" href="{{_rel}}styles/docfx.vendor.css">
<link rel="stylesheet" href="{{_rel}}styles/docfx.css">
<link rel="stylesheet" href="{{_rel}}styles/main.css">
<link href="//cdn.rawgit.com/noelboss/featherlight/1.7.6/release/featherlight.min.css" type="text/css" rel="stylesheet" />
<meta property="docfx:navrel" content="{{_navRel}}">
<meta property="docfx:tocrel" content="{{_tocRel}}">
{{#_enableSearch}}<meta property="docfx:rel" content="{{_rel}}">{{/_enableSearch}}
{{#_enableNewTab}}<meta property="docfx:newtab" content="true">{{/_enableNewTab}}
</head>

+ 8
- 0
docs/_template/lightbox-featherlight/partials/scripts.tmpl.partial View File

@@ -0,0 +1,8 @@
{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}}

<script type="text/javascript" src="{{_rel}}styles/docfx.vendor.js"></script>
<script type="text/javascript" src="{{_rel}}styles/docfx.js"></script>
<script type="text/javascript" src="{{_rel}}styles/main.js"></script>
<script src="//code.jquery.com/jquery-latest.js"></script>
<script src="//cdn.rawgit.com/noelboss/featherlight/1.7.6/release/featherlight.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="{{_rel}}styles/plugin-featherlight.js"></script>

+ 15
- 0
docs/_template/lightbox-featherlight/styles/plugin-featherlight.js View File

@@ -0,0 +1,15 @@
$(document).ready(function() {
//find all images, but not the logo, and add the lightbox
$('img').not('#logo').each(function(){
var $img = $(this);
var filename = $img.attr('src')
//add cursor
$img.css('cursor','zoom-in');
$img.css('cursor','-moz-zoom-in');
$img.css('cursor','-webkit-zoom-in');

//add featherlight
$img.attr('alt', filename);
$img.featherlight(filename);
});
});

+ 2
- 1
docs/docfx.json View File

@@ -54,7 +54,8 @@
"dest":"_site",
"template":[
"default",
"_template"
"_template/dark",
"_template/lightbox-featherlight"
],
"overwrite": "_overwrites/**/**.md",
"globalMetadata":{


Loading…
Cancel
Save