.github/FUNDING.yml
@@ -1 +1,2 @@ --- ko_fi: lxndrblz .github/stale.yml
@@ -1,3 +1,4 @@ --- # Number of days of inactivity before an issue becomes stale daysUntilStale: 60 # Number of days of inactivity before a stale issue is closed @@ -14,4 +15,4 @@ recent activity. It will be closed if no further activity occurs. Thank you for your contributions. # Comment to post when closing a stale issue. Set to `false` to disable closeComment: false closeComment: false README.md
@@ -293,5 +293,3 @@ * Go to [Cai Cai](https://github.com/hi-caicai), for the great Anatole Farbox theme that formed the foundation for this theme. * Go to [Kareya Saleh](https://unsplash.com/photos/tLKOj6cNwe0) for providing the profile picture in the exampleSite. archetypes/post.md
@@ -5,4 +5,4 @@ Tags: [] Categories: [] DisableComments: false --- --- assets/css/style.css
@@ -1,973 +1,972 @@ @charset "UTF-8"; :root { --bg-color: #fff; --secondary-bg-color: #eeeeee; --heading-color: #5f5f5f; --body-color: rgba(0, 0, 0, 0.7); --post-color: rgba(0, 0, 0, 0.44); --border-color: rgba(0, 0, 0, 0.15); --pre-bg-color: #f9f9fd; --nav-text-color: #5a5a5a; --tag-color: #424242; --blockquote-text-color: #858585; --blockquote-border-color: #dfe2e5; scroll-padding-top: 100px; --bg-color: #fff; --secondary-bg-color: #eeeeee; --heading-color: #5f5f5f; --body-color: rgba(0, 0, 0, 0.7); --post-color: rgba(0, 0, 0, 0.44); --border-color: rgba(0, 0, 0, 0.15); --pre-bg-color: #f9f9fd; --nav-text-color: #5a5a5a; --tag-color: #424242; --blockquote-text-color: #858585; --blockquote-border-color: #dfe2e5; scroll-padding-top: 100px; } html[data-theme='dark'] { --bg-color: #292a2d; --secondary-bg-color: #2c2d32; --heading-color: rgb(169, 169, 179); --body-color: rgb(169, 169, 179); --post-color: rgba(0, 0, 0, 0.44); --border-color: rgb(38, 38, 38); --pre-bg-color: rgb(33, 33, 45); --nav-text-color: rgb(191, 191, 191); --tag-color: rgb(191, 191, 191); --blockquote-text-color: #808080; --blockquote-border-color: #424242; --bg-color: #292a2d; --secondary-bg-color: #2c2d32; --heading-color: rgb(169, 169, 179); --body-color: rgb(169, 169, 179); --post-color: rgba(0, 0, 0, 0.44); --border-color: rgb(38, 38, 38); --pre-bg-color: rgb(33, 33, 45); --nav-text-color: rgb(191, 191, 191); --tag-color: rgb(191, 191, 191); --blockquote-text-color: #808080; --blockquote-border-color: #424242; } html { background-color: var(--bg-color); -webkit-font-smoothing: antialiased; background-color: var(--bg-color); -webkit-font-smoothing: antialiased; } body { color: var(--body-color); font-family: 'Verdana', sans-serif; font-size: 15px; width: 100%; margin: 0 auto 30px auto; background-color: var(--bg-color); color: var(--body-color); font-family: 'Verdana', sans-serif; font-size: 15px; width: 100%; margin: 0 auto 30px auto; background-color: var(--bg-color); } p { line-height: 1.9em; font-weight: 400; font-size: 14px; line-height: 1.9em; font-weight: 400; font-size: 14px; } a { text-decoration: none; text-decoration: none; } blockquote { padding: 0 1em; border-left: .25em solid var(--blockquote-border-color); color: var(--blockquote-text-color); padding: 0 1em; border-left: .25em solid var(--blockquote-border-color); color: var(--blockquote-text-color); } .category { padding: 4px 6px; border-radius: 3px; color: var(--tag-color) !important; background-color: var(--secondary-bg-color); border: 1px solid var(--border-color); padding: 4px 6px; border-radius: 3px; color: var(--tag-color) !important; background-color: var(--secondary-bg-color); border: 1px solid var(--border-color); } .tag::before { content: "#"; opacity: .5; content: "#"; opacity: .5; } .tag, .category { display: inline-block; font-size: 15px; line-height: 1; margin: 5px 8px 5px 0; display: inline-block; font-size: 15px; line-height: 1; margin: 5px 8px 5px 0; } pre { background-color: var(--pre-bg-color); padding: 5px; display: block; overflow-x: auto; background-color: var(--pre-bg-color); padding: 5px; display: block; overflow-x: auto; } .info i { opacity: 0.5; margin-right: 5px; opacity: 0.5; margin-right: 5px; } a:link, a:visited { opacity: 1; color: var(--tag-color); opacity: 1; color: var(--tag-color); } a:hover, a:active { color: #2660ab; color: #2660ab; } /*basic styles ends*/ /*animation starts*/ .animated { transition: top .8s linear; -webkit-animation-duration: 1s; -moz-animation-duration: 1s; -ms-animation-duration: 1s; -o-animation-duration: 1s; animation-duration: 1s; transition: top .8s linear; -webkit-animation-duration: 1s; -moz-animation-duration: 1s; -ms-animation-duration: 1s; -o-animation-duration: 1s; animation-duration: 1s; } .animated.hinge { -webkit-animation-duration: 1s; -moz-animation-duration: 1s; -ms-animation-duration: 1s; -o-animation-duration: 1s; animation-duration: 1s; -webkit-animation-duration: 1s; -moz-animation-duration: 1s; -ms-animation-duration: 1s; -o-animation-duration: 1s; animation-duration: 1s; } @-webkit-keyframes fadeInDown { 0% { -webkit-transform: translateY(-20px); } 0% { -webkit-transform: translateY(-20px); } 100% { -webkit-transform: translateY(0); } 100% { -webkit-transform: translateY(0); } } @-moz-keyframes fadeInDown { 0% { -moz-transform: translateY(-20px); } 0% { -moz-transform: translateY(-20px); } 100% { -moz-transform: translateY(0); } 100% { -moz-transform: translateY(0); } } @-o-keyframes fadeInDown { 0% { -o-transform: translateY(-20px); } 0% { -o-transform: translateY(-20px); } 100% { -o-transform: translateY(0); } 100% { -o-transform: translateY(0); } } @keyframes fadeInDown { 0% { transform: translateY(-20px); } 0% { transform: translateY(-20px); } 100% { transform: translateY(0); } 100% { transform: translateY(0); } } .fadeInDown { -webkit-animation-name: fadeInDown; -moz-animation-name: fadeInDown; -o-animation-name: fadeInDown; animation-name: fadeInDown; -webkit-animation-name: fadeInDown; -moz-animation-name: fadeInDown; -o-animation-name: fadeInDown; animation-name: fadeInDown; } /*animation ends*/ .content { height: auto; float: right; width: 60%; margin-top: 60px; height: auto; float: right; width: 60%; margin-top: 60px; } .page-top { width: 60%; position: fixed; right: 0; z-index: 3; background-color: var(--bg-color); height: 60px; border-bottom: 1px solid var(--border-color); width: 60%; position: fixed; right: 0; z-index: 3; background-color: var(--bg-color); height: 60px; border-bottom: 1px solid var(--border-color); } .page-top .nav { list-style: none; padding: 11px 30px; float: left; font-size: 12px; display: block; width: calc(100% - 30px); list-style: none; padding: 11px 30px; float: left; font-size: 12px; display: block; width: calc(100% - 30px); } .page-top .nav li { position: relative; display: initial; padding-right: 20px; position: relative; display: initial; padding-right: 20px; } .page-top .nav a { color: var(--nav-text-color); color: var(--nav-text-color); } .page-top .nav a:hover { color: #2660ab; color: #2660ab; } .page-top .nav a.current { color: var(--nav-text-color); padding-bottom: 22px; border-bottom: 1px solid var(--nav-text-color); color: var(--nav-text-color); padding-bottom: 22px; border-bottom: 1px solid var(--nav-text-color); } .theme-switch-item { float: right; font-size: 2em; margin-top: -5px; float: right; font-size: 2em; margin-top: -5px; } .page-top .information { float: right; padding-top: 12px; padding-right: 20px; float: right; padding-top: 12px; padding-right: 20px; } .page-top .information .avatar { float: right; float: right; } .page-top .information .avatar img { width: 32px; height: 32px; border-radius: 300px; width: 32px; height: 32px; border-radius: 300px; } .page-top .information .back_btn { float: left; padding-top: 5px; margin-right: -10px; float: left; padding-top: 5px; margin-right: -10px; } .page-top .information .back_btn li { display: initial; padding-right: 40px; display: initial; padding-right: 40px; } .sidebar { width: 40%; -webkit-background-size: cover; background-size: cover; background-color: var(--bg-color); height: 100%; top: 0; left: 0; position: fixed; z-index: 4; border-right: 1px solid var(--border-color); width: 40%; -webkit-background-size: cover; background-size: cover; background-color: var(--bg-color); height: 100%; top: 0; left: 0; position: fixed; z-index: 4; border-right: 1px solid var(--border-color); } .sidebar .logo-title { text-align: center; padding-top: 240px; text-align: center; padding-top: 240px; } .sidebar .logo-title .description { font-size: 14px; font-size: 14px; } .sidebar .logo-title .logo { margin: 0 auto; margin: 0 auto; } .sidebar .logo-title .title img { width: 127px; border-radius: 50%; width: 127px; border-radius: 50%; } .sidebar .logo-title .title h3 { text-transform: uppercase; font-size: 2rem; font-weight: bold; letter-spacing: 2px; line-height: 1; margin: 1em; text-transform: uppercase; font-size: 2rem; font-weight: bold; letter-spacing: 2px; line-height: 1; margin: 1em; } .sidebar .logo-title .title a { text-decoration: none; color: var(--heading-color); font-size: 2rem; font-weight: bold; text-decoration: none; color: var(--heading-color); font-size: 2rem; font-weight: bold; } .sidebar .social-links { list-style: none; padding: 0; font-size: 14px; text-align: center; list-style: none; padding: 0; font-size: 14px; text-align: center; } .sidebar .social-links i { margin-right: 3px; margin-right: 3px; } .sidebar .social-links li { display: inline; padding: 0 4px; line-height: 0; display: inline; padding: 0 4px; line-height: 0; } .sidebar .social-links a { color: var(--heading-color); color: var(--heading-color); } .sidebar .social-links a:hover { color: #2660ab; color: #2660ab; } .post { background-color: var(--bg-color); margin: 30px; background-color: var(--bg-color); margin: 30px; } .post .post-title h1 { text-transform: uppercase; font-size: 30px; letter-spacing: 5px; line-height: 1; text-transform: uppercase; font-size: 30px; letter-spacing: 5px; line-height: 1; } .post .post-title h2 { text-transform: uppercase; letter-spacing: 1px; font-size: 28px; line-height: 1; font-weight: 600; color: var(--heading-color); text-transform: uppercase; letter-spacing: 1px; font-size: 28px; line-height: 1; font-weight: 600; color: var(--heading-color); } .post .post-title h3 { text-transform: uppercase; letter-spacing: 1px; line-height: 1; font-weight: 600; /* color: #464646; */ color: var(--heading-color); font-size: 22px; margin: 0; text-transform: uppercase; letter-spacing: 1px; line-height: 1; font-weight: 600; /* color: #464646; */ color: var(--heading-color); font-size: 22px; margin: 0; } .post .post-title a { text-decoration: none; letter-spacing: 1px; color: var(--heading-color); text-decoration: none; letter-spacing: 1px; color: var(--heading-color); } .post .post-title a:hover { text-decoration: underline; text-decoration: underline; } .post .post-content a { text-decoration: none; letter-spacing: 1px; color: #2660ab; text-decoration: none; letter-spacing: 1px; color: #2660ab; } .post .post-content a:hover { color: #2F69B3; color: #2F69B3; } .post .post-content h3 { font-size: 22px; font-weight: 600; font-size: 22px; font-weight: 600; } .post .post-content h4 { /* color: var(--heading-color); */ font-size: 16px; /* color: var(--heading-color); */ font-size: 16px; } .post .post-content img { max-width: 100%; max-width: 100%; } .post .post-footer { padding: 0 0 10px 0; border-bottom: 1px solid var(--border-color); padding: 0 0 10px 0; border-bottom: 1px solid var(--border-color); } .post .post-footer .meta { max-width: 100%; display: flex; color: #bbbbbb; max-width: 100%; display: flex; color: #bbbbbb; } .post .post-footer .meta .info { float: left; font-size: 12px; margin-bottom: 1em; color: var(--body-color); float: left; font-size: 12px; margin-bottom: 1em; color: var(--body-color); } .post .post-footer .info .separator a { margin-right: 0.2em; margin-right: 0.2em; } .post .post-footer .meta .info .date { margin-right: 10px; margin-right: 10px; } .info { margin: 1em; margin: 1em; } .post .post-footer .meta a { text-decoration: none; color: var(--body-color); padding-right: 10px; text-decoration: none; color: var(--body-color); padding-right: 10px; } .post .post-footer .meta a:hover { color: #2660ab; color: #2660ab; } .post .post-footer .meta i { margin-right: 6px; margin-right: 6px; } .post .post-footer .tags { padding-bottom: 15px; font-size: 13px; padding-bottom: 15px; font-size: 13px; } .post .post-footer .tags ul { list-style-type: none; display: inline; margin: 0; padding: 0; list-style-type: none; display: inline; margin: 0; padding: 0; } .post .post-footer .tags ul li { list-style-type: none; margin: 0; padding-right: 5px; display: inline; list-style-type: none; margin: 0; padding-right: 5px; display: inline; } .post .post-footer .tags a { text-decoration: none; color: var(--post-color); font-weight: 400; text-decoration: none; color: var(--post-color); font-weight: 400; } .post .post-footer .tags a:hover { text-decoration: none; text-decoration: none; } .pagination { margin: 30px; padding: 0px 0 56px 0; text-align: center; margin: 30px; padding: 0px 0 56px 0; text-align: center; } .pagination ul { list-style: none; margin: 0; padding: 0; height: 13px; list-style: none; margin: 0; padding: 0; height: 13px; } .pagination ul li { margin: 0 2px 0 2px; display: inline; line-height: 1; margin: 0 2px 0 2px; display: inline; line-height: 1; } .pagination ul li a { text-decoration: none; color: var(--body-color); text-decoration: none; color: var(--body-color); } .pagination .pre { float: left; float: left; } .pagination .next { float: right; float: right; } .like-reblog-buttons { float: right; float: right; } .like-button { float: right; padding: 0 0 0 10px; float: right; padding: 0 0 0 10px; } .reblog-button { float: right; padding: 0; float: right; padding: 0; } #install-btn { position: fixed; bottom: 0px; right: 6px; position: fixed; bottom: 0px; right: 6px; } #disqus_thread { margin: 30px; border-bottom: 1px solid var(--border-color); margin: 30px; border-bottom: 1px solid var(--border-color); } .footer { clear: both; text-align: center; font-size: 10px; margin: 0 auto; bottom: 0; position: absolute; width: 100%; padding-bottom: 20px; clear: both; text-align: center; font-size: 10px; margin: 0 auto; bottom: 0; position: absolute; width: 100%; padding-bottom: 20px; } .footer a { color: #A6A6A6; color: #A6A6A6; } .footer a:hover { color: #2660ab; color: #2660ab; } /*for archive*/ .archive { width: 100%; width: 100%; } .list-with-title { font-size: 14px; margin: 30px; padding: 0; font-size: 14px; margin: 30px; padding: 0; } .list-with-title li { list-style-type: none; padding: 0; list-style-type: none; padding: 0; } .list-with-title .listing-title { font-size: 24px; color: #666666; font-weight: 600; line-height: 2.2em; font-size: 24px; color: #666666; font-weight: 600; line-height: 2.2em; } .list-with-title .listing { padding: 0; padding: 0; } .list-with-title .listing .listing-post { padding-bottom: 5px; padding-bottom: 5px; } .list-with-title .listing .listing-post .post-time { float: right; color: #C5C5C5; float: right; color: #C5C5C5; } .list-with-title .listing .listing-post a { color: #8F8F8F; color: #8F8F8F; } .list-with-title .listing .listing-post a:hover { color: #2660ab; color: #2660ab; } /* share */ .share { margin: 0px 30px; display: inline-flex; margin: 0px 30px; display: inline-flex; } .evernote { width: 32px; height: 32px; border-radius: 300px; background-color: #3E3E3E; margin-right: 5px; width: 32px; height: 32px; border-radius: 300px; background-color: #3E3E3E; margin-right: 5px; } .evernote a { color: #fff; padding: 11px; font-size: 12px; color: #fff; padding: 11px; font-size: 12px; } .evernote a:hover { color: #ED6243; padding: 11px; color: #ED6243; padding: 11px; } .weibo { width: 32px; height: 32px; border-radius: 300px; background-color: #ED6243; margin-right: 5px; width: 32px; height: 32px; border-radius: 300px; background-color: #ED6243; margin-right: 5px; } .weibo a { color: #fff; padding: 9px; color: #fff; padding: 9px; } .weibo a:hover { color: #BD4226; color: #BD4226; } .twitter { width: 32px; height: 32px; border-radius: 300px; background-color: #59C0FD; margin-right: 5px; width: 32px; height: 32px; border-radius: 300px; background-color: #59C0FD; margin-right: 5px; } .twitter a { color: #fff; padding: 9px; color: #fff; padding: 9px; } .twitter a:hover { color: #4B9ECE; color: #4B9ECE; } /* about */ .about { margin: 30px; margin: 30px; } .about h3 { font-size: 22px; font-size: 22px; } /* links*/ .links { margin: 30px; margin: 30px; } .links h3 { font-size: 22px; font-size: 22px; } .links a { cursor: pointer; cursor: pointer; } /* Comments */ .comment-count { color: #666; color: #666; } .tab-community { color: #666; color: #666; } .read_more { font-size: 14px; font-size: 14px; } .back-button { padding-top: 30px; max-width: 100px; padding-left: 40px; float: left; padding-top: 30px; max-width: 100px; padding-left: 40px; float: left; } /* Facebook Comments */ #fb_comments_container { margin: 30px; margin: 30px; } /* Buttons */ a.btn { color: #868686; font-weight: 400; color: #868686; font-weight: 400; } .btn { display: inline-block; position: relative; outline: 0; color: var(--post-color); background: transparent; font-size: 14px; text-align: center; text-decoration: none; cursor: pointer; border: 1px solid var(--border-color); white-space: nowrap; font-weight: 400; font-style: normal; border-radius: 999em; display: inline-block; position: relative; outline: 0; color: var(--post-color); background: transparent; font-size: 14px; text-align: center; text-decoration: none; cursor: pointer; border: 1px solid var(--border-color); white-space: nowrap; font-weight: 400; font-style: normal; border-radius: 999em; } .btn:hover { display: inline-block; position: relative; outline: 0px; color: #464545; background: transparent; font-size: 14px; text-align: center; text-decoration: none; cursor: pointer; border: 1px solid #464545; white-space: nowrap; font-weight: 400; font-style: normal; border-radius: 999em; display: inline-block; position: relative; outline: 0px; color: #464545; background: transparent; font-size: 14px; text-align: center; text-decoration: none; cursor: pointer; border: 1px solid #464545; white-space: nowrap; font-weight: 400; font-style: normal; border-radius: 999em; } [role="back"] { padding: 0.5em 1.25em; line-height: 1.666em; padding: 0.5em 1.25em; line-height: 1.666em; } [role="home"] { padding: 0.5em 1.25em; line-height: 1.666em; padding: 0.5em 1.25em; line-height: 1.666em; } [role="navigation"] { padding: 0.5em 1.25em; line-height: 1.666em; padding: 0.5em 1.25em; line-height: 1.666em; } [role="tags"] { padding: 6px 12px; padding: 6px 12px; } /* Menu */ .menu { float: right; padding-top: 30px; float: right; padding-top: 30px; } .menu .btn-down { margin: 0px; margin: 0px; } .menu .btn-down li { list-style: none; width: 100px; list-style: none; width: 100px; } .menu .btn-down li a { display: inline-block; position: relative; padding: 0.5em 1.25em; outline: 0; color: var(--post-color); background: transparent; font-size: 14px; text-align: center; text-decoration: none; cursor: pointer; border: 1px solid var(--border-color); white-space: nowrap; font-weight: 400; font-style: normal; border-radius: 999em; margin-top: 5px; display: inline-block; position: relative; padding: 0.5em 1.25em; outline: 0; color: var(--post-color); background: transparent; font-size: 14px; text-align: center; text-decoration: none; cursor: pointer; border: 1px solid var(--border-color); white-space: nowrap; font-weight: 400; font-style: normal; border-radius: 999em; margin-top: 5px; } .menu .btn-down li a:hover { position: relative; padding: 0.5em 1.25em; outline: 0; color: #fff; background: #3CBD10; font-size: 14px; text-align: center; text-decoration: none; cursor: pointer; border: 1px solid rgba(0, 0, 0, 0.15); white-space: nowrap; font-weight: 400; font-style: normal; border-radius: 999em; margin-top: 5px; position: relative; padding: 0.5em 1.25em; outline: 0; color: #fff; background: #3CBD10; font-size: 14px; text-align: center; text-decoration: none; cursor: pointer; border: 1px solid rgba(0, 0, 0, 0.15); white-space: nowrap; font-weight: 400; font-style: normal; border-radius: 999em; margin-top: 5px; } .menu .btn-down div { position: absolute; visibility: hidden; width: 100px; float: right; position: absolute; visibility: hidden; width: 100px; float: right; } .page_404 { text-align: center; padding-top: 50px; text-align: center; padding-top: 50px; } .navbar-burger { display: none; display: none; } @media screen and (max-width: 960px) { .sidebar { width: 100%; position: absolute; border-right: none; z-index: 1; } .sidebar { width: 100%; position: absolute; border-right: none; z-index: 1; } .sidebar .logo-title { padding-top: 120px; } .sidebar .logo-title { padding-top: 120px; } .sidebar .logo-title .title img { width: 100px; } .sidebar .logo-title .title img { width: 100px; } .sidebar .logo-title .title h3 { font-size: 20px; } .sidebar .logo-title .title h3 { font-size: 20px; } .page-top { width: 100%; } .page-top { width: 100%; } .post-title h3 { line-height: 1.6; } .post-title h3 { line-height: 1.6; } .content { margin-top: 420px; width: 100%; z-index: 2; position: absolute; } .content { margin-top: 420px; width: 100%; z-index: 2; position: absolute; } .footer { display: none; } .footer { display: none; } .share { display: grid; } .share { display: grid; } .page-top .nav { background-color: var(--secondary-bg-color); ; box-shadow: 0 8px 16px rgba(10, 10, 10, .1); padding: .5rem 0; width: 100%; display: none; margin-top: 0px; } .page-top .nav { background-color: var(--secondary-bg-color); box-shadow: 0 8px 16px rgba(10, 10, 10, .1); padding: .5rem 0; width: 100%; display: none; margin-top: 0px; } .page-top .nav.is-active { /* display: block; */ display: block; } .page-top .nav.is-active { /* display: block; */ display: block; } .page-top .nav li { display: block; flex-grow: 0; flex-shrink: 0; display: block; line-height: 2.5; padding: .5rem .75rem; position: relative; text-transform: uppercase; text-align: center; font-size: 1.3em; } .page-top .nav li { display: block; flex-grow: 0; flex-shrink: 0; display: block; line-height: 2.5; padding: .5rem .75rem; position: relative; text-transform: uppercase; text-align: center; font-size: 1.3em; } .page-top .nav a.current { border-bottom: none; } .page-top .nav a.current { border-bottom: none; } .navbar-burger { cursor: pointer; display: block; height: 3.25rem; position: relative; width: 3.25rem; margin-left: auto; } .navbar-burger { cursor: pointer; display: block; height: 3.25rem; position: relative; width: 3.25rem; margin-left: auto; } .navbar-burger span { background-color: var(--heading-color); display: block; height: 1px; left: calc(50% - 8px); position: absolute; transform-origin: center; transition-duration: 86ms; transition-property: background-color, opacity, transform; transition-timing-function: ease-out; width: 16px; } .navbar-burger span { background-color: var(--heading-color); display: block; height: 1px; left: calc(50% - 8px); position: absolute; transform-origin: center; transition-duration: 86ms; transition-property: background-color, opacity, transform; transition-timing-function: ease-out; width: 16px; } .navbar-burger span:nth-child(1) { top: calc(50% - 6px); } .navbar-burger span:nth-child(1) { top: calc(50% - 6px); } .navbar-burger span:nth-child(2) { top: calc(50% - 1px); } .navbar-burger span:nth-child(2) { top: calc(50% - 1px); } .navbar-burger span:nth-child(3) { top: calc(50% + 4px); } .navbar-burger span:nth-child(3) { top: calc(50% + 4px); } .theme-switch-item { float: none; } .theme-switch-item { float: none; } } /* Medium zoom */ .medium-zoom-overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; opacity: 0; transition: opacity 300ms; will-change: opacity; background: var(--bg-color); position: fixed; top: 0; right: 0; bottom: 0; left: 0; opacity: 0; transition: opacity 300ms; will-change: opacity; background: var(--bg-color); } .medium-zoom--opened .medium-zoom-overlay { cursor: pointer; cursor: zoom-out; opacity: 1; cursor: pointer; cursor: zoom-out; opacity: 1; } .medium-zoom-image { cursor: pointer; cursor: zoom-in; /* The `transition` is marked as "!important" for the animation to happen even though it's overriden by another inline `transition` style attribute. This is problematic with frameworks that generate inline styles on their images (e.g. Gatsby). See https://github.com/francoischalifour/medium-zoom/issues/110 */ transition: transform 300ms cubic-bezier(0.2, 0, 0.2, 1) !important; z-index: 100; cursor: pointer; cursor: zoom-in; /* The `transition` is marked as "!important" for the animation to happen even though it's overriden by another inline `transition` style attribute. This is problematic with frameworks that generate inline styles on their images (e.g. Gatsby). See https://github.com/francoischalifour/medium-zoom/issues/110 */ transition: transform 300ms cubic-bezier(0.2, 0, 0.2, 1) !important; z-index: 100; } .medium-zoom-image--hidden { visibility: hidden; visibility: hidden; } .medium-zoom-image--opened { position: relative; cursor: pointer; cursor: zoom-out; will-change: transform; position: relative; cursor: pointer; cursor: zoom-out; will-change: transform; } assets/js/anatole-header.js
@@ -1,39 +1,35 @@ // initialize default value function getTheme(){ function getTheme() { return localStorage.getItem('theme') ? localStorage.getItem('theme') : null; } function setTheme(style){ function setTheme(style) { document.documentElement.setAttribute('data-theme', style); localStorage.setItem('theme', style); localStorage.setItem('theme', style); } function init(){ function init() { // initialize default value var theme = getTheme(); // check if a prefered color theme is set for users that have never been to our site const userPrefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches; if (theme === null) { if(userPrefersDark){ if (userPrefersDark) { setTheme('dark'); } else if(!document.documentElement.getAttribute('data-theme')){ } else if (!document.documentElement.getAttribute('data-theme')) { setTheme('light'); } else{ } else { setTheme(document.documentElement.getAttribute('data-theme')); } } else { } else { // load a stored theme if (theme == 'light') { document.documentElement.setAttribute('data-theme', 'light'); } else { } else { document.documentElement.setAttribute('data-theme', 'dark'); } } } } } @@ -42,32 +38,31 @@ var theme = getTheme(); if (theme == 'light') { setTheme('dark'); } else { } else { setTheme('light'); } } document.addEventListener('DOMContentLoaded', function() { document.addEventListener('DOMContentLoaded', function () { var themeSwitcher = document.querySelector('.theme-switch'); themeSwitcher.addEventListener('click', switchTheme, false); }, false); document.addEventListener("DOMContentLoaded", function () { // Get all "navbar-burger" elements var $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll(".navbar-burger"), 0); var $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll(".navbar-burger"), 0); // Check if there are any navbar burgers if ($navbarBurgers.length > 0) { // Add a click event on each of them $navbarBurgers.forEach(function ($el) { $el.addEventListener("click", function () { var target = $el.dataset.target; var $target = document.getElementById(target); $el.classList.toggle("is-active"); $target.classList.toggle("is-active"); }); }); } if ($navbarBurgers.length > 0) { // Add a click event on each of them $navbarBurgers.forEach(function ($el) { $el.addEventListener("click", function () { var target = $el.dataset.target; var $target = document.getElementById(target); $el.classList.toggle("is-active"); $target.classList.toggle("is-active"); }); }); } }); init(); assets/js/jquery-appear.js
@@ -8,117 +8,117 @@ * * Version: 0.4 */ (function($) { (function ($) { var selectors = []; var check_binded = false; var check_lock = false; var defaults = { interval: 250, force_process: false interval: 250, force_process: false }; var $window = $(window); var $prior_appeared = []; function appeared(selector) { return $(selector).filter(function() { return $(this).is(':appeared'); }); return $(selector).filter(function () { return $(this).is(':appeared'); }); } function process() { check_lock = false; for (var index = 0, selectorsLength = selectors.length; index < selectorsLength; index++) { var $appeared = appeared(selectors[index]); $appeared.trigger('appear', [$appeared]); if ($prior_appeared[index]) { var $disappeared = $prior_appeared[index].not($appeared); $disappeared.trigger('disappear', [$disappeared]); } $prior_appeared[index] = $appeared; } } function add_selector(selector) { selectors.push(selector); $prior_appeared.push(); } // ":appeared" custom filter $.expr.pseudos.appeared = $.expr.createPseudo(function(arg) { return function(element) { var $element = $(element); if (!$element.is(':visible')) { return false; } var window_left = $window.scrollLeft(); var window_top = $window.scrollTop(); var offset = $element.offset(); var left = offset.left; var top = offset.top; if (top + $element.height() >= window_top && top - ($element.data('appear-top-offset') || 0) <= window_top + $window.height() && left + $element.width() >= window_left && left - ($element.data('appear-left-offset') || 0) <= window_left + $window.width()) { return true; } else { return false; } }; }); $.fn.extend({ // watching for element's appearance in browser viewport appear: function(selector, options) { $.appear(this, options); return this; } }); $.extend({ appear: function(selector, options) { var opts = $.extend({}, defaults, options || {}); if (!check_binded) { var on_check = function() { if (check_lock) { return; check_lock = false; for (var index = 0, selectorsLength = selectors.length; index < selectorsLength; index++) { var $appeared = appeared(selectors[index]); $appeared.trigger('appear', [$appeared]); if ($prior_appeared[index]) { var $disappeared = $prior_appeared[index].not($appeared); $disappeared.trigger('disappear', [$disappeared]); } check_lock = true; setTimeout(process, opts.interval); }; $(window).scroll(on_check).resize(on_check); check_binded = true; $prior_appeared[index] = $appeared; } if (opts.force_process) { setTimeout(process, opts.interval); } add_selector(selector); }, // force elements's appearance check force_appear: function() { if (check_binded) { process(); return true; } return false; } }); })(function() { if (typeof module !== 'undefined') { // Node return require('jquery'); } else { return jQuery; } }()); function add_selector(selector) { selectors.push(selector); $prior_appeared.push(); } // ":appeared" custom filter $.expr.pseudos.appeared = $.expr.createPseudo(function (arg) { return function (element) { var $element = $(element); if (!$element.is(':visible')) { return false; } var window_left = $window.scrollLeft(); var window_top = $window.scrollTop(); var offset = $element.offset(); var left = offset.left; var top = offset.top; if (top + $element.height() >= window_top && top - ($element.data('appear-top-offset') || 0) <= window_top + $window.height() && left + $element.width() >= window_left && left - ($element.data('appear-left-offset') || 0) <= window_left + $window.width()) { return true; } else { return false; } }; }); $.fn.extend({ // watching for element's appearance in browser viewport appear: function (selector, options) { $.appear(this, options); return this; } }); $.extend({ appear: function (selector, options) { var opts = $.extend({}, defaults, options || {}); if (!check_binded) { var on_check = function () { if (check_lock) { return; } check_lock = true; setTimeout(process, opts.interval); }; $(window).scroll(on_check).resize(on_check); check_binded = true; } if (opts.force_process) { setTimeout(process, opts.interval); } add_selector(selector); }, // force elements's appearance check force_appear: function () { if (check_binded) { process(); return true; } return false; } }); })(function () { if (typeof module !== 'undefined') { // Node return require('jquery'); } else { return jQuery; } }()); assets/js/jquery-migrate.js
@@ -2,837 +2,836 @@ * jQuery Migrate - v3.3.0 - 2020-05-05T01:57Z * Copyright OpenJS Foundation and other contributors */ ( function( factory ) { "use strict"; (function (factory) { "use strict"; if ( typeof define === "function" && define.amd ) { if (typeof define === "function" && define.amd) { // AMD. Register as an anonymous module. define( [ "jquery" ], function( jQuery ) { return factory( jQuery, window ); } ); } else if ( typeof module === "object" && module.exports ) { // AMD. Register as an anonymous module. define(["jquery"], function (jQuery) { return factory(jQuery, window); }); } else if (typeof module === "object" && module.exports) { // Node/CommonJS // eslint-disable-next-line no-undef module.exports = factory( require( "jquery" ), window ); } else { // Node/CommonJS // eslint-disable-next-line no-undef module.exports = factory(require("jquery"), window); } else { // Browser globals factory( jQuery, window ); } } )( function( jQuery, window ) { "use strict"; // Browser globals factory(jQuery, window); } })(function (jQuery, window) { "use strict"; jQuery.migrateVersion = "3.3.0"; jQuery.migrateVersion = "3.3.0"; // Returns 0 if v1 == v2, -1 if v1 < v2, 1 if v1 > v2 function compareVersions( v1, v2 ) { var i, rVersionParts = /^(\d+)\.(\d+)\.(\d+)/, v1p = rVersionParts.exec( v1 ) || [ ], v2p = rVersionParts.exec( v2 ) || [ ]; function compareVersions(v1, v2) { var i, rVersionParts = /^(\d+)\.(\d+)\.(\d+)/, v1p = rVersionParts.exec(v1) || [], v2p = rVersionParts.exec(v2) || []; for ( i = 1; i <= 3; i++ ) { if ( +v1p[ i ] > +v2p[ i ] ) { return 1; } if ( +v1p[ i ] < +v2p[ i ] ) { return -1; } } return 0; } for (i = 1; i <= 3; i++) { if (+v1p[i] > +v2p[i]) { return 1; } if (+v1p[i] < +v2p[i]) { return -1; } } return 0; } function jQueryVersionSince( version ) { return compareVersions( jQuery.fn.jquery, version ) >= 0; } function jQueryVersionSince(version) { return compareVersions(jQuery.fn.jquery, version) >= 0; } ( function() { (function () { // Support: IE9 only // IE9 only creates console object when dev tools are first opened // IE9 console is a host object, callable but doesn't have .apply() if ( !window.console || !window.console.log ) { return; } // Support: IE9 only // IE9 only creates console object when dev tools are first opened // IE9 console is a host object, callable but doesn't have .apply() if (!window.console || !window.console.log) { return; } // Need jQuery 3.0.0+ and no older Migrate loaded if ( !jQuery || !jQueryVersionSince( "3.0.0" ) ) { window.console.log( "JQMIGRATE: jQuery 3.0.0+ REQUIRED" ); } if ( jQuery.migrateWarnings ) { window.console.log( "JQMIGRATE: Migrate plugin loaded multiple times" ); } // Need jQuery 3.0.0+ and no older Migrate loaded if (!jQuery || !jQueryVersionSince("3.0.0")) { window.console.log("JQMIGRATE: jQuery 3.0.0+ REQUIRED"); } if (jQuery.migrateWarnings) { window.console.log("JQMIGRATE: Migrate plugin loaded multiple times"); } // Show a message on the console so devs know we're active window.console.log( "JQMIGRATE: Migrate is installed" + ( jQuery.migrateMute ? "" : " with logging active" ) + ", version " + jQuery.migrateVersion ); // Show a message on the console so devs know we're active window.console.log("JQMIGRATE: Migrate is installed" + (jQuery.migrateMute ? "" : " with logging active") + ", version " + jQuery.migrateVersion); } )(); })(); var warnedAbout = {}; var warnedAbout = {}; // By default each warning is only reported once. jQuery.migrateDeduplicateWarnings = true; jQuery.migrateDeduplicateWarnings = true; // List of warnings already given; public read only jQuery.migrateWarnings = []; jQuery.migrateWarnings = []; // Set to false to disable traces that appear with warnings if ( jQuery.migrateTrace === undefined ) { jQuery.migrateTrace = true; } if (jQuery.migrateTrace === undefined) { jQuery.migrateTrace = true; } // Forget any warnings we've already given; public jQuery.migrateReset = function() { warnedAbout = {}; jQuery.migrateWarnings.length = 0; }; jQuery.migrateReset = function () { warnedAbout = {}; jQuery.migrateWarnings.length = 0; }; function migrateWarn( msg ) { var console = window.console; if ( !jQuery.migrateDeduplicateWarnings || !warnedAbout[ msg ] ) { warnedAbout[ msg ] = true; jQuery.migrateWarnings.push( msg ); if ( console && console.warn && !jQuery.migrateMute ) { console.warn( "JQMIGRATE: " + msg ); if ( jQuery.migrateTrace && console.trace ) { console.trace(); } } } } function migrateWarn(msg) { var console = window.console; if (!jQuery.migrateDeduplicateWarnings || !warnedAbout[msg]) { warnedAbout[msg] = true; jQuery.migrateWarnings.push(msg); if (console && console.warn && !jQuery.migrateMute) { console.warn("JQMIGRATE: " + msg); if (jQuery.migrateTrace && console.trace) { console.trace(); } } } } function migrateWarnProp( obj, prop, value, msg ) { Object.defineProperty( obj, prop, { configurable: true, enumerable: true, get: function() { migrateWarn( msg ); return value; }, set: function( newValue ) { migrateWarn( msg ); value = newValue; } } ); } function migrateWarnProp(obj, prop, value, msg) { Object.defineProperty(obj, prop, { configurable: true, enumerable: true, get: function () { migrateWarn(msg); return value; }, set: function (newValue) { migrateWarn(msg); value = newValue; } }); } function migrateWarnFunc( obj, prop, newFunc, msg ) { obj[ prop ] = function() { migrateWarn( msg ); return newFunc.apply( this, arguments ); }; } function migrateWarnFunc(obj, prop, newFunc, msg) { obj[prop] = function () { migrateWarn(msg); return newFunc.apply(this, arguments); }; } if ( window.document.compatMode === "BackCompat" ) { if (window.document.compatMode === "BackCompat") { // JQuery has never supported or tested Quirks Mode migrateWarn( "jQuery is not compatible with Quirks Mode" ); } // JQuery has never supported or tested Quirks Mode migrateWarn("jQuery is not compatible with Quirks Mode"); } var findProp, class2type = {}, oldInit = jQuery.fn.init, oldFind = jQuery.find, var findProp, class2type = {}, oldInit = jQuery.fn.init, oldFind = jQuery.find, rattrHashTest = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/, rattrHashGlob = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g, rattrHashTest = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/, rattrHashGlob = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g, // Support: Android <=4.0 only // Make sure we trim BOM and NBSP rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; // Support: Android <=4.0 only // Make sure we trim BOM and NBSP rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; jQuery.fn.init = function( arg1 ) { var args = Array.prototype.slice.call( arguments ); jQuery.fn.init = function (arg1) { var args = Array.prototype.slice.call(arguments); if ( typeof arg1 === "string" && arg1 === "#" ) { if (typeof arg1 === "string" && arg1 === "#") { // JQuery( "#" ) is a bogus ID selector, but it returned an empty set before jQuery 3.0 migrateWarn( "jQuery( '#' ) is not a valid selector" ); args[ 0 ] = []; } // JQuery( "#" ) is a bogus ID selector, but it returned an empty set before jQuery 3.0 migrateWarn("jQuery( '#' ) is not a valid selector"); args[0] = []; } return oldInit.apply( this, args ); }; jQuery.fn.init.prototype = jQuery.fn; return oldInit.apply(this, args); }; jQuery.fn.init.prototype = jQuery.fn; jQuery.find = function( selector ) { var args = Array.prototype.slice.call( arguments ); jQuery.find = function (selector) { var args = Array.prototype.slice.call(arguments); // Support: PhantomJS 1.x // String#match fails to match when used with a //g RegExp, only on some strings if ( typeof selector === "string" && rattrHashTest.test( selector ) ) { // Support: PhantomJS 1.x // String#match fails to match when used with a //g RegExp, only on some strings if (typeof selector === "string" && rattrHashTest.test(selector)) { // The nonstandard and undocumented unquoted-hash was removed in jQuery 1.12.0 // First see if qS thinks it's a valid selector, if so avoid a false positive try { window.document.querySelector( selector ); } catch ( err1 ) { // The nonstandard and undocumented unquoted-hash was removed in jQuery 1.12.0 // First see if qS thinks it's a valid selector, if so avoid a false positive try { window.document.querySelector(selector); } catch (err1) { // Didn't *look* valid to qSA, warn and try quoting what we think is the value selector = selector.replace( rattrHashGlob, function( _, attr, op, value ) { return "[" + attr + op + "\"" + value + "\"]"; } ); // Didn't *look* valid to qSA, warn and try quoting what we think is the value selector = selector.replace(rattrHashGlob, function (_, attr, op, value) { return "[" + attr + op + "\"" + value + "\"]"; }); // If the regexp *may* have created an invalid selector, don't update it // Note that there may be false alarms if selector uses jQuery extensions try { window.document.querySelector( selector ); migrateWarn( "Attribute selector with '#' must be quoted: " + args[ 0 ] ); args[ 0 ] = selector; } catch ( err2 ) { migrateWarn( "Attribute selector with '#' was not fixed: " + args[ 0 ] ); } } } // If the regexp *may* have created an invalid selector, don't update it // Note that there may be false alarms if selector uses jQuery extensions try { window.document.querySelector(selector); migrateWarn("Attribute selector with '#' must be quoted: " + args[0]); args[0] = selector; } catch (err2) { migrateWarn("Attribute selector with '#' was not fixed: " + args[0]); } } } return oldFind.apply( this, args ); }; return oldFind.apply(this, args); }; // Copy properties attached to original jQuery.find method (e.g. .attr, .isXML) for ( findProp in oldFind ) { if ( Object.prototype.hasOwnProperty.call( oldFind, findProp ) ) { jQuery.find[ findProp ] = oldFind[ findProp ]; } } for (findProp in oldFind) { if (Object.prototype.hasOwnProperty.call(oldFind, findProp)) { jQuery.find[findProp] = oldFind[findProp]; } } // The number of elements contained in the matched element set migrateWarnFunc( jQuery.fn, "size", function() { return this.length; }, "jQuery.fn.size() is deprecated and removed; use the .length property" ); migrateWarnFunc(jQuery.fn, "size", function () { return this.length; }, "jQuery.fn.size() is deprecated and removed; use the .length property"); migrateWarnFunc( jQuery, "parseJSON", function() { return JSON.parse.apply( null, arguments ); }, "jQuery.parseJSON is deprecated; use JSON.parse" ); migrateWarnFunc(jQuery, "parseJSON", function () { return JSON.parse.apply(null, arguments); }, "jQuery.parseJSON is deprecated; use JSON.parse"); migrateWarnFunc( jQuery, "holdReady", jQuery.holdReady, "jQuery.holdReady is deprecated" ); migrateWarnFunc(jQuery, "holdReady", jQuery.holdReady, "jQuery.holdReady is deprecated"); migrateWarnFunc( jQuery, "unique", jQuery.uniqueSort, "jQuery.unique is deprecated; use jQuery.uniqueSort" ); migrateWarnFunc(jQuery, "unique", jQuery.uniqueSort, "jQuery.unique is deprecated; use jQuery.uniqueSort"); // Now jQuery.expr.pseudos is the standard incantation migrateWarnProp( jQuery.expr, "filters", jQuery.expr.pseudos, "jQuery.expr.filters is deprecated; use jQuery.expr.pseudos" ); migrateWarnProp( jQuery.expr, ":", jQuery.expr.pseudos, "jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos" ); migrateWarnProp(jQuery.expr, "filters", jQuery.expr.pseudos, "jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"); migrateWarnProp(jQuery.expr, ":", jQuery.expr.pseudos, "jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos"); // Prior to jQuery 3.1.1 there were internal refs so we don't warn there if ( jQueryVersionSince( "3.1.1" ) ) { migrateWarnFunc( jQuery, "trim", function( text ) { return text == null ? "" : ( text + "" ).replace( rtrim, "" ); }, "jQuery.trim is deprecated; use String.prototype.trim" ); } if (jQueryVersionSince("3.1.1")) { migrateWarnFunc(jQuery, "trim", function (text) { return text == null ? "" : (text + "").replace(rtrim, ""); }, "jQuery.trim is deprecated; use String.prototype.trim"); } // Prior to jQuery 3.2 there were internal refs so we don't warn there if ( jQueryVersionSince( "3.2.0" ) ) { migrateWarnFunc( jQuery, "nodeName", function( elem, name ) { return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); }, "jQuery.nodeName is deprecated" ); } if (jQueryVersionSince("3.2.0")) { migrateWarnFunc(jQuery, "nodeName", function (elem, name) { return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); }, "jQuery.nodeName is deprecated"); } if ( jQueryVersionSince( "3.3.0" ) ) { if (jQueryVersionSince("3.3.0")) { migrateWarnFunc( jQuery, "isNumeric", function( obj ) { migrateWarnFunc(jQuery, "isNumeric", function (obj) { // As of jQuery 3.0, isNumeric is limited to // strings and numbers (primitives or objects) // that can be coerced to finite numbers (gh-2662) var type = typeof obj; return ( type === "number" || type === "string" ) && // As of jQuery 3.0, isNumeric is limited to // strings and numbers (primitives or objects) // that can be coerced to finite numbers (gh-2662) var type = typeof obj; return (type === "number" || type === "string") && // parseFloat NaNs numeric-cast false positives ("") // ...but misinterprets leading-number strings, e.g. hex literals ("0x...") // subtraction forces infinities to NaN !isNaN( obj - parseFloat( obj ) ); }, "jQuery.isNumeric() is deprecated" ); // parseFloat NaNs numeric-cast false positives ("") // ...but misinterprets leading-number strings, e.g. hex literals ("0x...") // subtraction forces infinities to NaN !isNaN(obj - parseFloat(obj)); }, "jQuery.isNumeric() is deprecated" ); // Populate the class2type map jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol". split( " " ), function( _, name ) { class2type[ "[object " + name + "]" ] = name.toLowerCase(); } ); // Populate the class2type map jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "), function (_, name) { class2type["[object " + name + "]"] = name.toLowerCase(); }); migrateWarnFunc( jQuery, "type", function( obj ) { if ( obj == null ) { return obj + ""; } migrateWarnFunc(jQuery, "type", function (obj) { if (obj == null) { return obj + ""; } // Support: Android <=2.3 only (functionish RegExp) return typeof obj === "object" || typeof obj === "function" ? class2type[ Object.prototype.toString.call( obj ) ] || "object" : typeof obj; }, "jQuery.type is deprecated" ); // Support: Android <=2.3 only (functionish RegExp) return typeof obj === "object" || typeof obj === "function" ? class2type[Object.prototype.toString.call(obj)] || "object" : typeof obj; }, "jQuery.type is deprecated"); migrateWarnFunc( jQuery, "isFunction", function( obj ) { return typeof obj === "function"; }, "jQuery.isFunction() is deprecated" ); migrateWarnFunc(jQuery, "isFunction", function (obj) { return typeof obj === "function"; }, "jQuery.isFunction() is deprecated"); migrateWarnFunc( jQuery, "isWindow", function( obj ) { return obj != null && obj === obj.window; }, "jQuery.isWindow() is deprecated" ); migrateWarnFunc(jQuery, "isWindow", function (obj) { return obj != null && obj === obj.window; }, "jQuery.isWindow() is deprecated" ); migrateWarnFunc( jQuery, "isArray", Array.isArray, "jQuery.isArray is deprecated; use Array.isArray" ); } migrateWarnFunc(jQuery, "isArray", Array.isArray, "jQuery.isArray is deprecated; use Array.isArray" ); } // Support jQuery slim which excludes the ajax module if ( jQuery.ajax ) { if (jQuery.ajax) { var oldAjax = jQuery.ajax; var oldAjax = jQuery.ajax; jQuery.ajax = function( ) { var jQXHR = oldAjax.apply( this, arguments ); jQuery.ajax = function () { var jQXHR = oldAjax.apply(this, arguments); // Be sure we got a jQXHR (e.g., not sync) if ( jQXHR.promise ) { migrateWarnFunc( jQXHR, "success", jQXHR.done, "jQXHR.success is deprecated and removed" ); migrateWarnFunc( jQXHR, "error", jQXHR.fail, "jQXHR.error is deprecated and removed" ); migrateWarnFunc( jQXHR, "complete", jQXHR.always, "jQXHR.complete is deprecated and removed" ); } // Be sure we got a jQXHR (e.g., not sync) if (jQXHR.promise) { migrateWarnFunc(jQXHR, "success", jQXHR.done, "jQXHR.success is deprecated and removed"); migrateWarnFunc(jQXHR, "error", jQXHR.fail, "jQXHR.error is deprecated and removed"); migrateWarnFunc(jQXHR, "complete", jQXHR.always, "jQXHR.complete is deprecated and removed"); } return jQXHR; }; return jQXHR; }; } } var oldRemoveAttr = jQuery.fn.removeAttr, oldToggleClass = jQuery.fn.toggleClass, rmatchNonSpace = /\S+/g; var oldRemoveAttr = jQuery.fn.removeAttr, oldToggleClass = jQuery.fn.toggleClass, rmatchNonSpace = /\S+/g; jQuery.fn.removeAttr = function( name ) { var self = this; jQuery.fn.removeAttr = function (name) { var self = this; jQuery.each( name.match( rmatchNonSpace ), function( _i, attr ) { if ( jQuery.expr.match.bool.test( attr ) ) { migrateWarn( "jQuery.fn.removeAttr no longer sets boolean properties: " + attr ); self.prop( attr, false ); } } ); jQuery.each(name.match(rmatchNonSpace), function (_i, attr) { if (jQuery.expr.match.bool.test(attr)) { migrateWarn("jQuery.fn.removeAttr no longer sets boolean properties: " + attr); self.prop(attr, false); } }); return oldRemoveAttr.apply( this, arguments ); }; return oldRemoveAttr.apply(this, arguments); }; jQuery.fn.toggleClass = function( state ) { jQuery.fn.toggleClass = function (state) { // Only deprecating no-args or single boolean arg if ( state !== undefined && typeof state !== "boolean" ) { return oldToggleClass.apply( this, arguments ); } // Only deprecating no-args or single boolean arg if (state !== undefined && typeof state !== "boolean") { return oldToggleClass.apply(this, arguments); } migrateWarn( "jQuery.fn.toggleClass( boolean ) is deprecated" ); migrateWarn("jQuery.fn.toggleClass( boolean ) is deprecated"); // Toggle entire class name of each element return this.each( function() { var className = this.getAttribute && this.getAttribute( "class" ) || ""; // Toggle entire class name of each element return this.each(function () { var className = this.getAttribute && this.getAttribute("class") || ""; if ( className ) { jQuery.data( this, "__className__", className ); } if (className) { jQuery.data(this, "__className__", className); } // If the element has a class name or if we're passed `false`, // then remove the whole classname (if there was one, the above saved it). // Otherwise bring back whatever was previously saved (if anything), // falling back to the empty string if nothing was stored. if ( this.setAttribute ) { this.setAttribute( "class", className || state === false ? "" : jQuery.data( this, "__className__" ) || "" ); } } ); }; // If the element has a class name or if we're passed `false`, // then remove the whole classname (if there was one, the above saved it). // Otherwise bring back whatever was previously saved (if anything), // falling back to the empty string if nothing was stored. if (this.setAttribute) { this.setAttribute("class", className || state === false ? "" : jQuery.data(this, "__className__") || "" ); } }); }; function camelCase( string ) { return string.replace( /-([a-z])/g, function( _, letter ) { return letter.toUpperCase(); } ); } function camelCase(string) { return string.replace(/-([a-z])/g, function (_, letter) { return letter.toUpperCase(); }); } var oldFnCss, internalSwapCall = false, ralphaStart = /^[a-z]/, var oldFnCss, internalSwapCall = false, ralphaStart = /^[a-z]/, // The regex visualized: // // /----------\ // | | /-------\ // | / Top \ | | | // /--- Border ---+-| Right |-+---+- Width -+---\ // | | Bottom | | // | \ Left / | // | | // | /----------\ | // | /-------------\ | | |- END // | | | | / Top \ | | // | | / Margin \ | | | Right | | | // |---------+-| |-+---+-| Bottom |-+----| // | \ Padding / \ Left / | // BEGIN -| | // | /---------\ | // | | | | // | | / Min \ | / Width \ | // \--------------+-| |-+---| |---/ // \ Max / \ Height / rautoPx = /^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/; // The regex visualized: // // /----------\ // | | /-------\ // | / Top \ | | | // /--- Border ---+-| Right |-+---+- Width -+---\ // | | Bottom | | // | \ Left / | // | | // | /----------\ | // | /-------------\ | | |- END // | | | | / Top \ | | // | | / Margin \ | | | Right | | | // |---------+-| |-+---+-| Bottom |-+----| // | \ Padding / \ Left / | // BEGIN -| | // | /---------\ | // | | | | // | | / Min \ | / Width \ | // \--------------+-| |-+---| |---/ // \ Max / \ Height / rautoPx = /^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/; // If this version of jQuery has .swap(), don't false-alarm on internal uses if ( jQuery.swap ) { jQuery.each( [ "height", "width", "reliableMarginRight" ], function( _, name ) { var oldHook = jQuery.cssHooks[ name ] && jQuery.cssHooks[ name ].get; if (jQuery.swap) { jQuery.each(["height", "width", "reliableMarginRight"], function (_, name) { var oldHook = jQuery.cssHooks[name] && jQuery.cssHooks[name].get; if ( oldHook ) { jQuery.cssHooks[ name ].get = function() { var ret; if (oldHook) { jQuery.cssHooks[name].get = function () { var ret; internalSwapCall = true; ret = oldHook.apply( this, arguments ); internalSwapCall = false; return ret; }; } } ); } internalSwapCall = true; ret = oldHook.apply(this, arguments); internalSwapCall = false; return ret; }; } }); } jQuery.swap = function( elem, options, callback, args ) { var ret, name, old = {}; jQuery.swap = function (elem, options, callback, args) { var ret, name, old = {}; if ( !internalSwapCall ) { migrateWarn( "jQuery.swap() is undocumented and deprecated" ); } if (!internalSwapCall) { migrateWarn("jQuery.swap() is undocumented and deprecated"); } // Remember the old values, and insert the new ones for ( name in options ) { old[ name ] = elem.style[ name ]; elem.style[ name ] = options[ name ]; } // Remember the old values, and insert the new ones for (name in options) { old[name] = elem.style[name]; elem.style[name] = options[name]; } ret = callback.apply( elem, args || [] ); ret = callback.apply(elem, args || []); // Revert the old values for ( name in options ) { elem.style[ name ] = old[ name ]; } // Revert the old values for (name in options) { elem.style[name] = old[name]; } return ret; }; return ret; }; if ( jQueryVersionSince( "3.4.0" ) && typeof Proxy !== "undefined" ) { if (jQueryVersionSince("3.4.0") && typeof Proxy !== "undefined") { jQuery.cssProps = new Proxy( jQuery.cssProps || {}, { set: function() { migrateWarn( "JQMIGRATE: jQuery.cssProps is deprecated" ); return Reflect.set.apply( this, arguments ); } } ); } jQuery.cssProps = new Proxy(jQuery.cssProps || {}, { set: function () { migrateWarn("JQMIGRATE: jQuery.cssProps is deprecated"); return Reflect.set.apply(this, arguments); } }); } // Create a dummy jQuery.cssNumber if missing. It won't be used by jQuery but // it will prevent code adding new keys to it unconditionally from crashing. if ( !jQuery.cssNumber ) { jQuery.cssNumber = {}; } if (!jQuery.cssNumber) { jQuery.cssNumber = {}; } function isAutoPx( prop ) { function isAutoPx(prop) { // The first test is used to ensure that: // 1. The prop starts with a lowercase letter (as we uppercase it for the second regex). // 2. The prop is not empty. return ralphaStart.test( prop ) && rautoPx.test( prop[ 0 ].toUpperCase() + prop.slice( 1 ) ); } // The first test is used to ensure that: // 1. The prop starts with a lowercase letter (as we uppercase it for the second regex). // 2. The prop is not empty. return ralphaStart.test(prop) && rautoPx.test(prop[0].toUpperCase() + prop.slice(1)); } oldFnCss = jQuery.fn.css; oldFnCss = jQuery.fn.css; jQuery.fn.css = function( name, value ) { var origThis = this; if ( typeof name !== "string" ) { jQuery.each( name, function( n, v ) { jQuery.fn.css.call( origThis, n, v ); } ); } if ( typeof value === "number" && !isAutoPx( camelCase( name ) ) ) { migrateWarn( "Use of number-typed values is deprecated in jQuery.fn.css" ); } jQuery.fn.css = function (name, value) { var origThis = this; if (typeof name !== "string") { jQuery.each(name, function (n, v) { jQuery.fn.css.call(origThis, n, v); }); } if (typeof value === "number" && !isAutoPx(camelCase(name))) { migrateWarn("Use of number-typed values is deprecated in jQuery.fn.css"); } return oldFnCss.apply( this, arguments ); }; return oldFnCss.apply(this, arguments); }; var oldData = jQuery.data; var oldData = jQuery.data; jQuery.data = function( elem, name, value ) { var curData, sameKeys, key; jQuery.data = function (elem, name, value) { var curData, sameKeys, key; // Name can be an object, and each entry in the object is meant to be set as data if ( name && typeof name === "object" && arguments.length === 2 ) { curData = jQuery.hasData( elem ) && oldData.call( this, elem ); sameKeys = {}; for ( key in name ) { if ( key !== camelCase( key ) ) { migrateWarn( "jQuery.data() always sets/gets camelCased names: " + key ); curData[ key ] = name[ key ]; } else { sameKeys[ key ] = name[ key ]; } } // Name can be an object, and each entry in the object is meant to be set as data if (name && typeof name === "object" && arguments.length === 2) { curData = jQuery.hasData(elem) && oldData.call(this, elem); sameKeys = {}; for (key in name) { if (key !== camelCase(key)) { migrateWarn("jQuery.data() always sets/gets camelCased names: " + key); curData[key] = name[key]; } else { sameKeys[key] = name[key]; } } oldData.call( this, elem, sameKeys ); oldData.call(this, elem, sameKeys); return name; } return name; } // If the name is transformed, look for the un-transformed name in the data object if ( name && typeof name === "string" && name !== camelCase( name ) ) { curData = jQuery.hasData( elem ) && oldData.call( this, elem ); if ( curData && name in curData ) { migrateWarn( "jQuery.data() always sets/gets camelCased names: " + name ); if ( arguments.length > 2 ) { curData[ name ] = value; } return curData[ name ]; } } // If the name is transformed, look for the un-transformed name in the data object if (name && typeof name === "string" && name !== camelCase(name)) { curData = jQuery.hasData(elem) && oldData.call(this, elem); if (curData && name in curData) { migrateWarn("jQuery.data() always sets/gets camelCased names: " + name); if (arguments.length > 2) { curData[name] = value; } return curData[name]; } } return oldData.apply( this, arguments ); }; return oldData.apply(this, arguments); }; // Support jQuery slim which excludes the effects module if ( jQuery.fx ) { if (jQuery.fx) { var intervalValue, intervalMsg, oldTweenRun = jQuery.Tween.prototype.run, linearEasing = function( pct ) { return pct; }; var intervalValue, intervalMsg, oldTweenRun = jQuery.Tween.prototype.run, linearEasing = function (pct) { return pct; }; jQuery.Tween.prototype.run = function( ) { if ( jQuery.easing[ this.easing ].length > 1 ) { migrateWarn( "'jQuery.easing." + this.easing.toString() + "' should use only one argument" ); jQuery.Tween.prototype.run = function () { if (jQuery.easing[this.easing].length > 1) { migrateWarn( "'jQuery.easing." + this.easing.toString() + "' should use only one argument" ); jQuery.easing[ this.easing ] = linearEasing; } jQuery.easing[this.easing] = linearEasing; } oldTweenRun.apply( this, arguments ); }; oldTweenRun.apply(this, arguments); }; intervalValue = jQuery.fx.interval || 13; intervalMsg = "jQuery.fx.interval is deprecated"; intervalValue = jQuery.fx.interval || 13; intervalMsg = "jQuery.fx.interval is deprecated"; // Support: IE9, Android <=4.4 // Avoid false positives on browsers that lack rAF // Don't warn if document is hidden, jQuery uses setTimeout (#292) if ( window.requestAnimationFrame ) { Object.defineProperty( jQuery.fx, "interval", { configurable: true, enumerable: true, get: function() { if ( !window.document.hidden ) { migrateWarn( intervalMsg ); } return intervalValue; }, set: function( newValue ) { migrateWarn( intervalMsg ); intervalValue = newValue; } } ); } if (window.requestAnimationFrame) { Object.defineProperty(jQuery.fx, "interval", { configurable: true, enumerable: true, get: function () { if (!window.document.hidden) { migrateWarn(intervalMsg); } return intervalValue; }, set: function (newValue) { migrateWarn(intervalMsg); intervalValue = newValue; } }); } } } var oldLoad = jQuery.fn.load, oldEventAdd = jQuery.event.add, originalFix = jQuery.event.fix; var oldLoad = jQuery.fn.load, oldEventAdd = jQuery.event.add, originalFix = jQuery.event.fix; jQuery.event.props = []; jQuery.event.fixHooks = {}; jQuery.event.props = []; jQuery.event.fixHooks = {}; migrateWarnProp( jQuery.event.props, "concat", jQuery.event.props.concat, "jQuery.event.props.concat() is deprecated and removed" ); migrateWarnProp(jQuery.event.props, "concat", jQuery.event.props.concat, "jQuery.event.props.concat() is deprecated and removed"); jQuery.event.fix = function( originalEvent ) { var event, type = originalEvent.type, fixHook = this.fixHooks[ type ], props = jQuery.event.props; jQuery.event.fix = function (originalEvent) { var event, type = originalEvent.type, fixHook = this.fixHooks[type], props = jQuery.event.props; if ( props.length ) { migrateWarn( "jQuery.event.props are deprecated and removed: " + props.join() ); while ( props.length ) { jQuery.event.addProp( props.pop() ); } } if (props.length) { migrateWarn("jQuery.event.props are deprecated and removed: " + props.join()); while (props.length) { jQuery.event.addProp(props.pop()); } } if ( fixHook && !fixHook._migrated_ ) { fixHook._migrated_ = true; migrateWarn( "jQuery.event.fixHooks are deprecated and removed: " + type ); if ( ( props = fixHook.props ) && props.length ) { while ( props.length ) { jQuery.event.addProp( props.pop() ); } } } if (fixHook && !fixHook._migrated_) { fixHook._migrated_ = true; migrateWarn("jQuery.event.fixHooks are deprecated and removed: " + type); if ((props = fixHook.props) && props.length) { while (props.length) { jQuery.event.addProp(props.pop()); } } } event = originalFix.call( this, originalEvent ); event = originalFix.call(this, originalEvent); return fixHook && fixHook.filter ? fixHook.filter( event, originalEvent ) : event; }; return fixHook && fixHook.filter ? fixHook.filter(event, originalEvent) : event; }; jQuery.event.add = function( elem, types ) { jQuery.event.add = function (elem, types) { // This misses the multiple-types case but that seems awfully rare if ( elem === window && types === "load" && window.document.readyState === "complete" ) { migrateWarn( "jQuery(window).on('load'...) called after load event occurred" ); } return oldEventAdd.apply( this, arguments ); }; // This misses the multiple-types case but that seems awfully rare if (elem === window && types === "load" && window.document.readyState === "complete") { migrateWarn("jQuery(window).on('load'...) called after load event occurred"); } return oldEventAdd.apply(this, arguments); }; jQuery.each( [ "load", "unload", "error" ], function( _, name ) { jQuery.each(["load", "unload", "error"], function (_, name) { jQuery.fn[ name ] = function() { var args = Array.prototype.slice.call( arguments, 0 ); jQuery.fn[name] = function () { var args = Array.prototype.slice.call(arguments, 0); // If this is an ajax load() the first arg should be the string URL; // technically this could also be the "Anything" arg of the event .load() // which just goes to show why this dumb signature has been deprecated! // jQuery custom builds that exclude the Ajax module justifiably die here. if ( name === "load" && typeof args[ 0 ] === "string" ) { return oldLoad.apply( this, args ); } // If this is an ajax load() the first arg should be the string URL; // technically this could also be the "Anything" arg of the event .load() // which just goes to show why this dumb signature has been deprecated! // jQuery custom builds that exclude the Ajax module justifiably die here. if (name === "load" && typeof args[0] === "string") { return oldLoad.apply(this, args); } migrateWarn( "jQuery.fn." + name + "() is deprecated" ); migrateWarn("jQuery.fn." + name + "() is deprecated"); args.splice( 0, 0, name ); if ( arguments.length ) { return this.on.apply( this, args ); } args.splice(0, 0, name); if (arguments.length) { return this.on.apply(this, args); } // Use .triggerHandler here because: // - load and unload events don't need to bubble, only applied to window or image // - error event should not bubble to window, although it does pre-1.7 // See http://bugs.jquery.com/ticket/11820 this.triggerHandler.apply( this, args ); return this; }; // Use .triggerHandler here because: // - load and unload events don't need to bubble, only applied to window or image // - error event should not bubble to window, although it does pre-1.7 // See http://bugs.jquery.com/ticket/11820 this.triggerHandler.apply(this, args); return this; }; } ); }); jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + "change select submit keydown keypress keyup contextmenu" ).split( " " ), function( _i, name ) { jQuery.each(("blur focus focusin focusout resize scroll click dblclick " + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + "change select submit keydown keypress keyup contextmenu").split(" "), function (_i, name) { // Handle event binding jQuery.fn[ name ] = function( data, fn ) { migrateWarn( "jQuery.fn." + name + "() event shorthand is deprecated" ); return arguments.length > 0 ? this.on( name, null, data, fn ) : this.trigger( name ); }; } ); // Handle event binding jQuery.fn[name] = function (data, fn) { migrateWarn("jQuery.fn." + name + "() event shorthand is deprecated"); return arguments.length > 0 ? this.on(name, null, data, fn) : this.trigger(name); }; }); // Trigger "ready" event only once, on document ready jQuery( function() { jQuery( window.document ).triggerHandler( "ready" ); } ); jQuery(function () { jQuery(window.document).triggerHandler("ready"); }); jQuery.event.special.ready = { setup: function() { if ( this === window.document ) { migrateWarn( "'ready' event is deprecated" ); } } }; jQuery.event.special.ready = { setup: function () { if (this === window.document) { migrateWarn("'ready' event is deprecated"); } } }; jQuery.fn.extend( { jQuery.fn.extend({ bind: function( types, data, fn ) { migrateWarn( "jQuery.fn.bind() is deprecated" ); return this.on( types, null, data, fn ); }, unbind: function( types, fn ) { migrateWarn( "jQuery.fn.unbind() is deprecated" ); return this.off( types, null, fn ); }, delegate: function( selector, types, data, fn ) { migrateWarn( "jQuery.fn.delegate() is deprecated" ); return this.on( types, selector, data, fn ); }, undelegate: function( selector, types, fn ) { migrateWarn( "jQuery.fn.undelegate() is deprecated" ); return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); }, hover: function( fnOver, fnOut ) { migrateWarn( "jQuery.fn.hover() is deprecated" ); return this.on( "mouseenter", fnOver ).on( "mouseleave", fnOut || fnOver ); } } ); bind: function (types, data, fn) { migrateWarn("jQuery.fn.bind() is deprecated"); return this.on(types, null, data, fn); }, unbind: function (types, fn) { migrateWarn("jQuery.fn.unbind() is deprecated"); return this.off(types, null, fn); }, delegate: function (selector, types, data, fn) { migrateWarn("jQuery.fn.delegate() is deprecated"); return this.on(types, selector, data, fn); }, undelegate: function (selector, types, fn) { migrateWarn("jQuery.fn.undelegate() is deprecated"); return arguments.length === 1 ? this.off(selector, "**") : this.off(types, selector || "**", fn); }, hover: function (fnOver, fnOut) { migrateWarn("jQuery.fn.hover() is deprecated"); return this.on("mouseenter", fnOver).on("mouseleave", fnOut || fnOver); } }); var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, origHtmlPrefilter = jQuery.htmlPrefilter, makeMarkup = function( html ) { var doc = window.document.implementation.createHTMLDocument( "" ); doc.body.innerHTML = html; return doc.body && doc.body.innerHTML; }, warnIfChanged = function( html ) { var changed = html.replace( rxhtmlTag, "<$1></$2>" ); if ( changed !== html && makeMarkup( html ) !== makeMarkup( changed ) ) { migrateWarn( "HTML tags must be properly nested and closed: " + html ); } }; var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, origHtmlPrefilter = jQuery.htmlPrefilter, makeMarkup = function (html) { var doc = window.document.implementation.createHTMLDocument(""); doc.body.innerHTML = html; return doc.body && doc.body.innerHTML; }, warnIfChanged = function (html) { var changed = html.replace(rxhtmlTag, "<$1></$2>"); if (changed !== html && makeMarkup(html) !== makeMarkup(changed)) { migrateWarn("HTML tags must be properly nested and closed: " + html); } }; jQuery.UNSAFE_restoreLegacyHtmlPrefilter = function() { jQuery.htmlPrefilter = function( html ) { warnIfChanged( html ); return html.replace( rxhtmlTag, "<$1></$2>" ); }; }; jQuery.UNSAFE_restoreLegacyHtmlPrefilter = function () { jQuery.htmlPrefilter = function (html) { warnIfChanged(html); return html.replace(rxhtmlTag, "<$1></$2>"); }; }; jQuery.htmlPrefilter = function( html ) { warnIfChanged( html ); return origHtmlPrefilter( html ); }; jQuery.htmlPrefilter = function (html) { warnIfChanged(html); return origHtmlPrefilter(html); }; var oldOffset = jQuery.fn.offset; var oldOffset = jQuery.fn.offset; jQuery.fn.offset = function() { var docElem, elem = this[ 0 ], bogus = { top: 0, left: 0 }; jQuery.fn.offset = function () { var docElem, elem = this[0], bogus = {top: 0, left: 0}; if ( !elem || !elem.nodeType ) { migrateWarn( "jQuery.fn.offset() requires a valid DOM element" ); return undefined; } if (!elem || !elem.nodeType) { migrateWarn("jQuery.fn.offset() requires a valid DOM element"); return undefined; } docElem = ( elem.ownerDocument || window.document ).documentElement; if ( !jQuery.contains( docElem, elem ) ) { migrateWarn( "jQuery.fn.offset() requires an element connected to a document" ); return bogus; } docElem = (elem.ownerDocument || window.document).documentElement; if (!jQuery.contains(docElem, elem)) { migrateWarn("jQuery.fn.offset() requires an element connected to a document"); return bogus; } return oldOffset.apply( this, arguments ); }; return oldOffset.apply(this, arguments); }; // Support jQuery slim which excludes the ajax module // The jQuery.param patch is about respecting `jQuery.ajaxSettings.traditional` // so it doesn't make sense for the slim build. if ( jQuery.ajax ) { if (jQuery.ajax) { var oldParam = jQuery.param; var oldParam = jQuery.param; jQuery.param = function( data, traditional ) { var ajaxTraditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; jQuery.param = function (data, traditional) { var ajaxTraditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; if ( traditional === undefined && ajaxTraditional ) { if (traditional === undefined && ajaxTraditional) { migrateWarn( "jQuery.param() no longer uses jQuery.ajaxSettings.traditional" ); traditional = ajaxTraditional; } migrateWarn("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"); traditional = ajaxTraditional; } return oldParam.call( this, data, traditional ); }; return oldParam.call(this, data, traditional); }; } } var oldSelf = jQuery.fn.andSelf || jQuery.fn.addBack; var oldSelf = jQuery.fn.andSelf || jQuery.fn.addBack; jQuery.fn.andSelf = function() { migrateWarn( "jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()" ); return oldSelf.apply( this, arguments ); }; jQuery.fn.andSelf = function () { migrateWarn("jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"); return oldSelf.apply(this, arguments); }; // Support jQuery slim which excludes the deferred module in jQuery 4.0+ if ( jQuery.Deferred ) { if (jQuery.Deferred) { var oldDeferred = jQuery.Deferred, tuples = [ var oldDeferred = jQuery.Deferred, tuples = [ // Action, add listener, callbacks, .then handlers, final state [ "resolve", "done", jQuery.Callbacks( "once memory" ), jQuery.Callbacks( "once memory" ), "resolved" ], [ "reject", "fail", jQuery.Callbacks( "once memory" ), jQuery.Callbacks( "once memory" ), "rejected" ], [ "notify", "progress", jQuery.Callbacks( "memory" ), jQuery.Callbacks( "memory" ) ] ]; // Action, add listener, callbacks, .then handlers, final state ["resolve", "done", jQuery.Callbacks("once memory"), jQuery.Callbacks("once memory"), "resolved"], ["reject", "fail", jQuery.Callbacks("once memory"), jQuery.Callbacks("once memory"), "rejected"], ["notify", "progress", jQuery.Callbacks("memory"), jQuery.Callbacks("memory")] ]; jQuery.Deferred = function( func ) { var deferred = oldDeferred(), promise = deferred.promise(); jQuery.Deferred = function (func) { var deferred = oldDeferred(), promise = deferred.promise(); deferred.pipe = promise.pipe = function( /* fnDone, fnFail, fnProgress */ ) { var fns = arguments; deferred.pipe = promise.pipe = function ( /* fnDone, fnFail, fnProgress */) { var fns = arguments; migrateWarn( "deferred.pipe() is deprecated" ); migrateWarn("deferred.pipe() is deprecated"); return jQuery.Deferred( function( newDefer ) { jQuery.each( tuples, function( i, tuple ) { var fn = typeof fns[ i ] === "function" && fns[ i ]; return jQuery.Deferred(function (newDefer) { jQuery.each(tuples, function (i, tuple) { var fn = typeof fns[i] === "function" && fns[i]; // Deferred.done(function() { bind to newDefer or newDefer.resolve }) // deferred.fail(function() { bind to newDefer or newDefer.reject }) // deferred.progress(function() { bind to newDefer or newDefer.notify }) deferred[ tuple[ 1 ] ]( function() { var returned = fn && fn.apply( this, arguments ); if ( returned && typeof returned.promise === "function" ) { returned.promise() .done( newDefer.resolve ) .fail( newDefer.reject ) .progress( newDefer.notify ); } else { newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); } } ); } ); fns = null; } ).promise(); // Deferred.done(function() { bind to newDefer or newDefer.resolve }) // deferred.fail(function() { bind to newDefer or newDefer.reject }) // deferred.progress(function() { bind to newDefer or newDefer.notify }) deferred[tuple[1]](function () { var returned = fn && fn.apply(this, arguments); if (returned && typeof returned.promise === "function") { returned.promise() .done(newDefer.resolve) .fail(newDefer.reject) .progress(newDefer.notify); } else { newDefer[tuple[0] + "With"]( this === promise ? newDefer.promise() : this, fn ? [returned] : arguments ); } }); }); fns = null; }).promise(); }; }; if ( func ) { func.call( deferred, deferred ); } if (func) { func.call(deferred, deferred); } return deferred; }; return deferred; }; // Preserve handler of uncaught exceptions in promise chains jQuery.Deferred.exceptionHook = oldDeferred.exceptionHook; jQuery.Deferred.exceptionHook = oldDeferred.exceptionHook; } } return jQuery; } ); return jQuery; }); assets/js/jquery.js
Diff too large assets/js/medium-zoom.js
@@ -1,450 +1,458 @@ /*! medium-zoom 1.0.5 | MIT License | https://github.com/francoischalifour/medium-zoom */ (function(global, factory) { typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() : typeof define === "function" && define.amd ? define(factory) : (global = global || self, global.mediumZoom = factory()); })(this, function() { (function (global, factory) { typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() : typeof define === "function" && define.amd ? define(factory) : (global = global || self, global.mediumZoom = factory()); })(this, function () { "use strict"; var _extends = Object.assign || function(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } } return target; return target; }; var isSupported = function isSupported(node) { return node.tagName === "IMG"; return node.tagName === "IMG"; }; var isNodeList = function isNodeList(selector) { return NodeList.prototype.isPrototypeOf(selector); return NodeList.prototype.isPrototypeOf(selector); }; var isNode = function isNode(selector) { return selector && selector.nodeType === 1; return selector && selector.nodeType === 1; }; var isSvg = function isSvg(image) { var source = image.currentSrc || image.src; return source.substr(-4).toLowerCase() === ".svg"; var source = image.currentSrc || image.src; return source.substr(-4).toLowerCase() === ".svg"; }; var getImagesFromSelector = function getImagesFromSelector(selector) { try { if (Array.isArray(selector)) { return selector.filter(isSupported); try { if (Array.isArray(selector)) { return selector.filter(isSupported); } if (isNodeList(selector)) { return [].slice.call(selector).filter(isSupported); } if (isNode(selector)) { return [selector].filter(isSupported); } if (typeof selector === "string") { return [].slice.call(document.querySelectorAll(selector)).filter(isSupported); } return []; } catch (err) { throw new TypeError("The provided selector is invalid.\n" + "Expects a CSS selector, a Node element, a NodeList or an array.\n" + "See: https://github.com/francoischalifour/medium-zoom"); } if (isNodeList(selector)) { return [].slice.call(selector).filter(isSupported); } if (isNode(selector)) { return [ selector ].filter(isSupported); } if (typeof selector === "string") { return [].slice.call(document.querySelectorAll(selector)).filter(isSupported); } return []; } catch (err) { throw new TypeError("The provided selector is invalid.\n" + "Expects a CSS selector, a Node element, a NodeList or an array.\n" + "See: https://github.com/francoischalifour/medium-zoom"); } }; var createOverlay = function createOverlay() { var overlay = document.createElement("div"); overlay.classList.add("medium-zoom-overlay"); return overlay; var overlay = document.createElement("div"); overlay.classList.add("medium-zoom-overlay"); return overlay; }; var cloneTarget = function cloneTarget(template) { var _template$getBounding = template.getBoundingClientRect(), top = _template$getBounding.top, left = _template$getBounding.left, width = _template$getBounding.width, height = _template$getBounding.height; var clone = template.cloneNode(); var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0; var scrollLeft = window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0; clone.removeAttribute("id"); clone.style.position = "absolute"; clone.style.top = top + scrollTop + "px"; clone.style.left = left + scrollLeft + "px"; clone.style.width = width + "px"; clone.style.height = height + "px"; clone.style.transform = ""; return clone; var _template$getBounding = template.getBoundingClientRect(), top = _template$getBounding.top, left = _template$getBounding.left, width = _template$getBounding.width, height = _template$getBounding.height; var clone = template.cloneNode(); var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0; var scrollLeft = window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0; clone.removeAttribute("id"); clone.style.position = "absolute"; clone.style.top = top + scrollTop + "px"; clone.style.left = left + scrollLeft + "px"; clone.style.width = width + "px"; clone.style.height = height + "px"; clone.style.transform = ""; return clone; }; var createCustomEvent = function createCustomEvent(type, params) { var eventParams = _extends({ bubbles: false, cancelable: false, detail: undefined }, params); if (typeof window.CustomEvent === "function") { return new CustomEvent(type, eventParams); } var customEvent = document.createEvent("CustomEvent"); customEvent.initCustomEvent(type, eventParams.bubbles, eventParams.cancelable, eventParams.detail); return customEvent; var eventParams = _extends({ bubbles: false, cancelable: false, detail: undefined }, params); if (typeof window.CustomEvent === "function") { return new CustomEvent(type, eventParams); } var customEvent = document.createEvent("CustomEvent"); customEvent.initCustomEvent(type, eventParams.bubbles, eventParams.cancelable, eventParams.detail); return customEvent; }; var mediumZoom = function mediumZoom(selector) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var Promise = window.Promise || function Promise(fn) { function noop() {} fn(noop, noop); }; var _handleClick = function _handleClick(event) { var target = event.target; if (target === overlay) { close(); return; } if (images.indexOf(target) === -1) { return; } toggle({ target: target }); }; var _handleScroll = function _handleScroll() { if (isAnimating || !active.original) { return; } var currentScroll = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0; if (Math.abs(scrollTop - currentScroll) > zoomOptions.scrollOffset) { setTimeout(close, 150); } }; var _handleKeyUp = function _handleKeyUp(event) { var key = event.key || event.keyCode; if (key === "Escape" || key === "Esc" || key === 27) { close(); } }; var update = function update() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var newOptions = options; if (options.container && options.container instanceof Object) { newOptions.container = _extends({}, zoomOptions.container, options.container); } if (options.template) { var template = isNode(options.template) ? options.template : document.querySelector(options.template); newOptions.template = template; } zoomOptions = _extends({}, zoomOptions, newOptions); images.forEach(function(image) { image.dispatchEvent(createCustomEvent("medium-zoom:update", { detail: { zoom: zoom var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var Promise = window.Promise || function Promise(fn) { function noop() { } })); }); return zoom; }; var clone = function clone() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; return mediumZoom(_extends({}, zoomOptions, options)); }; var attach = function attach() { for (var _len = arguments.length, selectors = Array(_len), _key = 0; _key < _len; _key++) { selectors[_key] = arguments[_key]; } var newImages = selectors.reduce(function(imagesAccumulator, currentSelector) { return [].concat(imagesAccumulator, getImagesFromSelector(currentSelector)); }, []); newImages.filter(function(newImage) { return images.indexOf(newImage) === -1; }).forEach(function(newImage) { images.push(newImage); newImage.classList.add("medium-zoom-image"); }); eventListeners.forEach(function(_ref) { var type = _ref.type, listener = _ref.listener, options = _ref.options; newImages.forEach(function(image) { image.addEventListener(type, listener, options); }); }); return zoom; }; var detach = function detach() { for (var _len2 = arguments.length, selectors = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { selectors[_key2] = arguments[_key2]; } if (active.zoomed) { close(); } var imagesToDetach = selectors.length > 0 ? selectors.reduce(function(imagesAccumulator, currentSelector) { return [].concat(imagesAccumulator, getImagesFromSelector(currentSelector)); }, []) : images; imagesToDetach.forEach(function(image) { image.classList.remove("medium-zoom-image"); image.dispatchEvent(createCustomEvent("medium-zoom:detach", { detail: { zoom: zoom } })); }); images = images.filter(function(image) { return imagesToDetach.indexOf(image) === -1; }); return zoom; }; var on = function on(type, listener) { var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; images.forEach(function(image) { image.addEventListener("medium-zoom:" + type, listener, options); }); eventListeners.push({ type: "medium-zoom:" + type, listener: listener, options: options }); return zoom; }; var off = function off(type, listener) { var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; images.forEach(function(image) { image.removeEventListener("medium-zoom:" + type, listener, options); }); eventListeners = eventListeners.filter(function(eventListener) { return !(eventListener.type === "medium-zoom:" + type && eventListener.listener.toString() === listener.toString()); }); return zoom; }; var open = function open() { var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, target = _ref2.target; var _animate = function _animate() { var container = { width: document.documentElement.clientWidth, height: document.documentElement.clientHeight, left: 0, top: 0, right: 0, bottom: 0 }; var viewportWidth = void 0; var viewportHeight = void 0; if (zoomOptions.container) { if (zoomOptions.container instanceof Object) { container = _extends({}, container, zoomOptions.container); viewportWidth = container.width - container.left - container.right - zoomOptions.margin * 2; viewportHeight = container.height - container.top - container.bottom - zoomOptions.margin * 2; } else { var zoomContainer = isNode(zoomOptions.container) ? zoomOptions.container : document.querySelector(zoomOptions.container); var _zoomContainer$getBou = zoomContainer.getBoundingClientRect(), _width = _zoomContainer$getBou.width, _height = _zoomContainer$getBou.height, _left = _zoomContainer$getBou.left, _top = _zoomContainer$getBou.top; container = _extends({}, container, { width: _width, height: _height, left: _left, top: _top }); } } viewportWidth = viewportWidth || container.width - zoomOptions.margin * 2; viewportHeight = viewportHeight || container.height - zoomOptions.margin * 2; var zoomTarget = active.zoomedHd || active.original; var naturalWidth = isSvg(zoomTarget) ? viewportWidth : zoomTarget.naturalWidth || viewportWidth; var naturalHeight = isSvg(zoomTarget) ? viewportHeight : zoomTarget.naturalHeight || viewportHeight; var _zoomTarget$getBoundi = zoomTarget.getBoundingClientRect(), top = _zoomTarget$getBoundi.top, left = _zoomTarget$getBoundi.left, width = _zoomTarget$getBoundi.width, height = _zoomTarget$getBoundi.height; var scaleX = Math.min(naturalWidth, viewportWidth) / width; var scaleY = Math.min(naturalHeight, viewportHeight) / height; var scale = Math.min(scaleX, scaleY); var translateX = (-left + (viewportWidth - width) / 2 + zoomOptions.margin + container.left) / scale; var translateY = (-top + (viewportHeight - height) / 2 + zoomOptions.margin + container.top) / scale; var transform = "scale(" + scale + ") translate3d(" + translateX + "px, " + translateY + "px, 0)"; active.zoomed.style.transform = transform; if (active.zoomedHd) { active.zoomedHd.style.transform = transform; } fn(noop, noop); }; return new Promise(function(resolve) { if (target && images.indexOf(target) === -1) { resolve(zoom); return; } var _handleOpenEnd = function _handleOpenEnd() { isAnimating = false; active.zoomed.removeEventListener("transitionend", _handleOpenEnd); active.original.dispatchEvent(createCustomEvent("medium-zoom:opened", { detail: { zoom: zoom } })); resolve(zoom); }; if (active.zoomed) { resolve(zoom); return; } if (target) { active.original = target; } else if (images.length > 0) { var _images = images; active.original = _images[0]; } else { resolve(zoom); return; } active.original.dispatchEvent(createCustomEvent("medium-zoom:open", { detail: { zoom: zoom var _handleClick = function _handleClick(event) { var target = event.target; if (target === overlay) { close(); return; } })); scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0; isAnimating = true; active.zoomed = cloneTarget(active.original); document.body.appendChild(overlay); if (zoomOptions.template) { var template = isNode(zoomOptions.template) ? zoomOptions.template : document.querySelector(zoomOptions.template); active.template = document.createElement("div"); active.template.appendChild(template.content.cloneNode(true)); document.body.appendChild(active.template); } document.body.appendChild(active.zoomed); window.requestAnimationFrame(function() { document.body.classList.add("medium-zoom--opened"); }); active.original.classList.add("medium-zoom-image--hidden"); active.zoomed.classList.add("medium-zoom-image--opened"); active.zoomed.addEventListener("click", close); active.zoomed.addEventListener("transitionend", _handleOpenEnd); if (active.original.getAttribute("data-zoom-src")) { active.zoomedHd = active.zoomed.cloneNode(); active.zoomedHd.removeAttribute("srcset"); active.zoomedHd.removeAttribute("sizes"); active.zoomedHd.src = active.zoomed.getAttribute("data-zoom-src"); active.zoomedHd.onerror = function() { clearInterval(getZoomTargetSize); console.warn("Unable to reach the zoom image target " + active.zoomedHd.src); active.zoomedHd = null; _animate(); }; var getZoomTargetSize = setInterval(function() { if (active.zoomedHd.complete) { clearInterval(getZoomTargetSize); active.zoomedHd.classList.add("medium-zoom-image--opened"); active.zoomedHd.addEventListener("click", close); document.body.appendChild(active.zoomedHd); _animate(); } }, 10); } else if (active.original.hasAttribute("srcset")) { active.zoomedHd = active.zoomed.cloneNode(); active.zoomedHd.removeAttribute("sizes"); var loadEventListener = active.zoomedHd.addEventListener("load", function() { active.zoomedHd.removeEventListener("load", loadEventListener); active.zoomedHd.classList.add("medium-zoom-image--opened"); active.zoomedHd.addEventListener("click", close); document.body.appendChild(active.zoomedHd); _animate(); if (images.indexOf(target) === -1) { return; } toggle({ target: target }); } else { _animate(); } }); }; var close = function close() { return new Promise(function(resolve) { if (isAnimating || !active.original) { resolve(zoom); return; } var _handleCloseEnd = function _handleCloseEnd() { active.original.classList.remove("medium-zoom-image--hidden"); document.body.removeChild(active.zoomed); if (active.zoomedHd) { document.body.removeChild(active.zoomedHd); }; var _handleScroll = function _handleScroll() { if (isAnimating || !active.original) { return; } document.body.removeChild(overlay); active.zoomed.classList.remove("medium-zoom-image--opened"); if (active.template) { document.body.removeChild(active.template); var currentScroll = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0; if (Math.abs(scrollTop - currentScroll) > zoomOptions.scrollOffset) { setTimeout(close, 150); } isAnimating = false; active.zoomed.removeEventListener("transitionend", _handleCloseEnd); active.original.dispatchEvent(createCustomEvent("medium-zoom:closed", { detail: { zoom: zoom } })); active.original = null; active.zoomed = null; active.zoomedHd = null; active.template = null; resolve(zoom); }; isAnimating = true; document.body.classList.remove("medium-zoom--opened"); active.zoomed.style.transform = ""; if (active.zoomedHd) { active.zoomedHd.style.transform = ""; } if (active.template) { active.template.style.transition = "opacity 150ms"; active.template.style.opacity = 0; } active.original.dispatchEvent(createCustomEvent("medium-zoom:close", { detail: { zoom: zoom }; var _handleKeyUp = function _handleKeyUp(event) { var key = event.key || event.keyCode; if (key === "Escape" || key === "Esc" || key === 27) { close(); } })); active.zoomed.addEventListener("transitionend", _handleCloseEnd); }); }; var toggle = function toggle() { var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, target = _ref3.target; if (active.original) { return close(); }; var update = function update() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var newOptions = options; if (options.container && options.container instanceof Object) { newOptions.container = _extends({}, zoomOptions.container, options.container); } if (options.template) { var template = isNode(options.template) ? options.template : document.querySelector(options.template); newOptions.template = template; } zoomOptions = _extends({}, zoomOptions, newOptions); images.forEach(function (image) { image.dispatchEvent(createCustomEvent("medium-zoom:update", { detail: { zoom: zoom } })); }); return zoom; }; var clone = function clone() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; return mediumZoom(_extends({}, zoomOptions, options)); }; var attach = function attach() { for (var _len = arguments.length, selectors = Array(_len), _key = 0; _key < _len; _key++) { selectors[_key] = arguments[_key]; } var newImages = selectors.reduce(function (imagesAccumulator, currentSelector) { return [].concat(imagesAccumulator, getImagesFromSelector(currentSelector)); }, []); newImages.filter(function (newImage) { return images.indexOf(newImage) === -1; }).forEach(function (newImage) { images.push(newImage); newImage.classList.add("medium-zoom-image"); }); eventListeners.forEach(function (_ref) { var type = _ref.type, listener = _ref.listener, options = _ref.options; newImages.forEach(function (image) { image.addEventListener(type, listener, options); }); }); return zoom; }; var detach = function detach() { for (var _len2 = arguments.length, selectors = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { selectors[_key2] = arguments[_key2]; } if (active.zoomed) { close(); } var imagesToDetach = selectors.length > 0 ? selectors.reduce(function (imagesAccumulator, currentSelector) { return [].concat(imagesAccumulator, getImagesFromSelector(currentSelector)); }, []) : images; imagesToDetach.forEach(function (image) { image.classList.remove("medium-zoom-image"); image.dispatchEvent(createCustomEvent("medium-zoom:detach", { detail: { zoom: zoom } })); }); images = images.filter(function (image) { return imagesToDetach.indexOf(image) === -1; }); return zoom; }; var on = function on(type, listener) { var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; images.forEach(function (image) { image.addEventListener("medium-zoom:" + type, listener, options); }); eventListeners.push({ type: "medium-zoom:" + type, listener: listener, options: options }); return zoom; }; var off = function off(type, listener) { var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; images.forEach(function (image) { image.removeEventListener("medium-zoom:" + type, listener, options); }); eventListeners = eventListeners.filter(function (eventListener) { return !(eventListener.type === "medium-zoom:" + type && eventListener.listener.toString() === listener.toString()); }); return zoom; }; var open = function open() { var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, target = _ref2.target; var _animate = function _animate() { var container = { width: document.documentElement.clientWidth, height: document.documentElement.clientHeight, left: 0, top: 0, right: 0, bottom: 0 }; var viewportWidth = void 0; var viewportHeight = void 0; if (zoomOptions.container) { if (zoomOptions.container instanceof Object) { container = _extends({}, container, zoomOptions.container); viewportWidth = container.width - container.left - container.right - zoomOptions.margin * 2; viewportHeight = container.height - container.top - container.bottom - zoomOptions.margin * 2; } else { var zoomContainer = isNode(zoomOptions.container) ? zoomOptions.container : document.querySelector(zoomOptions.container); var _zoomContainer$getBou = zoomContainer.getBoundingClientRect(), _width = _zoomContainer$getBou.width, _height = _zoomContainer$getBou.height, _left = _zoomContainer$getBou.left, _top = _zoomContainer$getBou.top; container = _extends({}, container, { width: _width, height: _height, left: _left, top: _top }); } } viewportWidth = viewportWidth || container.width - zoomOptions.margin * 2; viewportHeight = viewportHeight || container.height - zoomOptions.margin * 2; var zoomTarget = active.zoomedHd || active.original; var naturalWidth = isSvg(zoomTarget) ? viewportWidth : zoomTarget.naturalWidth || viewportWidth; var naturalHeight = isSvg(zoomTarget) ? viewportHeight : zoomTarget.naturalHeight || viewportHeight; var _zoomTarget$getBoundi = zoomTarget.getBoundingClientRect(), top = _zoomTarget$getBoundi.top, left = _zoomTarget$getBoundi.left, width = _zoomTarget$getBoundi.width, height = _zoomTarget$getBoundi.height; var scaleX = Math.min(naturalWidth, viewportWidth) / width; var scaleY = Math.min(naturalHeight, viewportHeight) / height; var scale = Math.min(scaleX, scaleY); var translateX = (-left + (viewportWidth - width) / 2 + zoomOptions.margin + container.left) / scale; var translateY = (-top + (viewportHeight - height) / 2 + zoomOptions.margin + container.top) / scale; var transform = "scale(" + scale + ") translate3d(" + translateX + "px, " + translateY + "px, 0)"; active.zoomed.style.transform = transform; if (active.zoomedHd) { active.zoomedHd.style.transform = transform; } }; return new Promise(function (resolve) { if (target && images.indexOf(target) === -1) { resolve(zoom); return; } var _handleOpenEnd = function _handleOpenEnd() { isAnimating = false; active.zoomed.removeEventListener("transitionend", _handleOpenEnd); active.original.dispatchEvent(createCustomEvent("medium-zoom:opened", { detail: { zoom: zoom } })); resolve(zoom); }; if (active.zoomed) { resolve(zoom); return; } if (target) { active.original = target; } else if (images.length > 0) { var _images = images; active.original = _images[0]; } else { resolve(zoom); return; } active.original.dispatchEvent(createCustomEvent("medium-zoom:open", { detail: { zoom: zoom } })); scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0; isAnimating = true; active.zoomed = cloneTarget(active.original); document.body.appendChild(overlay); if (zoomOptions.template) { var template = isNode(zoomOptions.template) ? zoomOptions.template : document.querySelector(zoomOptions.template); active.template = document.createElement("div"); active.template.appendChild(template.content.cloneNode(true)); document.body.appendChild(active.template); } document.body.appendChild(active.zoomed); window.requestAnimationFrame(function () { document.body.classList.add("medium-zoom--opened"); }); active.original.classList.add("medium-zoom-image--hidden"); active.zoomed.classList.add("medium-zoom-image--opened"); active.zoomed.addEventListener("click", close); active.zoomed.addEventListener("transitionend", _handleOpenEnd); if (active.original.getAttribute("data-zoom-src")) { active.zoomedHd = active.zoomed.cloneNode(); active.zoomedHd.removeAttribute("srcset"); active.zoomedHd.removeAttribute("sizes"); active.zoomedHd.src = active.zoomed.getAttribute("data-zoom-src"); active.zoomedHd.onerror = function () { clearInterval(getZoomTargetSize); console.warn("Unable to reach the zoom image target " + active.zoomedHd.src); active.zoomedHd = null; _animate(); }; var getZoomTargetSize = setInterval(function () { if (active.zoomedHd.complete) { clearInterval(getZoomTargetSize); active.zoomedHd.classList.add("medium-zoom-image--opened"); active.zoomedHd.addEventListener("click", close); document.body.appendChild(active.zoomedHd); _animate(); } }, 10); } else if (active.original.hasAttribute("srcset")) { active.zoomedHd = active.zoomed.cloneNode(); active.zoomedHd.removeAttribute("sizes"); var loadEventListener = active.zoomedHd.addEventListener("load", function () { active.zoomedHd.removeEventListener("load", loadEventListener); active.zoomedHd.classList.add("medium-zoom-image--opened"); active.zoomedHd.addEventListener("click", close); document.body.appendChild(active.zoomedHd); _animate(); }); } else { _animate(); } }); }; var close = function close() { return new Promise(function (resolve) { if (isAnimating || !active.original) { resolve(zoom); return; } var _handleCloseEnd = function _handleCloseEnd() { active.original.classList.remove("medium-zoom-image--hidden"); document.body.removeChild(active.zoomed); if (active.zoomedHd) { document.body.removeChild(active.zoomedHd); } document.body.removeChild(overlay); active.zoomed.classList.remove("medium-zoom-image--opened"); if (active.template) { document.body.removeChild(active.template); } isAnimating = false; active.zoomed.removeEventListener("transitionend", _handleCloseEnd); active.original.dispatchEvent(createCustomEvent("medium-zoom:closed", { detail: { zoom: zoom } })); active.original = null; active.zoomed = null; active.zoomedHd = null; active.template = null; resolve(zoom); }; isAnimating = true; document.body.classList.remove("medium-zoom--opened"); active.zoomed.style.transform = ""; if (active.zoomedHd) { active.zoomedHd.style.transform = ""; } if (active.template) { active.template.style.transition = "opacity 150ms"; active.template.style.opacity = 0; } active.original.dispatchEvent(createCustomEvent("medium-zoom:close", { detail: { zoom: zoom } })); active.zoomed.addEventListener("transitionend", _handleCloseEnd); }); }; var toggle = function toggle() { var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, target = _ref3.target; if (active.original) { return close(); } return open({ target: target }); }; var getOptions = function getOptions() { return zoomOptions; }; var getImages = function getImages() { return images; }; var getZoomedImage = function getZoomedImage() { return active.original; }; var images = []; var eventListeners = []; var isAnimating = false; var scrollTop = 0; var zoomOptions = options; var active = { original: null, zoomed: null, zoomedHd: null, template: null }; if (Object.prototype.toString.call(selector) === "[object Object]") { zoomOptions = selector; } else if (selector || typeof selector === "string") { attach(selector); } return open({ target: target }); }; var getOptions = function getOptions() { return zoomOptions; }; var getImages = function getImages() { return images; }; var getZoomedImage = function getZoomedImage() { return active.original; }; var images = []; var eventListeners = []; var isAnimating = false; var scrollTop = 0; var zoomOptions = options; var active = { original: null, zoomed: null, zoomedHd: null, template: null }; if (Object.prototype.toString.call(selector) === "[object Object]") { zoomOptions = selector; } else if (selector || typeof selector === "string") { attach(selector); } zoomOptions = _extends({ margin: 0, scrollOffset: 40, container: null, template: null }, zoomOptions); var overlay = createOverlay(); document.addEventListener("click", _handleClick); document.addEventListener("keyup", _handleKeyUp); document.addEventListener("scroll", _handleScroll); window.addEventListener("resize", close); var zoom = { open: open, close: close, toggle: toggle, update: update, clone: clone, attach: attach, detach: detach, on: on, off: off, getOptions: getOptions, getImages: getImages, getZoomedImage: getZoomedImage }; return zoom; zoomOptions = _extends({ margin: 0, scrollOffset: 40, container: null, template: null }, zoomOptions); var overlay = createOverlay(); document.addEventListener("click", _handleClick); document.addEventListener("keyup", _handleKeyUp); document.addEventListener("scroll", _handleScroll); window.addEventListener("resize", close); var zoom = { open: open, close: close, toggle: toggle, update: update, clone: clone, attach: attach, detach: detach, on: on, off: off, getOptions: getOptions, getImages: getImages, getZoomedImage: getZoomedImage }; return zoom; }; return mediumZoom; }); }); mediumZoom(document.querySelectorAll('div.post-content img')); mediumZoom(document.querySelectorAll('div.post-content img')); exampleSite/config.toml
@@ -73,4 +73,4 @@ name = "About" weight = 300 identifier = "about" url = "/about/" url = "/about/" exampleSite/content/_index.md
@@ -1,4 +1,3 @@ +++ author = "Hugo Authors" +++ exampleSite/content/about.md
@@ -23,6 +23,3 @@ Websites built with Hugo are extremelly fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider. Learn more and contribute on [GitHub](https://github.com/gohugoio). exampleSite/content/archives.md
@@ -2,4 +2,4 @@ date: 2019-05-28 type: section layout: "archives" --- --- exampleSite/content/post/emoji-support.md
@@ -44,4 +44,4 @@ } } </style> {{< /css.inline >}} {{< /css.inline >}} exampleSite/content/post/markdown-syntax.md
@@ -148,4 +148,3 @@ Press <kbd><kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd></kbd> to end the session. Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures. exampleSite/content/post/math-typesetting.md
@@ -44,4 +44,3 @@ $$ \varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } } $$ i18n/ch-zn.toml
@@ -18,4 +18,4 @@ other = "返回 <a href=\"{{ . }}\">主页面</a>." [comments] other = "注释" other = "注释" i18n/en.toml
@@ -18,4 +18,4 @@ other = "You can head back to <a href=\"{{ . }}\">homepage</a>." [comments] other = "comments" other = "comments" i18n/fa.toml
@@ -18,4 +18,4 @@ other = "شما میتوانید برگردید به <a href=\"{{ . }}\">صفحه اصلی</a>." [comments] other = "نظرات" other = "نظرات" layouts/404.html
@@ -1,8 +1,8 @@ {{ define "main" }} <div class="page_404"> <h1>404</h1> <h2>{{ i18n "page_not_found" }}</h2> <p>{{ i18n "page_does_not_exist" }}</p> <p>{{ i18n "head_back" .Site.BaseURL | safeHTML }}</p> </div> <div class="page_404"> <h1>404</h1> <h2>{{ i18n "page_not_found" }}</h2> <p>{{ i18n "page_does_not_exist" }}</p> <p>{{ i18n "head_back" .Site.BaseURL | safeHTML }}</p> </div> {{ end }} layouts/_default/baseof.html
@@ -1,19 +1,19 @@ <!DOCTYPE html> <html lang="{{- site.Language.Lang -}}" data-theme="{{- .Site.Params.displayMode -}}"> {{- partial "head.html" . -}} <body> {{- partial "head.html" . -}} <body> {{- partial "sidebar.html" . -}} <div class="main"> {{ partial "navbar.html" . }} <div class="autopagerize_page_element"> <div class="content"> {{- block "main" . }}{{- end }} </div> </div> {{- partial "sidebar.html" . -}} <div class="main"> {{ partial "navbar.html" . }} <div class="autopagerize_page_element"> <div class="content"> {{- block "main" . }}{{- end }} </div> </div> </div> {{- partial "footer.html" . -}} </body> {{- partial "footer.html" . -}} </body> </html> layouts/_default/list.html
@@ -1,6 +1,5 @@ {{ define "main" }} <div class="archive animated fadeInDown"> <ul class="list-with-title"> {{ range .Data.Pages.GroupByDate "2006" }} <div class="listing-title">{{ .Key }}</div> @@ -16,4 +15,4 @@ {{ end }} </ul> </div> {{ end }} {{ end }} layouts/_default/single.html
@@ -1,36 +1,36 @@ {{ define "main" }} <div class="post animated fadeInDown"> <div class="post-content"> {{ define "main" }} <div class="post animated fadeInDown"> <div class="post-content"> <div class="post-title"> <h3>{{ .Title }} </h3> <div class="post-title"> <h3>{{ .Title }}</h3> {{ if eq .Type "post"}} <div class="info"> <em class="fa fa-sun-o"></em> <span class="date">{{ .Date.Format "Mon, Jan 2, 2006" }}</span> <em class="fa fa-clock-o"></em> <span class="reading-time">{{ i18n "reading_time" .ReadingTime }}</span> </div> {{ end }} </div> {{ .Content }} </div> <div class="post-footer"> <div class="info"> {{ with .Page.Params.Categories }}{{ partial "taxonomy/categories.html" . }}{{ end }} {{ with .Page.Params.Tags }}{{ partial "taxonomy/tags.html" . }}{{ end }} </div> </div> {{ if eq .Type "post"}} <div class="info"> <i class="fa fa-sun-o"></i> <span class="date">{{ .Date.Format "Mon, Jan 2, 2006" }}</span> <i class="fa fa-clock-o"></i><span class="reading-time">{{ i18n "reading_time" .ReadingTime }}</span> </div> {{ if .Site.DisqusShortname -}} <div id="fb_comments_container"> <h2>{{ i18n "comments" }}</h2> {{ template "_internal/disqus.html" . }} </div> {{- end }} {{ end }} </div> {{ .Content }} </div> <div class="post-footer"> <div class="info"> {{ with .Page.Params.Categories }}{{ partial "taxonomy/categories.html" . }}{{ end }} {{ with .Page.Params.Tags }}{{ partial "taxonomy/tags.html" . }}{{ end }} </div> </div> {{ if eq .Type "post"}} {{ if .Site.DisqusShortname -}} <div id="fb_comments_container"> <h2>{{ i18n "comments" }}</h2> {{ template "_internal/disqus.html" . }} </div> {{- end }} {{ end }} </div> {{ end }} {{ end }} layouts/index.html
@@ -1,28 +1,32 @@ {{ define "main" }} {{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }} {{ range $paginator.Pages }} <div class="post animated fadeInDown"> <div class="post-title"> <h3><a href="{{ .RelPermalink }}">{{ .Title }}</a> </h3> </div> <div class="post-content"><div class="p_part"><p>{{ .Summary }}</p></div> <div class="p_part"><p></p></div></div> <div class="post-footer"> <div class="meta"> <div class="info"><i class="fa fa-sun-o"></i><span class="date">{{ .Date.Format "Mon, Jan 2, 2006" }}</span> {{ with .Params.tags }} {{- range $index, $el := . -}} <a class="tag" href="{{ ( printf "tags/%s/" ( . | urlize ) ) | relLangURL }}">{{ . }}</a> {{- end -}} {{ end }} {{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }} {{ range $paginator.Pages }} <div class="post animated fadeInDown"> <div class="post-title"> <h3><a href="{{ .RelPermalink }}">{{ .Title }}</a> </h3> </div> <div class="post-content"> <div class="p_part"><p>{{ .Summary }}</p></div> <div class="p_part"><p></p></div> </div> <div class="post-footer"> <div class="meta"> <div class="info"><em class="fa fa-sun-o"></em><span class="date">{{ .Date.Format "Mon, Jan 2, 2006" }}</span> {{ with .Params.tags }} {{- range $index, $el := . -}} <a class="tag" href="{{ ( printf "tags/%s/" ( . | urlize ) ) | relLangURL }}">{{ . }}</a> {{- end -}} {{ end }} </div> </div> </div> </div> </div> {{ end }} <div class="pagination"> {{ template "_internal/pagination.html" . }} </div> </div> {{ end }} <div class="pagination"> {{ template "_internal/pagination.html" . }} </div> {{ end }} layouts/partials/footer.html
@@ -1,11 +1,18 @@ {{ $js := resources.Get "js/jquery.js" }} {{ $secureJS := $js | resources.Minify | resources.Fingerprint }} <script type="text/javascript" src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}" crossorigin="anonymous"></script> <script type="text/javascript" src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}" crossorigin="anonymous"></script> {{ $migrate := resources.Get "js/jquery-migrate.js" }} {{ $appear := resources.Get "js/jquery-appear.js" }} {{ $js := slice $migrate $appear | resources.Concat "js/bundle.js" }} {{ $secureJS := $js | resources.Minify | resources.Fingerprint }} <script type="text/javascript" src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}" crossorigin="anonymous"></script> <script type="text/javascript" src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}" crossorigin="anonymous"></script> {{- partial "medium-zoom.html" . -}} {{- partial "math.html" . -}} {{- template "_internal/google_analytics_async.html" . -}} layouts/partials/head.html
@@ -1,55 +1,77 @@ <head> <title> {{.Site.Params.author}}{{ with .Title }} | {{ . }}{{ end }} </title> <!-- Meta --> <meta charset="utf-8"> {{- hugo.Generator -}} <meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover"> <meta name="description" content="{{ .Site.Params.description }}"> {{- if .Site.Params.googleSiteVerify }} <meta name="google-site-verification" content="{{ .Site.Params.googleSiteVerify }}"> {{- end -}} <!-- CSS --> {{ $style := resources.Get "css/style.css" | resources.Minify | resources.Fingerprint }} <link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}" crossorigin="anonymous" type="text/css"> <link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}" crossorigin="anonymous" type="text/css"> {{- $css := "" -}} {{- range .Site.Params.customCss -}} {{ $css := resources.Get . | fingerprint }} <link rel="stylesheet" href="{{ $css.Permalink }}" integrity="{{ $css.Data.Integrity }}" crossorigin="anonymous" type="text/css"> <link rel="stylesheet" href="{{ $css.Permalink }}" integrity="{{ $css.Data.Integrity }}" crossorigin="anonymous" type="text/css"> {{- end -}} <link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous"> <link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous"> <!-- Favicons --> <link rel="shortcut icon" href="{{ .Site.Params.favicon | absURL }}favicon.ico" type="image/x-icon"> <link rel="apple-touch-icon" sizes="180x180" href="{{ .Site.Params.favicon | absURL }}apple-touch-icon.png"> <link rel="icon" type="image/png" sizes="32x32" href="{{ .Site.Params.favicon | absURL }}favicon-32x32.png"> <link rel="icon" type="image/png" sizes="16x16" href="{{ .Site.Params.favicon | absURL }}favicon-16x16.png"> <link rel="canonical" href="{{ .Permalink }}"> <!-- RSS --> {{ with .OutputFormats.Get "rss" -}} {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ end -}} <!-- JavaScript --> {{ $anatole := resources.Get "js/anatole-header.js" }} {{ $secureJS := $anatole | resources.Minify | resources.Fingerprint }} <script type="text/javascript" src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}" crossorigin="anonymous"></script> <script type="text/javascript" src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}" crossorigin="anonymous"></script> {{- $js := "" -}} {{- range .Site.Params.customJs -}} {{- if or (in . "http://") (in . "https://") -}} <script src="{{ . | relURL }}"></script> {{- else -}} {{- $customJS := resources.Get . -}} {{- if $customJS -}} {{- if eq $js "" -}} {{- $js = $customJS -}} {{- else -}} {{- $js = slice $js $customJS | resources.Concat "js/custom.js" -}} {{- end -}} {{- if or (in . "http://") (in . "https://") -}} <script src="{{ . | relURL }}"></script> {{- else -}} {{- $customJS := resources.Get . -}} {{- if $customJS -}} {{- if eq $js "" -}} {{- $js = $customJS -}} {{- else -}} {{- $js = slice $js $customJS | resources.Concat "js/custom.js" -}} {{- end -}} {{- end -}} {{- end -}} {{- end -}} {{- end -}} {{- if .Site.Params.googleSiteVerify }} <!-- Google Site Verification --> <meta name="google-site-verification" content="{{ .Site.Params.googleSiteVerify }}"> {{- end -}} {{- if ne $js "" -}} {{- $secureJS := $js | resources.Minify | resources.Fingerprint -}} <script type="text/javascript" src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}" crossorigin="anonymous"></script> <script type="text/javascript" src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}" crossorigin="anonymous"></script> {{- end -}} <!-- Twitter Cards --> layouts/partials/math.html
@@ -10,21 +10,35 @@ {{- if eq $use "mathjax" -}} {{- $url := "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-AMS-MML_HTMLorMML" -}} {{- $hash := "sha384-e/4/LvThKH1gwzXhdbY2AsjR3rm7LHWyhIG5C0jiRfn8AN2eTN5ILeztWw0H9jmN" -}} <script defer type="text/javascript" src="{{- $url -}}" integrity="{{- $hash -}}" crossorigin="anonymous"></script> <script type="text/x-mathjax-config">MathJax.Hub.Config({ tex2jax: { inlineMath: [['$','$'], ['\\(','\\)']] } });</script> <script defer type="text/javascript" src="{{- $url -}}" integrity="{{- $hash -}}" crossorigin="anonymous"></script> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [['$','$'], ['\\(','\\)']] } }); </script> {{- else -}} {{- $url := "https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" -}} {{- $hash := "sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" -}} <link rel="stylesheet" href="{{- $url -}}" integrity="{{- $hash -}}" crossorigin="anonymous"> <link rel="stylesheet" href="{{- $url -}}" integrity="{{- $hash -}}" crossorigin="anonymous"> {{- $url := "https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js" -}} {{- $hash := "sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" -}} <script defer src="{{- $url -}}" integrity="{{- $hash -}}" crossorigin="anonymous"></script> <script defer src="{{- $url -}}" integrity="{{- $hash -}}" crossorigin="anonymous"></script> {{- $url := "https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js" -}} {{- $hash := "sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" -}} <script defer src="{{- $url -}}" integrity="{{- $hash -}}" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script> <script defer src="{{- $url -}}" integrity="{{- $hash -}}" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script> {{- end -}} {{- end -}} {{- end -}} layouts/partials/medium-zoom.html
@@ -1,3 +1,6 @@ {{ $js := resources.Get "js/medium-zoom.js" }} {{ $secureJS := $js | resources.Minify | resources.Fingerprint }} <script type="text/javascript" src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}" crossorigin="anonymous"></script> <script type="text/javascript" src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}" crossorigin="anonymous"></script> layouts/partials/navbar.html
@@ -1,24 +1,32 @@ <div class="page-top animated fadeInDown"> <a role="button" class="navbar-burger" data-target="navMenu" aria-label="menu" aria-expanded="false" > <a role="button" class="navbar-burger" data-target="navMenu" aria-label="menu" aria-expanded="false"> <span aria-hidden="true"></span> <span aria-hidden="true"></span> <span aria-hidden="true"></span> </a> </a> <ul class="nav" id="navMenu"> {{ $url := .RelPermalink }} {{ range .Site.Menus.main }} {{ $active := eq $url .URL }} <li><a {{if $active }}class="current"{{end}} href="{{ .URL }}" {{ if strings.HasPrefix .URL "http" }}target="_blank" rel="noopener noreferrer" {{ end }} title="{{ .Title }}">{{ .Name }}</a></li> {{ $active := eq $url .URL }} <li><a {{if $active }}class="current"{{end}} href="{{ .URL }}" {{ if strings.HasPrefix .URL "http" }} target="_blank" rel="noopener noreferrer" {{ end }} title="{{ .Title }}">{{ .Name }}</a></li> {{ end }} {{ if .Site.IsMultiLingual }} {{ range $.Site.Home.AllTranslations }} <li><a href="{{ .Permalink }}" title="{{ .Language.LanguageName }}">{{ .Language.LanguageName }}</a></li> <li><a href="{{ .Permalink }}" title="{{ .Language.LanguageName }}">{{ .Language.LanguageName }}</a> </li> {{ end }} {{ end }} <li class="theme-switch-item"> <a class="theme-switch" title="Switch Theme"> <i class="fa fa-adjust fa-fw" aria-hidden="true"></i> </a> <a class="theme-switch" title="Switch Theme"> <i class="fa fa-adjust fa-fw" aria-hidden="true"></i> </a> </li> </ul> </div> layouts/partials/taxonomy/categories.html
@@ -1,4 +1,3 @@ <span class="separator"> {{- range $index, $el := . -}} <a class="category" href="{{ ( printf "categories/%s/" ( . | urlize ) ) | relLangURL }}">{{ . }}</a> layouts/partials/taxonomy/tags.html
@@ -1,6 +1,5 @@ <span class="separator"> {{- range $index, $el := . -}} <a class="tag" href="{{ ( printf "tags/%s/" ( . | urlize ) ) | relLangURL }}">{{ . }}</a> {{- end -}} </span> <span class="separator"> {{- range $index, $el := . -}} <a class="tag" href="{{ ( printf "tags/%s/" ( . | urlize ) ) | relLangURL }}">{{ . }}</a> {{- end -}} </span>