mkdocs-document-dates 2.4.0__tar.gz → 3.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. {mkdocs_document_dates-2.4.0 → mkdocs_document_dates-3.0.0}/PKG-INFO +36 -37
  2. mkdocs_document_dates-3.0.0/README.md +101 -0
  3. {mkdocs_document_dates-2.4.0 → mkdocs_document_dates-3.0.0}/mkdocs_document_dates/lang/en.py +1 -1
  4. {mkdocs_document_dates-2.4.0 → mkdocs_document_dates-3.0.0}/mkdocs_document_dates/plugin.py +58 -17
  5. mkdocs_document_dates-3.0.0/mkdocs_document_dates/static/document-dates.config.css +76 -0
  6. mkdocs_document_dates-3.0.0/mkdocs_document_dates/static/document-dates.config.js +64 -0
  7. mkdocs_document_dates-3.0.0/mkdocs_document_dates/static/tippy/backdrop.css +1 -0
  8. mkdocs_document_dates-3.0.0/mkdocs_document_dates/static/tippy/light.css +1 -0
  9. mkdocs_document_dates-3.0.0/mkdocs_document_dates/static/tippy/material.css +1 -0
  10. mkdocs_document_dates-3.0.0/mkdocs_document_dates/static/tippy/popper.min.js +6 -0
  11. mkdocs_document_dates-3.0.0/mkdocs_document_dates/static/tippy/scale.css +1 -0
  12. mkdocs_document_dates-3.0.0/mkdocs_document_dates/static/tippy/shift-away.css +1 -0
  13. mkdocs_document_dates-3.0.0/mkdocs_document_dates/static/tippy/tippy.css +1 -0
  14. mkdocs_document_dates-3.0.0/mkdocs_document_dates/static/tippy/tippy.umd.min.js +2 -0
  15. {mkdocs_document_dates-2.4.0 → mkdocs_document_dates-3.0.0}/mkdocs_document_dates.egg-info/PKG-INFO +36 -37
  16. {mkdocs_document_dates-2.4.0 → mkdocs_document_dates-3.0.0}/mkdocs_document_dates.egg-info/SOURCES.txt +11 -2
  17. {mkdocs_document_dates-2.4.0 → mkdocs_document_dates-3.0.0}/setup.py +7 -2
  18. mkdocs_document_dates-2.4.0/README.md +0 -102
  19. mkdocs_document_dates-2.4.0/mkdocs_document_dates/styles.py +0 -42
  20. {mkdocs_document_dates-2.4.0 → mkdocs_document_dates-3.0.0}/LICENSE +0 -0
  21. {mkdocs_document_dates-2.4.0 → mkdocs_document_dates-3.0.0}/mkdocs_document_dates/__init__.py +0 -0
  22. {mkdocs_document_dates-2.4.0 → mkdocs_document_dates-3.0.0}/mkdocs_document_dates/hooks/pre-commit +0 -0
  23. {mkdocs_document_dates-2.4.0 → mkdocs_document_dates-3.0.0}/mkdocs_document_dates/hooks_installer.py +0 -0
  24. {mkdocs_document_dates-2.4.0 → mkdocs_document_dates-3.0.0}/mkdocs_document_dates/lang/__init__.py +0 -0
  25. {mkdocs_document_dates-2.4.0 → mkdocs_document_dates-3.0.0}/mkdocs_document_dates/lang/ar.py +0 -0
  26. {mkdocs_document_dates-2.4.0 → mkdocs_document_dates-3.0.0}/mkdocs_document_dates/lang/de.py +0 -0
  27. {mkdocs_document_dates-2.4.0 → mkdocs_document_dates-3.0.0}/mkdocs_document_dates/lang/es.py +0 -0
  28. {mkdocs_document_dates-2.4.0 → mkdocs_document_dates-3.0.0}/mkdocs_document_dates/lang/fr.py +0 -0
  29. {mkdocs_document_dates-2.4.0 → mkdocs_document_dates-3.0.0}/mkdocs_document_dates/lang/ja.py +0 -0
  30. {mkdocs_document_dates-2.4.0 → mkdocs_document_dates-3.0.0}/mkdocs_document_dates/lang/ko.py +0 -0
  31. {mkdocs_document_dates-2.4.0 → mkdocs_document_dates-3.0.0}/mkdocs_document_dates/lang/ru.py +0 -0
  32. {mkdocs_document_dates-2.4.0 → mkdocs_document_dates-3.0.0}/mkdocs_document_dates/lang/zh.py +0 -0
  33. {mkdocs_document_dates-2.4.0 → mkdocs_document_dates-3.0.0}/mkdocs_document_dates/lang/zh_tw.py +0 -0
  34. {mkdocs_document_dates-2.4.0 → mkdocs_document_dates-3.0.0}/mkdocs_document_dates.egg-info/dependency_links.txt +0 -0
  35. {mkdocs_document_dates-2.4.0 → mkdocs_document_dates-3.0.0}/mkdocs_document_dates.egg-info/entry_points.txt +0 -0
  36. {mkdocs_document_dates-2.4.0 → mkdocs_document_dates-3.0.0}/mkdocs_document_dates.egg-info/requires.txt +0 -0
  37. {mkdocs_document_dates-2.4.0 → mkdocs_document_dates-3.0.0}/mkdocs_document_dates.egg-info/top_level.txt +0 -0
  38. {mkdocs_document_dates-2.4.0 → mkdocs_document_dates-3.0.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mkdocs-document-dates
3
- Version: 2.4.0
3
+ Version: 3.0.0
4
4
  Summary: A MkDocs plugin for displaying accurate document creation and last modification dates.
5
5
  Home-page: https://github.com/jaywhj/mkdocs-document-dates
6
6
  Author: Aaron Wang
@@ -27,20 +27,27 @@ English | [简体中文](README_zh.md)
27
27
 
28
28
 
29
29
 
30
- A MkDocs plugin for displaying <mark>accurate</mark> document creation and last modification dates.
30
+ A MkDocs plugin for displaying the <mark>exact</mark> creation and last modification dates of markdown document.
31
31
 
32
32
  ## Features
33
33
 
34
34
  - **No Git dependency**, uses filesystem timestamps directly
35
35
  - Supports manual date specification in `Front Matter`
36
- - Cross-platform support (Windows, macOS, Linux)
37
36
  - Support for multiple time formats (date, datetime, timeago)
38
- - Flexible display position (top or bottom)
39
37
  - Support for document exclusion mode
40
- - Material Design icons, Elegant styling
41
- - Lightweight with no extra dependencies
42
- - Multi-language support
38
+ - Flexible display position (top or bottom)
39
+ - Material style icons, elegant styling (Customizable)
40
+ - Supports Tooltip Hover Tips
41
+ - Intelligent repositioning to always float optimally in view
42
+ - Supports automatic theme switching following Material's light/dark color scheme
43
+ - Support for customizing themes, styles, animations
44
+ - Compatible with mouse, keyboard and **touch** (mobile) to trigger hover
43
45
  - Support for CI/CD build systems (e.g. Github Actions)
46
+ - Multi-language support, cross-platform support (Windows, macOS, Linux)
47
+
48
+ ## Showcases
49
+
50
+ ![render](render.gif)
44
51
 
45
52
  ## Installation
46
53
 
@@ -50,7 +57,7 @@ pip install mkdocs-document-dates
50
57
 
51
58
  ## Configuration
52
59
 
53
- Just add the plugin to your mkdocs.yml:
60
+ Just add the plugin to your `mkdocs.yml`:
54
61
 
55
62
  ```yaml
56
63
  plugins:
@@ -62,12 +69,12 @@ Or, customize the configuration:
62
69
  ```yaml
63
70
  plugins:
64
71
  - document-dates:
65
- type: date # Date type: date | datetime | timeago, default: date
72
+ type: date # Date type: date datetime timeago, default: date
66
73
  locale: en # Localization: zh zh_tw en es fr de ar ja ko ru, default: en
67
- date_format: '%Y-%m-%d' # Date format
74
+ date_format: '%Y-%m-%d' # Date format, Supports all Python datetime format strings, e.g., %Y-%m-%d, %b %d, %Y, etc
68
75
  time_format: '%H:%M:%S' # Time format (valid only if type=datetime)
69
- position: bottom # Display position: top (after title) | bottom (end of document), default: bottom
70
- exclude: # List of file patterns to exclude
76
+ position: bottom # Display position: top (after title) bottom (end of document), default: bottom
77
+ exclude: # List of excluded files
71
78
  - temp.md # Exclude specific file
72
79
  - private/* # Exclude all files in private directory, including subdirectories
73
80
  - drafts/*.md # Exclude all markdown files in the current directory drafts, but not subdirectories
@@ -86,40 +93,32 @@ modified: 2025-02-23
86
93
  # Document Title
87
94
  ```
88
95
 
89
- - `created` can be replaced by any of the following fields: `created, date, creation_date, created_at, date_created`
90
- - `modified` can be replaced by any of the following fields: `modified, updated, last_modified, updated_at, date_modified, last_update`
91
-
92
- ## Configuration Options
93
-
94
- - **type** : Date type (default: `date` )
95
- - `date` : Display date only
96
- - `datetime` : Display date and time
97
- - `timeago` : Display relative time (e.g., 2 minutes ago)
98
- - **locale** : Localization (default: `en` )
99
- - Supports: `zh zh_tw en es fr de ar ja ko ru`
100
- - **date_format** : Date format (default: `%Y-%m-%d`)
101
- - Supports all Python datetime format strings, e.g., %Y-%m-%d, %b %d, %Y, etc.
102
- - **time_format** : Time format (default: `%H:%M:%S`)
103
- - **position** : Display position (default: `bottom`)
104
- - `top` : Display after the first heading
105
- - `bottom` : Display at the end of the document
106
- - **exclude** : File exclusion list (default: [] )
107
- - Supports glob patterns, e.g., ["private/\*", "temp.md", "drafts/\*.md"]
96
+ - `created` can be replaced with: `created, date, creation_date, created_at, date_created`
97
+ - `modified` can be replaced with: `modified, updated, last_modified, updated_at, date_modified, last_update`
98
+
99
+ ## Customization
100
+
101
+ This plugin supports deep customization, just modify the code in the corresponding file:
102
+
103
+ - Style & Theme: `docs/assets/document_dates/document-dates.config.css`
104
+ - Properties & Animations: `docs/assets/document_dates/document-dates.config.js`
105
+
106
+ Tip: If you want to restore the default effect, just delete this file and rebuild your project
108
107
 
109
108
  ## Tips
110
109
 
111
- - It still works when using CI/CD build systems (e.g. Github Actions), used a cache file `.dates_cache.json` to solve this problem:
112
- 1. First, you can configure the workflow like this (penultimate line) in your .github/workflows/ci.yml:
110
+ - It still works when using CI/CD build systems (e.g. Github Actions), here's how it works:
111
+ 1. First, you can configure the workflow like this (penultimate line) in your `.github/workflows/ci.yml`:
113
112
  ```
114
113
  ...
115
114
 
116
115
  - run: pip install mkdocs-document-dates
117
116
  - run: mkdocs gh-deploy --force
118
117
  ```
119
- 2. Then update your Markdown document in MkDocs as normal
120
- 3. After running git add and git commit, you will see the auto-generated cache file .dates_cache.json (hidden by default) in the `docs` folder under MkDocs
118
+ 2. Then update your Markdown document in `docs` as normal
119
+ 3. After running git add and git commit, you will see the auto-generated cache file `.dates_cache.json` (hidden by default) in the `docs` folder
121
120
  - Make sure you have installed python3 ahead of time and set environment variables
122
- 4. Finally, run git push, and you can see that there are also .dates_cache.json files in the docs directory in the GitHub repository, which means success
123
- - Priority of time reads:
121
+ 4. Finally, run git push, and you can see that the `.dates_cache.json` file also exists in the docs directory in the GitHub repository, which means success!
122
+ - Priority for datetime reads:
124
123
  - `Front Matter` > `Cache file` > `Filesystem timestamp`
125
124
  - If you are using MkDocs on a Linux system, the modification time is used as the creation time because of system limitations. If you need the exact creation time, you can specify it manually in Front Matter
@@ -0,0 +1,101 @@
1
+ # mkdocs-document-dates
2
+
3
+ English | [简体中文](README_zh.md)
4
+
5
+
6
+
7
+ A MkDocs plugin for displaying the <mark>exact</mark> creation and last modification dates of markdown document.
8
+
9
+ ## Features
10
+
11
+ - **No Git dependency**, uses filesystem timestamps directly
12
+ - Supports manual date specification in `Front Matter`
13
+ - Support for multiple time formats (date, datetime, timeago)
14
+ - Support for document exclusion mode
15
+ - Flexible display position (top or bottom)
16
+ - Material style icons, elegant styling (Customizable)
17
+ - Supports Tooltip Hover Tips
18
+ - Intelligent repositioning to always float optimally in view
19
+ - Supports automatic theme switching following Material's light/dark color scheme
20
+ - Support for customizing themes, styles, animations
21
+ - Compatible with mouse, keyboard and **touch** (mobile) to trigger hover
22
+ - Support for CI/CD build systems (e.g. Github Actions)
23
+ - Multi-language support, cross-platform support (Windows, macOS, Linux)
24
+
25
+ ## Showcases
26
+
27
+ ![render](render.gif)
28
+
29
+ ## Installation
30
+
31
+ ```bash
32
+ pip install mkdocs-document-dates
33
+ ```
34
+
35
+ ## Configuration
36
+
37
+ Just add the plugin to your `mkdocs.yml`:
38
+
39
+ ```yaml
40
+ plugins:
41
+ - document-dates
42
+ ```
43
+
44
+ Or, customize the configuration:
45
+
46
+ ```yaml
47
+ plugins:
48
+ - document-dates:
49
+ type: date # Date type: date datetime timeago, default: date
50
+ locale: en # Localization: zh zh_tw en es fr de ar ja ko ru, default: en
51
+ date_format: '%Y-%m-%d' # Date format, Supports all Python datetime format strings, e.g., %Y-%m-%d, %b %d, %Y, etc
52
+ time_format: '%H:%M:%S' # Time format (valid only if type=datetime)
53
+ position: bottom # Display position: top (after title) bottom (end of document), default: bottom
54
+ exclude: # List of excluded files
55
+ - temp.md # Exclude specific file
56
+ - private/* # Exclude all files in private directory, including subdirectories
57
+ - drafts/*.md # Exclude all markdown files in the current directory drafts, but not subdirectories
58
+ ```
59
+
60
+ ## Manual Date Specification
61
+
62
+ You can also manually specify the date of a Markdown document in its `Front Matter` :
63
+
64
+ ```yaml
65
+ ---
66
+ created: 2023-01-01
67
+ modified: 2025-02-23
68
+ ---
69
+
70
+ # Document Title
71
+ ```
72
+
73
+ - `created` can be replaced with: `created, date, creation_date, created_at, date_created`
74
+ - `modified` can be replaced with: `modified, updated, last_modified, updated_at, date_modified, last_update`
75
+
76
+ ## Customization
77
+
78
+ This plugin supports deep customization, just modify the code in the corresponding file:
79
+
80
+ - Style & Theme: `docs/assets/document_dates/document-dates.config.css`
81
+ - Properties & Animations: `docs/assets/document_dates/document-dates.config.js`
82
+
83
+ Tip: If you want to restore the default effect, just delete this file and rebuild your project
84
+
85
+ ## Tips
86
+
87
+ - It still works when using CI/CD build systems (e.g. Github Actions), here's how it works:
88
+ 1. First, you can configure the workflow like this (penultimate line) in your `.github/workflows/ci.yml`:
89
+ ```
90
+ ...
91
+
92
+ - run: pip install mkdocs-document-dates
93
+ - run: mkdocs gh-deploy --force
94
+ ```
95
+ 2. Then update your Markdown document in `docs` as normal
96
+ 3. After running git add and git commit, you will see the auto-generated cache file `.dates_cache.json` (hidden by default) in the `docs` folder
97
+ - Make sure you have installed python3 ahead of time and set environment variables
98
+ 4. Finally, run git push, and you can see that the `.dates_cache.json` file also exists in the docs directory in the GitHub repository, which means success!
99
+ - Priority for datetime reads:
100
+ - `Front Matter` > `Cache file` > `Filesystem timestamp`
101
+ - If you are using MkDocs on a Linux system, the modification time is used as the creation time because of system limitations. If you need the exact creation time, you can specify it manually in Front Matter
@@ -14,6 +14,6 @@ translations = {
14
14
  'months_ago': '{} months ago',
15
15
  'year_ago': '1 year ago',
16
16
  'years_ago': '{} years ago',
17
- 'created_time': 'Created Time',
17
+ 'created_time': 'Created',
18
18
  'modified_time': 'Last Update',
19
19
  }
@@ -1,12 +1,12 @@
1
1
  import os
2
2
  import json
3
+ import shutil
3
4
  import platform
4
5
  from datetime import datetime
5
6
  from pathlib import Path
6
7
  from mkdocs.plugins import BasePlugin
7
8
  from mkdocs.config import config_options
8
9
  from .lang import load_translations
9
- from .styles import DOCUMENT_DATES_CSS
10
10
 
11
11
  class DocumentDatesPlugin(BasePlugin):
12
12
  config_scheme = (
@@ -24,23 +24,62 @@ class DocumentDatesPlugin(BasePlugin):
24
24
  super().__init__()
25
25
  self.translations = load_translations()
26
26
 
27
- def _get_css_content(self):
28
- return DOCUMENT_DATES_CSS
29
-
30
27
  def on_config(self, config):
31
28
  if 'extra_css' not in config:
32
29
  config['extra_css'] = []
33
30
 
34
- # 添加 Material Icons
31
+ # 加载图标 Google Fonts Icons: https://fonts.google.com/icons
35
32
  material_icons_url = 'https://fonts.googleapis.com/icon?family=Material+Icons'
36
33
  if material_icons_url not in config['extra_css']:
37
34
  config['extra_css'].append(material_icons_url)
38
35
 
39
- # 添加默认 CSS
40
- css_file = Path(config['docs_dir']) / 'assets' / 'document_dates.css'
41
- css_file.parent.mkdir(parents=True, exist_ok=True)
42
- css_file.write_text(self._get_css_content())
43
- config['extra_css'].append('assets/document_dates.css')
36
+
37
+ # 加载 static 目录下的所有资源
38
+ source_dir = Path(__file__).parent / 'static'
39
+ dest_dir = Path(config['docs_dir']) / 'assets/document_dates'
40
+ dest_dir.mkdir(parents=True, exist_ok=True)
41
+
42
+ # 复制 static 目录到 document_dates 目录,对于配置文件(document-dates.config.css 和 document-dates.config.js),只在目标不存在时才复制
43
+ for item in source_dir.glob('**/*'):
44
+ if item.is_file():
45
+ relative_path = item.relative_to(source_dir)
46
+ dest_path = dest_dir / relative_path
47
+ dest_path.parent.mkdir(parents=True, exist_ok=True)
48
+ if not dest_path.exists() or item.name not in ['document-dates.config.css', 'document-dates.config.js']:
49
+ shutil.copy2(item, dest_path)
50
+
51
+ # tippyjs core
52
+ # https://unpkg.com/@popperjs/core@2/dist/umd/popper.min.js
53
+ # https://unpkg.com/tippy.js@6/dist/tippy.umd.min.js
54
+ # https://unpkg.com/tippy.js@6/dist/tippy.css
55
+ # animations
56
+ # https://unpkg.com/tippy.js@6/animations/scale.css
57
+ # animations: Material filling effect
58
+ # https://unpkg.com/tippy.js@6/dist/backdrop.css
59
+ # https://unpkg.com/tippy.js@6/animations/shift-away.css
60
+ # themes
61
+ # https://unpkg.com/tippy.js@6/themes/light.css
62
+ # https://unpkg.com/tippy.js@6/themes/material.css
63
+
64
+ # 加载所有 CSS 资源文件
65
+ tippy_css_dir = dest_dir / 'tippy'
66
+ for css_file in tippy_css_dir.glob('*.css'):
67
+ config['extra_css'].append(f'assets/document_dates/tippy/{css_file.name}')
68
+
69
+ # 加载 CSS 主配置文件
70
+ config['extra_css'].append('assets/document_dates/document-dates.config.css')
71
+
72
+ # 然后按顺序加载 JS 文件
73
+ if 'extra_javascript' not in config:
74
+ config['extra_javascript'] = []
75
+
76
+ # 优先加载核心 JS 文件
77
+ js_core_files = ['popper.min.js', 'tippy.umd.min.js']
78
+ for js_file in js_core_files:
79
+ config['extra_javascript'].append(f'assets/document_dates/tippy/{js_file}')
80
+
81
+ # 最后加载 JS 配置文件
82
+ config['extra_javascript'].append('assets/document_dates/document-dates.config.js')
44
83
 
45
84
  return config
46
85
 
@@ -53,13 +92,15 @@ class DocumentDatesPlugin(BasePlugin):
53
92
  position_class = 'document-dates-top' if self.config['position'] == 'top' else 'document-dates-bottom'
54
93
 
55
94
  return (
56
- f"<div class='document-dates-plugin-wrapper {position_class}'>"
57
- f"<div class='document-dates-plugin'>"
58
- f"<span title='{t['created_time']}: {created.strftime(self.config['date_format'])}'><span class='material-icons'>add_circle</span>"
59
- f"{self._get_formatted_date(created)}</span>"
60
- f"<span title='{t['modified_time']}: {modified.strftime(self.config['date_format'])}'><span class='material-icons'>update</span>"
61
- f"{self._get_formatted_date(modified)}</span>"
62
- f"</div>"
95
+ f"<div class='document-dates-plugin-wrapper {position_class}'>"
96
+ f"<div class='document-dates-plugin'>"
97
+ f"<span data-tippy-content='{t['created_time']}: {created.strftime(self.config['date_format'])}'>"
98
+ f"<span class='material-icons' data-icon='doc_created'>add_circle</span>"
99
+ f"{self._get_formatted_date(created)}</span>"
100
+ f"<span data-tippy-content='{t['modified_time']}: {modified.strftime(self.config['date_format'])}'>"
101
+ f"<span class='material-icons' data-icon='doc_modified'>update</span>"
102
+ f"{self._get_formatted_date(modified)}</span>"
103
+ f"</div>"
63
104
  f"</div>"
64
105
  )
65
106
 
@@ -0,0 +1,76 @@
1
+
2
+ /* 1. Plug-in styles
3
+ including icons, fonts, colors, opacity, etc
4
+ */
5
+ .document-dates-plugin {
6
+ color: #8e8e8e;
7
+ font-size: 0.75rem;
8
+ padding: 0.2rem 0;
9
+ opacity: 0.7;
10
+ display: flex;
11
+ align-items: center;
12
+ margin-bottom: 0.3rem;
13
+ }
14
+ .document-dates-plugin span:not(:first-child) {
15
+ margin-left: 1.5rem;
16
+ }
17
+ .document-dates-plugin span {
18
+ display: inline-flex;
19
+ align-items: center;
20
+ }
21
+ .document-dates-plugin .material-icons {
22
+ font-size: 0.9rem;
23
+ opacity: 0.7;
24
+ margin-right: 0.3rem;
25
+ }
26
+
27
+
28
+ /* 2. Plug-in wrapper styles
29
+ including divider, margin, padding, etc
30
+ */
31
+ .document-dates-plugin-wrapper.document-dates-top {
32
+ margin-top: -1.2rem;
33
+ padding-bottom: 0.3rem;
34
+ border-bottom: 1px solid rgba(142, 142, 142, 0.15);
35
+ }
36
+ .document-dates-plugin-wrapper.document-dates-bottom {
37
+ margin: 1rem 0;
38
+ padding-bottom: 0.3rem;
39
+ border-bottom: 1px solid rgba(142, 142, 142, 0.15);
40
+ }
41
+
42
+ /* Hide the footnote divider immediately following the date information with the CSS adjacent sibling selector */
43
+ .document-dates-plugin-wrapper + .footnote hr {
44
+ display: none;
45
+ }
46
+
47
+
48
+ /* 3. Tooltip styles
49
+ including theme, arrow, font, color, background color, etc
50
+ */
51
+ /* .tippy-box {
52
+ font-size: 12px;
53
+ } */
54
+ /* Demo of the custom theme 'tomato' (optional) */
55
+ .tippy-box[data-theme~='tomato'] {
56
+ background-color: tomato;
57
+ color: white;
58
+ }
59
+ /* Customize the arrow corresponding to the theme tomato */
60
+ .tippy-box[data-theme~='tomato'] > .tippy-arrow::before {
61
+ color: tomato;
62
+ }
63
+ /*
64
+ Recommended Colors:
65
+ tomato: rgb(241, 112, 91);
66
+ mung bean: rgb(122, 145, 109);
67
+ cloisonné: rgb(15, 89, 164);
68
+ soft blue: rgb(16, 104, 152);
69
+ */
70
+
71
+ /* Customize arrows, resize */
72
+ .tippy-arrow::before {
73
+ -webkit-transform: scale(0.75);
74
+ -ms-transform: scale(0.75);
75
+ transform: scale(0.75);
76
+ }
@@ -0,0 +1,64 @@
1
+
2
+ /* 1. Customized Icons (optional)
3
+ Just change the icon name. default: add_circle, update
4
+ the icon names, see Google Fonts Icons (2500+): https://fonts.google.com/icons
5
+ */
6
+ /*
7
+ const iconConfig = {
8
+ doc_created: 'note_add', // default: add_circle
9
+ doc_modified: 'task', // default: update
10
+ };
11
+ // For updating icons dynamically based on the data-icon attribute
12
+ document.addEventListener('DOMContentLoaded', () => {
13
+ document.querySelectorAll('.material-icons[data-icon]').forEach(icon => {
14
+ const defaultIcon = icon.getAttribute('data-icon');
15
+ icon.textContent = iconConfig[defaultIcon] || defaultIcon;
16
+ });
17
+ });
18
+ */
19
+
20
+
21
+ /* 2. Tooltip properties
22
+ including theme, placement, animation, arrow, etc
23
+ */
24
+ // Match Tooltip's theme with Material's color scheme
25
+ function getCurrentTheme() {
26
+ const scheme = document.body?.getAttribute('data-md-color-scheme') || 'default';
27
+ return scheme === 'slate' ? 'material' : 'light';
28
+ }
29
+ // Configure the properties of the Tooltip here, available documents: https://atomiks.github.io/tippyjs/
30
+ const tippyInstances = tippy('[data-tippy-content]', {
31
+
32
+ theme: getCurrentTheme(), // configurable: light material, or custom theme in document-dates.config.css
33
+ placement: 'bottom', // placement: top bottom left right auto
34
+ offset: [0, 5], // placement offset: [horizontal, vertical]
35
+ // interactive: true, // content in Tooltip is interactive
36
+
37
+ animation: 'scale', // animation type: scale shift-away
38
+ inertia: true, // animation inertia
39
+ // arrow: false, // whether to allow arrows
40
+
41
+ // animateFill: true, // determines if the background fill color should be animated
42
+
43
+ // delay: [400, null], // delay: [show, hide], show delay is 400ms, hide delay is the default
44
+ });
45
+
46
+
47
+ /* 3. Automatic theme switching
48
+ Set Tooltip's theme to change automatically with the Material's light/dark color scheme
49
+ If you don't need this feature, just delete the code below
50
+ */
51
+ const observer = new MutationObserver((mutations) => {
52
+ mutations.forEach((mutation) => {
53
+ if (mutation.attributeName === 'data-md-color-scheme') {
54
+ const newTheme = getCurrentTheme();
55
+ tippyInstances.forEach(instance => {
56
+ instance.setProps({ theme: newTheme });
57
+ });
58
+ }
59
+ });
60
+ });
61
+ observer.observe(document.body, {
62
+ attributes: true,
63
+ attributeFilter: ['data-md-color-scheme']
64
+ });
@@ -0,0 +1 @@
1
+ .tippy-box[data-placement^=top]>.tippy-backdrop{transform-origin:0 25%;border-radius:40% 40% 0 0}.tippy-box[data-placement^=top]>.tippy-backdrop[data-state=visible]{transform:scale(1) translate(-50%,-55%)}.tippy-box[data-placement^=top]>.tippy-backdrop[data-state=hidden]{transform:scale(.2) translate(-50%,-45%)}.tippy-box[data-placement^=bottom]>.tippy-backdrop{transform-origin:0 -50%;border-radius:0 0 30% 30%}.tippy-box[data-placement^=bottom]>.tippy-backdrop[data-state=visible]{transform:scale(1) translate(-50%,-45%)}.tippy-box[data-placement^=bottom]>.tippy-backdrop[data-state=hidden]{transform:scale(.2) translate(-50%)}.tippy-box[data-placement^=left]>.tippy-backdrop{transform-origin:50% 0;border-radius:50% 0 0 50%}.tippy-box[data-placement^=left]>.tippy-backdrop[data-state=visible]{transform:scale(1) translate(-50%,-50%)}.tippy-box[data-placement^=left]>.tippy-backdrop[data-state=hidden]{transform:scale(.2) translate(-75%,-50%)}.tippy-box[data-placement^=right]>.tippy-backdrop{transform-origin:-50% 0;border-radius:0 50% 50% 0}.tippy-box[data-placement^=right]>.tippy-backdrop[data-state=visible]{transform:scale(1) translate(-50%,-50%)}.tippy-box[data-placement^=right]>.tippy-backdrop[data-state=hidden]{transform:scale(.2) translate(-25%,-50%)}.tippy-box[data-animatefill]{background-color:transparent!important}.tippy-backdrop{position:absolute;background-color:#333;border-radius:50%;width:calc(110% + 32px);left:50%;top:50%;z-index:-1;transition:all cubic-bezier(.46,.1,.52,.98);-webkit-backface-visibility:hidden;backface-visibility:hidden}.tippy-backdrop[data-state=hidden]{opacity:0}.tippy-backdrop:after{content:"";float:left;padding-top:100%}.tippy-backdrop+.tippy-content{transition-property:opacity;will-change:opacity}.tippy-backdrop+.tippy-content[data-state=hidden]{opacity:0}
@@ -0,0 +1 @@
1
+ .tippy-box[data-theme~=light]{color:#26323d;box-shadow:0 0 20px 4px rgba(154,161,177,.15),0 4px 80px -8px rgba(36,40,47,.25),0 4px 4px -2px rgba(91,94,105,.15);background-color:#fff}.tippy-box[data-theme~=light][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=light][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff}.tippy-box[data-theme~=light][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=light][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff}.tippy-box[data-theme~=light]>.tippy-backdrop{background-color:#fff}.tippy-box[data-theme~=light]>.tippy-svg-arrow{fill:#fff}
@@ -0,0 +1 @@
1
+ .tippy-box[data-theme~=material]{background-color:#505355;}.tippy-box[data-theme~=material][data-placement^=top]>.tippy-arrow:before{border-top-color:#505355}.tippy-box[data-theme~=material][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#505355}.tippy-box[data-theme~=material][data-placement^=left]>.tippy-arrow:before{border-left-color:#505355}.tippy-box[data-theme~=material][data-placement^=right]>.tippy-arrow:before{border-right-color:#505355}.tippy-box[data-theme~=material]>.tippy-backdrop{background-color:#505355}.tippy-box[data-theme~=material]>.tippy-svg-arrow{fill:#505355}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @popperjs/core v2.11.8 - MIT License
3
+ */
4
+
5
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Popper={})}(this,(function(e){"use strict";function t(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function n(e){return e instanceof t(e).Element||e instanceof Element}function r(e){return e instanceof t(e).HTMLElement||e instanceof HTMLElement}function o(e){return"undefined"!=typeof ShadowRoot&&(e instanceof t(e).ShadowRoot||e instanceof ShadowRoot)}var i=Math.max,a=Math.min,s=Math.round;function f(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function c(){return!/^((?!chrome|android).)*safari/i.test(f())}function p(e,o,i){void 0===o&&(o=!1),void 0===i&&(i=!1);var a=e.getBoundingClientRect(),f=1,p=1;o&&r(e)&&(f=e.offsetWidth>0&&s(a.width)/e.offsetWidth||1,p=e.offsetHeight>0&&s(a.height)/e.offsetHeight||1);var u=(n(e)?t(e):window).visualViewport,l=!c()&&i,d=(a.left+(l&&u?u.offsetLeft:0))/f,h=(a.top+(l&&u?u.offsetTop:0))/p,m=a.width/f,v=a.height/p;return{width:m,height:v,top:h,right:d+m,bottom:h+v,left:d,x:d,y:h}}function u(e){var n=t(e);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function l(e){return e?(e.nodeName||"").toLowerCase():null}function d(e){return((n(e)?e.ownerDocument:e.document)||window.document).documentElement}function h(e){return p(d(e)).left+u(e).scrollLeft}function m(e){return t(e).getComputedStyle(e)}function v(e){var t=m(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function y(e,n,o){void 0===o&&(o=!1);var i,a,f=r(n),c=r(n)&&function(e){var t=e.getBoundingClientRect(),n=s(t.width)/e.offsetWidth||1,r=s(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(n),m=d(n),y=p(e,c,o),g={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(f||!f&&!o)&&(("body"!==l(n)||v(m))&&(g=(i=n)!==t(i)&&r(i)?{scrollLeft:(a=i).scrollLeft,scrollTop:a.scrollTop}:u(i)),r(n)?((b=p(n,!0)).x+=n.clientLeft,b.y+=n.clientTop):m&&(b.x=h(m))),{x:y.left+g.scrollLeft-b.x,y:y.top+g.scrollTop-b.y,width:y.width,height:y.height}}function g(e){var t=p(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function b(e){return"html"===l(e)?e:e.assignedSlot||e.parentNode||(o(e)?e.host:null)||d(e)}function x(e){return["html","body","#document"].indexOf(l(e))>=0?e.ownerDocument.body:r(e)&&v(e)?e:x(b(e))}function w(e,n){var r;void 0===n&&(n=[]);var o=x(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=t(o),s=i?[a].concat(a.visualViewport||[],v(o)?o:[]):o,f=n.concat(s);return i?f:f.concat(w(b(s)))}function O(e){return["table","td","th"].indexOf(l(e))>=0}function j(e){return r(e)&&"fixed"!==m(e).position?e.offsetParent:null}function E(e){for(var n=t(e),i=j(e);i&&O(i)&&"static"===m(i).position;)i=j(i);return i&&("html"===l(i)||"body"===l(i)&&"static"===m(i).position)?n:i||function(e){var t=/firefox/i.test(f());if(/Trident/i.test(f())&&r(e)&&"fixed"===m(e).position)return null;var n=b(e);for(o(n)&&(n=n.host);r(n)&&["html","body"].indexOf(l(n))<0;){var i=m(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(e)||n}var D="top",A="bottom",L="right",P="left",M="auto",k=[D,A,L,P],W="start",B="end",H="viewport",T="popper",R=k.reduce((function(e,t){return e.concat([t+"-"+W,t+"-"+B])}),[]),S=[].concat(k,[M]).reduce((function(e,t){return e.concat([t,t+"-"+W,t+"-"+B])}),[]),V=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function q(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function C(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&o(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function N(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function I(e,r,o){return r===H?N(function(e,n){var r=t(e),o=d(e),i=r.visualViewport,a=o.clientWidth,s=o.clientHeight,f=0,p=0;if(i){a=i.width,s=i.height;var u=c();(u||!u&&"fixed"===n)&&(f=i.offsetLeft,p=i.offsetTop)}return{width:a,height:s,x:f+h(e),y:p}}(e,o)):n(r)?function(e,t){var n=p(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(r,o):N(function(e){var t,n=d(e),r=u(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=i(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=i(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),f=-r.scrollLeft+h(e),c=-r.scrollTop;return"rtl"===m(o||n).direction&&(f+=i(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:s,x:f,y:c}}(d(e)))}function _(e,t,o,s){var f="clippingParents"===t?function(e){var t=w(b(e)),o=["absolute","fixed"].indexOf(m(e).position)>=0&&r(e)?E(e):e;return n(o)?t.filter((function(e){return n(e)&&C(e,o)&&"body"!==l(e)})):[]}(e):[].concat(t),c=[].concat(f,[o]),p=c[0],u=c.reduce((function(t,n){var r=I(e,n,s);return t.top=i(r.top,t.top),t.right=a(r.right,t.right),t.bottom=a(r.bottom,t.bottom),t.left=i(r.left,t.left),t}),I(e,p,s));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function F(e){return e.split("-")[0]}function U(e){return e.split("-")[1]}function z(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function X(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?F(o):null,a=o?U(o):null,s=n.x+n.width/2-r.width/2,f=n.y+n.height/2-r.height/2;switch(i){case D:t={x:s,y:n.y-r.height};break;case A:t={x:s,y:n.y+n.height};break;case L:t={x:n.x+n.width,y:f};break;case P:t={x:n.x-r.width,y:f};break;default:t={x:n.x,y:n.y}}var c=i?z(i):null;if(null!=c){var p="y"===c?"height":"width";switch(a){case W:t[c]=t[c]-(n[p]/2-r[p]/2);break;case B:t[c]=t[c]+(n[p]/2-r[p]/2)}}return t}function Y(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function G(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function J(e,t){void 0===t&&(t={});var r=t,o=r.placement,i=void 0===o?e.placement:o,a=r.strategy,s=void 0===a?e.strategy:a,f=r.boundary,c=void 0===f?"clippingParents":f,u=r.rootBoundary,l=void 0===u?H:u,h=r.elementContext,m=void 0===h?T:h,v=r.altBoundary,y=void 0!==v&&v,g=r.padding,b=void 0===g?0:g,x=Y("number"!=typeof b?b:G(b,k)),w=m===T?"reference":T,O=e.rects.popper,j=e.elements[y?w:m],E=_(n(j)?j:j.contextElement||d(e.elements.popper),c,l,s),P=p(e.elements.reference),M=X({reference:P,element:O,strategy:"absolute",placement:i}),W=N(Object.assign({},O,M)),B=m===T?W:P,R={top:E.top-B.top+x.top,bottom:B.bottom-E.bottom+x.bottom,left:E.left-B.left+x.left,right:B.right-E.right+x.right},S=e.modifiersData.offset;if(m===T&&S){var V=S[i];Object.keys(R).forEach((function(e){var t=[L,A].indexOf(e)>=0?1:-1,n=[D,A].indexOf(e)>=0?"y":"x";R[e]+=V[n]*t}))}return R}var K={placement:"bottom",modifiers:[],strategy:"absolute"};function Q(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Z(e){void 0===e&&(e={});var t=e,r=t.defaultModifiers,o=void 0===r?[]:r,i=t.defaultOptions,a=void 0===i?K:i;return function(e,t,r){void 0===r&&(r=a);var i,s,f={placement:"bottom",orderedModifiers:[],options:Object.assign({},K,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],p=!1,u={state:f,setOptions:function(r){var i="function"==typeof r?r(f.options):r;l(),f.options=Object.assign({},a,f.options,i),f.scrollParents={reference:n(e)?w(e):e.contextElement?w(e.contextElement):[],popper:w(t)};var s,p,d=function(e){var t=q(e);return V.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((s=[].concat(o,f.options.modifiers),p=s.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(p).map((function(e){return p[e]}))));return f.orderedModifiers=d.filter((function(e){return e.enabled})),f.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var i=o({state:f,name:t,instance:u,options:r}),a=function(){};c.push(i||a)}})),u.update()},forceUpdate:function(){if(!p){var e=f.elements,t=e.reference,n=e.popper;if(Q(t,n)){f.rects={reference:y(t,E(n),"fixed"===f.options.strategy),popper:g(n)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach((function(e){return f.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<f.orderedModifiers.length;r++)if(!0!==f.reset){var o=f.orderedModifiers[r],i=o.fn,a=o.options,s=void 0===a?{}:a,c=o.name;"function"==typeof i&&(f=i({state:f,options:s,name:c,instance:u})||f)}else f.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(e){u.forceUpdate(),e(f)}))},function(){return s||(s=new Promise((function(e){Promise.resolve().then((function(){s=void 0,e(i())}))}))),s}),destroy:function(){l(),p=!0}};if(!Q(e,t))return u;function l(){c.forEach((function(e){return e()})),c=[]}return u.setOptions(r).then((function(e){!p&&r.onFirstUpdate&&r.onFirstUpdate(e)})),u}}var $={passive:!0};var ee={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var n=e.state,r=e.instance,o=e.options,i=o.scroll,a=void 0===i||i,s=o.resize,f=void 0===s||s,c=t(n.elements.popper),p=[].concat(n.scrollParents.reference,n.scrollParents.popper);return a&&p.forEach((function(e){e.addEventListener("scroll",r.update,$)})),f&&c.addEventListener("resize",r.update,$),function(){a&&p.forEach((function(e){e.removeEventListener("scroll",r.update,$)})),f&&c.removeEventListener("resize",r.update,$)}},data:{}};var te={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=X({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},ne={top:"auto",right:"auto",bottom:"auto",left:"auto"};function re(e){var n,r=e.popper,o=e.popperRect,i=e.placement,a=e.variation,f=e.offsets,c=e.position,p=e.gpuAcceleration,u=e.adaptive,l=e.roundOffsets,h=e.isFixed,v=f.x,y=void 0===v?0:v,g=f.y,b=void 0===g?0:g,x="function"==typeof l?l({x:y,y:b}):{x:y,y:b};y=x.x,b=x.y;var w=f.hasOwnProperty("x"),O=f.hasOwnProperty("y"),j=P,M=D,k=window;if(u){var W=E(r),H="clientHeight",T="clientWidth";if(W===t(r)&&"static"!==m(W=d(r)).position&&"absolute"===c&&(H="scrollHeight",T="scrollWidth"),W=W,i===D||(i===P||i===L)&&a===B)M=A,b-=(h&&W===k&&k.visualViewport?k.visualViewport.height:W[H])-o.height,b*=p?1:-1;if(i===P||(i===D||i===A)&&a===B)j=L,y-=(h&&W===k&&k.visualViewport?k.visualViewport.width:W[T])-o.width,y*=p?1:-1}var R,S=Object.assign({position:c},u&&ne),V=!0===l?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:s(n*o)/o||0,y:s(r*o)/o||0}}({x:y,y:b},t(r)):{x:y,y:b};return y=V.x,b=V.y,p?Object.assign({},S,((R={})[M]=O?"0":"",R[j]=w?"0":"",R.transform=(k.devicePixelRatio||1)<=1?"translate("+y+"px, "+b+"px)":"translate3d("+y+"px, "+b+"px, 0)",R)):Object.assign({},S,((n={})[M]=O?b+"px":"",n[j]=w?y+"px":"",n.transform="",n))}var oe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,f=void 0===s||s,c={placement:F(t.placement),variation:U(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,re(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:f})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,re(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var ie={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},i=t.elements[e];r(i)&&l(i)&&(Object.assign(i.style,n),Object.keys(o).forEach((function(e){var t=o[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});r(o)&&l(o)&&(Object.assign(o.style,a),Object.keys(i).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]};var ae={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=S.reduce((function(e,n){return e[n]=function(e,t,n){var r=F(e),o=[P,D].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[P,L].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],f=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}},se={left:"right",right:"left",bottom:"top",top:"bottom"};function fe(e){return e.replace(/left|right|bottom|top/g,(function(e){return se[e]}))}var ce={start:"end",end:"start"};function pe(e){return e.replace(/start|end/g,(function(e){return ce[e]}))}function ue(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,f=n.allowedAutoPlacements,c=void 0===f?S:f,p=U(r),u=p?s?R:R.filter((function(e){return U(e)===p})):k,l=u.filter((function(e){return c.indexOf(e)>=0}));0===l.length&&(l=u);var d=l.reduce((function(t,n){return t[n]=J(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[F(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}var le={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,f=n.fallbackPlacements,c=n.padding,p=n.boundary,u=n.rootBoundary,l=n.altBoundary,d=n.flipVariations,h=void 0===d||d,m=n.allowedAutoPlacements,v=t.options.placement,y=F(v),g=f||(y===v||!h?[fe(v)]:function(e){if(F(e)===M)return[];var t=fe(e);return[pe(e),t,pe(t)]}(v)),b=[v].concat(g).reduce((function(e,n){return e.concat(F(n)===M?ue(t,{placement:n,boundary:p,rootBoundary:u,padding:c,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),x=t.rects.reference,w=t.rects.popper,O=new Map,j=!0,E=b[0],k=0;k<b.length;k++){var B=b[k],H=F(B),T=U(B)===W,R=[D,A].indexOf(H)>=0,S=R?"width":"height",V=J(t,{placement:B,boundary:p,rootBoundary:u,altBoundary:l,padding:c}),q=R?T?L:P:T?A:D;x[S]>w[S]&&(q=fe(q));var C=fe(q),N=[];if(i&&N.push(V[H]<=0),s&&N.push(V[q]<=0,V[C]<=0),N.every((function(e){return e}))){E=B,j=!1;break}O.set(B,N)}if(j)for(var I=function(e){var t=b.find((function(t){var n=O.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return E=t,"break"},_=h?3:1;_>0;_--){if("break"===I(_))break}t.placement!==E&&(t.modifiersData[r]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function de(e,t,n){return i(e,a(t,n))}var he={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,s=void 0===o||o,f=n.altAxis,c=void 0!==f&&f,p=n.boundary,u=n.rootBoundary,l=n.altBoundary,d=n.padding,h=n.tether,m=void 0===h||h,v=n.tetherOffset,y=void 0===v?0:v,b=J(t,{boundary:p,rootBoundary:u,padding:d,altBoundary:l}),x=F(t.placement),w=U(t.placement),O=!w,j=z(x),M="x"===j?"y":"x",k=t.modifiersData.popperOffsets,B=t.rects.reference,H=t.rects.popper,T="function"==typeof y?y(Object.assign({},t.rects,{placement:t.placement})):y,R="number"==typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),S=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,V={x:0,y:0};if(k){if(s){var q,C="y"===j?D:P,N="y"===j?A:L,I="y"===j?"height":"width",_=k[j],X=_+b[C],Y=_-b[N],G=m?-H[I]/2:0,K=w===W?B[I]:H[I],Q=w===W?-H[I]:-B[I],Z=t.elements.arrow,$=m&&Z?g(Z):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[C],ne=ee[N],re=de(0,B[I],$[I]),oe=O?B[I]/2-G-re-te-R.mainAxis:K-re-te-R.mainAxis,ie=O?-B[I]/2+G+re+ne+R.mainAxis:Q+re+ne+R.mainAxis,ae=t.elements.arrow&&E(t.elements.arrow),se=ae?"y"===j?ae.clientTop||0:ae.clientLeft||0:0,fe=null!=(q=null==S?void 0:S[j])?q:0,ce=_+ie-fe,pe=de(m?a(X,_+oe-fe-se):X,_,m?i(Y,ce):Y);k[j]=pe,V[j]=pe-_}if(c){var ue,le="x"===j?D:P,he="x"===j?A:L,me=k[M],ve="y"===M?"height":"width",ye=me+b[le],ge=me-b[he],be=-1!==[D,P].indexOf(x),xe=null!=(ue=null==S?void 0:S[M])?ue:0,we=be?ye:me-B[ve]-H[ve]-xe+R.altAxis,Oe=be?me+B[ve]+H[ve]-xe-R.altAxis:ge,je=m&&be?function(e,t,n){var r=de(e,t,n);return r>n?n:r}(we,me,Oe):de(m?we:ye,me,m?Oe:ge);k[M]=je,V[M]=je-me}t.modifiersData[r]=V}},requiresIfExists:["offset"]};var me={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=F(n.placement),f=z(s),c=[P,L].indexOf(s)>=0?"height":"width";if(i&&a){var p=function(e,t){return Y("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:G(e,k))}(o.padding,n),u=g(i),l="y"===f?D:P,d="y"===f?A:L,h=n.rects.reference[c]+n.rects.reference[f]-a[f]-n.rects.popper[c],m=a[f]-n.rects.reference[f],v=E(i),y=v?"y"===f?v.clientHeight||0:v.clientWidth||0:0,b=h/2-m/2,x=p[l],w=y-u[c]-p[d],O=y/2-u[c]/2+b,j=de(x,O,w),M=f;n.modifiersData[r]=((t={})[M]=j,t.centerOffset=j-O,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&C(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ve(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ye(e){return[D,L,A,P].some((function(t){return e[t]>=0}))}var ge={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=J(t,{elementContext:"reference"}),s=J(t,{altBoundary:!0}),f=ve(a,r),c=ve(s,o,i),p=ye(f),u=ye(c);t.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}},be=Z({defaultModifiers:[ee,te,oe,ie]}),xe=[ee,te,oe,ie,ae,le,he,me,ge],we=Z({defaultModifiers:xe});e.applyStyles=ie,e.arrow=me,e.computeStyles=oe,e.createPopper=we,e.createPopperLite=be,e.defaultModifiers=xe,e.detectOverflow=J,e.eventListeners=ee,e.flip=le,e.hide=ge,e.offset=ae,e.popperGenerator=Z,e.popperOffsets=te,e.preventOverflow=he,Object.defineProperty(e,"__esModule",{value:!0})}));
6
+ //# sourceMappingURL=popper.min.js.map
@@ -0,0 +1 @@
1
+ .tippy-box[data-animation=scale][data-placement^=top]{transform-origin:bottom}.tippy-box[data-animation=scale][data-placement^=bottom]{transform-origin:top}.tippy-box[data-animation=scale][data-placement^=left]{transform-origin:right}.tippy-box[data-animation=scale][data-placement^=right]{transform-origin:left}.tippy-box[data-animation=scale][data-state=hidden]{transform:scale(.5);opacity:0}
@@ -0,0 +1 @@
1
+ .tippy-box[data-animation=shift-away][data-state=hidden]{opacity:0}.tippy-box[data-animation=shift-away][data-state=hidden][data-placement^=top]{transform:translateY(10px)}.tippy-box[data-animation=shift-away][data-state=hidden][data-placement^=bottom]{transform:translateY(-10px)}.tippy-box[data-animation=shift-away][data-state=hidden][data-placement^=left]{transform:translateX(10px)}.tippy-box[data-animation=shift-away][data-state=hidden][data-placement^=right]{transform:translateX(-10px)}
@@ -0,0 +1 @@
1
+ .tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}
@@ -0,0 +1,2 @@
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],t):(e=e||self).tippy=t(e.Popper)}(this,(function(e){"use strict";var t={passive:!0,capture:!0},n=function(){return document.body};function r(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function o(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function i(e,t){return"function"==typeof e?e.apply(void 0,t):e}function a(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function s(e,t){var n=Object.assign({},e);return t.forEach((function(e){delete n[e]})),n}function u(e){return[].concat(e)}function c(e,t){-1===e.indexOf(t)&&e.push(t)}function p(e){return e.split("-")[0]}function f(e){return[].slice.call(e)}function l(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function d(){return document.createElement("div")}function v(e){return["Element","Fragment"].some((function(t){return o(e,t)}))}function m(e){return o(e,"MouseEvent")}function g(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function h(e){return v(e)?[e]:function(e){return o(e,"NodeList")}(e)?f(e):Array.isArray(e)?e:f(document.querySelectorAll(e))}function b(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function y(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function w(e){var t,n=u(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}function E(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}function O(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var x={isTouch:!1},C=0;function T(){x.isTouch||(x.isTouch=!0,window.performance&&document.addEventListener("mousemove",A))}function A(){var e=performance.now();e-C<20&&(x.isTouch=!1,document.removeEventListener("mousemove",A)),C=e}function L(){var e=document.activeElement;if(g(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var D=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto,R=Object.assign({appendTo:n,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),k=Object.keys(R);function P(e){var t=(e.plugins||[]).reduce((function(t,n){var r,o=n.name,i=n.defaultValue;o&&(t[o]=void 0!==e[o]?e[o]:null!=(r=R[o])?r:i);return t}),{});return Object.assign({},e,t)}function j(e,t){var n=Object.assign({},t,{content:i(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(P(Object.assign({},R,{plugins:t}))):k).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},R.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function M(e,t){e.innerHTML=t}function V(e){var t=d();return!0===e?t.className="tippy-arrow":(t.className="tippy-svg-arrow",v(e)?t.appendChild(e):M(t,e)),t}function I(e,t){v(t.content)?(M(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?M(e,t.content):e.textContent=t.content)}function S(e){var t=e.firstElementChild,n=f(t.children);return{box:t,content:n.find((function(e){return e.classList.contains("tippy-content")})),arrow:n.find((function(e){return e.classList.contains("tippy-arrow")||e.classList.contains("tippy-svg-arrow")})),backdrop:n.find((function(e){return e.classList.contains("tippy-backdrop")}))}}function N(e){var t=d(),n=d();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=d();function o(n,r){var o=S(t),i=o.box,a=o.content,s=o.arrow;r.theme?i.setAttribute("data-theme",r.theme):i.removeAttribute("data-theme"),"string"==typeof r.animation?i.setAttribute("data-animation",r.animation):i.removeAttribute("data-animation"),r.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?i.setAttribute("role",r.role):i.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||I(a,e.props),r.arrow?s?n.arrow!==r.arrow&&(i.removeChild(s),i.appendChild(V(r.arrow))):i.appendChild(V(r.arrow)):s&&i.removeChild(s)}return r.className="tippy-content",r.setAttribute("data-state","hidden"),I(r,e.props),t.appendChild(n),n.appendChild(r),o(e.props,e.props),{popper:t,onUpdate:o}}N.$$tippy=!0;var B=1,H=[],U=[];function _(o,s){var v,g,h,C,T,A,L,k,M=j(o,Object.assign({},R,P(l(s)))),V=!1,I=!1,N=!1,_=!1,F=[],W=a(we,M.interactiveDebounce),X=B++,Y=(k=M.plugins).filter((function(e,t){return k.indexOf(e)===t})),$={id:X,reference:o,popper:d(),popperInstance:null,props:M,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:Y,clearDelayTimeouts:function(){clearTimeout(v),clearTimeout(g),cancelAnimationFrame(h)},setProps:function(e){if($.state.isDestroyed)return;ae("onBeforeUpdate",[$,e]),be();var t=$.props,n=j(o,Object.assign({},t,l(e),{ignoreAttributes:!0}));$.props=n,he(),t.interactiveDebounce!==n.interactiveDebounce&&(ce(),W=a(we,n.interactiveDebounce));t.triggerTarget&&!n.triggerTarget?u(t.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):n.triggerTarget&&o.removeAttribute("aria-expanded");ue(),ie(),J&&J(t,n);$.popperInstance&&(Ce(),Ae().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));ae("onAfterUpdate",[$,e])},setContent:function(e){$.setProps({content:e})},show:function(){var e=$.state.isVisible,t=$.state.isDestroyed,o=!$.state.isEnabled,a=x.isTouch&&!$.props.touch,s=r($.props.duration,0,R.duration);if(e||t||o||a)return;if(te().hasAttribute("disabled"))return;if(ae("onShow",[$],!1),!1===$.props.onShow($))return;$.state.isVisible=!0,ee()&&(z.style.visibility="visible");ie(),de(),$.state.isMounted||(z.style.transition="none");if(ee()){var u=re(),p=u.box,f=u.content;b([p,f],0)}A=function(){var e;if($.state.isVisible&&!_){if(_=!0,z.offsetHeight,z.style.transition=$.props.moveTransition,ee()&&$.props.animation){var t=re(),n=t.box,r=t.content;b([n,r],s),y([n,r],"visible")}se(),ue(),c(U,$),null==(e=$.popperInstance)||e.forceUpdate(),ae("onMount",[$]),$.props.animation&&ee()&&function(e,t){me(e,t)}(s,(function(){$.state.isShown=!0,ae("onShown",[$])}))}},function(){var e,t=$.props.appendTo,r=te();e=$.props.interactive&&t===n||"parent"===t?r.parentNode:i(t,[r]);e.contains(z)||e.appendChild(z);$.state.isMounted=!0,Ce()}()},hide:function(){var e=!$.state.isVisible,t=$.state.isDestroyed,n=!$.state.isEnabled,o=r($.props.duration,1,R.duration);if(e||t||n)return;if(ae("onHide",[$],!1),!1===$.props.onHide($))return;$.state.isVisible=!1,$.state.isShown=!1,_=!1,V=!1,ee()&&(z.style.visibility="hidden");if(ce(),ve(),ie(!0),ee()){var i=re(),a=i.box,s=i.content;$.props.animation&&(b([a,s],o),y([a,s],"hidden"))}se(),ue(),$.props.animation?ee()&&function(e,t){me(e,(function(){!$.state.isVisible&&z.parentNode&&z.parentNode.contains(z)&&t()}))}(o,$.unmount):$.unmount()},hideWithInteractivity:function(e){ne().addEventListener("mousemove",W),c(H,W),W(e)},enable:function(){$.state.isEnabled=!0},disable:function(){$.hide(),$.state.isEnabled=!1},unmount:function(){$.state.isVisible&&$.hide();if(!$.state.isMounted)return;Te(),Ae().forEach((function(e){e._tippy.unmount()})),z.parentNode&&z.parentNode.removeChild(z);U=U.filter((function(e){return e!==$})),$.state.isMounted=!1,ae("onHidden",[$])},destroy:function(){if($.state.isDestroyed)return;$.clearDelayTimeouts(),$.unmount(),be(),delete o._tippy,$.state.isDestroyed=!0,ae("onDestroy",[$])}};if(!M.render)return $;var q=M.render($),z=q.popper,J=q.onUpdate;z.setAttribute("data-tippy-root",""),z.id="tippy-"+$.id,$.popper=z,o._tippy=$,z._tippy=$;var G=Y.map((function(e){return e.fn($)})),K=o.hasAttribute("aria-expanded");return he(),ue(),ie(),ae("onCreate",[$]),M.showOnCreate&&Le(),z.addEventListener("mouseenter",(function(){$.props.interactive&&$.state.isVisible&&$.clearDelayTimeouts()})),z.addEventListener("mouseleave",(function(){$.props.interactive&&$.props.trigger.indexOf("mouseenter")>=0&&ne().addEventListener("mousemove",W)})),$;function Q(){var e=$.props.touch;return Array.isArray(e)?e:[e,0]}function Z(){return"hold"===Q()[0]}function ee(){var e;return!(null==(e=$.props.render)||!e.$$tippy)}function te(){return L||o}function ne(){var e=te().parentNode;return e?w(e):document}function re(){return S(z)}function oe(e){return $.state.isMounted&&!$.state.isVisible||x.isTouch||C&&"focus"===C.type?0:r($.props.delay,e?0:1,R.delay)}function ie(e){void 0===e&&(e=!1),z.style.pointerEvents=$.props.interactive&&!e?"":"none",z.style.zIndex=""+$.props.zIndex}function ae(e,t,n){var r;(void 0===n&&(n=!0),G.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(r=$.props)[e].apply(r,t)}function se(){var e=$.props.aria;if(e.content){var t="aria-"+e.content,n=z.id;u($.props.triggerTarget||o).forEach((function(e){var r=e.getAttribute(t);if($.state.isVisible)e.setAttribute(t,r?r+" "+n:n);else{var o=r&&r.replace(n,"").trim();o?e.setAttribute(t,o):e.removeAttribute(t)}}))}}function ue(){!K&&$.props.aria.expanded&&u($.props.triggerTarget||o).forEach((function(e){$.props.interactive?e.setAttribute("aria-expanded",$.state.isVisible&&e===te()?"true":"false"):e.removeAttribute("aria-expanded")}))}function ce(){ne().removeEventListener("mousemove",W),H=H.filter((function(e){return e!==W}))}function pe(e){if(!x.isTouch||!N&&"mousedown"!==e.type){var t=e.composedPath&&e.composedPath()[0]||e.target;if(!$.props.interactive||!O(z,t)){if(u($.props.triggerTarget||o).some((function(e){return O(e,t)}))){if(x.isTouch)return;if($.state.isVisible&&$.props.trigger.indexOf("click")>=0)return}else ae("onClickOutside",[$,e]);!0===$.props.hideOnClick&&($.clearDelayTimeouts(),$.hide(),I=!0,setTimeout((function(){I=!1})),$.state.isMounted||ve())}}}function fe(){N=!0}function le(){N=!1}function de(){var e=ne();e.addEventListener("mousedown",pe,!0),e.addEventListener("touchend",pe,t),e.addEventListener("touchstart",le,t),e.addEventListener("touchmove",fe,t)}function ve(){var e=ne();e.removeEventListener("mousedown",pe,!0),e.removeEventListener("touchend",pe,t),e.removeEventListener("touchstart",le,t),e.removeEventListener("touchmove",fe,t)}function me(e,t){var n=re().box;function r(e){e.target===n&&(E(n,"remove",r),t())}if(0===e)return t();E(n,"remove",T),E(n,"add",r),T=r}function ge(e,t,n){void 0===n&&(n=!1),u($.props.triggerTarget||o).forEach((function(r){r.addEventListener(e,t,n),F.push({node:r,eventType:e,handler:t,options:n})}))}function he(){var e;Z()&&(ge("touchstart",ye,{passive:!0}),ge("touchend",Ee,{passive:!0})),(e=$.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(ge(e,ye),e){case"mouseenter":ge("mouseleave",Ee);break;case"focus":ge(D?"focusout":"blur",Oe);break;case"focusin":ge("focusout",Oe)}}))}function be(){F.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,o=e.options;t.removeEventListener(n,r,o)})),F=[]}function ye(e){var t,n=!1;if($.state.isEnabled&&!xe(e)&&!I){var r="focus"===(null==(t=C)?void 0:t.type);C=e,L=e.currentTarget,ue(),!$.state.isVisible&&m(e)&&H.forEach((function(t){return t(e)})),"click"===e.type&&($.props.trigger.indexOf("mouseenter")<0||V)&&!1!==$.props.hideOnClick&&$.state.isVisible?n=!0:Le(e),"click"===e.type&&(V=!n),n&&!r&&De(e)}}function we(e){var t=e.target,n=te().contains(t)||z.contains(t);"mousemove"===e.type&&n||function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,o=e.popperState,i=e.props.interactiveBorder,a=p(o.placement),s=o.modifiersData.offset;if(!s)return!0;var u="bottom"===a?s.top.y:0,c="top"===a?s.bottom.y:0,f="right"===a?s.left.x:0,l="left"===a?s.right.x:0,d=t.top-r+u>i,v=r-t.bottom-c>i,m=t.left-n+f>i,g=n-t.right-l>i;return d||v||m||g}))}(Ae().concat(z).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:M}:null})).filter(Boolean),e)&&(ce(),De(e))}function Ee(e){xe(e)||$.props.trigger.indexOf("click")>=0&&V||($.props.interactive?$.hideWithInteractivity(e):De(e))}function Oe(e){$.props.trigger.indexOf("focusin")<0&&e.target!==te()||$.props.interactive&&e.relatedTarget&&z.contains(e.relatedTarget)||De(e)}function xe(e){return!!x.isTouch&&Z()!==e.type.indexOf("touch")>=0}function Ce(){Te();var t=$.props,n=t.popperOptions,r=t.placement,i=t.offset,a=t.getReferenceClientRect,s=t.moveTransition,u=ee()?S(z).arrow:null,c=a?{getBoundingClientRect:a,contextElement:a.contextElement||te()}:o,p=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(ee()){var n=re().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}}];ee()&&u&&p.push({name:"arrow",options:{element:u,padding:3}}),p.push.apply(p,(null==n?void 0:n.modifiers)||[]),$.popperInstance=e.createPopper(c,z,Object.assign({},n,{placement:r,onFirstUpdate:A,modifiers:p}))}function Te(){$.popperInstance&&($.popperInstance.destroy(),$.popperInstance=null)}function Ae(){return f(z.querySelectorAll("[data-tippy-root]"))}function Le(e){$.clearDelayTimeouts(),e&&ae("onTrigger",[$,e]),de();var t=oe(!0),n=Q(),r=n[0],o=n[1];x.isTouch&&"hold"===r&&o&&(t=o),t?v=setTimeout((function(){$.show()}),t):$.show()}function De(e){if($.clearDelayTimeouts(),ae("onUntrigger",[$,e]),$.state.isVisible){if(!($.props.trigger.indexOf("mouseenter")>=0&&$.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&V)){var t=oe(!1);t?g=setTimeout((function(){$.state.isVisible&&$.hide()}),t):h=requestAnimationFrame((function(){$.hide()}))}}else ve()}}function F(e,n){void 0===n&&(n={});var r=R.plugins.concat(n.plugins||[]);document.addEventListener("touchstart",T,t),window.addEventListener("blur",L);var o=Object.assign({},n,{plugins:r}),i=h(e).reduce((function(e,t){var n=t&&_(t,o);return n&&e.push(n),e}),[]);return v(e)?i[0]:i}F.defaultProps=R,F.setDefaultProps=function(e){Object.keys(e).forEach((function(t){R[t]=e[t]}))},F.currentInput=x;var W=Object.assign({},e.applyStyles,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),X={mouseover:"mouseenter",focusin:"focus",click:"click"};var Y={name:"animateFill",defaultValue:!1,fn:function(e){var t;if(null==(t=e.props.render)||!t.$$tippy)return{};var n=S(e.popper),r=n.box,o=n.content,i=e.props.animateFill?function(){var e=d();return e.className="tippy-backdrop",y([e],"hidden"),e}():null;return{onCreate:function(){i&&(r.insertBefore(i,r.firstElementChild),r.setAttribute("data-animatefill",""),r.style.overflow="hidden",e.setProps({arrow:!1,animation:"shift-away"}))},onMount:function(){if(i){var e=r.style.transitionDuration,t=Number(e.replace("ms",""));o.style.transitionDelay=Math.round(t/10)+"ms",i.style.transitionDuration=e,y([i],"visible")}},onShow:function(){i&&(i.style.transitionDuration="0ms")},onHide:function(){i&&y([i],"hidden")}}}};var $={clientX:0,clientY:0},q=[];function z(e){var t=e.clientX,n=e.clientY;$={clientX:t,clientY:n}}var J={name:"followCursor",defaultValue:!1,fn:function(e){var t=e.reference,n=w(e.props.triggerTarget||t),r=!1,o=!1,i=!0,a=e.props;function s(){return"initial"===e.props.followCursor&&e.state.isVisible}function u(){n.addEventListener("mousemove",f)}function c(){n.removeEventListener("mousemove",f)}function p(){r=!0,e.setProps({getReferenceClientRect:null}),r=!1}function f(n){var r=!n.target||t.contains(n.target),o=e.props.followCursor,i=n.clientX,a=n.clientY,s=t.getBoundingClientRect(),u=i-s.left,c=a-s.top;!r&&e.props.interactive||e.setProps({getReferenceClientRect:function(){var e=t.getBoundingClientRect(),n=i,r=a;"initial"===o&&(n=e.left+u,r=e.top+c);var s="horizontal"===o?e.top:r,p="vertical"===o?e.right:n,f="horizontal"===o?e.bottom:r,l="vertical"===o?e.left:n;return{width:p-l,height:f-s,top:s,right:p,bottom:f,left:l}}})}function l(){e.props.followCursor&&(q.push({instance:e,doc:n}),function(e){e.addEventListener("mousemove",z)}(n))}function d(){0===(q=q.filter((function(t){return t.instance!==e}))).filter((function(e){return e.doc===n})).length&&function(e){e.removeEventListener("mousemove",z)}(n)}return{onCreate:l,onDestroy:d,onBeforeUpdate:function(){a=e.props},onAfterUpdate:function(t,n){var i=n.followCursor;r||void 0!==i&&a.followCursor!==i&&(d(),i?(l(),!e.state.isMounted||o||s()||u()):(c(),p()))},onMount:function(){e.props.followCursor&&!o&&(i&&(f($),i=!1),s()||u())},onTrigger:function(e,t){m(t)&&($={clientX:t.clientX,clientY:t.clientY}),o="focus"===t.type},onHidden:function(){e.props.followCursor&&(p(),c(),i=!0)}}}};var G={name:"inlinePositioning",defaultValue:!1,fn:function(e){var t,n=e.reference;var r=-1,o=!1,i=[],a={name:"tippyInlinePositioning",enabled:!0,phase:"afterWrite",fn:function(o){var a=o.state;e.props.inlinePositioning&&(-1!==i.indexOf(a.placement)&&(i=[]),t!==a.placement&&-1===i.indexOf(a.placement)&&(i.push(a.placement),e.setProps({getReferenceClientRect:function(){return function(e){return function(e,t,n,r){if(n.length<2||null===e)return t;if(2===n.length&&r>=0&&n[0].left>n[1].right)return n[r]||t;switch(e){case"top":case"bottom":var o=n[0],i=n[n.length-1],a="top"===e,s=o.top,u=i.bottom,c=a?o.left:i.left,p=a?o.right:i.right;return{top:s,bottom:u,left:c,right:p,width:p-c,height:u-s};case"left":case"right":var f=Math.min.apply(Math,n.map((function(e){return e.left}))),l=Math.max.apply(Math,n.map((function(e){return e.right}))),d=n.filter((function(t){return"left"===e?t.left===f:t.right===l})),v=d[0].top,m=d[d.length-1].bottom;return{top:v,bottom:m,left:f,right:l,width:l-f,height:m-v};default:return t}}(p(e),n.getBoundingClientRect(),f(n.getClientRects()),r)}(a.placement)}})),t=a.placement)}};function s(){var t;o||(t=function(e,t){var n;return{popperOptions:Object.assign({},e.popperOptions,{modifiers:[].concat(((null==(n=e.popperOptions)?void 0:n.modifiers)||[]).filter((function(e){return e.name!==t.name})),[t])})}}(e.props,a),o=!0,e.setProps(t),o=!1)}return{onCreate:s,onAfterUpdate:s,onTrigger:function(t,n){if(m(n)){var o=f(e.reference.getClientRects()),i=o.find((function(e){return e.left-2<=n.clientX&&e.right+2>=n.clientX&&e.top-2<=n.clientY&&e.bottom+2>=n.clientY})),a=o.indexOf(i);r=a>-1?a:r}},onHidden:function(){r=-1}}}};var K={name:"sticky",defaultValue:!1,fn:function(e){var t=e.reference,n=e.popper;function r(t){return!0===e.props.sticky||e.props.sticky===t}var o=null,i=null;function a(){var s=r("reference")?(e.popperInstance?e.popperInstance.state.elements.reference:t).getBoundingClientRect():null,u=r("popper")?n.getBoundingClientRect():null;(s&&Q(o,s)||u&&Q(i,u))&&e.popperInstance&&e.popperInstance.update(),o=s,i=u,e.state.isMounted&&requestAnimationFrame(a)}return{onMount:function(){e.props.sticky&&a()}}}};function Q(e,t){return!e||!t||(e.top!==t.top||e.right!==t.right||e.bottom!==t.bottom||e.left!==t.left)}return F.setDefaultProps({plugins:[Y,J,G,K],render:N}),F.createSingleton=function(e,t){var n;void 0===t&&(t={});var r,o=e,i=[],a=[],c=t.overrides,p=[],f=!1;function l(){a=o.map((function(e){return u(e.props.triggerTarget||e.reference)})).reduce((function(e,t){return e.concat(t)}),[])}function v(){i=o.map((function(e){return e.reference}))}function m(e){o.forEach((function(t){e?t.enable():t.disable()}))}function g(e){return o.map((function(t){var n=t.setProps;return t.setProps=function(o){n(o),t.reference===r&&e.setProps(o)},function(){t.setProps=n}}))}function h(e,t){var n=a.indexOf(t);if(t!==r){r=t;var s=(c||[]).concat("content").reduce((function(e,t){return e[t]=o[n].props[t],e}),{});e.setProps(Object.assign({},s,{getReferenceClientRect:"function"==typeof s.getReferenceClientRect?s.getReferenceClientRect:function(){var e;return null==(e=i[n])?void 0:e.getBoundingClientRect()}}))}}m(!1),v(),l();var b={fn:function(){return{onDestroy:function(){m(!0)},onHidden:function(){r=null},onClickOutside:function(e){e.props.showOnCreate&&!f&&(f=!0,r=null)},onShow:function(e){e.props.showOnCreate&&!f&&(f=!0,h(e,i[0]))},onTrigger:function(e,t){h(e,t.currentTarget)}}}},y=F(d(),Object.assign({},s(t,["overrides"]),{plugins:[b].concat(t.plugins||[]),triggerTarget:a,popperOptions:Object.assign({},t.popperOptions,{modifiers:[].concat((null==(n=t.popperOptions)?void 0:n.modifiers)||[],[W])})})),w=y.show;y.show=function(e){if(w(),!r&&null==e)return h(y,i[0]);if(!r||null!=e){if("number"==typeof e)return i[e]&&h(y,i[e]);if(o.indexOf(e)>=0){var t=e.reference;return h(y,t)}return i.indexOf(e)>=0?h(y,e):void 0}},y.showNext=function(){var e=i[0];if(!r)return y.show(0);var t=i.indexOf(r);y.show(i[t+1]||e)},y.showPrevious=function(){var e=i[i.length-1];if(!r)return y.show(e);var t=i.indexOf(r),n=i[t-1]||e;y.show(n)};var E=y.setProps;return y.setProps=function(e){c=e.overrides||c,E(e)},y.setInstances=function(e){m(!0),p.forEach((function(e){return e()})),o=e,m(!1),v(),l(),p=g(y),y.setProps({triggerTarget:a})},p=g(y),y},F.delegate=function(e,n){var r=[],o=[],i=!1,a=n.target,c=s(n,["target"]),p=Object.assign({},c,{trigger:"manual",touch:!1}),f=Object.assign({touch:R.touch},c,{showOnCreate:!0}),l=F(e,p);function d(e){if(e.target&&!i){var t=e.target.closest(a);if(t){var r=t.getAttribute("data-tippy-trigger")||n.trigger||R.trigger;if(!t._tippy&&!("touchstart"===e.type&&"boolean"==typeof f.touch||"touchstart"!==e.type&&r.indexOf(X[e.type])<0)){var s=F(t,f);s&&(o=o.concat(s))}}}}function v(e,t,n,o){void 0===o&&(o=!1),e.addEventListener(t,n,o),r.push({node:e,eventType:t,handler:n,options:o})}return u(l).forEach((function(e){var n=e.destroy,a=e.enable,s=e.disable;e.destroy=function(e){void 0===e&&(e=!0),e&&o.forEach((function(e){e.destroy()})),o=[],r.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,o=e.options;t.removeEventListener(n,r,o)})),r=[],n()},e.enable=function(){a(),o.forEach((function(e){return e.enable()})),i=!1},e.disable=function(){s(),o.forEach((function(e){return e.disable()})),i=!0},function(e){var n=e.reference;v(n,"touchstart",d,t),v(n,"mouseover",d),v(n,"focusin",d),v(n,"click",d)}(e)})),l},F.hideAll=function(e){var t=void 0===e?{}:e,n=t.exclude,r=t.duration;U.forEach((function(e){var t=!1;if(n&&(t=g(n)?e.reference===n:e.popper===n.popper),!t){var o=e.props.duration;e.setProps({duration:r}),e.hide(),e.state.isDestroyed||e.setProps({duration:o})}}))},F.roundArrow='<svg width="16" height="6" xmlns="http://www.w3.org/2000/svg"><path d="M0 6s1.796-.013 4.67-3.615C5.851.9 6.93.006 8 0c1.07-.006 2.148.887 3.343 2.385C14.233 6.005 16 6 16 6H0z"></svg>',F}));
2
+ //# sourceMappingURL=tippy.umd.min.js.map
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mkdocs-document-dates
3
- Version: 2.4.0
3
+ Version: 3.0.0
4
4
  Summary: A MkDocs plugin for displaying accurate document creation and last modification dates.
5
5
  Home-page: https://github.com/jaywhj/mkdocs-document-dates
6
6
  Author: Aaron Wang
@@ -27,20 +27,27 @@ English | [简体中文](README_zh.md)
27
27
 
28
28
 
29
29
 
30
- A MkDocs plugin for displaying <mark>accurate</mark> document creation and last modification dates.
30
+ A MkDocs plugin for displaying the <mark>exact</mark> creation and last modification dates of markdown document.
31
31
 
32
32
  ## Features
33
33
 
34
34
  - **No Git dependency**, uses filesystem timestamps directly
35
35
  - Supports manual date specification in `Front Matter`
36
- - Cross-platform support (Windows, macOS, Linux)
37
36
  - Support for multiple time formats (date, datetime, timeago)
38
- - Flexible display position (top or bottom)
39
37
  - Support for document exclusion mode
40
- - Material Design icons, Elegant styling
41
- - Lightweight with no extra dependencies
42
- - Multi-language support
38
+ - Flexible display position (top or bottom)
39
+ - Material style icons, elegant styling (Customizable)
40
+ - Supports Tooltip Hover Tips
41
+ - Intelligent repositioning to always float optimally in view
42
+ - Supports automatic theme switching following Material's light/dark color scheme
43
+ - Support for customizing themes, styles, animations
44
+ - Compatible with mouse, keyboard and **touch** (mobile) to trigger hover
43
45
  - Support for CI/CD build systems (e.g. Github Actions)
46
+ - Multi-language support, cross-platform support (Windows, macOS, Linux)
47
+
48
+ ## Showcases
49
+
50
+ ![render](render.gif)
44
51
 
45
52
  ## Installation
46
53
 
@@ -50,7 +57,7 @@ pip install mkdocs-document-dates
50
57
 
51
58
  ## Configuration
52
59
 
53
- Just add the plugin to your mkdocs.yml:
60
+ Just add the plugin to your `mkdocs.yml`:
54
61
 
55
62
  ```yaml
56
63
  plugins:
@@ -62,12 +69,12 @@ Or, customize the configuration:
62
69
  ```yaml
63
70
  plugins:
64
71
  - document-dates:
65
- type: date # Date type: date | datetime | timeago, default: date
72
+ type: date # Date type: date datetime timeago, default: date
66
73
  locale: en # Localization: zh zh_tw en es fr de ar ja ko ru, default: en
67
- date_format: '%Y-%m-%d' # Date format
74
+ date_format: '%Y-%m-%d' # Date format, Supports all Python datetime format strings, e.g., %Y-%m-%d, %b %d, %Y, etc
68
75
  time_format: '%H:%M:%S' # Time format (valid only if type=datetime)
69
- position: bottom # Display position: top (after title) | bottom (end of document), default: bottom
70
- exclude: # List of file patterns to exclude
76
+ position: bottom # Display position: top (after title) bottom (end of document), default: bottom
77
+ exclude: # List of excluded files
71
78
  - temp.md # Exclude specific file
72
79
  - private/* # Exclude all files in private directory, including subdirectories
73
80
  - drafts/*.md # Exclude all markdown files in the current directory drafts, but not subdirectories
@@ -86,40 +93,32 @@ modified: 2025-02-23
86
93
  # Document Title
87
94
  ```
88
95
 
89
- - `created` can be replaced by any of the following fields: `created, date, creation_date, created_at, date_created`
90
- - `modified` can be replaced by any of the following fields: `modified, updated, last_modified, updated_at, date_modified, last_update`
91
-
92
- ## Configuration Options
93
-
94
- - **type** : Date type (default: `date` )
95
- - `date` : Display date only
96
- - `datetime` : Display date and time
97
- - `timeago` : Display relative time (e.g., 2 minutes ago)
98
- - **locale** : Localization (default: `en` )
99
- - Supports: `zh zh_tw en es fr de ar ja ko ru`
100
- - **date_format** : Date format (default: `%Y-%m-%d`)
101
- - Supports all Python datetime format strings, e.g., %Y-%m-%d, %b %d, %Y, etc.
102
- - **time_format** : Time format (default: `%H:%M:%S`)
103
- - **position** : Display position (default: `bottom`)
104
- - `top` : Display after the first heading
105
- - `bottom` : Display at the end of the document
106
- - **exclude** : File exclusion list (default: [] )
107
- - Supports glob patterns, e.g., ["private/\*", "temp.md", "drafts/\*.md"]
96
+ - `created` can be replaced with: `created, date, creation_date, created_at, date_created`
97
+ - `modified` can be replaced with: `modified, updated, last_modified, updated_at, date_modified, last_update`
98
+
99
+ ## Customization
100
+
101
+ This plugin supports deep customization, just modify the code in the corresponding file:
102
+
103
+ - Style & Theme: `docs/assets/document_dates/document-dates.config.css`
104
+ - Properties & Animations: `docs/assets/document_dates/document-dates.config.js`
105
+
106
+ Tip: If you want to restore the default effect, just delete this file and rebuild your project
108
107
 
109
108
  ## Tips
110
109
 
111
- - It still works when using CI/CD build systems (e.g. Github Actions), used a cache file `.dates_cache.json` to solve this problem:
112
- 1. First, you can configure the workflow like this (penultimate line) in your .github/workflows/ci.yml:
110
+ - It still works when using CI/CD build systems (e.g. Github Actions), here's how it works:
111
+ 1. First, you can configure the workflow like this (penultimate line) in your `.github/workflows/ci.yml`:
113
112
  ```
114
113
  ...
115
114
 
116
115
  - run: pip install mkdocs-document-dates
117
116
  - run: mkdocs gh-deploy --force
118
117
  ```
119
- 2. Then update your Markdown document in MkDocs as normal
120
- 3. After running git add and git commit, you will see the auto-generated cache file .dates_cache.json (hidden by default) in the `docs` folder under MkDocs
118
+ 2. Then update your Markdown document in `docs` as normal
119
+ 3. After running git add and git commit, you will see the auto-generated cache file `.dates_cache.json` (hidden by default) in the `docs` folder
121
120
  - Make sure you have installed python3 ahead of time and set environment variables
122
- 4. Finally, run git push, and you can see that there are also .dates_cache.json files in the docs directory in the GitHub repository, which means success
123
- - Priority of time reads:
121
+ 4. Finally, run git push, and you can see that the `.dates_cache.json` file also exists in the docs directory in the GitHub repository, which means success!
122
+ - Priority for datetime reads:
124
123
  - `Front Matter` > `Cache file` > `Filesystem timestamp`
125
124
  - If you are using MkDocs on a Linux system, the modification time is used as the creation time because of system limitations. If you need the exact creation time, you can specify it manually in Front Matter
@@ -4,7 +4,6 @@ setup.py
4
4
  mkdocs_document_dates/__init__.py
5
5
  mkdocs_document_dates/hooks_installer.py
6
6
  mkdocs_document_dates/plugin.py
7
- mkdocs_document_dates/styles.py
8
7
  mkdocs_document_dates.egg-info/PKG-INFO
9
8
  mkdocs_document_dates.egg-info/SOURCES.txt
10
9
  mkdocs_document_dates.egg-info/dependency_links.txt
@@ -22,4 +21,14 @@ mkdocs_document_dates/lang/ja.py
22
21
  mkdocs_document_dates/lang/ko.py
23
22
  mkdocs_document_dates/lang/ru.py
24
23
  mkdocs_document_dates/lang/zh.py
25
- mkdocs_document_dates/lang/zh_tw.py
24
+ mkdocs_document_dates/lang/zh_tw.py
25
+ mkdocs_document_dates/static/document-dates.config.css
26
+ mkdocs_document_dates/static/document-dates.config.js
27
+ mkdocs_document_dates/static/tippy/backdrop.css
28
+ mkdocs_document_dates/static/tippy/light.css
29
+ mkdocs_document_dates/static/tippy/material.css
30
+ mkdocs_document_dates/static/tippy/popper.min.js
31
+ mkdocs_document_dates/static/tippy/scale.css
32
+ mkdocs_document_dates/static/tippy/shift-away.css
33
+ mkdocs_document_dates/static/tippy/tippy.css
34
+ mkdocs_document_dates/static/tippy/tippy.umd.min.js
@@ -7,7 +7,7 @@ try:
7
7
  except FileNotFoundError:
8
8
  long_description = "A MkDocs plugin for displaying accurate document creation and last modification dates."
9
9
 
10
- VERSION = '2.4.0'
10
+ VERSION = '3.0.0'
11
11
 
12
12
  setup(
13
13
  name="mkdocs-document-dates",
@@ -36,7 +36,12 @@ setup(
36
36
  ],
37
37
  },
38
38
  package_data={
39
- 'mkdocs_document_dates': ['hooks/*'],
39
+ 'mkdocs_document_dates': [
40
+ 'hooks/*',
41
+ 'static/tippy/*',
42
+ 'static/*.config.css',
43
+ 'static/*.config.js'
44
+ ],
40
45
  },
41
46
  python_requires=">=3.7",
42
47
  )
@@ -1,102 +0,0 @@
1
- # mkdocs-document-dates
2
-
3
- English | [简体中文](README_zh.md)
4
-
5
-
6
-
7
- A MkDocs plugin for displaying <mark>accurate</mark> document creation and last modification dates.
8
-
9
- ## Features
10
-
11
- - **No Git dependency**, uses filesystem timestamps directly
12
- - Supports manual date specification in `Front Matter`
13
- - Cross-platform support (Windows, macOS, Linux)
14
- - Support for multiple time formats (date, datetime, timeago)
15
- - Flexible display position (top or bottom)
16
- - Support for document exclusion mode
17
- - Material Design icons, Elegant styling
18
- - Lightweight with no extra dependencies
19
- - Multi-language support
20
- - Support for CI/CD build systems (e.g. Github Actions)
21
-
22
- ## Installation
23
-
24
- ```bash
25
- pip install mkdocs-document-dates
26
- ```
27
-
28
- ## Configuration
29
-
30
- Just add the plugin to your mkdocs.yml:
31
-
32
- ```yaml
33
- plugins:
34
- - document-dates
35
- ```
36
-
37
- Or, customize the configuration:
38
-
39
- ```yaml
40
- plugins:
41
- - document-dates:
42
- type: date # Date type: date | datetime | timeago, default: date
43
- locale: en # Localization: zh zh_tw en es fr de ar ja ko ru, default: en
44
- date_format: '%Y-%m-%d' # Date format
45
- time_format: '%H:%M:%S' # Time format (valid only if type=datetime)
46
- position: bottom # Display position: top (after title) | bottom (end of document), default: bottom
47
- exclude: # List of file patterns to exclude
48
- - temp.md # Exclude specific file
49
- - private/* # Exclude all files in private directory, including subdirectories
50
- - drafts/*.md # Exclude all markdown files in the current directory drafts, but not subdirectories
51
- ```
52
-
53
- ## Manual Date Specification
54
-
55
- You can also manually specify the date of a Markdown document in its `Front Matter` :
56
-
57
- ```yaml
58
- ---
59
- created: 2023-01-01
60
- modified: 2025-02-23
61
- ---
62
-
63
- # Document Title
64
- ```
65
-
66
- - `created` can be replaced by any of the following fields: `created, date, creation_date, created_at, date_created`
67
- - `modified` can be replaced by any of the following fields: `modified, updated, last_modified, updated_at, date_modified, last_update`
68
-
69
- ## Configuration Options
70
-
71
- - **type** : Date type (default: `date` )
72
- - `date` : Display date only
73
- - `datetime` : Display date and time
74
- - `timeago` : Display relative time (e.g., 2 minutes ago)
75
- - **locale** : Localization (default: `en` )
76
- - Supports: `zh zh_tw en es fr de ar ja ko ru`
77
- - **date_format** : Date format (default: `%Y-%m-%d`)
78
- - Supports all Python datetime format strings, e.g., %Y-%m-%d, %b %d, %Y, etc.
79
- - **time_format** : Time format (default: `%H:%M:%S`)
80
- - **position** : Display position (default: `bottom`)
81
- - `top` : Display after the first heading
82
- - `bottom` : Display at the end of the document
83
- - **exclude** : File exclusion list (default: [] )
84
- - Supports glob patterns, e.g., ["private/\*", "temp.md", "drafts/\*.md"]
85
-
86
- ## Tips
87
-
88
- - It still works when using CI/CD build systems (e.g. Github Actions), used a cache file `.dates_cache.json` to solve this problem:
89
- 1. First, you can configure the workflow like this (penultimate line) in your .github/workflows/ci.yml:
90
- ```
91
- ...
92
-
93
- - run: pip install mkdocs-document-dates
94
- - run: mkdocs gh-deploy --force
95
- ```
96
- 2. Then update your Markdown document in MkDocs as normal
97
- 3. After running git add and git commit, you will see the auto-generated cache file .dates_cache.json (hidden by default) in the `docs` folder under MkDocs
98
- - Make sure you have installed python3 ahead of time and set environment variables
99
- 4. Finally, run git push, and you can see that there are also .dates_cache.json files in the docs directory in the GitHub repository, which means success
100
- - Priority of time reads:
101
- - `Front Matter` > `Cache file` > `Filesystem timestamp`
102
- - If you are using MkDocs on a Linux system, the modification time is used as the creation time because of system limitations. If you need the exact creation time, you can specify it manually in Front Matter
@@ -1,42 +0,0 @@
1
-
2
- DOCUMENT_DATES_CSS = """
3
- .document-dates-plugin {
4
- color: #8e8e8e;
5
- font-size: 0.75rem;
6
- padding: 0.2rem 0;
7
- opacity: 0.7;
8
- display: flex;
9
- gap: 1.5rem;
10
- align-items: center;
11
- margin-bottom: 0.3rem;
12
- }
13
- .document-dates-plugin span {
14
- display: inline-flex;
15
- align-items: center;
16
- gap: 0.3rem;
17
- }
18
- .document-dates-plugin .material-icons {
19
- font-size: 0.9rem;
20
- opacity: 0.7;
21
- }
22
-
23
-
24
- /* top position style */
25
- .document-dates-plugin-wrapper.document-dates-top {
26
- margin-top: -1.2rem;
27
- padding-bottom: 0.3rem;
28
- border-bottom: 1px solid rgba(0, 0, 0, 0.07);
29
- }
30
- /* bottom position style */
31
- .document-dates-plugin-wrapper.document-dates-bottom {
32
- margin: 1rem 0;
33
- padding-bottom: 0.3rem;
34
- border-bottom: 1px solid rgba(0, 0, 0, 0.07);
35
- }
36
-
37
-
38
- /* Hide the footnote divider immediately following the date information with the CSS adjacent sibling selector */
39
- .document-dates-plugin-wrapper + .footnote hr {
40
- display: none;
41
- }
42
- """