├── static ├── js │ ├── custom.js │ ├── theme_default │ │ ├── pre_main.js │ │ ├── split.js │ │ ├── tocbot.min.js │ │ ├── main.js │ │ └── viewer.min.js │ ├── live.js │ └── search │ │ └── search_main.js ├── search_index │ ├── index.json │ ├── index_1.json │ └── index_0.json ├── css │ ├── custom.css │ ├── theme_default │ │ ├── dark.css │ │ ├── prism.min.css │ │ ├── viewer.min.css │ │ └── light.css │ └── search │ │ └── style.css └── image │ ├── theme_default │ ├── menu.svg │ ├── array.svg │ ├── back.svg │ ├── indicator.svg │ ├── to-top.svg │ ├── anchor.svg │ ├── print.svg │ ├── light_mode.svg │ └── dark_mode.svg │ └── search │ ├── cancel.svg │ ├── up.svg │ ├── close.svg │ └── search.svg ├── doc ├── sidebar.yaml ├── config.json └── index.html ├── favicon.ico ├── robots.txt ├── config.json ├── .mergify.yml ├── .github └── workflows │ ├── pull-request-automation.yml │ └── main.yml ├── README.md ├── LICENSE ├── main ├── main_url.txt └── PyTrackers.py ├── .gitignore ├── index.html └── 404.html /static/js/custom.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /doc/sidebar.yaml: -------------------------------------------------------------------------------- 1 | items: 2 | - label: Brief 3 | file: README.md 4 | -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phishinqi/TrackersList/HEAD/favicon.ico -------------------------------------------------------------------------------- /robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Sitemap: https://phishinqi.github.io/sitemap.xml 3 | -------------------------------------------------------------------------------- /doc/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "import": "config", 3 | "name": "ReadMe" 4 | } 5 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "import": "config", 3 | "class": "md_page", 4 | "name": "Pages" 5 | } 6 | -------------------------------------------------------------------------------- /static/search_index/index.json: -------------------------------------------------------------------------------- 1 | {"/doc/": ["ReadMe", "/TrackersList/static/search_index/index_0.json"], "/": ["Pages", "/TrackersList/static/search_index/index_1.json"]} -------------------------------------------------------------------------------- /.mergify.yml: -------------------------------------------------------------------------------- 1 | pull_request_rules: 2 | - name: automatic merge for Dependabot pull requests 3 | conditions: 4 | - author=github-actions[bot] 5 | actions: 6 | merge: 7 | method: merge 8 | -------------------------------------------------------------------------------- /static/css/custom.css: -------------------------------------------------------------------------------- 1 | 2 | 3 | #home_page h1 { 4 | color: #4caf7d; 5 | } 6 | .dark #home_page h1{ 7 | color: white; 8 | } 9 | 10 | @media screen and (max-width: 900px) { 11 | #home_page h1 { 12 | color: #eb4848; 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /static/search_index/index_1.json: -------------------------------------------------------------------------------- 1 | {"/TrackersList/404.html": {"title": "", "content": "---\nlayout: 404.html\n---"}, "/TrackersList/index.html": {"title": "PyTrackers", "content": "---\ntitle: PyTrackers\nkeywords: PyTrackers\ndesc: PyTrackers, generated with teedoc, a static site generator\nid: home_page\n---\n\n\n\n\n
\n

PyTrackers

\n

好耶~

