-
Notifications
You must be signed in to change notification settings - Fork 2k
Reduce the use of !important for GitHub banner
#744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
83f495b
88c803b
991570e
9d12ad1
9888a55
2f5ac6b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,8 @@ | ||
| {% if theme.github_banner.enable %} | ||
| {% set github_banner_bg_color = theme.android_chrome_color %} | ||
| {% set github_banner_fg_color = '#fff' %} | ||
| {% set github_URL = theme.github_banner.permalink %} | ||
| {% set github_title = theme.github_banner.title %} | ||
|
|
||
| {% set github_image = '<svg width="80" height="80" viewBox="0 0 250 250" style="fill: ' + github_banner_bg_color + '; color: ' + github_banner_fg_color + '; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg>' %} | ||
| {% set github_image = '<svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg>' %} | ||
|
|
||
| {{ next_url(github_URL, github_image, {class: 'github-corner', title: github_title, "aria-label": github_title}) }} | ||
| {% endif %} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,15 @@ | ||
| @keyframes octocat-wave { | ||
| 0%, 100% { | ||
| transform: rotate(0); | ||
| } | ||
| 20%, 60% { | ||
| transform: rotate(-25deg); | ||
| } | ||
| 40%, 80% { | ||
| transform: rotate(10deg); | ||
| } | ||
| } | ||
|
|
||
| .github-corner { | ||
| scheme = hexo-config('scheme'); | ||
| bg_color = unquote(hexo-config('android_chrome_color')); | ||
|
|
@@ -6,22 +18,19 @@ | |
| :hover .octo-arm { | ||
| animation: octocat-wave 560ms ease-in-out; | ||
| } | ||
| @keyframes octocat-wave { | ||
| 0%, 100% { | ||
| transform: rotate(0); | ||
| } | ||
| 20%, 60% { | ||
| transform: rotate(-25deg); | ||
| } | ||
| 40%, 80% { | ||
| transform: rotate(10deg); | ||
| } | ||
| > svg { | ||
| fill: bg_color; | ||
| color: #fff; | ||
| position: absolute; | ||
| top: 0; | ||
| border: 0; | ||
| right: 0; | ||
| } | ||
| +tablet-mobile() { | ||
| > svg { | ||
| if (scheme == 'Pisces') || (scheme == 'Gemini') { | ||
| fill: #fff !important; | ||
| color: bg_color !important; | ||
| fill: #fff; | ||
| color: bg_color; | ||
| } | ||
| } | ||
| .github-corner:hover .octo-arm { | ||
|
|
@@ -34,8 +43,7 @@ | |
| +mobile() { | ||
| > svg { | ||
| if (scheme == 'Mist') { | ||
| top: inherit !important; | ||
| margin-top: -50px; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, my fault: i forgot to checkout your pull. |
||
| top: inherit; | ||
| if mobile_layout_economy { | ||
| +mobile-small() { | ||
| margin-top: initial; | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,6 +1,5 @@ | ||||||||||||||||||||||||||||
| .posts-expand { | ||||||||||||||||||||||||||||
| .post-eof { | ||||||||||||||||||||||||||||
| show(); | ||||||||||||||||||||||||||||
| margin: $post-eof-margin-top auto $post-eof-margin-bottom; | ||||||||||||||||||||||||||||
| width: 8%; | ||||||||||||||||||||||||||||
| height: 1px; | ||||||||||||||||||||||||||||
|
|
@@ -10,7 +9,7 @@ | |||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| .post:last-child { | ||||||||||||||||||||||||||||
| .post-eof.post-eof.post-eof { | ||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Screen? Where is this class?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure. But it's same as
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This thing need to add delimeter between posts in homepage. And of course, last delimeter no needed, that's why display hexo-theme-next/layout/_macro/post.swig Lines 449 to 452 in 022b9cc
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But see, in Gemini I make same feature with another way: hexo-theme-next/source/css/_schemes/Gemini/index.styl Lines 45 to 53 in 022b9cc
IDK which method is better, but I think need to choose only one.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So, in Muse and Pisces – Need to do refactor for that and join 2 spitted functions into better one. |
||||||||||||||||||||||||||||
| .post-eof { | ||||||||||||||||||||||||||||
| hide(); | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -76,8 +76,7 @@ use_seo = hexo-config('seo'); | |
| } | ||
|
|
||
| // Post delimiters. | ||
| .post-eof, | ||
| .post-spread { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are we remove this class? I don't remember...
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't find
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here: https://github.com/theme-next/hexo-theme-next/pull/357/files. |
||
| .post-eof { | ||
| hide(); | ||
| } | ||
|
|
||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here. Please, have a look.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
U say u fix
hide()with!important. GitHub banner nothing to do with this.Also, u brake foreground styles for GitHub banner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My mistake, it's not just about
hide()And I have tested, it's fine in all resolution, doesn't brake foreground styles