\n
\n
\n See Doc\n
"}} -------------------------------------------------------------------------------- /static/image/theme_default/menu.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/image/theme_default/array.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/image/theme_default/back.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/image/search/cancel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.github/workflows/pull-request-automation.yml: -------------------------------------------------------------------------------- 1 | name: Automerge 2 | on: 3 | pull_request: 4 | types: 5 | - labeled 6 | - unlabeled 7 | - synchronize 8 | - opened 9 | - edited 10 | - ready_for_review 11 | - reopened 12 | - unlocked 13 | pull_request_review: 14 | types: 15 | - submitted 16 | status: {} 17 | jobs: 18 | automerge: 19 | runs-on: ubuntu-latest 20 | steps: 21 | - name: automerge 22 | uses: "pascalgn/automerge-action@629929da409181990e4e638dcf84a74e11d3af66" 23 | env: 24 | GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" 25 | MERGE_LABELS: "automerge,!work in progress" 26 | MERGE_METHOD: "squash" 27 | MERGE_COMMIT_MESSAGE: "pull-request-title" 28 | -------------------------------------------------------------------------------- /static/image/theme_default/indicator.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/image/search/up.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/image/theme_default/to-top.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/search_index/index_0.json: -------------------------------------------------------------------------------- 1 | {"/TrackersList/doc/index.html": {"title": "PyTrackersList", "content": "---\ntitle: PyTrackersList\nkeywords: Trackers,List\nauthor: Ryokou_Kiryu\ndate: 2023-01-05\nversion: 1.0.0\n---\n\n## 什麽是 PyTrackersList?\nPyTrackersList 是使用使用 Python 編寫的 PyTrackers 以及以 Github Actions 爲基礎運行的脚本程式,其目的是整理多個公開 Trackers 訂閲列表與一個訂閲列表中。\n\n**PyTrackersList 并不提供 Trackers,它只有整合作用。**\n\n## 如何使用?\nPyTrackersList 的使用十分簡單,你只需要兩個鏈接,並將它們粘貼到你所使用的客戶端中就可以了。\n這裏是 PyTrackers 提供的鏈接:\n\n.. tabset::\n :id: tabset1\n\n ## 去重\n\n https://raw.githubusercontent.com/phishinqi/TrackersList/main/main/output_trackers.txt\n https://cdn.jsdelivr.net/gh/phishinqi/TrackersList@main/main/output_trackers.txt\n\n ## 原始\n\n https://raw.githubusercontent.com/phishinqi/TrackersList/main/main/trackers.txt\n https://cdn.jsdelivr.net/gh/phishinqi/TrackersList@main/main/trackers.txt"}} -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TrackersList 2 |
3 | 4 | 適用於一些BT客戶端的Trackers列表,通過Python自動爬取 5 | 你可以在[這裏](https://phishinqi.github.io/TrackersList/)查看相關幫助 6 | 感謝以下項目提供的Trackers: 7 | * https://github.com/ngosang/trackerslist 8 | * https://github.com/XIU2/TrackersListCollection 9 | * https://github.com/DeSireFire/animeTrackerList 10 | 11 | # 注意 12 | **本項目過於臃腫,可能並不適合絕大部分人** 13 | 感謝您發現本項目,但我更希望您能夠修改我的代碼讓他變得不像這樣臃腫 14 | 15 | # 如何使用 16 | 使用下面兩個鏈接即可: 17 | * 去重:https://raw.githubusercontent.com/phishinqi/TrackersList/main/main/output_trackers.txt 18 | * 未去重:https://raw.githubusercontent.com/phishinqi/TrackersList/main/main/trackers.txt 19 | 20 | **若上述無法使用,我提供了CDN鏈接** 21 | 22 | * 去重:https://cdn.jsdelivr.net/gh/phishinqi/TrackersList@main/main/output_trackers.txt 23 | * 未去重:https://cdn.jsdelivr.net/gh/phishinqi/TrackersList@main/main/trackers.txt 24 | -------------------------------------------------------------------------------- /static/image/search/close.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/image/theme_default/anchor.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: GetTrackers 2 | 3 | on: 4 | schedule: 5 | - cron: '0 0,1,5,10,14,17,22 * * *' 6 | workflow_dispatch: 7 | 8 | jobs: 9 | run: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v3 13 | - uses: actions/setup-python@v4 14 | with: 15 | python-version: '3.11.1' 16 | - name: cache log 17 | id: cache-log 18 | uses: actions/cache@v3 19 | with: 20 | path: log 21 | key: bot-logs 22 | - name: Run pip install wget 23 | run: pip install wget 24 | - name: Run python PyTrackers.py 25 | run: | 26 | python PyTrackers.py 27 | working-directory: ./main 28 | 29 | - name: Create Pull Request 30 | uses: peter-evans/create-pull-request@v4 31 | 32 | - uses: actions/upload-artifact@v3 33 | with: 34 | name: my-artifact 35 | path: | 36 | ./main/trackers.txt 37 | ./main/output_trackers.txt 38 | retention-days: 1 39 | -------------------------------------------------------------------------------- /static/image/search/search.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Ryokou-Kiryu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /main/main_url.txt: -------------------------------------------------------------------------------- 1 | https://trackerslist.com/all.txt 2 | https://cdn.jsdelivr.net/gh/ngosang/trackerslist@master/trackers_all.txt 3 | https://newtrackon.com/api/all 4 | https://newtrackon.com/api/stable 5 | https://cf.trackerslist.com/all.txt 6 | https://cdn.jsdelivr.net/gh/DeSireFire/animeTrackerList/AT_all.txt 7 | https://gitee.com/harvey520/www.yaozuopan.top/raw/master/blacklist.txt 8 | http://github.itzmx.com/1265578519/OpenTracker/master/tracker.txt 9 | https://raw.githubusercontent.com/hezhijie0327/Trackerslist/main/trackerslist_combine.txt 10 | https://raw.githubusercontent.com/hezhijie0327/Trackerslist/main/trackerslist_exclude.txt 11 | https://raw.githubusercontent.com/hezhijie0327/Trackerslist/main/trackerslist_tracker.txt 12 | https://ghproxy.com/https://raw.githubusercontent.com/Tunglies/TrackersList/main/all.txt 13 | https://raw.githubusercontent.com/phishinqi/source/main/tracker.txt 14 | https://github.itzmx.com/1265578519/OpenTracker/master/tracker.txt 15 | https://cdn.jsdelivr.net/gh/DeSireFire/animeTrackerList/ATline_best.txt 16 | https://cdn.jsdelivr.net/gh/DeSireFire/animeTrackerList/ATline_all.txt 17 | https://raw.githubusercontent.com/chenjia404/CnTrackersList/master/all.txt 18 | -------------------------------------------------------------------------------- /static/image/theme_default/print.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/image/theme_default/light_mode.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/js/theme_default/pre_main.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | var theme = getTheme(); 3 | setTheme(theme); 4 | }()); 5 | 6 | function addCss(filename) { 7 | var head = document.getElementsByTagName('head')[0]; 8 | var link = document.createElement('link'); 9 | link.rel = 'stylesheet'; 10 | link.type = 'text/css'; 11 | link.href = filename; 12 | head.appendChild(link); 13 | } 14 | function removejscssfile(filename, filetype) { 15 | var targetelement = (filetype == "js") ? "script" : (filetype == "css") ? "link" : "none" 16 | var targetattr = (filetype == "js") ? "src" : (filetype == "css") ? "href" : "none" 17 | var allsuspects = document.getElementsByTagName(targetelement) 18 | for (var i = allsuspects.length; i >= 0; i--) { 19 | if (allsuspects[i] && allsuspects[i].getAttribute(targetattr) != null && allsuspects[i].getAttribute(targetattr).indexOf(filename) != -1) 20 | allsuspects[i].parentNode.removeChild(allsuspects[i]) 21 | } 22 | } 23 | 24 | 25 | function getTheme(){ 26 | var t = localStorage.getItem("theme"); 27 | if(!t){ 28 | t = "light"; 29 | setTheme(t); 30 | } 31 | return t; 32 | } 33 | function setTheme(theme){ 34 | var obj = document.getElementById("themes"); 35 | if(theme=="dark"){ 36 | if(obj){ 37 | obj.classList.remove("light"); 38 | obj.classList.add("dark"); 39 | } 40 | document.getElementsByTagName("html")[0].classList.add("dark"); 41 | // load dark and light togher, distingush by .dark class instead use single css file 42 | // removejscssfile("/TrackersList/static/css/theme_default/light.css", "css"); 43 | // addCss("/TrackersList/static/css/theme_default/dark.css"); 44 | }else{ 45 | if(obj){ 46 | obj.classList.remove("dark"); 47 | obj.classList.add("light"); 48 | } 49 | document.getElementsByTagName("html")[0].classList.remove("dark"); 50 | // removejscssfile("/TrackersList/static/css/theme_default/dark.css", "css"); 51 | // addCss("/TrackersList/static/css/theme_default/light.css"); 52 | } 53 | localStorage.setItem("theme", theme); 54 | } 55 | -------------------------------------------------------------------------------- /static/image/theme_default/dark_mode.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | pip-wheel-metadata/ 24 | share/python-wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | MANIFEST 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .nox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | *.py,cover 51 | .hypothesis/ 52 | .pytest_cache/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | target/ 76 | 77 | # Jupyter Notebook 78 | .ipynb_checkpoints 79 | 80 | # IPython 81 | profile_default/ 82 | ipython_config.py 83 | 84 | # pyenv 85 | .python-version 86 | 87 | # pipenv 88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 91 | # install all needed dependencies. 92 | #Pipfile.lock 93 | 94 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 95 | __pypackages__/ 96 | 97 | # Celery stuff 98 | celerybeat-schedule 99 | celerybeat.pid 100 | 101 | # SageMath parsed files 102 | *.sage.py 103 | 104 | # Environments 105 | .env 106 | .venv 107 | env/ 108 | venv/ 109 | ENV/ 110 | env.bak/ 111 | venv.bak/ 112 | 113 | # Spyder project settings 114 | .spyderproject 115 | .spyproject 116 | 117 | # Rope project settings 118 | .ropeproject 119 | 120 | # mkdocs documentation 121 | /site 122 | 123 | # mypy 124 | .mypy_cache/ 125 | .dmypy.json 126 | dmypy.json 127 | 128 | # Pyre type checker 129 | .pyre/ 130 | -------------------------------------------------------------------------------- /static/css/theme_default/dark.css: -------------------------------------------------------------------------------- 1 | /** 2 | teedoc light theme css 3 | @author neucrack 4 | @copyright (c) neucrack CZD666666@gmail.com with MIT License 5 | @changes 2021.1.27 add basic attrributes 6 | */ 7 | 8 | /* 9 | use .dark class to cover light theme style 10 | */ 11 | 12 | /* global template */ 13 | .dark body { 14 | color: #d1d1d1; 15 | background-color: #1b1b1b; 16 | } 17 | .dark a { 18 | color: #8a8a8a; 19 | } 20 | .dark a:visited { 21 | color: #8a8a8a; 22 | } 23 | .dark code { 24 | background-color: #2a2a2a; 25 | } 26 | .dark pre[class*="language-"].line-numbers > code { 27 | background: none; 28 | padding: 0; 29 | } 30 | .dark #navbar .sub_items ul { 31 | box-shadow: 0 0 9px 0px #000000; 32 | background-color: #232323; 33 | } 34 | .dark #sidebar .active > a, 35 | .dark #navbar .active > a { 36 | background-color: #2d2d2d; 37 | color: #4caf7d; 38 | } 39 | .dark #sidebar .active > a, 40 | .dark #navbar .active > a, 41 | .dark #navbar .active_parent > a { 42 | background-color: #2d2d2d; 43 | } 44 | .dark #sidebar li > a:hover, 45 | .dark #sidebar li.active_parent > a:hover, 46 | .dark #navbar li > a:hover, 47 | .dark #navbar .sub_items > a:hover { 48 | background-color: #2d2d2d; 49 | } 50 | .dark #sidebar ul .active_parent > a { 51 | background-color: #232323; 52 | } 53 | .dark .gutter.gutter-horizontal { 54 | background-color: #484848; 55 | } 56 | .dark *::-webkit-scrollbar-track { 57 | background: #484848; 58 | } 59 | .dark *::-webkit-scrollbar-thumb { 60 | background-color: #6b6b6b; 61 | } 62 | .dark #article #toc { 63 | background-color: #1b1b1b; 64 | } 65 | .dark #to_top { 66 | background-color: #2d2d2d; 67 | box-shadow: 8px 8px 20px #000000; 68 | } 69 | .dark #to_top:hover { 70 | box-shadow: 8px 8px 28px #000000; 71 | } 72 | .dark #to_top:active { 73 | box-shadow: 0px 0px 20px #000000; 74 | } 75 | .dark blockquote { 76 | background-color: #2d2d2d; 77 | } 78 | .dark blockquote.spoiler { 79 | border-left: 5px solid #FF9800; 80 | background-color: #6e5200; 81 | color: white; 82 | } 83 | .dark td { 84 | background-color: #373737; 85 | border: 2px solid #555555; 86 | } 87 | .dark th { 88 | font-weight: 700; 89 | background-color: #0f5943; 90 | color: white; 91 | border: 2px solid #006f4f; 92 | } 93 | .dark sup a { 94 | background-color: #2d2d2d; 95 | } 96 | .dark a:hover { 97 | background-color: #424242; 98 | } 99 | .dark #doc_footer { 100 | background-color: #2d2d2d; 101 | border-top: 1px solid #2d2d2d; 102 | } 103 | .dark #page_footer { 104 | background-color: #2d2d2d; 105 | border-top: 1px solid #2d2d2d; 106 | } 107 | .dark #footer a:hover { 108 | background-color: #404040; 109 | } 110 | .dark #previous_next { 111 | border-top: 1px solid #525252; 112 | } 113 | .dark #previous_next a { 114 | background-color: #2d2d2d; 115 | } 116 | 117 | /* google translate */ 118 | .dark #navbar #google_translate_element .goog-te-gadget-simple { 119 | background-color: #1b1b1b; 120 | } 121 | .dark #navbar #google_translate_element .goog-te-gadget-simple .goog-te-menu-value { 122 | color: #8a8a8a; 123 | } 124 | 125 | /* tabset */ 126 | .dark .tabset { 127 | border: 0.2em solid #4c4c4c; 128 | } 129 | .dark .tabset-text-container { 130 | background-color: #212121; 131 | } 132 | .dark .tabset-tab-active { 133 | background-color: #212121; 134 | } 135 | 136 | /* details */ 137 | .dark details { 138 | border: 0.2em solid #4c4c4c; 139 | } 140 | .dark details > .details-content { 141 | background-color: #212121; 142 | } 143 | 144 | /* markdown */ 145 | .dark #mermaid-1662893106119 .messageText { 146 | fill: #6f6f6f; 147 | stroke: #6f6f6f; 148 | } 149 | #mermaid-1662893106119 .loopText, #mermaid-1662893106119 .loopText>tspan { 150 | fill: #a99b1a; 151 | stroke: none; 152 | } 153 | 154 | @media screen and (max-width: 900px) { 155 | .dark #menu_wrapper.m_menu_fixed { 156 | background-color: rgb(27, 27, 27, 0.9); 157 | box-shadow: 0px 1px 10px 0px rgb(0, 0, 0, 0.32); 158 | } 159 | .dark #sidebar_wrapper { 160 | background-color: #1b1b1b; 161 | } 162 | .dark #navbar { 163 | display: block; 164 | border-bottom: 1px solid #383838; 165 | z-index: 89; 166 | } 167 | } 168 | 169 | 170 | -------------------------------------------------------------------------------- /main/PyTrackers.py: -------------------------------------------------------------------------------- 1 | import asyncio 2 | import aiohttp 3 | import os 4 | from aiologger import Logger 5 | from tqdm import tqdm 6 | import aiofiles 7 | 8 | MAIN_URL_FILE = 'main_url.txt' 9 | ORIGINAL_TRACKERS_FILE = 'original_trackers.txt' 10 | OUTPUT_TRACKERS_FILE = 'output_trackers.txt' 11 | 12 | logger = Logger.with_default_handlers(name='my_async_logger') 13 | 14 | async def download_main_url(): 15 | main_url = "https://raw.githubusercontent.com/phishinqi/phishinqi.github.io/refs/heads/main/assets/txt/trackers_url.txt" 16 | 17 | if os.path.exists(MAIN_URL_FILE): 18 | logger.info(f"{MAIN_URL_FILE} 文件已存在,跳过下载。") 19 | return 20 | 21 | logger.info(f"正在下载 {MAIN_URL_FILE} 文件...") 22 | try: 23 | timeout = aiohttp.ClientTimeout(total=30) 24 | async with aiohttp.ClientSession(timeout=timeout) as session: 25 | async with session.get(main_url) as response: 26 | response.raise_for_status() 27 | content = await response.text() 28 | 29 | async with aiofiles.open(MAIN_URL_FILE, 'w', encoding='utf-8') as f: 30 | await f.write(content) 31 | 32 | logger.info(f"{MAIN_URL_FILE} 文件下载完成。") 33 | except aiohttp.ClientError as e: 34 | logger.error(f"下载 {MAIN_URL_FILE} 时发生网络错误: {e}") 35 | except asyncio.TimeoutError: 36 | logger.error(f"下载 {MAIN_URL_FILE} 时超时。") 37 | 38 | async def read_urls(): 39 | if not os.path.exists(MAIN_URL_FILE): 40 | logger.error(f"{MAIN_URL_FILE} 文件不存在!") 41 | return [] 42 | 43 | async with aiofiles.open(MAIN_URL_FILE, 'r', encoding='utf-8') as f: 44 | urls = await f.readlines() 45 | return [url.strip() for url in urls if url.strip()] 46 | 47 | async def prepare_trackers_file(file_name): 48 | if os.path.exists(file_name): 49 | try: 50 | os.remove(file_name) 51 | logger.info(f"已删除旧的 {file_name} 文件。") 52 | except OSError as e: 53 | logger.error(f"删除 {file_name} 文件时发生错误: {e}") 54 | else: 55 | logger.info(f"{file_name} 文件不存在,无需删除。") 56 | async with aiofiles.open(file_name, 'w', encoding='utf-8') as f: 57 | await f.write("") 58 | 59 | async def fetch_tracker(session, url, f_write, progress_bar): 60 | try: 61 | async with session.get(url) as response: 62 | response.raise_for_status() 63 | content = await response.text() 64 | await f_write.write(content + '\n') 65 | except aiohttp.ClientError as e: 66 | logger.error(f"下载 {url} 时发生网络错误: {e}") 67 | except asyncio.TimeoutError: 68 | logger.error(f"下载 {url} 时超时。") 69 | except asyncio.CancelledError: 70 | logger.error(f"下载 {url} 时被取消。") 71 | except Exception as e: 72 | logger.error(f"下载 {url} 时发生未知错误: {e}") 73 | finally: 74 | progress_bar.update(1) 75 | 76 | async def fetch_and_write_trackers(session, urls, output_file): 77 | logger.info("正在下载 trackers...") 78 | async with aiofiles.open(output_file, 'a', encoding='utf-8') as f_write: 79 | with tqdm(total=len(urls), desc="下载中", unit="个") as progress_bar: 80 | tasks = [fetch_tracker(session, url, f_write, progress_bar) for url in urls] 81 | await asyncio.gather(*tasks) 82 | 83 | async def remove_duplicates(input_file, output_file): 84 | logger.info("正在去重...") 85 | seen = set() 86 | 87 | try: 88 | async with aiofiles.open(input_file, 'r', encoding='utf-8') as f_read: 89 | async with aiofiles.open(output_file, 'w', encoding='utf-8') as f_write: 90 | async for line in f_read: 91 | stripped_line = line.strip() 92 | if stripped_line and stripped_line not in seen: 93 | seen.add(stripped_line) 94 | await f_write.write(stripped_line + '\n\n') 95 | 96 | logger.info("去重完成。") 97 | except (OSError, IOError) as e: 98 | logger.error(f"去重过程中发生文件 I/O 错误: {e}") 99 | except Exception as e: 100 | logger.error(f"去重过程中发生其他错误: {e}") 101 | 102 | async def main(): 103 | await download_main_url() 104 | urls = await read_urls() 105 | 106 | if not urls: 107 | logger.error("没有可处理的 URL,请检查 main_url.txt 文件。") 108 | return 109 | 110 | await prepare_trackers_file(ORIGINAL_TRACKERS_FILE) 111 | 112 | async with aiohttp.ClientSession() as session: 113 | await fetch_and_write_trackers(session, urls, ORIGINAL_TRACKERS_FILE) 114 | 115 | await remove_duplicates(ORIGINAL_TRACKERS_FILE, OUTPUT_TRACKERS_FILE) 116 | await logger.shutdown() 117 | 118 | if os.path.exists(MAIN_URL_FILE): 119 | try: 120 | os.remove(MAIN_URL_FILE) 121 | logger.info(f"{MAIN_URL_FILE} 文件已删除。") 122 | except OSError as e: 123 | logger.error(f"删除 {MAIN_URL_FILE} 文件时发生错误: {e}") 124 | 125 | if __name__ == "__main__": 126 | asyncio.run(main()) 127 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 18 | 19 | 20 | PyTrackers - PyTrackersList 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 62 | 63 |
64 |
65 |
66 | 67 |
68 |

PyTrackers

69 |

好耶~

70 |
71 |
72 | See Doc 73 |
74 | 75 | 76 |
77 |
78 | 79 | 99 |
100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /static/js/theme_default/split.js: -------------------------------------------------------------------------------- 1 | /*! Split.js - v1.6.4 */ 2 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Split=t()}(this,(function(){"use strict";var e="undefined"!=typeof window?window:null,t=null===e,n=t?void 0:e.document,i=function(){return!1},r=t?"calc":["","-webkit-","-moz-","-o-"].filter((function(e){var t=n.createElement("div");return t.style.cssText="width:"+e+"calc(9px)",!!t.style.length})).shift()+"calc",s=function(e){return"string"==typeof e||e instanceof String},o=function(e){if(s(e)){var t=n.querySelector(e);if(!t)throw new Error("Selector "+e+" did not match a DOM element");return t}return e},a=function(e,t,n){var i=e[t];return void 0!==i?i:n},u=function(e,t,n,i){if(t){if("end"===i)return 0;if("center"===i)return e/2}else if(n){if("start"===i)return 0;if("center"===i)return e/2}return e},l=function(e,t){var i=n.createElement("div");return i.className="gutter gutter-"+t,i},c=function(e,t,n){var i={};return s(t)?i[e]=t:i[e]=r+"("+t+"% - "+n+"px)",i},h=function(e,t){var n;return(n={})[e]=t+"px",n};return function(r,s){if(void 0===s&&(s={}),t)return{};var d,f,v,m,g,p,y=r;Array.from&&(y=Array.from(y));var z=o(y[0]).parentNode,S=getComputedStyle?getComputedStyle(z):null,b=S?S.flexDirection:null,E=a(s,"sizes")||y.map((function(){return 100/y.length})),_=a(s,"minSize",100),L=Array.isArray(_)?_:y.map((function(){return _})),w=a(s,"maxSize",1/0),x=Array.isArray(w)?w:y.map((function(){return w})),k=a(s,"expandToMin",!1),C=a(s,"gutterSize",10),M=a(s,"gutterAlign","center"),U=a(s,"snapOffset",30),A=a(s,"dragInterval",1),O=a(s,"direction","horizontal"),D=a(s,"cursor","horizontal"===O?"col-resize":"row-resize"),B=a(s,"gutter",l),T=a(s,"elementStyle",c),j=a(s,"gutterStyle",h);function F(e,t,n,i){var r=T(d,t,n,i);Object.keys(r).forEach((function(t){e.style[t]=r[t]}))}function R(){return p.map((function(e){return e.size}))}function N(e){return"touches"in e?e.touches[0][f]:e[f]}function q(e){var t=p[this.a],n=p[this.b],i=t.size+n.size;t.size=e/this.size*i,n.size=i-e/this.size*i,F(t.element,t.size,this._b,t.i),F(n.element,n.size,this._c,n.i)}function H(e){var t,n=p[this.a],r=p[this.b];this.dragging&&(t=N(e)-this.start+(this._b-this.dragOffset),A>1&&(t=Math.round(t/A)*A),t<=n.minSize+U+this._b?t=n.minSize+this._b:t>=this.size-(r.minSize+U+this._c)&&(t=this.size-(r.minSize+this._c)),t>=n.maxSize-U+this._b?t=n.maxSize+this._b:t<=this.size-(r.maxSize-U+this._c)&&(t=this.size-(r.maxSize+this._c)),q.call(this,t),a(s,"onDrag",i)(R()))}function I(){var e=p[this.a].element,t=p[this.b].element,n=e.getBoundingClientRect(),i=t.getBoundingClientRect();this.size=n[d]+i[d]+this._b+this._c,this.start=n[v],this.end=n[m]}function W(e){var t=function(e){if(!getComputedStyle)return null;var t=getComputedStyle(e);if(!t)return null;var n=e[g];return 0===n?null:n-="horizontal"===O?parseFloat(t.paddingLeft)+parseFloat(t.paddingRight):parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)}(z);if(null===t)return e;if(L.reduce((function(e,t){return e+t}),0)>t)return e;var n=0,i=[],r=e.map((function(r,s){var o=t*r/100,a=u(C,0===s,s===e.length-1,M),l=L[s]+a;return o0&&i[r]-n>0){var o=Math.min(n,i[r]-n);n-=o,s=e-o}return s/t*100}))}function X(){var t=p[this.a].element,r=p[this.b].element;this.dragging&&a(s,"onDragEnd",i)(R()),this.dragging=!1,e.removeEventListener("mouseup",this.stop),e.removeEventListener("touchend",this.stop),e.removeEventListener("touchcancel",this.stop),e.removeEventListener("mousemove",this.move),e.removeEventListener("touchmove",this.move),this.stop=null,this.move=null,t.removeEventListener("selectstart",i),t.removeEventListener("dragstart",i),r.removeEventListener("selectstart",i),r.removeEventListener("dragstart",i),t.style.userSelect="",t.style.webkitUserSelect="",t.style.MozUserSelect="",t.style.pointerEvents="",r.style.userSelect="",r.style.webkitUserSelect="",r.style.MozUserSelect="",r.style.pointerEvents="",this.gutter.style.cursor="",this.parent.style.cursor="",n.body.style.cursor=""}function Y(t){if(!("button"in t)||0===t.button){var r=p[this.a].element,o=p[this.b].element;this.dragging||a(s,"onDragStart",i)(R()),t.preventDefault(),this.dragging=!0,this.move=H.bind(this),this.stop=X.bind(this),e.addEventListener("mouseup",this.stop),e.addEventListener("touchend",this.stop),e.addEventListener("touchcancel",this.stop),e.addEventListener("mousemove",this.move),e.addEventListener("touchmove",this.move),r.addEventListener("selectstart",i),r.addEventListener("dragstart",i),o.addEventListener("selectstart",i),o.addEventListener("dragstart",i),r.style.userSelect="none",r.style.webkitUserSelect="none",r.style.MozUserSelect="none",r.style.pointerEvents="none",o.style.userSelect="none",o.style.webkitUserSelect="none",o.style.MozUserSelect="none",o.style.pointerEvents="none",this.gutter.style.cursor=D,this.parent.style.cursor=D,n.body.style.cursor=D,I.call(this),this.dragOffset=N(t)-this.end}}"horizontal"===O?(d="width",f="clientX",v="left",m="right",g="clientWidth"):"vertical"===O&&(d="height",f="clientY",v="top",m="bottom",g="clientHeight"),E=W(E);var G=[];function J(e){var t=e.i===G.length,n=t?G[e.i-1]:G[e.i];I.call(n);var i=t?n.size-e.minSize-n._c:e.minSize+n._b;q.call(n,i)}return(p=y.map((function(e,t){var n,i={element:o(e),size:E[t],minSize:L[t],maxSize:x[t],i:t};if(t>0&&((n={a:t-1,b:t,dragging:!1,direction:O,parent:z})._b=u(C,t-1==0,!1,M),n._c=u(C,!1,t===y.length-1,M),"row-reverse"===b||"column-reverse"===b)){var r=n.a;n.a=n.b,n.b=r}if(t>0){var s=B(t,O,i.element);!function(e,t,n){var i=j(d,t,n);Object.keys(i).forEach((function(t){e.style[t]=i[t]}))}(s,C,t),n._a=Y.bind(n),s.addEventListener("mousedown",n._a),s.addEventListener("touchstart",n._a),z.insertBefore(s,i.element),n.gutter=s}return F(i.element,i.size,u(C,0===t,t===y.length-1,M),t),t>0&&G.push(n),i}))).forEach((function(e){var t=e.element.getBoundingClientRect()[d];t0){var i=G[n-1],r=p[i.a],s=p[i.b];r.size=t[n-1],s.size=e,F(r.element,r.size,i._b,r.i),F(s.element,s.size,i._c,s.i)}}))},getSizes:R,collapse:function(e){J(p[e])},destroy:function(e,t){G.forEach((function(n){if(!0!==t?n.parent.removeChild(n.gutter):(n.gutter.removeEventListener("mousedown",n._a),n.gutter.removeEventListener("touchstart",n._a)),!0!==e){var i=T(d,n.a.size,n._b);Object.keys(i).forEach((function(e){p[n.a].element.style[e]="",p[n.b].element.style[e]=""}))}}))},parent:z,pairs:G}}})); 3 | //# sourceMappingURL=split.min.js.map 4 | -------------------------------------------------------------------------------- /static/css/theme_default/prism.min.css: -------------------------------------------------------------------------------- 1 | /* PrismJS 1.23.0 2 | https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript+bash+c+cpp+cmake+coffeescript+docker+go+ini+java+json+json5+kotlin+latex+less+lua+makefile+markdown+markup-templating+objectivec+php+powershell+python+jsx+tsx+ruby+rust+sass+scss+shell-session+sql+swift+textile+typescript+yaml&plugins=line-numbers+highlight-keywords+toolbar+copy-to-clipboard+match-braces */ 3 | /** 4 | * prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML 5 | * Based on https://github.com/chriskempson/tomorrow-theme 6 | * @author Rose Pritchard 7 | */ 8 | 9 | code[class*="language-"], 10 | pre[class*="language-"] { 11 | color: #ccc; 12 | background: none; 13 | font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; 14 | font-size: 1em; 15 | text-align: left; 16 | white-space: pre; 17 | word-spacing: normal; 18 | word-break: normal; 19 | word-wrap: normal; 20 | line-height: 1.5; 21 | 22 | -moz-tab-size: 4; 23 | -o-tab-size: 4; 24 | tab-size: 4; 25 | 26 | -webkit-hyphens: none; 27 | -moz-hyphens: none; 28 | -ms-hyphens: none; 29 | hyphens: none; 30 | 31 | } 32 | 33 | /* Code blocks */ 34 | pre[class*="language-"] { 35 | padding: 1em; 36 | margin: .5em 0; 37 | overflow: auto; 38 | } 39 | 40 | :not(pre) > code[class*="language-"], 41 | pre[class*="language-"] { 42 | background: #2d2d2d; 43 | } 44 | 45 | /* Inline code */ 46 | :not(pre) > code[class*="language-"] { 47 | padding: .1em; 48 | border-radius: .3em; 49 | white-space: normal; 50 | } 51 | 52 | .token.comment, 53 | .token.block-comment, 54 | .token.prolog, 55 | .token.doctype, 56 | .token.cdata { 57 | color: #999; 58 | } 59 | 60 | .token.punctuation { 61 | color: #ccc; 62 | } 63 | 64 | .token.tag, 65 | .token.attr-name, 66 | .token.namespace, 67 | .token.deleted { 68 | color: #e2777a; 69 | } 70 | 71 | .token.function-name { 72 | color: #6196cc; 73 | } 74 | 75 | .token.boolean, 76 | .token.number, 77 | .token.function { 78 | color: #f08d49; 79 | } 80 | 81 | .token.property, 82 | .token.class-name, 83 | .token.constant, 84 | .token.symbol { 85 | color: #f8c555; 86 | } 87 | 88 | .token.selector, 89 | .token.important, 90 | .token.atrule, 91 | .token.keyword, 92 | .token.builtin { 93 | color: #cc99cd; 94 | } 95 | 96 | .token.string, 97 | .token.char, 98 | .token.attr-value, 99 | .token.regex, 100 | .token.variable { 101 | color: #7ec699; 102 | } 103 | 104 | .token.operator, 105 | .token.entity, 106 | .token.url { 107 | color: #67cdcc; 108 | } 109 | 110 | .token.important, 111 | .token.bold { 112 | font-weight: bold; 113 | } 114 | .token.italic { 115 | font-style: italic; 116 | } 117 | 118 | .token.entity { 119 | cursor: help; 120 | } 121 | 122 | .token.inserted { 123 | color: green; 124 | } 125 | 126 | pre[class*="language-"].line-numbers { 127 | position: relative; 128 | padding-left: 3.8em; 129 | counter-reset: linenumber; 130 | } 131 | 132 | pre[class*="language-"].line-numbers > code { 133 | position: relative; 134 | white-space: inherit; 135 | } 136 | 137 | .line-numbers .line-numbers-rows { 138 | position: absolute; 139 | pointer-events: none; 140 | top: 0; 141 | font-size: 100%; 142 | left: -3.8em; 143 | width: 3em; /* works for line-numbers below 1000 lines */ 144 | letter-spacing: -1px; 145 | border-right: 1px solid #999; 146 | 147 | -webkit-user-select: none; 148 | -moz-user-select: none; 149 | -ms-user-select: none; 150 | user-select: none; 151 | 152 | } 153 | 154 | .line-numbers-rows > span { 155 | display: block; 156 | counter-increment: linenumber; 157 | } 158 | 159 | .line-numbers-rows > span:before { 160 | content: counter(linenumber); 161 | color: #999; 162 | display: block; 163 | padding-right: 0.8em; 164 | text-align: right; 165 | } 166 | 167 | div.code-toolbar { 168 | position: relative; 169 | } 170 | 171 | div.code-toolbar > .toolbar { 172 | position: absolute; 173 | top: .3em; 174 | right: .2em; 175 | transition: opacity 0.3s ease-in-out; 176 | opacity: 0; 177 | } 178 | 179 | div.code-toolbar:hover > .toolbar { 180 | opacity: 1; 181 | } 182 | 183 | /* Separate line b/c rules are thrown out if selector is invalid. 184 | IE11 and old Edge versions don't support :focus-within. */ 185 | div.code-toolbar:focus-within > .toolbar { 186 | opacity: 1; 187 | } 188 | 189 | div.code-toolbar > .toolbar .toolbar-item { 190 | display: inline-block; 191 | } 192 | 193 | div.code-toolbar > .toolbar a { 194 | cursor: pointer; 195 | } 196 | 197 | div.code-toolbar > .toolbar button { 198 | background: none; 199 | border: 0; 200 | color: inherit; 201 | font: inherit; 202 | line-height: normal; 203 | overflow: visible; 204 | padding: 0; 205 | -webkit-user-select: none; /* for button */ 206 | -moz-user-select: none; 207 | -ms-user-select: none; 208 | } 209 | 210 | div.code-toolbar > .toolbar a, 211 | div.code-toolbar > .toolbar button, 212 | div.code-toolbar > .toolbar span { 213 | color: #bbb; 214 | font-size: .8em; 215 | padding: 0 .5em; 216 | background: #f5f2f0; 217 | background: rgba(224, 224, 224, 0.2); 218 | box-shadow: 0 2px 0 0 rgba(0,0,0,0.2); 219 | border-radius: .5em; 220 | } 221 | 222 | div.code-toolbar > .toolbar a:hover, 223 | div.code-toolbar > .toolbar a:focus, 224 | div.code-toolbar > .toolbar button:hover, 225 | div.code-toolbar > .toolbar button:focus, 226 | div.code-toolbar > .toolbar span:hover, 227 | div.code-toolbar > .toolbar span:focus { 228 | color: inherit; 229 | text-decoration: none; 230 | } 231 | 232 | .token.punctuation.brace-hover, 233 | .token.punctuation.brace-selected { 234 | outline: solid 1px; 235 | } 236 | 237 | .rainbow-braces .token.punctuation.brace-level-1, 238 | .rainbow-braces .token.punctuation.brace-level-5, 239 | .rainbow-braces .token.punctuation.brace-level-9 { 240 | color: #E50; 241 | opacity: 1; 242 | } 243 | .rainbow-braces .token.punctuation.brace-level-2, 244 | .rainbow-braces .token.punctuation.brace-level-6, 245 | .rainbow-braces .token.punctuation.brace-level-10 { 246 | color: #0B3; 247 | opacity: 1; 248 | } 249 | .rainbow-braces .token.punctuation.brace-level-3, 250 | .rainbow-braces .token.punctuation.brace-level-7, 251 | .rainbow-braces .token.punctuation.brace-level-11 { 252 | color: #26F; 253 | opacity: 1; 254 | } 255 | .rainbow-braces .token.punctuation.brace-level-4, 256 | .rainbow-braces .token.punctuation.brace-level-8, 257 | .rainbow-braces .token.punctuation.brace-level-12 { 258 | color: #E0E; 259 | opacity: 1; 260 | } 261 | 262 | -------------------------------------------------------------------------------- /static/css/theme_default/viewer.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Viewer.js v1.10.0 3 | * https://fengyuanchen.github.io/viewerjs 4 | * 5 | * Copyright 2015-present Chen Fengyuan 6 | * Released under the MIT license 7 | * 8 | * Date: 2021-06-12T07:57:06.776Z 9 | */.viewer-close:before,.viewer-flip-horizontal:before,.viewer-flip-vertical:before,.viewer-fullscreen-exit:before,.viewer-fullscreen:before,.viewer-next:before,.viewer-one-to-one:before,.viewer-play:before,.viewer-prev:before,.viewer-reset:before,.viewer-rotate-left:before,.viewer-rotate-right:before,.viewer-zoom-in:before,.viewer-zoom-out:before{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARgAAAAUCAYAAABWOyJDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAQPSURBVHic7Zs/iFxVFMa/0U2UaJGksUgnIVhYxVhpjDbZCBmLdAYECxsRFBTUamcXUiSNncgKQbSxsxH8gzAP3FU2jY0kKKJNiiiIghFlccnP4p3nPCdv3p9778vsLOcHB2bfveeb7955c3jvvNkBIMdxnD64a94GHMfZu3iBcRynN7zAOI7TG15gHCeeNUkr8zaxG2lbYDYsdgMbktBsP03jdQwljSXdtBhLOmtjowC9Mg9L+knSlcD8TNKpSA9lBpK2JF2VdDSR5n5J64m0qli399hNFMUlpshQii5jbXTbHGviB0nLNeNDSd9VO4A2UdB2fp+x0eCnaXxWXGA2X0au/3HgN9P4LFCjIANOJdrLr0zzZ+BEpNYDwKbpnQMeAw4m8HjQtM6Z9qa917zPQwFr3M5KgA6J5rTJCdFZJj9/lyvGhsDvwFNVuV2MhhjrK6b9bFiE+j1r87eBl4HDwCF7/U/k+ofAX5b/EXBv5JoLMuILzf3Ap6Z3EzgdqHMCuF7hcQf4HDgeoHnccncqdK/TvSDWffFXI/exICY/xZyqc6XLWF1UFZna4gJ7q8BsRvgd2/xXpo6P+D9dfT7PpECtA3cnWPM0GXGFZh/wgWltA+cDNC7X+AP4GzjZQe+k5dRxuYPeiuXU7e1qwLpDz7dFjXKRaSwuMLvAlG8zZlG+YmiK1HoFqT7wP2z+4Q45TfEGcMt01xLoNZEBTwRqD4BLpnMLeC1A41UmVxsXgXeBayV/Wx20rpTyrpnWRft7p6O/FdqzGrDukPNtkaMoMo3FBdBSQMOnYBCReyf05s126fU9ytfX98+mY54Kxnp7S9K3kj6U9KYdG0h6UdLbkh7poFXMfUnSOyVvL0h6VtIXHbS6nOP+s/Zm9mvyXW1uuC9ohZ72E9uDmXWLJOB1GxsH+DxPftsB8B6wlGDN02TAkxG6+4D3TWsbeC5CS8CDFce+AW500LhhOW2020TRjK3b21HEmgti9m0RonxbdMZeVzV+/4tF3cBpP7E9mKHNL5q8h5g0eYsCMQz0epq8gQrwMXAgcs0FGXGFRcB9wCemF9PkbYqM/Bas7fxLwNeJPdTdpo4itQti8lPMqTpXuozVRVXPpbHI3KkNTB1NfkL81j2mvhDp91HgV9MKuRIqrykj3WPq4rHyL+axj8/qGPmTqi6F9YDlHOvJU6oYcTsh/TYSzWmTE6JT19CtLTJt32D6CmHe0eQn1O8z5AXgT4sx4Vcu0/EQecMydB8z0hUWkTd2t4CrwNEePqMBcAR4mrBbwyXLPWJa8zrXmmLEhNBmfpkuY2102xxrih+pb+ieAb6vGhuA97UcJ5KR8gZ77K+99xxeYBzH6Q3/Z0fHcXrDC4zjOL3hBcZxnN74F+zlvXFWXF9PAAAAAElFTkSuQmCC");background-repeat:no-repeat;background-size:280px;color:transparent;display:block;font-size:0;height:20px;line-height:0;width:20px}.viewer-zoom-in:before{background-position:0 0;content:"Zoom In"}.viewer-zoom-out:before{background-position:-20px 0;content:"Zoom Out"}.viewer-one-to-one:before{background-position:-40px 0;content:"One to One"}.viewer-reset:before{background-position:-60px 0;content:"Reset"}.viewer-prev:before{background-position:-80px 0;content:"Previous"}.viewer-play:before{background-position:-100px 0;content:"Play"}.viewer-next:before{background-position:-120px 0;content:"Next"}.viewer-rotate-left:before{background-position:-140px 0;content:"Rotate Left"}.viewer-rotate-right:before{background-position:-160px 0;content:"Rotate Right"}.viewer-flip-horizontal:before{background-position:-180px 0;content:"Flip Horizontal"}.viewer-flip-vertical:before{background-position:-200px 0;content:"Flip Vertical"}.viewer-fullscreen:before{background-position:-220px 0;content:"Enter Full Screen"}.viewer-fullscreen-exit:before{background-position:-240px 0;content:"Exit Full Screen"}.viewer-close:before{background-position:-260px 0;content:"Close"}.viewer-container{-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;bottom:0;direction:ltr;font-size:0;left:0;line-height:0;overflow:hidden;position:absolute;right:0;top:0;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.viewer-container::-moz-selection,.viewer-container ::-moz-selection{background-color:transparent}.viewer-container::selection,.viewer-container ::selection{background-color:transparent}.viewer-container:focus{outline:0}.viewer-container img{display:block;height:auto;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.viewer-canvas{bottom:0;left:0;overflow:hidden;position:absolute;right:0;top:0}.viewer-canvas>img{height:auto;margin:15px auto;max-width:90%!important;width:auto}.viewer-footer{bottom:0;left:0;overflow:hidden;position:absolute;right:0;text-align:center}.viewer-navbar{background-color:rgba(0,0,0,.5);overflow:hidden}.viewer-list{-webkit-box-sizing:content-box;box-sizing:content-box;height:50px;margin:0;overflow:hidden;padding:1px 0}.viewer-list>li{color:transparent;cursor:pointer;float:left;font-size:0;height:50px;line-height:0;opacity:.5;overflow:hidden;-webkit-transition:opacity .15s;transition:opacity .15s;width:30px}.viewer-list>li:focus,.viewer-list>li:hover{opacity:.75}.viewer-list>li:focus{outline:0}.viewer-list>li+li{margin-left:1px}.viewer-list>.viewer-loading{position:relative}.viewer-list>.viewer-loading:after{border-width:2px;height:20px;margin-left:-10px;margin-top:-10px;width:20px}.viewer-list>.viewer-active,.viewer-list>.viewer-active:focus,.viewer-list>.viewer-active:hover{opacity:1}.viewer-player{background-color:#000;bottom:0;cursor:none;display:none;right:0;z-index:1}.viewer-player,.viewer-player>img{left:0;position:absolute;top:0}.viewer-toolbar>ul{display:inline-block;margin:0 auto 5px;overflow:hidden;padding:6px 3px}.viewer-toolbar>ul>li{background-color:rgba(0,0,0,.5);border-radius:50%;cursor:pointer;float:left;height:24px;overflow:hidden;-webkit-transition:background-color .15s;transition:background-color .15s;width:24px}.viewer-toolbar>ul>li:focus,.viewer-toolbar>ul>li:hover{background-color:rgba(0,0,0,.8)}.viewer-toolbar>ul>li:focus{-webkit-box-shadow:0 0 3px #fff;box-shadow:0 0 3px #fff;outline:0;position:relative;z-index:1}.viewer-toolbar>ul>li:before{margin:2px}.viewer-toolbar>ul>li+li{margin-left:1px}.viewer-toolbar>ul>.viewer-small{height:18px;margin-bottom:3px;margin-top:3px;width:18px}.viewer-toolbar>ul>.viewer-small:before{margin:-1px}.viewer-toolbar>ul>.viewer-large{height:30px;margin-bottom:-3px;margin-top:-3px;width:30px}.viewer-toolbar>ul>.viewer-large:before{margin:5px}.viewer-tooltip{background-color:rgba(0,0,0,.8);border-radius:10px;color:#fff;display:none;font-size:12px;height:20px;left:50%;line-height:20px;margin-left:-25px;margin-top:-10px;position:absolute;text-align:center;top:50%;width:50px}.viewer-title{color:#ccc;display:inline-block;font-size:12px;line-height:1;margin:0 5% 5px;max-width:90%;opacity:.8;overflow:hidden;text-overflow:ellipsis;-webkit-transition:opacity .15s;transition:opacity .15s;white-space:nowrap}.viewer-title:hover{opacity:1}.viewer-button{background-color:rgba(0,0,0,.5);border-radius:50%;cursor:pointer;height:80px;overflow:hidden;position:absolute;right:-40px;top:-40px;-webkit-transition:background-color .15s;transition:background-color .15s;width:80px}.viewer-button:focus,.viewer-button:hover{background-color:rgba(0,0,0,.8)}.viewer-button:focus{-webkit-box-shadow:0 0 3px #fff;box-shadow:0 0 3px #fff;outline:0}.viewer-button:before{bottom:15px;left:15px;position:absolute}.viewer-fixed{position:fixed}.viewer-open{overflow:hidden}.viewer-show{display:block}.viewer-hide{display:none}.viewer-backdrop{background-color:rgba(0,0,0,.5)}.viewer-invisible{visibility:hidden}.viewer-move{cursor:move;cursor:-webkit-grab;cursor:grab}.viewer-fade{opacity:0}.viewer-in{opacity:1}.viewer-transition{-webkit-transition:all .3s;transition:all .3s}@-webkit-keyframes viewer-spinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes viewer-spinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.viewer-loading:after{-webkit-animation:viewer-spinner 1s linear infinite;animation:viewer-spinner 1s linear infinite;border:4px solid hsla(0,0%,100%,.1);border-left-color:hsla(0,0%,100%,.5);border-radius:50%;content:"";display:inline-block;height:40px;left:50%;margin-left:-20px;margin-top:-20px;position:absolute;top:50%;width:40px;z-index:1}@media (max-width:767px){.viewer-hide-xs-down{display:none}}@media (max-width:991px){.viewer-hide-sm-down{display:none}}@media (max-width:1199px){.viewer-hide-md-down{display:none}} -------------------------------------------------------------------------------- /404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | PyTrackersList 22 | 23 | 24 | 67 | 68 | 69 | 70 | 71 | 72 | 106 | 107 |
108 |
109 |
110 | 111 | 112 |

404 页面未找到

113 | 114 | 115 | 116 | 117 | 118 |
119 | 返回上一页 首页 120 |
121 | 130 | 131 | 132 |
133 |
134 | 135 | 155 |
156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | -------------------------------------------------------------------------------- /static/css/search/style.css: -------------------------------------------------------------------------------- 1 | /** 2 | teedoc search plugin css 3 | @author neucrack 4 | @copyright (c) neucrack CZD666666@gmail.com with MIT License 5 | @changes 2021.2.1 add basic attrributes 6 | */ 7 | .blur { 8 | -webkit-filter: blur(9px); 9 | filter: blur(9px); 10 | } 11 | .pointer { 12 | cursor: pointer; 13 | } 14 | .dark #search { 15 | background-color: #2d2d2d; 16 | } 17 | #search { 18 | border-radius: 2em; 19 | background-color: #f1f1f1; 20 | display: flex; 21 | flex-direction: row; 22 | justify-content: center; 23 | align-items: center; 24 | transition: 0.4s; 25 | } 26 | 27 | #search .icon { 28 | transition: transform 0.4s linear; 29 | background: url("/TrackersList/static/image/search/search.svg"); 30 | background-size: contain; 31 | background-repeat: no-repeat; 32 | background-position: center; 33 | align-self: center; 34 | min-height: 1.8rem; 35 | min-width: 1.8rem; 36 | transition: 0.2s; 37 | } 38 | #search .placeholder { 39 | padding: 0 1em; 40 | color: #a5a5a5; 41 | } 42 | #search_hints { 43 | display: none; 44 | } 45 | 46 | #search_wrapper { 47 | display: none; 48 | position: fixed; 49 | top: 0; 50 | bottom: 0; 51 | left: 0; 52 | right: 0; 53 | background-color: rgba(0, 0, 0, 0.73); 54 | z-index: 100; 55 | } 56 | .dark #search_wrapper { 57 | background-color: transparent; 58 | } 59 | #search_wrapper input:focus{ 60 | outline: none; 61 | border: 1px solid #58b195; 62 | } 63 | #search_wrapper .close { 64 | background: url("/TrackersList/static/image/search/close.svg"); 65 | background-size: contain; 66 | background-repeat: no-repeat; 67 | background-position: center; 68 | border-radius: 0.5em; 69 | min-height: 2.5rem; 70 | min-width: 2.5rem; 71 | z-index: 100; 72 | position: fixed; 73 | top: 3em; 74 | right: 3em; 75 | cursor: pointer; 76 | } 77 | #search_title { 78 | margin: 1em; 79 | } 80 | #search_wrapper #search_title > div { 81 | display: flex; 82 | flex-direction: row; 83 | justify-content: center; 84 | } 85 | #search_wrapper input { 86 | height: 60px; 87 | width: 60%; 88 | border: none; 89 | border-radius: 0.5em; 90 | margin: 0; 91 | text-align: center; 92 | color: #222222; 93 | font-size: 1.2em; 94 | display: inline-block; 95 | box-shadow: 0 0 12px 0 #e8e8e8; 96 | } 97 | .dark #search_wrapper input { 98 | box-shadow: 0 0 12px 0 #000000; 99 | background-color: black; 100 | color: white; 101 | } 102 | #search_wrapper > div { 103 | display: flex; 104 | height: 100%; 105 | } 106 | #search_wrapper #search_content { 107 | display: flex; 108 | flex-direction: column; 109 | width: 75%; 110 | height: 100%; 111 | background-color: white; 112 | margin: auto; 113 | padding: 0; 114 | border-radius: 0.5em; 115 | } 116 | .dark #search_wrapper #search_content { 117 | background-color: #3c3c3c; 118 | } 119 | #search_result { 120 | height: 100%; 121 | display: flex; 122 | flex-direction: row; 123 | overflow: auto; 124 | } 125 | #search_result h1 { 126 | font-size: 1.2em; 127 | } 128 | #search_result_name { 129 | overflow-y: auto; 130 | min-width: max-content; 131 | } 132 | #search_result_content { 133 | overflow-y: auto; 134 | flex-grow: 1; 135 | } 136 | #search_result ul { 137 | padding-left: 0; 138 | list-style: none; 139 | } 140 | #search_result li { 141 | box-shadow: 0 0 10px #e0e0e0; 142 | list-style: none; 143 | padding: 1em; 144 | margin: 1em; 145 | border-radius: 0.5em; 146 | transition: 0.4s; 147 | background-color: white; 148 | } 149 | .dark #search_result li { 150 | background-color: #2d2d2d; 151 | box-shadow: 0 0 2px #000000; 152 | } 153 | #search_result #search_result_name li { 154 | margin: 0.5em 1em 0.5em 0; 155 | background: #4caf7d; 156 | color: white; 157 | border-radius: 0; 158 | } 159 | .dark #search_result #search_result_name li { 160 | background: #1b4c33; 161 | } 162 | #search_result #search_result_name li:hover { 163 | margin-right: 0; 164 | } 165 | #search_result li:hover { 166 | box-shadow: 0px 5px 14px #868686; 167 | } 168 | .dark #search_result li:hover{ 169 | box-shadow: 0px 5px 14px #1d1d1d; 170 | } 171 | 172 | #search_result code { 173 | background-color: #4caf7d; 174 | color: white; 175 | border-radius: 0.2em; 176 | padding: 0.1em; 177 | } 178 | #search_result .loading_hint { 179 | color: red; 180 | } 181 | #search_curr_result { 182 | margin-top: 0; 183 | padding-bottom: 3em; 184 | border: 1px solid #4caf7d; 185 | border-radius: 5px; 186 | } 187 | #search_others_result { 188 | padding-bottom: 3em; 189 | border: 1px solid #bdbdbd; 190 | border-radius: 5px; 191 | } 192 | .dark #search_curr_result { 193 | border: 1px solid #1b4c33; 194 | } 195 | .dark #search_others_result { 196 | border: 1px solid #696969; 197 | } 198 | #search_curr_result:first-child, 199 | #search_others_result:first-child { 200 | border-radius: 5px; 201 | } 202 | #search_result .hint { 203 | height: 2em; 204 | color: white; 205 | font-size: 1.5em; 206 | display: flex; 207 | justify-content: center; 208 | flex-direction: column; 209 | text-align: center; 210 | border-top: none; 211 | box-shadow: 0 6px 7px rgba(76, 175, 125, 0.38); 212 | background: #4caf7d; 213 | } 214 | .dark #search_result .hint { 215 | background: #1b4c33; 216 | } 217 | #search_curr_result > .hint { 218 | background-color: #4caf7d; 219 | } 220 | #search_curr_result .searching { 221 | background-color: #ff9800; 222 | } 223 | .search_highlight { 224 | background-color: #FFEB3B; 225 | border-radius: 0.2em; 226 | padding: 0.1em; 227 | 228 | } 229 | .dark .search_highlight{ 230 | color: #1b1b1b; 231 | } 232 | .selected_highlight { 233 | background-color: #ff9823; 234 | } 235 | 236 | #search_ctrl_btn { 237 | position: fixed; 238 | top: 2em; 239 | right: 1em; 240 | display: flex; 241 | flex-direction: row; 242 | z-index: 999; 243 | user-select: none; 244 | } 245 | #search_ctrl_btn > div { 246 | border-radius: 0.2em; 247 | min-width: 5em; 248 | min-height: 2.5em; 249 | background-color: #fae94e; 250 | margin: 0.2em; 251 | display: flex; 252 | flex-direction: row; 253 | align-items: center; 254 | justify-content: center; 255 | padding: 0.2em; 256 | cursor: pointer; 257 | box-shadow: 0 0 12px 0 rgb(0, 0, 0, 0.06); 258 | transition: 0.4s; 259 | color: #8b7000; 260 | } 261 | #search_ctrl_btn > div:hover { 262 | box-shadow: 0 0 12px 0 rgb(0, 0, 0, 0.2); 263 | } 264 | #search_ctrl_btn > .previous .icon { 265 | background-image: url("/static/image/search/up.svg"); 266 | -ms-transform: rotate(270deg); 267 | -moz-transform: rotate(270deg); 268 | -webkit-transform: rotate(270deg); 269 | transform: rotate(270deg); 270 | background-size: 2em; 271 | background-repeat: no-repeat; 272 | background-position: center; 273 | min-height: 1.5em; 274 | min-width: 1.5em; 275 | height: 1.5em; 276 | width: 1.5em; 277 | } 278 | #search_ctrl_btn > .next .icon { 279 | background-image: url("/static/image/search/up.svg"); 280 | -ms-transform: rotate(90deg); 281 | -moz-transform: rotate(90deg); 282 | -webkit-transform: rotate(90deg); 283 | transform: rotate(90deg); 284 | background-size: 2em; 285 | background-repeat: no-repeat; 286 | background-position: center; 287 | min-height: 1.5em; 288 | min-width: 1.5em; 289 | height: 1.5em; 290 | width: 1.5em; 291 | } 292 | 293 | #remove_search > .icon { 294 | background-image: url("/static/image/search/cancel.svg"); 295 | background-size: 2em; 296 | background-repeat: no-repeat; 297 | background-position: center; 298 | min-height: 1.5em; 299 | min-width: 1.5em; 300 | height: 1.5em; 301 | width: 1.5em; 302 | } 303 | 304 | 305 | @media screen and (max-width: 900px) { 306 | #search_wrapper #search_content { 307 | width: 100%; 308 | height: 100%; 309 | border-radius: 0; 310 | } 311 | #search_wrapper input { 312 | font-size: 0.8em; 313 | } 314 | #search_wrapper .close { 315 | top: 1.5em; 316 | right: 1em; 317 | } 318 | #search_result li { 319 | margin: 0; 320 | } 321 | #search_result #search_result_name li { 322 | font-size: 0.8em; 323 | } 324 | #search_curr_result > .hint { 325 | font-size: 1.2em; 326 | } 327 | #search_result .hint { 328 | font-size: 1.2em; 329 | } 330 | } 331 | -------------------------------------------------------------------------------- /doc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | PyTrackersList - PyTrackersList 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 89 | 90 |
91 | 102 |
103 | 107 |
108 |
109 |
110 |
111 | 112 |

PyTrackersList

113 | 114 |
115 |
116 |
    117 | 118 |
119 |
120 |
121 |
122 | 125 | 126 | 129 | 130 |
131 |
132 | 133 |
134 |
135 |
136 |
137 | 138 | 139 |
140 |
141 | 142 |
143 |
144 | 145 |

什麽是 PyTrackersList?

146 |

PyTrackersList 是使用使用 Python 編寫的 PyTrackers 以及以 Github Actions 爲基礎運行的脚本程式,其目的是整理多個公開 Trackers 訂閲列表與一個訂閲列表中。

147 |

PyTrackersList 并不提供 Trackers,它只有整合作用。

148 |

如何使用?

149 |

PyTrackersList 的使用十分簡單,你只需要兩個鏈接,並將它們粘貼到你所使用的客戶端中就可以了。
150 | 這裏是 PyTrackers 提供的鏈接:

151 | 164 | 165 | 166 |
167 |
168 |
169 | 172 | 175 |
176 |
177 |
178 |
179 |
180 |
181 | 182 |
183 |
184 |
185 |
186 |
187 | 188 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | -------------------------------------------------------------------------------- /static/js/live.js: -------------------------------------------------------------------------------- 1 | /* 2 | Live.js - One script closer to Designing in the Browser 3 | Written for Handcraft.com by Martin Kool (@mrtnkl). 4 | 5 | Version 4. 6 | Recent change: Made stylesheet and mimetype checks case insensitive. 7 | 8 | http://livejs.com 9 | http://livejs.com/license (MIT) 10 | @livejs 11 | 12 | Include live.js#css to monitor css changes only. 13 | Include live.js#js to monitor js changes only. 14 | Include live.js#html to monitor html changes only. 15 | Mix and match to monitor a preferred combination such as live.js#html,css 16 | 17 | By default, just include live.js to monitor all css, js and html changes. 18 | 19 | Live.js can also be loaded as a bookmarklet. It is best to only use it for CSS then, 20 | as a page reload due to a change in html or css would not re-include the bookmarklet. 21 | To monitor CSS and be notified that it has loaded, include it as: live.js#css,notify 22 | */ 23 | (function () { 24 | 25 | var headers = { "Etag": 1, "Last-Modified": 1, "Content-Length": 1, "Content-Type": 1 }, 26 | resources = {}, 27 | pendingRequests = {}, 28 | currentLinkElements = {}, 29 | oldLinkElements = {}, 30 | interval = 1000, 31 | loaded = false, 32 | active = { "html": 1, "css": 1, "js": 1 }; 33 | 34 | var Live = { 35 | 36 | // performs a cycle per interval 37 | heartbeat: function () { 38 | if (document.body) { 39 | // make sure all resources are loaded on first activation 40 | if (!loaded) Live.loadresources(); 41 | Live.checkForChanges(); 42 | } 43 | setTimeout(Live.heartbeat, interval); 44 | }, 45 | 46 | // loads all local css and js resources upon first activation 47 | loadresources: function () { 48 | 49 | // helper method to assert if a given url is local 50 | function isLocal(url) { 51 | var loc = document.location, 52 | reg = new RegExp("^\\.|^\/(?!\/)|^[\\w]((?!://).)*$|" + loc.protocol + "//" + loc.host); 53 | return url.match(reg); 54 | } 55 | 56 | // gather all resources 57 | var scripts = document.getElementsByTagName("script"), 58 | links = document.getElementsByTagName("link"), 59 | uris = []; 60 | 61 | // track local js urls 62 | for (var i = 0; i < scripts.length; i++) { 63 | var script = scripts[i], src = script.getAttribute("src"); 64 | if (src && isLocal(src)) 65 | uris.push(src); 66 | if (src && src.match(/\blive.js#/)) { 67 | for (var type in active) 68 | active[type] = src.match("[#,|]" + type) != null 69 | if (src.match("notify")) 70 | alert("Live.js is loaded."); 71 | } 72 | } 73 | if (!active.js) uris = []; 74 | if (active.html) uris.push(document.location.href); 75 | 76 | // track local css urls 77 | for (var i = 0; i < links.length && active.css; i++) { 78 | var link = links[i], rel = link.getAttribute("rel"), href = link.getAttribute("href", 2); 79 | if (href && rel && rel.match(new RegExp("stylesheet", "i")) && isLocal(href)) { 80 | uris.push(href); 81 | currentLinkElements[href] = link; 82 | } 83 | } 84 | 85 | // initialize the resources info 86 | for (var i = 0; i < uris.length; i++) { 87 | var url = uris[i]; 88 | Live.getHead(url, function (url, info) { 89 | resources[url] = info; 90 | }); 91 | } 92 | 93 | // add rule for morphing between old and new css files 94 | var head = document.getElementsByTagName("head")[0], 95 | style = document.createElement("style"), 96 | rule = "transition: all .3s ease-out;" 97 | css = [".livejs-loading * { ", rule, " -webkit-", rule, "-moz-", rule, "-o-", rule, "}"].join(''); 98 | style.setAttribute("type", "text/css"); 99 | head.appendChild(style); 100 | style.styleSheet ? style.styleSheet.cssText = css : style.appendChild(document.createTextNode(css)); 101 | 102 | // yep 103 | loaded = true; 104 | }, 105 | 106 | // check all tracking resources for changes 107 | checkForChanges: function () { 108 | for (var url in resources) { 109 | if (pendingRequests[url]) 110 | continue; 111 | 112 | Live.getHead(url, function (url, newInfo) { 113 | var oldInfo = resources[url], 114 | hasChanged = false; 115 | resources[url] = newInfo; 116 | for (var header in oldInfo) { 117 | // do verification based on the header type 118 | var oldValue = oldInfo[header], 119 | newValue = newInfo[header], 120 | contentType = newInfo["Content-Type"]; 121 | switch (header.toLowerCase()) { 122 | case "etag": 123 | if (!newValue) break; 124 | // fall through to default 125 | default: 126 | hasChanged = oldValue != newValue; 127 | break; 128 | } 129 | // if changed, act 130 | if (hasChanged) { 131 | Live.refreshResource(url, contentType); 132 | break; 133 | } 134 | } 135 | }); 136 | } 137 | }, 138 | 139 | // act upon a changed url of certain content type 140 | refreshResource: function (url, type) { 141 | switch (type.toLowerCase()) { 142 | // css files can be reloaded dynamically by replacing the link element 143 | case "text/css": 144 | var link = currentLinkElements[url], 145 | html = document.body.parentNode, 146 | head = link.parentNode, 147 | next = link.nextSibling, 148 | newLink = document.createElement("link"); 149 | 150 | html.className = html.className.replace(/\s*livejs\-loading/gi, '') + ' livejs-loading'; 151 | newLink.setAttribute("type", "text/css"); 152 | newLink.setAttribute("rel", "stylesheet"); 153 | newLink.setAttribute("href", url + "?now=" + new Date() * 1); 154 | next ? head.insertBefore(newLink, next) : head.appendChild(newLink); 155 | currentLinkElements[url] = newLink; 156 | oldLinkElements[url] = link; 157 | 158 | // schedule removal of the old link 159 | Live.removeoldLinkElements(); 160 | break; 161 | 162 | // check if an html resource is our current url, then reload 163 | case "text/html": 164 | if (Live.removeArgsId(url) != Live.removeArgsId(document.location.href)) 165 | return; 166 | 167 | // local javascript changes cause a reload as well 168 | case "text/javascript": 169 | case "application/javascript": 170 | case "application/x-javascript": 171 | document.location.reload(); 172 | } 173 | }, 174 | 175 | // remove args and id in url 176 | removeArgsId: function(url){ 177 | var idx = url.indexOf("?"); 178 | if(idx >= 0){ 179 | url = url.substr(0, idx); 180 | } 181 | idx = url.indexOf("#"); 182 | if(idx >= 0){ 183 | url = url.substr(0, idx); 184 | } 185 | return url; 186 | }, 187 | 188 | // removes the old stylesheet rules only once the new one has finished loading 189 | removeoldLinkElements: function () { 190 | var pending = 0; 191 | for (var url in oldLinkElements) { 192 | // if this sheet has any cssRules, delete the old link 193 | try { 194 | var link = currentLinkElements[url], 195 | oldLink = oldLinkElements[url], 196 | html = document.body.parentNode, 197 | sheet = link.sheet || link.styleSheet, 198 | rules = sheet.rules || sheet.cssRules; 199 | if (rules.length >= 0) { 200 | oldLink.parentNode.removeChild(oldLink); 201 | delete oldLinkElements[url]; 202 | setTimeout(function () { 203 | html.className = html.className.replace(/\s*livejs\-loading/gi, ''); 204 | }, 100); 205 | } 206 | } catch (e) { 207 | pending++; 208 | } 209 | if (pending) setTimeout(Live.removeoldLinkElements, 50); 210 | } 211 | }, 212 | 213 | // performs a HEAD request and passes the header info to the given callback 214 | getHead: function (url, callback) { 215 | pendingRequests[url] = true; 216 | var xhr = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XmlHttp"); 217 | xhr.open("HEAD", url, true); 218 | xhr.onreadystatechange = function () { 219 | delete pendingRequests[url]; 220 | if (xhr.readyState == 4 && xhr.status != 304) { 221 | xhr.getAllResponseHeaders(); 222 | var info = {}; 223 | for (var h in headers) { 224 | var value = xhr.getResponseHeader(h); 225 | // adjust the simple Etag variant to match on its significant part 226 | if (h.toLowerCase() == "etag" && value) value = value.replace(/^W\//, ''); 227 | if (h.toLowerCase() == "content-type" && value) value = value.replace(/^(.*?);.*?$/i, "$1"); 228 | info[h] = value; 229 | } 230 | callback(url, info); 231 | } 232 | } 233 | xhr.send(); 234 | } 235 | }; 236 | 237 | // start listening 238 | if (document.location.protocol != "file:") { 239 | if (!window.liveJsLoaded) 240 | Live.heartbeat(); 241 | 242 | window.liveJsLoaded = true; 243 | } 244 | else if (window.console) 245 | console.log("Live.js doesn't support the file protocol. It needs http."); 246 | })(); 247 | -------------------------------------------------------------------------------- /static/js/theme_default/tocbot.min.js: -------------------------------------------------------------------------------- 1 | (()=>{var e={163:e=>{e.exports=function(e){var t=[].forEach,n=[].some,o=document.body,l=!0,r=" ";function i(n,o){var l,c,a,u=o.appendChild((l=n,c=document.createElement("li"),a=document.createElement("a"),e.listItemClass&&c.setAttribute("class",e.listItemClass),e.onClick&&(a.onclick=e.onClick),e.includeTitleTags&&a.setAttribute("title",l.textContent),e.includeHtml&&l.childNodes.length?t.call(l.childNodes,(function(e){a.appendChild(e.cloneNode(!0))})):a.textContent=l.textContent,a.setAttribute("href",e.basePath+"#"+l.id),a.setAttribute("class",e.linkClass+r+"node-name--"+l.nodeName+r+e.extraLinkClasses),c.appendChild(a),c));if(n.children.length){var d=s(n.isCollapsed);n.children.forEach((function(e){i(e,d)})),u.appendChild(d)}}function s(t){var n=e.orderedList?"ol":"ul",o=document.createElement(n),l=e.listClass+r+e.extraListClasses;return t&&(l+=r+e.collapsibleClass,l+=r+e.isCollapsedClass),o.setAttribute("class",l),o}function c(t){var n=0;return t!==document.querySelector(e.contentSelector&&null!=t)&&(n=t.offsetTop,e.hasInnerContainers&&(n+=c(t.offsetParent))),n}function a(t){return t&&-1!==t.className.indexOf(e.collapsibleClass)&&-1!==t.className.indexOf(e.isCollapsedClass)?(t.className=t.className.split(r+e.isCollapsedClass).join(""),a(t.parentNode.parentNode)):t}return{enableTocAnimation:function(){l=!0},disableTocAnimation:function(t){var n=t.target||t.srcElement;"string"==typeof n.className&&-1!==n.className.indexOf(e.linkClass)&&(l=!1)},render:function(e,t){var n=s(!1);if(t.forEach((function(e){i(e,n)})),null!==e)return e.firstChild&&e.removeChild(e.firstChild),0===t.length?e:e.appendChild(n)},updateToc:function(i){var s;s=e.scrollContainer&&document.querySelector(e.scrollContainer)?document.querySelector(e.scrollContainer).scrollTop:document.documentElement.scrollTop||o.scrollTop,e.positionFixedSelector&&function(){var t;t=e.scrollContainer&&document.querySelector(e.scrollContainer)?document.querySelector(e.scrollContainer).scrollTop:document.documentElement.scrollTop||o.scrollTop;var n=document.querySelector(e.positionFixedSelector);"auto"===e.fixedSidebarOffset&&(e.fixedSidebarOffset=document.querySelector(e.tocSelector).offsetTop),t>e.fixedSidebarOffset?-1===n.className.indexOf(e.positionFixedClass)&&(n.className+=r+e.positionFixedClass):n.className=n.className.split(r+e.positionFixedClass).join("")}();var u,d=i;if(l&&null!==document.querySelector(e.tocSelector)&&d.length>0){n.call(d,(function(t,n){return c(t)>s+e.headingsOffset+10?(u=d[0===n?n:n-1],!0):n===d.length-1?(u=d[d.length-1],!0):void 0}));var f=document.querySelector(e.tocSelector).querySelectorAll("."+e.linkClass);t.call(f,(function(t){t.className=t.className.split(r+e.activeLinkClass).join("")}));var m=document.querySelector(e.tocSelector).querySelectorAll("."+e.listItemClass);t.call(m,(function(t){t.className=t.className.split(r+e.activeListItemClass).join("")}));var h=document.querySelector(e.tocSelector).querySelector("."+e.linkClass+".node-name--"+u.nodeName+'[href="'+e.basePath+"#"+u.id.replace(/([ #;&,.+*~':"!^$[\]()=>|/@])/g,"\\$1")+'"]');h&&-1===h.className.indexOf(e.activeLinkClass)&&(h.className+=r+e.activeLinkClass);var p=h&&h.parentNode;p&&-1===p.className.indexOf(e.activeListItemClass)&&(p.className+=r+e.activeListItemClass);var C=document.querySelector(e.tocSelector).querySelectorAll("."+e.listClass+"."+e.collapsibleClass);t.call(C,(function(t){-1===t.className.indexOf(e.isCollapsedClass)&&(t.className+=r+e.isCollapsedClass)})),h&&h.nextSibling&&-1!==h.nextSibling.className.indexOf(e.isCollapsedClass)&&(h.nextSibling.className=h.nextSibling.className.split(r+e.isCollapsedClass).join("")),a(h&&h.parentNode.parentNode)}}}}},547:e=>{e.exports={tocSelector:".js-toc",contentSelector:".js-toc-content",headingSelector:"h1, h2, h3",ignoreSelector:".js-toc-ignore",hasInnerContainers:!1,linkClass:"toc-link",extraLinkClasses:"",activeLinkClass:"is-active-link",listClass:"toc-list",extraListClasses:"",isCollapsedClass:"is-collapsed",collapsibleClass:"is-collapsible",listItemClass:"toc-list-item",activeListItemClass:"is-active-li",collapseDepth:0,scrollSmooth:!0,scrollSmoothDuration:420,scrollSmoothOffset:0,scrollEndCallback:function(e){},headingsOffset:1,throttleTimeout:50,positionFixedSelector:null,positionFixedClass:"is-position-fixed",fixedSidebarOffset:"auto",includeHtml:!1,includeTitleTags:!1,onClick:function(e){},orderedList:!0,scrollContainer:null,skipRendering:!1,headingLabelCallback:!1,ignoreHiddenElements:!1,headingObjectCallback:null,basePath:"",disableTocScrollSync:!1}},971:function(e,t,n){var o,l,r;l=[],o=function(e){"use strict";var t,o,l,r=n(547),i={},s={},c=n(163),a=n(279),u=n(938),d=!!(e&&e.document&&e.document.querySelector&&e.addEventListener);if("undefined"!=typeof window||d){var f=Object.prototype.hasOwnProperty;return s.destroy=function(){var e=h(i);null!==e&&(i.skipRendering||e&&(e.innerHTML=""),i.scrollContainer&&document.querySelector(i.scrollContainer)?(document.querySelector(i.scrollContainer).removeEventListener("scroll",this._scrollListener,!1),document.querySelector(i.scrollContainer).removeEventListener("resize",this._scrollListener,!1),t&&document.querySelector(i.scrollContainer).removeEventListener("click",this._clickListener,!1)):(document.removeEventListener("scroll",this._scrollListener,!1),document.removeEventListener("resize",this._scrollListener,!1),t&&document.removeEventListener("click",this._clickListener,!1)))},s.init=function(e){if(d){i=function(){for(var e={},t=0;t{e.exports=function(e){var t=[].reduce;function n(e){return e[e.length-1]}function o(e){return+e.nodeName.toUpperCase().replace("H","")}function l(t){if(!(t instanceof window.HTMLElement))return t;if(e.ignoreHiddenElements&&(!t.offsetHeight||!t.offsetParent))return null;const n=t.getAttribute("data-heading-label")||(e.headingLabelCallback?String(e.headingLabelCallback(t.textContent)):t.textContent.trim());var l={id:t.id,children:[],nodeName:t.nodeName,headingLevel:o(t),textContent:n};return e.includeHtml&&(l.childNodes=t.childNodes),e.headingObjectCallback?e.headingObjectCallback(l,t):l}return{nestHeadingsArray:function(o){return t.call(o,(function(t,o){var r=l(o);return r&&function(t,o){for(var r=l(t),i=r.headingLevel,s=o,c=n(s),a=i-(c?c.headingLevel:0);a>0&&(!(c=n(s))||i!==c.headingLevel);)c&&void 0!==c.children&&(s=c.children),a--;i>=e.collapseDepth&&(r.isCollapsed=!0),s.push(r)}(r,t.nest),t}),{nest:[]})},selectHeadings:function(t,n){var o=n;e.ignoreSelector&&(o=n.split(",").map((function(t){return t.trim()+":not("+e.ignoreSelector+")"})));try{return t.querySelectorAll(o)}catch(e){return console.warn("Headers not found with selector: "+o),null}}}}},374:(e,t)=>{t.initSmoothScrolling=function(e){var t=e.duration,n=e.offset,o=location.hash?l(location.href):location.href;function l(e){return e.slice(0,e.lastIndexOf("#"))}document.body.addEventListener("click",(function(r){var i;"a"!==(i=r.target).tagName.toLowerCase()||!(i.hash.length>0||"#"===i.href.charAt(i.href.length-1))||l(i.href)!==o&&l(i.href)+"#"!==o||r.target.className.indexOf("no-smooth-scroll")>-1||"#"===r.target.href.charAt(r.target.href.length-2)&&"!"===r.target.href.charAt(r.target.href.length-1)||-1===r.target.className.indexOf(e.linkClass)||function(e,t){var n,o,l=window.pageYOffset,r={duration:t.duration,offset:t.offset||0,callback:t.callback,easing:t.easing||function(e,t,n,o){return(e/=o/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t}},i=document.querySelector('[id="'+decodeURI(e).split("#").join("")+'"]')||document.querySelector('[id="'+e.split("#").join("")+'"]'),s="string"==typeof e?r.offset+(e?i&&i.getBoundingClientRect().top||0:-(document.documentElement.scrollTop||document.body.scrollTop)):e,c="function"==typeof r.duration?r.duration(s):r.duration;function a(e){o=e-n,window.scrollTo(0,r.easing(o,l,s,c)),o{e.exports=function(e){var t=document.querySelector(e.tocSelector);if(t&&t.scrollHeight>t.clientHeight){var n=t.querySelector("."+e.activeListItemClass);n&&(t.scrollTop=n.offsetTop)}}}},t={};function n(o){var l=t[o];if(void 0!==l)return l.exports;var r=t[o]={exports:{}};return e[o].call(r.exports,r,r.exports,n),r.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n(971)})(); -------------------------------------------------------------------------------- /static/js/search/search_main.js: -------------------------------------------------------------------------------- 1 | 2 | jQuery.fn.highlight = function (pat) { 3 | function innerHighlight(node, pat) { 4 | var skip = 0; 5 | if (node.nodeType == 3) { 6 | var pos = node.data.toUpperCase().indexOf(pat); 7 | if (pos >= 0) { 8 | var spannode = document.createElement('span'); 9 | spannode.className = 'search_highlight'; 10 | var middlebit = node.splitText(pos); 11 | var endbit = middlebit.splitText(pat.length); 12 | var middleclone = middlebit.cloneNode(true); 13 | spannode.appendChild(middleclone); 14 | middlebit.parentNode.replaceChild(spannode, middlebit); 15 | skip = 1; 16 | } 17 | } 18 | else if (node.nodeType == 1 && node.childNodes && !/(script|style)/i.test(node.tagName)) { 19 | for (var i = 0; i < node.childNodes.length; ++i) { 20 | i += innerHighlight(node.childNodes[i], pat); 21 | } 22 | } 23 | return skip; 24 | } 25 | return this.each(function () { 26 | innerHighlight(this, pat.toUpperCase()); 27 | }); 28 | }; 29 | 30 | window.onload = function(){ 31 | } 32 | 33 | $(document).ready(function(){ 34 | var waiting_search = false; 35 | var search_index = null; 36 | var search_content = { 37 | "curr": null, 38 | "others":{} 39 | } 40 | function onDownloadOk(data, arg1, arg2){ 41 | search_index = data; 42 | var pathname = window.location.pathname; 43 | var curr_url = null; 44 | var others_url = []; 45 | for(var url in search_index){ 46 | if(pathname.indexOf(url) != -1){ 47 | if(!curr_url){ 48 | curr_url = url; 49 | }else{ // already have math item, e.g. `/get_started/zh/install/index.html /get_started/zh` 50 | // and now `/get_started/zh/install/index.html /` 51 | // choose longger one 52 | if(url.length > curr_url.length){ 53 | others_url.push(curr_url); 54 | curr_url = url; 55 | }else{ 56 | others_url.push(url); 57 | } 58 | } 59 | }else{ 60 | others_url.push(url); 61 | } 62 | } 63 | if(search_index[curr_url]){ 64 | downloadJson(search_index[curr_url][1], onIndexDownloadOk, curr_url, true, search_index[curr_url][0]); 65 | } 66 | for(var i in others_url){ 67 | url = others_url[i]; 68 | downloadJson(search_index[url][1], onIndexDownloadOk, url, false, search_index[url][0]); 69 | } 70 | } 71 | function onIndexDownloadOk(data, url, is_curr, doc_name){ 72 | if(is_curr){ 73 | search_content["curr"] = [url, doc_name, data]; 74 | }else{ 75 | search_content["others"][url] = [url, doc_name, data]; 76 | } 77 | if(waiting_search == true){ 78 | waiting_search = false; 79 | onSearch(); 80 | } 81 | } 82 | downloadJson("/TrackersList/static/search_index/index.json", onDownloadOk); 83 | var input_hint = $("#search_input_hint").html(); 84 | var loading_hint = $("#search_loading_hint").html(); 85 | var download_err_hint = $("#search_download_err_hint").html(); 86 | var other_docs_result_hint = $("#search_other_docs_result_hint").html(); 87 | var curr_doc_result_hint = $("#search_curr_doc_result_hint").html(); 88 | $("body").append('
\ 89 |
\ 90 |
\ 91 |
\ 92 |
\ 93 | \ 94 |
\ 95 |
\ 96 |
\ 97 |
\ 98 |
\ 99 |
\ 100 |
\ 101 |
'); 102 | $("#search").bind("click", function(e){ 103 | $("body").css("overflow-y", "hidden"); 104 | $("#search_wrapper").show(); 105 | $("#search_input").focus(); 106 | $("#wrapper").addClass("blur"); 107 | $("#navbar").addClass("blur"); 108 | }); 109 | $("#search_wrapper .close").bind("click", function(e){ 110 | $("body").css("overflow-y", "auto"); 111 | $("#search_wrapper").hide(); 112 | $("#wrapper").removeClass("blur"); 113 | $("#navbar").removeClass("blur"); 114 | }); 115 | $("#search_input").bind("input propertychange", function(){ 116 | setTimeout(() => { 117 | onSearch(); 118 | }, 1000); 119 | }); 120 | function onSearch(){ 121 | $("#search_result_name").empty(); 122 | $("#search_result_content").empty(); 123 | $("#search_result_content").append('
    '+ curr_doc_result_hint +'
'); 124 | $("#search_result_content").append('
    '+ other_docs_result_hint +'
'); 125 | if(!search_index){ 126 | $("#search_result_content").append('
'+ loading_hint +'
'); 127 | waiting_search = true; 128 | return; 129 | } 130 | if(!search_content["curr"] && search_content["others"].length == 0){ 131 | $("#search_result_content").append('
'+ loading_hint +'
'); 132 | waiting_search = true; 133 | return; 134 | } 135 | $("#search_curr_result > .hint").addClass("searching"); 136 | var search_keywords = $("#search_input").val(); 137 | search_doc(search_content["curr"], "#search_curr_result"); 138 | var doc_id = 0; 139 | for(var url in search_content["others"]){ 140 | search_doc(search_content["others"][url], "#search_others_result", doc_id); 141 | doc_id += 1; 142 | } 143 | addSearchResultClickListener(); 144 | function search_doc(data, containerId, doc_id="curr"){ 145 | var doc_id_str = 'result_wrapper_' + doc_id; 146 | var findFlag = false; 147 | var items = data[2]; 148 | for(var url in items){ 149 | var content = items[url]; 150 | search_keywords = search_keywords.trim(); 151 | if(search_keywords.length <= 0){ 152 | return; 153 | } 154 | var keywords = search_keywords.split(" "); 155 | var find = false; 156 | var find_strs = ""; 157 | for(var i in keywords){ 158 | var keyword = keywords[i]; 159 | if(content["title"] && content["title"].indexOf(keyword) >= 0){ 160 | find = true; 161 | } 162 | } 163 | if(content["content"] && content["content"].length > 0){ 164 | find_strs = search(keywords, content["content"]); 165 | if(find_strs.length > 0){ 166 | find = true; 167 | } 168 | } 169 | if(find){ 170 | if(!findFlag){ 171 | $("#search_result_name").append('
  • '+ data[1] +'
  • '); 172 | $(containerId).append('
    '+data[1]+'
    '); 173 | findFlag = true; 174 | } 175 | $("#"+doc_id_str).append('
  • '+ (content["title"]?content["title"]:url) + 176 | '

    ' + find_strs + '
  • '); 177 | } 178 | } 179 | } 180 | $("#search_curr_result > .hint").removeClass("searching"); 181 | } 182 | function downloadJson(url, callback, arg1=null, arg2=null, arg3=null){ 183 | $.ajax({ 184 | type: "GET", 185 | url: url, 186 | contentType: "application/json", 187 | dataType: "json", 188 | success: function(data){ 189 | callback(data, arg1, arg2, arg3); 190 | }, 191 | error: function(){ 192 | $("#search_result_content").empty(); 193 | $("#search_result_content").append('
    '+ download_err_hint + ': '+ url +'
    '); 194 | } 195 | }); 196 | } 197 | highlightKeywords(); 198 | }); 199 | 200 | function focusItems(id, contrainerId, offset=0, classname=null){ 201 | var elementTop = 0; 202 | if(classname){ 203 | elementTop = $("."+classname)[0].offsetTop - offset; 204 | }else{ 205 | elementTop = $("#"+id)[0].offsetTop - offset; 206 | } 207 | 208 | $("#"+contrainerId).animate({scrollTop: elementTop},500); 209 | } 210 | 211 | 212 | function addSearchResultClickListener(){ 213 | $("#search_result_name > li").on("click", function(e){ 214 | var targetId = e.target.attributes.result_id.value; 215 | focusItems(targetId, "search_result_content", $("#search_title").height() + $("#search_result .hint").height()); 216 | }); 217 | } 218 | 219 | function highlightKeywords(){ 220 | var highlight_keywords = getQueryVariable("highlight"); 221 | if(highlight_keywords){ 222 | // add search result btn 223 | var html = document.getElementsByTagName("html")[0]; 224 | var lang = html.lang.split("-")[0].toLowerCase() 225 | let strs = { 226 | "zh": { 227 | "Previous": "上一个", 228 | "Next": "下一个" 229 | } 230 | } 231 | if(lang in strs){ 232 | var pre_name = strs[lang]["Previous"]; 233 | var next_name = strs[lang]["Next"]; 234 | }else{ 235 | var pre_name = "Previous"; 236 | var next_name = "Next"; 237 | } 238 | $("body").append('
    ' + 239 | '' + 240 | '' + 241 | '' + 242 | '
    '); 243 | var highlight_keywords = decodeURI(highlight_keywords); 244 | highlight_keywords = highlight_keywords.split(" "); 245 | for(var i=0; i .previous").on("click", function(){ 264 | let old = currSearchIdx; 265 | currSearchIdx -= 1; 266 | if (currSearchIdx < 0){ 267 | currSearchIdx = $(".search_highlight").length - 1; 268 | } 269 | window.scrollTo({ 270 | top: $(".search_highlight")[currSearchIdx].offsetTop - window.screen.height / 3, 271 | behavior: "smooth" 272 | }); 273 | $($(".search_highlight")[old]).removeClass("selected_highlight") 274 | $($(".search_highlight")[currSearchIdx]).addClass("selected_highlight") 275 | }); 276 | $("#search_ctrl_btn > .next").on("click", function(){ 277 | let old = currSearchIdx; 278 | currSearchIdx += 1; 279 | if (currSearchIdx >= $(".search_highlight").length){ 280 | currSearchIdx = 0; 281 | } 282 | window.scrollTo({ 283 | top: $(".search_highlight")[currSearchIdx].offsetTop - window.screen.height / 3, 284 | behavior: "smooth" 285 | }); 286 | $($(".search_highlight")[old]).removeClass("selected_highlight") 287 | $($(".search_highlight")[currSearchIdx]).addClass("selected_highlight") 288 | }); 289 | } 290 | } 291 | function getQueryVariable(variable) 292 | { 293 | var query = window.location.search.substring(1); 294 | var vars = query.split("&"); 295 | for (var i=0;i= 0){ 311 | idxs.push({ 312 | "idx": idx + idx_rel, 313 | "len": keyword.length 314 | }); 315 | _idxs = _search([keyword], content.substr(idx + keyword.length), idx_rel + idx + keyword.length); 316 | idxs = idxs.concat(_idxs); 317 | } 318 | } 319 | return idxs 320 | } 321 | var find_strs = ""; 322 | idxs = _search(keywords, content); 323 | idxs = idxs.sort((a, b)=> a.idx-b.idx); 324 | var idx_last = -1; 325 | var len_last = 0; 326 | for(var i=0; i= 0 && (idx - idx_last -len_last) < show_length){ // last keyword too close 331 | find_strs += content.substr(idx_last + len_last, idx - (idx_last + len_last)) + ''+ content.substr(idx, len) +'' 332 | }else{ 333 | var start_idx = (idx - show_length < 0) ? 0 : (idx - show_length); 334 | find_strs += '...' + content.substr(start_idx, idx - start_idx) + 335 | '' + content.substr(idx, len) + 336 | ''; 337 | } 338 | var idx_next = -1; 339 | if(i < idxs.length -1){ 340 | idx_next = idxs[i + 1]['idx']; 341 | } 342 | if(idx_next >= 0 && ((idx_next - idx - len) < show_length) ){ // next keywor too close 343 | }else{ 344 | find_strs += content.substr(idx + len, show_length) + '...'; 345 | } 346 | idx_last = idx; 347 | len_last = len; 348 | } 349 | return find_strs 350 | } 351 | 352 | -------------------------------------------------------------------------------- /static/js/theme_default/main.js: -------------------------------------------------------------------------------- 1 | 2 | (function () { 3 | var elements = document.getElementsByTagName("pre"); 4 | for(var i=0; i a").bind("click", function(e){ 124 | var is_click_indicator = $(e.target).hasClass("sub_indicator"); 125 | var a_obj = $(this); 126 | if(a_obj.attr("href") == window.location.pathname){ 127 | show_collapse_item(a_obj); 128 | return false; 129 | } 130 | show_collapse_item(a_obj); 131 | if(is_click_indicator){ // click indicator, only collapse, not jump to link 132 | return false; 133 | } 134 | var screenW = $(window).width(); 135 | if(screenW > 900){ 136 | return; 137 | } 138 | link_href = $(this).attr("href").split(location.host); 139 | if(link_href.length > 1){ 140 | link_href = link_href[1]; 141 | }else{ 142 | link_href = link_href[0]; 143 | } 144 | url_href = location.href.split(location.host)[1] 145 | let link_url = link_href.split("#")[0]; 146 | let sub = $(this).next(); 147 | var haveSub = false; 148 | if(sub && sub.prop("nodeName")){ 149 | haveSub = sub.prop("nodeName").toLowerCase() == "ul"; 150 | } 151 | if((link_href != decodeURIComponent(url_href) || !haveSub) && location.pathname == link_url){ // current page, and jump to header, close sidebar 152 | location.href = link_href; 153 | menu_toggle(); 154 | } 155 | }); 156 | } 157 | 158 | function hello(){ 159 | console.log('\n\n\ 160 | _ _ \n\ 161 | | | | | \n\ 162 | | |_ ___ ___ __| | ___ ___ \n\ 163 | | __/ _ \\/ _ \\/ _` |/ _ \\ / __|\n\ 164 | | || __/ __/ (_| | (_) | (__ \n\ 165 | \\__\\___|\\___|\\__,_|\\___/ \\___|\n\ 166 | \n\ 167 | generated by teedoc: \n\ 168 | \n\ 169 | https://github.com/teedoc/teedoc\n\ 170 | \n\n\n\ 171 | '); 172 | } 173 | 174 | 175 | function addTOC(){ 176 | if(!document.getElementById("toc_content")) 177 | return; 178 | tocbot.init({ 179 | // Where to render the table of contents. 180 | tocSelector: '#toc_content', 181 | // Where to grab the headings to build the table of contents. 182 | contentSelector: '#article_content', 183 | // Which headings to grab inside of the contentSelector element. 184 | headingSelector: 'h1, h2, h3, h4', 185 | // For headings inside relative or absolute positioned containers within content. 186 | hasInnerContainers: true, 187 | }); 188 | } 189 | 190 | function toChineseNumber(n) { 191 | if (!Number.isInteger(n) && n < 0) { 192 | throw Error('请输入自然数'); 193 | } 194 | 195 | const digits = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九']; 196 | const positions = ['', '十', '百', '千', '万', '十万', '百万', '千万', '亿', '十亿', '百亿', '千亿']; 197 | const charArray = String(n).split(''); 198 | let result = ''; 199 | let prevIsZero = false; 200 | //处理0 deal zero 201 | for (let i = 0; i < charArray.length; i++) { 202 | const ch = charArray[i]; 203 | if (ch !== '0' && !prevIsZero) { 204 | result += digits[parseInt(ch)] + positions[charArray.length - i - 1]; 205 | } else if (ch === '0') { 206 | prevIsZero = true; 207 | } else if (ch !== '0' && prevIsZero) { 208 | result += '零' + digits[parseInt(ch)] + positions[charArray.length - i - 1]; 209 | } 210 | } 211 | //处理十 deal ten 212 | if (n < 100) { 213 | result = result.replace('一十', '十'); 214 | } 215 | return result; 216 | } 217 | 218 | function addSequence(){ 219 | if(!tocbot._parseContent){ 220 | return; 221 | } 222 | var headings = tocbot._parseContent.selectHeadings(document.getElementById("article_content"), tocbot.options.headingSelector); 223 | var counth2=0, counth3=0, counth4=0; 224 | var html = document.getElementsByTagName("html")[0]; 225 | var isZh = html.lang.substring(0, 2).toLowerCase() == "zh"; 226 | for(var i=0; i' + seq + ''); 259 | } 260 | } 261 | 262 | 263 | function getSplitter(){ 264 | var sizes = localStorage.getItem("splitter_w"); 265 | if(sizes){ 266 | try 267 | { 268 | sizes = JSON.parse(sizes); 269 | } 270 | catch(err) 271 | { 272 | sizes = false; 273 | } 274 | } 275 | if(!sizes){ 276 | var screenW = $(window).width(); 277 | var split_w = 0; 278 | if(!sidebar_width_is_percent){ 279 | split_w = parseInt(sidebar_width/screenW*100); 280 | }else{ 281 | split_w = sidebar_width; 282 | } 283 | sizes = [split_w, 100-split_w]; 284 | setSplitter(sizes); 285 | } 286 | return sizes; 287 | } 288 | function setSplitter(sizes){ 289 | localStorage.setItem("splitter_w", JSON.stringify(sizes)); 290 | } 291 | 292 | var hasSplitter = false; 293 | 294 | function createSplitter(){ 295 | var split = Split(["#sidebar_wrapper", "#article"],{ 296 | gutterSize: 3, 297 | gutterAlign: 'start', 298 | minSize: 200, 299 | elementStyle: function (dimension, size, gutterSize) { 300 | return { 301 | 'width': 'calc(' + size + '% - ' + gutterSize + 'px)', 302 | } 303 | }, 304 | onDragEnd: function (sizes) { 305 | setSplitter(sizes) 306 | }, 307 | }); 308 | hasSplitter = true; 309 | var screenW = $(window).width(); 310 | var sizes = getSplitter(); 311 | split_w = parseInt(sizes[0]); 312 | if(isNaN(split_w) || (split_w + 20) >= screenW){ 313 | if(!sidebar_width_is_percent){ 314 | split_w = parseInt(sidebar_width/screenW*100); 315 | }else{ 316 | split_w = sidebar_width; 317 | } 318 | } 319 | split.setSizes([split_w, 100 - split_w]); 320 | $(".gutter").append('
    '); 321 | $(".gutter").hover(function(){ 322 | $(".gutter").css("width", "10px"); 323 | $(".gutter_icon").css("width", "10px"); 324 | },function(){ 325 | $(".gutter").css("width", "3px"); 326 | $(".gutter_icon").css("width", "3px"); 327 | }); 328 | } 329 | 330 | function addSplitter(){ 331 | var screenW = $(window).width(); 332 | if(screenW > 900) 333 | { 334 | createSplitter(); 335 | } 336 | } 337 | 338 | function registerOnWindowResize(has_sidebar){ 339 | window.onresize = function(){ 340 | var screenW = $(window).width(); 341 | if(!has_sidebar){ 342 | return; 343 | } 344 | if(screenW < 900){ 345 | $("#sidebar_wrapper").removeAttr("style"); 346 | if($("#menu").hasClass("close")){ 347 | $("#sidebar_wrapper").css("display", "block"); 348 | } 349 | $(".gutter").css("display", "none"); 350 | $("#article").css("width", "100%"); 351 | }else{ 352 | if(!hasSplitter){ 353 | createSplitter(); 354 | } 355 | if($("#sidebar_wrapper").css("display") != "none"){ 356 | $(".gutter").css("display", "block"); 357 | } 358 | } 359 | } 360 | } 361 | 362 | function focusSidebar(){ 363 | var windowH = window.innerHeight; 364 | var active = $("#sidebar .active")[0]; 365 | if(!active) 366 | return; 367 | var offset = active.offsetTop; 368 | if(offset > windowH/2){ 369 | $("#sidebar .show").scrollTop(offset); 370 | } 371 | } 372 | 373 | function imageViewer(){ 374 | var content_e = document.getElementById("content_body"); 375 | if(!content_e){ 376 | content_e = document.getElementById("page_wrapper"); 377 | } 378 | const gallery = new Viewer(content_e); 379 | } 380 | 381 | function addAnchor(){ 382 | $("#content_body h2, #content_body h3, #content_body h4, #content_body h5").each(function(){ 383 | if($(this).attr("id")){ 384 | $(this).append('#'); 385 | } 386 | }); 387 | } 388 | 389 | function rerender(){ 390 | Prism.highlightAll(); 391 | } 392 | 393 | function addPrintPage(){ 394 | if(!$("#article_info_right")){ 395 | return; 396 | } 397 | $("#article_info_right").append(''); 398 | 399 | var beforePrint = function(){ 400 | // update style changed by js: 401 | $("#article").css("width", "100%"); 402 | // rerender for proper output 403 | rerender(); 404 | } 405 | var afterPrint = function() { 406 | // location.reload(); 407 | } 408 | if (window.matchMedia) { 409 | var mediaQueryList = window.matchMedia('print'); 410 | mediaQueryList.addListener(function(mql) { 411 | if (mql.matches) { 412 | beforePrint(); 413 | } else { 414 | afterPrint(); 415 | } 416 | }); 417 | } 418 | window.onbeforeprint = beforePrint; 419 | window.onafterprint = afterPrint; 420 | $("#print_page").click(function(){ 421 | window.print(); 422 | }); 423 | } 424 | 425 | function addTocMobileListener(){ 426 | $("#toc_btn").click(function(){ 427 | if($("#toc_wrapper").hasClass("show")){ 428 | $("#toc_wrapper").removeClass("show"); 429 | }else{ 430 | $("#toc_wrapper").addClass("show"); 431 | } 432 | }); 433 | $("#toc_wrapper").click(function(){ 434 | if($("#toc_btn").is(":visible")){ 435 | $("#toc_wrapper").removeClass("show"); 436 | } 437 | }); 438 | } 439 | 440 | function addTabsetListener(){ 441 | $(".tabset-tab-label").on("click", function(){ 442 | let this_obj = $(this); 443 | // already active, do nothing 444 | if(this_obj.hasClass("tabset-tab-active")){ 445 | return; 446 | } 447 | // remove all active tabset-tab-active and tabset-text-active class from all have class that startswith tabset-id-, 448 | // then add active class to the same idx tab-label and tab-text 449 | let tabset_id = null; 450 | let same_id_tabsets = []; 451 | let old_idx = this_obj.parent().find(".tabset-tab-active").attr("idx"); 452 | let new_idx = this_obj.attr("idx"); 453 | let tabset_obj = this_obj.parent().parent().parent(); 454 | tabset_obj.attr("class").split(' ').forEach(function(item){ 455 | if(item.startsWith("tabset-id-")){ 456 | tabset_id = item; 457 | } 458 | }); 459 | if(!tabset_id){ 460 | same_id_tabsets = [tabset_obj[0]]; // to DOM element 461 | }else{ 462 | same_id_tabsets = document.getElementsByClassName(tabset_id); 463 | } 464 | for (let tabset of same_id_tabsets) { 465 | console.log(tabset); 466 | let tab_labels = tabset.getElementsByClassName("tabset-tab-label"); 467 | tab_labels[old_idx].classList.remove("tabset-tab-active"); 468 | tab_labels[new_idx].classList.add("tabset-tab-active"); 469 | let tab_texts = tabset.getElementsByClassName("tabset-text"); 470 | tab_texts[old_idx].classList.remove("tabset-text-active"); 471 | tab_texts[new_idx].classList.add("tabset-text-active"); 472 | } 473 | }); 474 | } 475 | -------------------------------------------------------------------------------- /static/js/theme_default/viewer.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Viewer.js v1.10.0 3 | * https://fengyuanchen.github.io/viewerjs 4 | * 5 | * Copyright 2015-present Chen Fengyuan 6 | * Released under the MIT license 7 | * 8 | * Date: 2021-06-12T07:57:10.970Z 9 | */ 10 | !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Viewer=e()}(this,function(){"use strict";function e(e,t){var i,n=Object.keys(e);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(e),t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)),n}function l(n){for(var t=1;t=this.length||this.viewed&&t===this.index)return this;if(!this.isShown)return this.index=t,this.show();this.viewing&&this.viewing.abort();var e=this.element,n=this.options,o=this.title,s=this.canvas,a=this.items[t],r=a.querySelector("img"),h=gt(r,"originalUrl"),l=r.getAttribute("alt"),c=document.createElement("img");if(ot(n.inheritedAttributes,function(t){var e=r.getAttribute(t);null!==e&&c.setAttribute(t,e)}),c.src=h,c.alt=l,nt(n.view)&&yt(e,"view",n.view,{once:!0}),!1===xt(e,"view",{originalImage:this.images[t],index:t,image:c})||!this.isShown||this.hiding||this.played)return this;h=this.items[this.index];ct(h,m),h.removeAttribute("aria-selected"),lt(a,m),a.setAttribute("aria-selected",!0),n.focus&&a.focus(),this.image=c,this.viewed=!1,this.index=t,this.imageData={},lt(c,D),n.loading&<(s,T),s.innerHTML="",s.appendChild(c),this.renderList(),o.innerHTML="";function u(){var t=i.imageData,e=Array.isArray(n.title)?n.title[1]:n.title;o.innerHTML=_(t=nt(e)?e.call(i,c,t):"".concat(l," (").concat(t.naturalWidth," × ").concat(t.naturalHeight,")"))?t.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">"):t}var d;return yt(e,V,u,{once:!0}),this.viewing={abort:function(){wt(e,V,u),c.complete?i.imageRendering?i.imageRendering.abort():i.imageInitializing&&i.imageInitializing.abort():(c.src="",wt(c,N,d),i.timeout&&clearTimeout(i.timeout))}},c.complete?this.load():(yt(c,N,d=this.load.bind(this),{once:!0}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(function(){ct(c,D),i.timeout=!1},1e3)),this},prev:function(){var t=this.index-1;return t<0&&(t=0Math.abs(r)&&(this.pointers={},1
    ',n=(i=d.querySelector(".".concat(g,"-container"))).querySelector(".".concat(g,"-title")),o=i.querySelector(".".concat(g,"-toolbar")),a=i.querySelector(".".concat(g,"-navbar")),m=i.querySelector(".".concat(g,"-button")),d=i.querySelector(".".concat(g,"-canvas")),this.parent=e,this.viewer=i,this.title=n,this.toolbar=o,this.navbar=a,this.button=m,this.canvas=d,this.footer=i.querySelector(".".concat(g,"-footer")),this.tooltipBox=i.querySelector(".".concat(g,"-tooltip")),this.player=i.querySelector(".".concat(g,"-player")),this.list=i.querySelector(".".concat(g,"-list")),i.id="".concat(g).concat(this.id),n.id="".concat(g,"Title").concat(this.id),lt(n,s.title?Tt(Array.isArray(s.title)?s.title[0]:s.title):w),lt(a,s.navbar?Tt(s.navbar):w),ut(m,w,!s.button),s.keyboard&&m.setAttribute("tabindex",0),s.backdrop&&(lt(i,"".concat(g,"-backdrop")),s.inline||"static"===s.backdrop||ft(d,K,"hide")),_(s.className)&&s.className&&s.className.split(Z).forEach(function(t){lt(i,t)}),s.toolbar?(r=document.createElement("ul"),h=it(s.toolbar),l=$.slice(0,3),c=$.slice(7,9),u=$.slice(9),h||lt(o,Tt(s.toolbar)),ot(h?s.toolbar:$,function(t,e){var i=h&&it(t),n=h?mt(e):t,o=i&&!Q(t.show)?t.show:t;!o||!s.zoomable&&-1!==l.indexOf(n)||!s.rotatable&&-1!==c.indexOf(n)||!s.scalable&&-1!==u.indexOf(n)||(e=i&&!Q(t.size)?t.size:t,i=i&&!Q(t.click)?t.click:t,t=document.createElement("li"),s.keyboard&&t.setAttribute("tabindex",0),t.setAttribute("role","button"),lt(t,"".concat(g,"-").concat(n)),nt(i)||ft(t,K,n),J(o)&<(t,Tt(o)),-1!==["small","large"].indexOf(e)?lt(t,"".concat(g,"-").concat(e)):"play"===n&<(t,"".concat(g,"-large")),nt(i)&&yt(t,O,i),r.appendChild(t))}),o.appendChild(r)):lt(o,w),s.rotatable||(lt(d=o.querySelectorAll('li[class*="rotate"]'),D),ot(d,function(t){o.appendChild(t)})),s.inline?(lt(m,b),rt(i,{zIndex:s.zIndexInline}),"static"===window.getComputedStyle(e).position&&rt(e,{position:"relative"}),e.insertBefore(i,t.nextSibling)):(lt(m,f),lt(i,p),lt(i,v),lt(i,w),rt(i,{zIndex:s.zIndex}),(m=(m=_(m=s.container)?t.ownerDocument.querySelector(m):m)||this.body).appendChild(i)),s.inline&&(this.render(),this.bind(),this.isShown=!0),this.ready=!0,nt(s.ready)&&yt(t,j,s.ready,{once:!0}),!1!==xt(t,j)?this.ready&&s.inline&&this.view(this.index):this.ready=!1)}}])&&o(t.prototype,e),n&&o(t,n),i}();return st(n.prototype,It,r,t,St,Ot),n}); -------------------------------------------------------------------------------- /static/css/theme_default/light.css: -------------------------------------------------------------------------------- 1 | /** 2 | teedoc light theme css 3 | @author neucrack 4 | @copyright (c) neucrack CZD666666@gmail.com with MIT License 5 | @changes 2021.1.26 add basic attrributes 6 | */ 7 | 8 | /* global template */ 9 | body { 10 | color: #606975; 11 | background-color: white; 12 | transition: 0.4s; 13 | margin: 0; 14 | display: flex; 15 | flex-direction: column; 16 | justify-content: space-between; 17 | min-height: 100vh; 18 | letter-spacing: 0.03em; 19 | font-family: "Microsoft YaHei",Helvetica,"Meiryo UI","Malgun Gothic","Segoe UI","Trebuchet MS",Monaco,monospace,Tahoma,STXihei,"华文细黑",STHeiti,"Helvetica Neue","Droid Sans","wenquanyi micro hei",FreeSans,Arimo,Arial,SimSun,"宋体",Heiti,"黑体",sans-serif; 20 | } 21 | a { 22 | color: #606975; 23 | text-decoration: none; 24 | } 25 | a:visited { 26 | color: #606975; 27 | } 28 | a:hover { 29 | background-color: #d8d8d8; 30 | border-radius: 5px; 31 | transition: 0.4s; 32 | } 33 | h1 { 34 | text-align: center; 35 | font-size: 2.2em; 36 | } 37 | h2 { 38 | font-size: 2em; 39 | } 40 | h3 { 41 | font-size: 1.5em; 42 | } 43 | h4 { 44 | font-size: 1.17em; 45 | } 46 | h5 { 47 | font-size: 1em; 48 | } 49 | h6 { 50 | font-size: 0.83em; 51 | } 52 | 53 | p { 54 | /* text-align: justify; */ 55 | line-height: 2em; 56 | } 57 | blockquote { 58 | border-left: 4px solid #4caf7d; 59 | margin: 0 0 1em 2px; 60 | padding: 1px; 61 | padding-left: 1em; 62 | background-color: #f1f1f1; 63 | border-radius: 0 5px 5px 0; 64 | transition: 0.4s; 65 | } 66 | blockquote.spoiler { 67 | border-left: 5px solid #FF9800; 68 | background-color: #ffd65b; 69 | } 70 | *::-webkit-scrollbar { 71 | width : 0.8rem; 72 | height: 0.8rem; 73 | min-width: 0.8rem; 74 | min-height: 0.6rem; 75 | } 76 | #sidebar ul::-webkit-scrollbar { 77 | width : 0.45rem; 78 | height: 0.8rem; 79 | min-width: 0.45rem; 80 | min-height: 0.6rem; 81 | } 82 | *::-webkit-scrollbar-thumb { 83 | border-radius : 0.6rem; 84 | background-color: #b8b8b8; 85 | } 86 | *::-webkit-scrollbar-track { 87 | background : #ededed; 88 | border-radius: 10px; 89 | } 90 | sup a { 91 | font-size: 1.1em; 92 | background-color: #f1f1f1; 93 | padding: 4px; 94 | border-left: 1px solid #4caf7d; 95 | border-right: 1px solid #4caf7d; 96 | } 97 | dl > dt { 98 | font-weight: bold; 99 | } 100 | table { 101 | border-collapse: collapse; 102 | border-spacing: 0; 103 | display: block; 104 | width: 100%; 105 | overflow: auto; 106 | word-break: keep-all; 107 | border-color: transparent; 108 | } 109 | tr { 110 | background-color: #f1f1f1; 111 | border-top: 1px solid #ccc; 112 | } 113 | td, th { 114 | padding: 6px 13px; 115 | transition: 0.4s; 116 | } 117 | th { 118 | font-weight: 700; 119 | color: white; 120 | filter: brightness(110%); 121 | border: 2px solid #4caf7d; 122 | background-color: #4caf7d; 123 | } 124 | td { 125 | background-color: #fbfbfb; 126 | border: 2px solid #f1f1f1; 127 | } 128 | code { 129 | background-color: #f1f1f1; 130 | border-radius: 0.2em; 131 | transition: 0.4s; 132 | font-family: Menlo, Consolas, "DejaVu Sans Mono", Bitstream Vera Sans Mono, Courier New, monospace, Monaco, 'Andale Mono', 'Ubuntu Mono', "Microsoft YaHei"; 133 | font-size: 85%; 134 | padding: 0.2em 0.4em; 135 | color: #4caf7d; 136 | } 137 | pre[class*="language-"].line-numbers > code { 138 | background: none; 139 | padding: 0; 140 | } 141 | .btn, 142 | #page_content .btn, 143 | #content_body .btn { 144 | color: white; 145 | border-radius: 5px; 146 | transition: 0.2s; 147 | padding: 1em; 148 | cursor: pointer; 149 | transition: 0.2s; 150 | background: #4caf7d; 151 | } 152 | .btn:hover, 153 | #page_content .btn:hover, 154 | #content_body .btn:hover { 155 | background: #4caf7d; 156 | box-shadow: 1px 1px 5px 0px green; 157 | } 158 | .btn:visited, 159 | #page_content .btn:visited, 160 | #content_body .btn:visited { 161 | color: white; 162 | } 163 | 164 | /* wrapper */ 165 | .type_doc #wrapper { 166 | margin-top: 1.5em; 167 | } 168 | #wrapper { 169 | display: flex; 170 | flex-grow: 1; 171 | } 172 | #page_wrapper { 173 | display: flex; 174 | flex-grow: 1; 175 | flex-direction: column; 176 | justify-content: space-between; 177 | text-align: center; 178 | } 179 | 180 | /* page */ 181 | #page_content { 182 | width: 100%; 183 | flex-grow: 1; 184 | display: flex; 185 | flex-direction: row; 186 | } 187 | #page_content > div { 188 | flex-grow: 1; 189 | align-self: center; 190 | } 191 | #page_content a { 192 | color: #c33a3a; 193 | } 194 | 195 | /* navbar */ 196 | #navbar { 197 | display: flex; 198 | justify-content: start; 199 | z-index: 100; 200 | } 201 | #navbar * { 202 | display: flex; 203 | align-items: center; 204 | } 205 | #navbar_menu_btn { 206 | display: none; 207 | } 208 | #navbar #navbar_items { 209 | display: flex; 210 | flex-grow: 1; 211 | justify-content: space-between; 212 | padding-right: 1em; 213 | word-break: keep-all; 214 | } 215 | #navbar h2 { 216 | color: #4caf7d; 217 | } 218 | #navbar a{ 219 | margin: 5px; 220 | padding: 10px 15px; 221 | cursor: pointer; 222 | } 223 | #navbar a.site_title{ 224 | padding: 0; 225 | } 226 | #navbar a.site_title:hover{ 227 | background-color: transparent; 228 | } 229 | #navbar .site_logo { 230 | max-height: 60px; 231 | } 232 | #navbar ul { 233 | list-style: none; 234 | padding-inline-start: 10px; 235 | } 236 | #navbar .sub_items { 237 | position: relative; 238 | display: block; 239 | } 240 | #navbar .sub_items > a { 241 | margin: 5px; 242 | padding: 10px 15px; 243 | } 244 | #navbar .sub_items > a:hover + ul { 245 | visibility: visible; 246 | } 247 | #navbar .sub_items ul { 248 | display: block; 249 | position: absolute; 250 | left: 0; 251 | box-shadow: 0 0 9px 0px #dadada; 252 | border-radius: 5px; 253 | padding: 0; 254 | width: max-content; 255 | min-width: 100%; 256 | background-color: white; 257 | visibility: hidden; 258 | margin-top: -5px; 259 | z-index: 101; 260 | } 261 | #navbar .sub_items ul:hover { 262 | visibility: visible; 263 | } 264 | #navbar .sub_items ul li { 265 | display: block; 266 | } 267 | 268 | 269 | /* sidebar */ 270 | #sidebar_wrapper { 271 | width: 300px; 272 | } 273 | /* sidebar splitter */ 274 | .gutter_icon { 275 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==); 276 | width: 3px; 277 | height: 2em; 278 | background-repeat: no-repeat; 279 | position: fixed; 280 | top: 50%; 281 | } 282 | .gutter { 283 | background-color: #eee; 284 | background-repeat: no-repeat; 285 | background-position: 50%; 286 | transition: 0.2s; 287 | border-radius: 5px; 288 | display: block; 289 | } 290 | 291 | .gutter.gutter-horizontal { 292 | /* background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg=='); */ 293 | cursor: col-resize; 294 | } 295 | 296 | #sidebar { 297 | /* width: 300px; 298 | min-width: 200px; 299 | position: sticky; 300 | top: 0; 301 | overflow-x: hidden; */ 302 | /* min-width: 200px; */ 303 | /* position: sticky; */ 304 | /* top: 0; */ 305 | /* overflow-x: hidden; */ 306 | display: flex; 307 | flex-direction: column; 308 | height: 100vh; 309 | position: -webkit-sticky; 310 | position: sticky; 311 | top: 0; 312 | padding-top: var(--ifm-navbar-height); 313 | /* width: var(--doc-sidebar-width); */ 314 | transition: opacity 50ms; 315 | padding-top: 0; 316 | z-index: 1; 317 | } 318 | #sidebar ul { 319 | padding-inline-start: 20px; 320 | display: none; 321 | } 322 | #sidebar > ul { 323 | padding-inline-start: 0; 324 | padding: .5rem; 325 | display: block; 326 | padding-bottom: 3em; 327 | margin: 0; 328 | overflow-y: auto; 329 | } 330 | #sidebar ul .show{ 331 | /* display: block; */ /* js instead, just reserve this item*/ 332 | } 333 | #sidebar ul .active_parent { 334 | display: block; 335 | } 336 | #sidebar ul .active_parent > ul{ 337 | display: block; 338 | } 339 | #sidebar ul.collapsed, #sidebar ul .active_parent > ul.collapsed{ 340 | /* display: none; */ /* js instead, just reserve this item*/ 341 | } 342 | #sidebar ul .active_parent > a{ 343 | background-color: #f1f1f1; 344 | border-radius: 5px; 345 | transition: 0.4s; 346 | } 347 | #sidebar li { 348 | list-style: none; 349 | margin: 2px 0; 350 | position: relative; 351 | } 352 | #sidebar li > a { 353 | display: flex; 354 | justify-content: space-between; 355 | padding: 0; 356 | font-size: 0.9em; 357 | } 358 | #sidebar a:hover { 359 | cursor: pointer; 360 | } 361 | #sidebar .active > a, #navbar .active > a, #navbar .active_parent > a{ 362 | background-color: #f1f1f1; 363 | border-radius: 5px; 364 | color: #4caf7d; 365 | transition: 0.4s; 366 | } 367 | #navbar .sub_items .active > a { 368 | transition: 0s; 369 | } 370 | #sidebar .active > a { 371 | transition: 0.4s; 372 | } 373 | #sidebar li > a > .label { 374 | padding: 10px; 375 | display: inline-block; 376 | white-space: nowrap; 377 | width: 100%; 378 | overflow: hidden; 379 | text-overflow: ellipsis; 380 | } 381 | 382 | #sidebar li > a:hover, 383 | #sidebar li.active_parent > a:hover, 384 | #navbar li > a:hover, 385 | #navbar .sub_items > a:hover{ 386 | background-color: #d8d8d8; 387 | border-radius: 5px; 388 | transition: 0.4s; 389 | } 390 | #sidebar .sub_indicator { 391 | transition: transform 0.4s linear; 392 | background: url("/TrackersList/static/image/theme_default/indicator.svg"); 393 | background-size: contain; 394 | background-repeat: no-repeat; 395 | background-position: center; 396 | align-self: center; 397 | height: 1.25rem; 398 | width: 1.25rem; 399 | -ms-transform: rotate(-45deg); 400 | -moz-transform: rotate(-45deg); 401 | -webkit-transform: rotate(-45deg); 402 | transform: rotate(-45deg); 403 | transition: 0.2s; 404 | } 405 | 406 | #sidebar .sub_indicator:hover, 407 | #sidebar li.no_link > a:hover > .sub_indicator, 408 | #sidebar li.no_link > a.sub_indicator:hover, 409 | #sidebar li.no_link > a.sub_indicator{ 410 | height: 1.6em; 411 | width: 1.6em; 412 | } 413 | #sidebar .sub_indicator_collapsed { 414 | -ms-transform: rotate(0deg); 415 | -moz-transform: rotate(0deg); 416 | -webkit-transform: rotate(0deg); 417 | transform: rotate(0deg); 418 | } 419 | #sidebar li.sidebar_category { 420 | font-size: 0.9em; 421 | color: #9e9e9e; 422 | margin: 1em 0 0.1em 0; 423 | } 424 | #sidebar .tip { 425 | position: absolute; 426 | color: white; 427 | left: 300px; 428 | box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.19); 429 | border-radius: 0.2em; 430 | padding: 1em; 431 | display: flex; 432 | flex-direction: column; 433 | width: max-content; 434 | transition: 0.4s; 435 | visibility: hidden; 436 | opacity: 0; 437 | background: #4caf7d; 438 | } 439 | #sidebar li > a:hover+.tip, #sidebar .tip:hover { 440 | visibility: visible; 441 | opacity: 1; 442 | } 443 | .blog_info > span { 444 | margin: 0.4em; 445 | } 446 | .blog_tags { 447 | text-align: center; 448 | margin-top: 1em; 449 | } 450 | .blog_tags > span { 451 | border-radius: 0.2em; 452 | padding: 0.2em; 453 | margin: 0.4em; 454 | filter: brightness(120%); 455 | border: 1px solid #4caf7d; 456 | } 457 | #blog_list > ul { 458 | padding-left: 0; 459 | } 460 | #blog_list > ul > li { 461 | list-style: none; 462 | box-shadow: 0px 0px 7px #00000033; 463 | margin: 2em 0; 464 | padding: 2em; 465 | border-radius: 0.4em; 466 | } 467 | #blog_list > ul > li a, #blog_list > ul > li a:visited { 468 | padding: 0; 469 | color: #4caf7d; 470 | } 471 | html[lang^=zh] #article_content #blog_list h2:before { 472 | content: ""; 473 | } 474 | #blog_list .blog_tags { 475 | text-align: left; 476 | } 477 | #blog_list .blog_info { 478 | color: #ababab; 479 | } 480 | #blog_list .blog_brief { 481 | color: #828282; 482 | } 483 | .blog_cover { 484 | text-align: center; 485 | margin-top: 1em; 486 | } 487 | .blog_cover > img { 488 | width: 100%; 489 | } 490 | #menu_wrapper { 491 | width: 2%; 492 | } 493 | #menu { 494 | background: url("/TrackersList/static/image/theme_default/menu.svg"); 495 | background-size: contain; 496 | background-repeat: no-repeat; 497 | background-position: center; 498 | border-radius: 5px; 499 | min-height: 2rem; 500 | min-width: 2rem; 501 | transition: 0.2s; 502 | cursor: pointer; 503 | position: sticky; 504 | top: 1em; 505 | z-index: 99; 506 | margin-left: 0.2em; 507 | } 508 | 509 | /* article */ 510 | #article { 511 | display: flex; 512 | width: 98%; 513 | margin: auto; 514 | justify-content: space-evenly; 515 | } 516 | #toc_wrapper { 517 | width: 25%; 518 | } 519 | #article #toc { 520 | background-color: white; 521 | position: sticky; 522 | transition: 0.4s; 523 | top: 15%; 524 | max-height: calc(100vh - 15vh); 525 | overflow-y: auto; 526 | } 527 | #article #toc a{ 528 | padding: 0.2em 0.0em; 529 | display: block; 530 | font-size: 0.9em; 531 | } 532 | #article #toc ul, #article #toc ol { 533 | list-style: none; 534 | padding-left: 1.5em; 535 | } 536 | #article #toc > div > ul, #article #toc > div > ol { 537 | padding-left: 1em; 538 | } 539 | 540 | /* add numbers for toc */ 541 | #toc {counter-reset: toc_l1;} 542 | #toc #toc_content {counter-reset: toc_l2;} 543 | #toc a.node-name--H1 { 544 | counter-reset: toc_l2; 545 | } 546 | #toc a.node-name--H2 { 547 | counter-reset: toc_l3; 548 | } 549 | #toc a.node-name--H1:before { 550 | counter-increment: toc_l1; 551 | } 552 | #toc a.node-name--H2:before { 553 | counter-increment: toc_l2; 554 | content: counter(toc_l2, decimal) ".\00a0"; 555 | } 556 | html[lang^=zh] #toc a.node-name--H2:before { 557 | counter-increment: toc_l2; 558 | content: counter(toc_l2, simp-chinese-informal) "、"; 559 | } 560 | #toc a.node-name--H3:before { 561 | counter-increment: toc_l3; 562 | content: counter(toc_l2, decimal) "." counter(toc_l3, decimal) ".\00a0"; 563 | } 564 | .heading_no_counter #toc a.node-name--H2:before { 565 | content: ""; 566 | } 567 | .heading_no_counter #toc a.node-name--H3:before { 568 | content: ""; 569 | } 570 | html[lang^=zh].heading_no_counter #toc a.node-name--H2:before { 571 | content: ""; 572 | } 573 | /* add numbers for titles toc*/ 574 | 575 | 576 | /* article content */ 577 | #content_wrapper { 578 | flex-grow: 1; 579 | justify-content: space-between; 580 | flex-direction: column; 581 | display: flex; 582 | width: 65%; 583 | } 584 | #content_body { 585 | max-width: 50em; 586 | width: 90%; 587 | display: flex; 588 | flex-direction: column; 589 | justify-content: space-between; 590 | line-height: 2em; 591 | margin: auto; 592 | overflow-x: auto; 593 | } 594 | #content_body h1 { 595 | line-height: initial; 596 | } 597 | #content_body a, #content_body a:visited { 598 | color: #c33a3a; 599 | padding: 0.2em; 600 | } 601 | #content_body a:hover { 602 | background-color: #fde1e1; 603 | padding: 0.2em; 604 | border-radius: 0.2em; 605 | } 606 | #content_body img { 607 | max-width: 100%; 608 | object-fit: contain; 609 | cursor: zoom-in; 610 | } 611 | 612 | /* add numbers for titles */ 613 | #article_content { 614 | /* counter-reset: h2section h3section h4section; */ 615 | min-height: 50vh; 616 | word-break: break-word; 617 | } 618 | #article_content h1 { 619 | /* counter-reset: h2section h3section h4section; */ 620 | line-height: 1.3em; 621 | } 622 | #article_content h2 { 623 | /* counter-reset: h3section h4section; */ 624 | line-height: 1.3em; 625 | } 626 | /* #article_content h3 { 627 | counter-reset: h4section; 628 | } 629 | #article_content h2:before 630 | { 631 | counter-increment: h2section; 632 | content: counter(h2section, upper-roman) "、"; 633 | } 634 | #article_content h3:before 635 | { 636 | counter-increment: h3section; 637 | content: counter(h2section, decimal) "." counter(h3section, decimal) "、"; 638 | } 639 | #article_content h4:before 640 | { 641 | counter-increment: h4section; 642 | content: counter(h2section, decimal) "." counter(h3section, decimal) "." counter(h4section, decimal) "、"; 643 | } 644 | html[lang^=zh] #article_content h2:before { 645 | content: counter(h2section, simp-chinese-informal) "、"; 646 | } 647 | html[lang^=zh] #article_content h3:before { 648 | content: counter(h2section, decimal) "." counter(h3section, decimal) "、"; 649 | } 650 | html[lang^=zh] #article_content h4:before { 651 | content: counter(h2section, decimal) "." counter(h3section, decimal) "." counter(h4section, decimal) "、"; 652 | } 653 | .heading_no_counter #article_content h2:before { 654 | content: ""; 655 | } 656 | .heading_no_counter #article_content h3:before { 657 | content: ""; 658 | } 659 | .heading_no_counter #article_content h4:before { 660 | content: ""; 661 | } 662 | html[lang^=zh].heading_no_counter #article_content h2:before { 663 | content: ""; 664 | } 665 | html[lang^=zh].heading_no_counter #article_content h3:before { 666 | content: ""; 667 | } 668 | html[lang^=zh].heading_no_counter #article_content h4:before { 669 | content: ""; 670 | } */ 671 | /* add numbers for titles end*/ 672 | 673 | #article_head { 674 | margin-bottom: 2em; 675 | } 676 | #article_tags ul { 677 | list-style: none; 678 | display: flex; 679 | align-items: baseline; 680 | justify-content: flex-end; 681 | padding: 0 682 | } 683 | #article_tags ul li{ 684 | margin: 5px; 685 | padding: 8px; 686 | border-radius: 5px; 687 | color: #ffffffcc; 688 | font-size: 0.9em; 689 | background-color: #4caf7d; 690 | } 691 | #article_info { 692 | display: flex; 693 | flex-direction: row; 694 | justify-content: space-between; 695 | } 696 | #article_info > div { 697 | align-self: center; 698 | display: flex; 699 | flex-direction: row; 700 | align-items: center; 701 | } 702 | #article_info > div > div { 703 | margin: 2px; 704 | } 705 | #article_info #print_page { 706 | height: 1em; 707 | width: 1em; 708 | cursor: pointer; 709 | background-repeat: no-repeat; 710 | background-size: contain; 711 | background-image: url("/TrackersList/static/image/theme_default/print.svg"); 712 | } 713 | #article_info>div>span { 714 | padding: 0.2em; 715 | color: #4caf7d; 716 | } 717 | #source_link { 718 | display: flex; 719 | flex-direction: row; 720 | justify-content: flex-end; 721 | } 722 | 723 | /* cover prism.css */ 724 | 725 | :not(pre) > code[class*="language-"], pre[class*="language-"] { 726 | background: #2d2d2d; 727 | border-radius: 5px; 728 | } 729 | div.code-toolbar > .toolbar a, div.code-toolbar > .toolbar button, div.code-toolbar > .toolbar span { 730 | color: #fff; 731 | font-size: .8em; 732 | padding: 1em; 733 | background: #f5f2f0; 734 | background: rgba(224, 224, 224, 0.2); 735 | box-shadow: 0 2px 0 0 rgba(0,0,0,0.2); 736 | border-radius: .5em; 737 | cursor: pointer; 738 | } 739 | div.code-toolbar > .toolbar a:hover, div.code-toolbar > .toolbar a:focus, div.code-toolbar > .toolbar button:hover, div.code-toolbar > .toolbar button:focus, div.code-toolbar > .toolbar span:hover, div.code-toolbar > .toolbar span:focus { 740 | color: #a9ffe0; 741 | text-decoration: none; 742 | } 743 | 744 | /* back to top button */ 745 | /* #to_top_wrapper { 746 | } */ 747 | #to_top { 748 | background: url("/TrackersList/static/image/theme_default/to-top.svg"); 749 | background-size: 2em; 750 | background-repeat: no-repeat; 751 | background-position: center; 752 | align-self: flex-end; 753 | position: sticky; 754 | bottom: 6em; 755 | right: 3em; 756 | margin: 1em; 757 | height: 3rem; 758 | width: 3rem; 759 | cursor: pointer; 760 | transition: 0.4s; 761 | z-index: 97; 762 | border-radius: 100%; 763 | padding: 2px; 764 | background-color: #f1f1f1; 765 | box-shadow: 8px 8px 20px rgba(0,0,0,0.13); 766 | } 767 | #to_top:hover { 768 | background-size: 2.5em; 769 | box-shadow: 8px 8px 20px rgba(0,0,0,0.24); 770 | } 771 | #to_top:active { 772 | box-shadow: 0px 0px 20px rgba(0,0,0,0.05); 773 | } 774 | 775 | 776 | /* footer article */ 777 | #previous_next { 778 | min-height: 3em; 779 | margin-top: 2em; 780 | display: flex; 781 | border-top: 1px solid #f1f1f1; 782 | padding: 1em; 783 | transition: 0.4s; 784 | display: flex; 785 | justify-content: space-between; 786 | } 787 | #previous_next > div { 788 | margin: 1em; 789 | } 790 | #previous_next a{ 791 | padding: 1em; 792 | border-radius: 5px; 793 | display: flex; 794 | align-items: center; 795 | background-color: #f1f1f1; 796 | justify-content: flex-start; 797 | } 798 | #previous_next a:hover { 799 | background-color: #dedede; 800 | } 801 | #previous_next #previous a > .label{ 802 | flex-grow: 1; 803 | text-align: center; 804 | padding-right: 2.5em; 805 | } 806 | #previous_next #previous a > .icon{ 807 | transition: transform 0.4s linear; 808 | background: url("/TrackersList/static/image/theme_default/to-top.svg"); 809 | background-size: 2em; 810 | background-repeat: no-repeat; 811 | background-position: center; 812 | min-height: 2.5rem; 813 | min-width: 2.5rem; 814 | -ms-transform: rotate(-90deg); 815 | -moz-transform: rotate(-90deg); 816 | -webkit-transform: rotate(-90deg); 817 | transform: rotate(-90deg); 818 | padding-right: 2em; 819 | padding: 0; 820 | } 821 | #previous_next #next a { 822 | justify-content: flex-end; 823 | } 824 | #previous_next #next a > .label{ 825 | flex-grow: 1; 826 | text-align: center; 827 | padding-left: 2.5em; 828 | } 829 | #previous_next #next a > .icon{ 830 | transition: transform 0.4s linear; 831 | background: url("/TrackersList/static/image/theme_default/to-top.svg"); 832 | background-size: 2em; 833 | background-repeat: no-repeat; 834 | background-position: center; 835 | min-height: 2.5rem; 836 | min-width: 2.5rem; 837 | -ms-transform: rotate(90deg); 838 | -moz-transform: rotate(90deg); 839 | -webkit-transform: rotate(90deg); 840 | transform: rotate(90deg); 841 | padding-left: 2em; 842 | padding: 0; 843 | } 844 | .footnotes { 845 | margin-top: 5em; 846 | } 847 | #doc_footer { 848 | min-height: 2em; 849 | display: flex; 850 | background-color: #2d2d2d; 851 | border-top: 1px solid #2d2d2d; 852 | padding: 1em; 853 | transition: 0.4s; 854 | } 855 | #page_footer { 856 | min-height: 2em; 857 | /* margin-top: 5em; */ 858 | display: flex; 859 | padding: 1em; 860 | transition: 0.4s; 861 | background-color: #292929; 862 | } 863 | #footer { 864 | display: flex; 865 | flex-direction: column; 866 | align-items: center; 867 | width: 100%; 868 | line-height: 1em; 869 | } 870 | #footer ul { 871 | list-style: none; 872 | padding: 0; 873 | margin: 0; 874 | } 875 | #footer a, #footer a:visited{ 876 | color: #848fa0; 877 | display: flex; 878 | padding: 0.2em; 879 | font-size: 0.9em; 880 | } 881 | #footer a:hover { 882 | background-color: #e6e6e6; 883 | border-radius: 0.1em; 884 | padding: 0.2em; 885 | } 886 | #footer_top { 887 | width: 100%; 888 | } 889 | #footer_top > ul { 890 | display: flex; 891 | justify-content: space-around; 892 | flex-direction: row; 893 | } 894 | #footer_top > ul > li > a { 895 | color: #cecece; 896 | font-weight: 700; 897 | margin: 1em 0 0.5em 0; 898 | } 899 | #footer_top > ul > li > a:hover { 900 | background-color: transparent; 901 | } 902 | #footer_bottom { 903 | margin-top: 2em; 904 | } 905 | #footer_bottom a { 906 | justify-content: center; 907 | } 908 | 909 | /* TOC */ 910 | .anchor { 911 | opacity: 0; 912 | transition: 0.4s; 913 | } 914 | h2:hover > .anchor, h3:hover > .anchor, h4:hover > .anchor, h5:hover > .anchor { 915 | opacity: 1; 916 | } 917 | .anchor:hover { 918 | opacity: 1; 919 | } 920 | .anchor-link { 921 | display: none; 922 | } 923 | #toc_content>.toc-list { 924 | overflow: hidden; 925 | position: relative 926 | } 927 | 928 | #toc_content>.toc-list li { 929 | list-style: none 930 | } 931 | 932 | .toc-list { 933 | margin: 0; 934 | padding-left: 10px 935 | } 936 | #toc_content > .toc-list > .toc-list-item { 937 | border-left: 2px solid #f1f1f1; 938 | } 939 | 940 | a.toc-link { 941 | color: currentColor; 942 | height: 100% 943 | } 944 | 945 | .is-collapsible { 946 | /* max-height: 1000px; */ 947 | overflow: hidden; 948 | transition: all 300ms ease-in-out 949 | } 950 | 951 | .is-collapsed { 952 | max-height: 0 953 | } 954 | 955 | .is-position-fixed { 956 | position: fixed !important; 957 | top: 0 958 | } 959 | 960 | .is-active-link { 961 | font-weight: 700 962 | } 963 | 964 | .toc-link::before { 965 | content: ' '; 966 | display: inline-block; 967 | height: inherit; 968 | left: 0; 969 | margin-top: -1px; 970 | padding-left: 6px; 971 | margin-left: -2px; 972 | } 973 | 974 | .is-active-link::before { 975 | border-left: 2px solid #4caf7d; 976 | } 977 | 978 | /* class template */ 979 | .md_page #page_content > div { 980 | width: 90%; 981 | max-width: 50em; 982 | margin: auto; 983 | line-height: 2em; 984 | } 985 | 986 | /* jupyter notebook parser */ 987 | .jp-InputArea { 988 | display: flex; 989 | flex-direction: row; 990 | } 991 | .jp-InputPrompt { 992 | word-break: keep-all; 993 | margin-right: 0.2em; 994 | font-size: 0.8em; 995 | } 996 | .jp-CodeMirrorEditor { 997 | flex-grow: 1; 998 | overflow: auto; 999 | } 1000 | .jp-OutputArea-child { 1001 | display: flex; 1002 | flex-direction: row; 1003 | } 1004 | .jp-OutputPrompt { 1005 | word-break: keep-all; 1006 | margin-right: 0.2em; 1007 | font-size: 0.8em; 1008 | min-width: 2.7em; 1009 | } 1010 | .jp-OutputArea-output { 1011 | flex-grow: 1; 1012 | overflow: auto; 1013 | background: #2d2d2d; 1014 | } 1015 | 1016 | /* google translate */ 1017 | #navbar #google_translate_element { 1018 | padding: 0; 1019 | } 1020 | #navbar #google_translate_element .goog-te-gadget-simple { 1021 | border-radius: 5px; 1022 | transition: 0.4s; 1023 | } 1024 | #navbar #google_translate_element .goog-te-gadget-simple .goog-te-menu-value { 1025 | transition: 0.4s; 1026 | } 1027 | 1028 | /* tabset */ 1029 | .tabset { 1030 | display: flex; 1031 | flex-direction: column; 1032 | align-items: normal; 1033 | border: 0.2em solid #ebedf0; 1034 | border-radius: 0.5em; 1035 | margin: 0.5em 0; 1036 | } 1037 | .tabset-title { 1038 | font-size: medium; 1039 | font-weight: 500; 1040 | padding: 0.5em 1em; 1041 | } 1042 | .tabset-content { 1043 | display: flex; 1044 | flex-direction: column; 1045 | align-items: normal; 1046 | } 1047 | .tabset-tab { 1048 | display: flex; 1049 | flex-direction: row; 1050 | padding: 0 1em; 1051 | } 1052 | .tabset-tab-label { 1053 | cursor: pointer; 1054 | font-size: large; 1055 | font-weight: 700; 1056 | padding: 0.5em 1em; 1057 | border-top-left-radius: 0.2em; 1058 | border-top-right-radius: 0.2em; 1059 | } 1060 | .tabset-tab-label:hover { 1061 | background-color: #0000000d; 1062 | } 1063 | .tabset-tab-active { 1064 | background-color: #0000000d; 1065 | border-bottom: 0.2em solid #4caf7d; 1066 | color: #4caf7d; 1067 | } 1068 | .tabset-text-container { 1069 | padding: 1em; 1070 | background-color: #0000000d; 1071 | } 1072 | .tabset-text-container > div { 1073 | display: none; 1074 | } 1075 | .tabset-text-container > div.tabset-text-active { 1076 | display: block; 1077 | } 1078 | 1079 | /* details */ 1080 | details { 1081 | display: flex; 1082 | flex-direction: column; 1083 | align-items: normal; 1084 | border: 0.2em solid #ebedf0; 1085 | border-radius: 0.5em; 1086 | margin: 0.5em 0; 1087 | transition: 0.4s; 1088 | } 1089 | details > summary { 1090 | font-size: medium; 1091 | font-weight: 500; 1092 | padding: 0.5em 1em; 1093 | cursor: pointer; 1094 | } 1095 | details > summary { 1096 | list-style-type:none; 1097 | position: relative; 1098 | padding-left: 2em; 1099 | } 1100 | details > summary:before { 1101 | display:inline-block; 1102 | content: url("/TrackersList/static/image/theme_default/array.svg"); 1103 | transform:rotate(90deg); 1104 | transition: 0.4s; 1105 | left: 0.5em; 1106 | position: absolute; 1107 | top: 0.45rem; 1108 | } 1109 | details[open] > summary:before { 1110 | transform:rotate(180deg); 1111 | top: 0.35rem; 1112 | } 1113 | details[open] summary ~ * { 1114 | animation: sweep .4s ease-in-out; 1115 | } 1116 | @keyframes sweep { 1117 | 0% {opacity: 0; margin-left: -10px} 1118 | 100% {opacity: 1; margin-left: 0px} 1119 | } 1120 | details > .details-content, details > div { 1121 | padding: 1em; 1122 | background-color: #0000000d; 1123 | } 1124 | 1125 | #update_history { 1126 | overflow-x: auto; 1127 | } 1128 | #update_history details > div { 1129 | padding: 0; 1130 | } 1131 | #update_history details { 1132 | width: fit-content; 1133 | } 1134 | 1135 | /* mobile phone */ 1136 | @media screen and (max-width: 900px) { 1137 | #navbar { 1138 | display: block; 1139 | border-bottom: 1px solid #f1f1f1; 1140 | z-index: 89; 1141 | } 1142 | #navbar * { 1143 | display: block; 1144 | } 1145 | #navbar a.site_title { 1146 | display: flex; 1147 | } 1148 | #navbar_menu { 1149 | display: flex; 1150 | justify-content: space-between; 1151 | } 1152 | #navbar ul { 1153 | padding-left: 0; 1154 | } 1155 | #navbar_menu_btn { 1156 | background: url("/TrackersList/static/image/theme_default/menu.svg"); 1157 | background-size: contain; 1158 | background-repeat: no-repeat; 1159 | background-position: center; 1160 | border-radius: 5px; 1161 | cursor: pointer; 1162 | width: 1em; 1163 | height: 1em; 1164 | display: block; 1165 | } 1166 | #navbar #navbar_items { 1167 | display: none; 1168 | padding-right: 0; 1169 | } 1170 | #navbar .sub_items ul { 1171 | left: 0; 1172 | right: auto; 1173 | } 1174 | #sidebar_wrapper { 1175 | position: fixed; 1176 | top: 0; 1177 | left: 0; 1178 | bottom: 0; 1179 | background-color: white; 1180 | box-shadow: 0 0 20px 0px #bbbbbb; 1181 | width: 100%; 1182 | z-index: 98; 1183 | display: none; 1184 | } 1185 | #sidebar { 1186 | position: relative; 1187 | width: 100%; 1188 | } 1189 | .gutter { 1190 | display: none; 1191 | } 1192 | #sidebar > ul { 1193 | padding-top: 4em; 1194 | } 1195 | #menu_wrapper { 1196 | z-index: 99; 1197 | } 1198 | #menu_wrapper.m_menu_fixed { 1199 | position: fixed; 1200 | left: 0; 1201 | top: 0; 1202 | width: 100%; 1203 | height: 4em; 1204 | background-color: rgb(255, 255, 255, 0.9); 1205 | box-shadow: 0px 1px 10px 0px rgb(0, 0, 0, 0.06); 1206 | } 1207 | #menu_wrapper.m_menu_fixed > #menu { 1208 | position: fixed; 1209 | left: 0.2em; 1210 | top: 1em; 1211 | } 1212 | #menu.close { 1213 | background: url("/TrackersList/static/image/theme_default/back.svg"); 1214 | background-size: contain; 1215 | background-repeat: no-repeat; 1216 | background-position: center; 1217 | border-radius: 5px; 1218 | min-height: 2em; 1219 | min-width: 2em; 1220 | } 1221 | #content_body { 1222 | width: 90%; 1223 | } 1224 | #toc_wrapper { 1225 | display: none; 1226 | position: fixed; 1227 | width: 100vh; 1228 | height: 100vh; 1229 | top: 0; 1230 | left: 0; 1231 | background-color: rgb(0, 0, 0, 0.5); 1232 | z-index: 999; 1233 | transition: 0.4s; 1234 | } 1235 | #toc_wrapper.show { 1236 | display: block; 1237 | } 1238 | #article #toc{ 1239 | position: fixed; 1240 | top: 4em; 1241 | right: 0; 1242 | z-index: 200; 1243 | width: 90%; 1244 | padding: 1em 0 1em 0; 1245 | border-radius: 0.3em 0 0 0.3em; 1246 | } 1247 | #previous_next { 1248 | flex-direction: column; 1249 | } 1250 | 1251 | .m_hide { 1252 | display: none; 1253 | } 1254 | #footer_top > ul { 1255 | flex-direction: column; 1256 | } 1257 | .md_page #page_content > div { 1258 | margin: 1.5em; 1259 | } 1260 | #article_tools { 1261 | width: 100%; 1262 | display: flex; 1263 | flex-direction: column; 1264 | align-items: flex-end; 1265 | position: sticky; 1266 | top: 1em; 1267 | z-index: 97; 1268 | } 1269 | #toc_btn { 1270 | background: url("/TrackersList/static/image/theme_default/anchor.svg"); 1271 | background-size: contain; 1272 | background-repeat: no-repeat; 1273 | background-position: center; 1274 | border-radius: 5px; 1275 | min-height: 2em; 1276 | min-width: 2em; 1277 | -ms-transform: rotate(12deg); 1278 | -moz-transform: rotate(12deg); 1279 | -webkit-transform: rotate(12deg); 1280 | transform: rotate(12deg); 1281 | } 1282 | } 1283 | 1284 | 1285 | /* special */ 1286 | 1287 | #themes{ 1288 | padding: 2px 5px; 1289 | cursor: pointer; 1290 | } 1291 | #navbar .light, #navbar .dark:hover { 1292 | background: url("/TrackersList/static/image/theme_default/light_mode.svg"); 1293 | background-size: contain; 1294 | background-repeat: no-repeat; 1295 | background-position: center; 1296 | min-height: 1rem; 1297 | min-width: 1rem; 1298 | } 1299 | #navbar .dark, #navbar .light:hover { 1300 | background: url("/TrackersList/static/image/theme_default/dark_mode.svg"); 1301 | background-size: contain; 1302 | background-repeat: no-repeat; 1303 | background-position: center; 1304 | min-height: 1rem; 1305 | min-width: 1rem; 1306 | } 1307 | 1308 | 1309 | @media print { 1310 | code[class*="language-"], pre[class*="language-"] { 1311 | white-space: pre-wrap; 1312 | } 1313 | pre[class*="language-"].line-numbers { 1314 | border: 1px solid #2d2d2d; 1315 | } 1316 | #navbar, 1317 | #sidebar_wrapper, .gutter, #menu_wrapper, 1318 | #toc, #to_top, #doc_footer, 1319 | #previous_next, 1320 | #source_link, #print_page, 1321 | #comments-container { 1322 | display: none; 1323 | } 1324 | #article { 1325 | width: 100%; 1326 | } 1327 | #content_body { 1328 | max-width: 100%; 1329 | width: 100%; 1330 | } 1331 | /* .line-numbers-rows { 1332 | display: none; 1333 | } */ 1334 | .gutter { 1335 | display: none; 1336 | } 1337 | } 1338 | --------------------------------------------------------------------------------