Skip to content
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

Support to manual configure the content max width for Gemini Scheme. #103

Merged
merged 7 commits into from
Feb 2, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,11 @@ highlight_theme: normal
# Enable "cheers" for archive page.
cheers_enabled: true

# Manual define the max content width
# !!Only available for Gemini Scheme currently
# Leave it empty for the default 75% (suggest not less than 1000px)
#max_content_width: 1000px

# ---------------------------------------------------------------
# Font Settings
# - Find fonts on Google Fonts (https://www.google.com/fonts)
Expand Down
10 changes: 10 additions & 0 deletions source/css/_schemes/Pisces/_layout.styl
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
get_max_content_width() {
if (hexo-config('scheme') == 'Gemini') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If for Gemini only, need to add this in Gemini scheme file maybe?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, maybe like the below?

$max-content-width = hexo-config('max_content_width')
max-width: unquote($max-content-width) if $max-content-width
}
}

.header {
position: relative;
margin: 0 auto;
width: $main-desktop;
get_max_content_width();

+tablet() {
width: auto;
Expand Down Expand Up @@ -48,6 +56,7 @@

.container .main-inner {
width: $main-desktop;
get_max_content_width();

+tablet() {
width: auto;
Expand Down Expand Up @@ -101,6 +110,7 @@

.footer-inner {
width: $main-desktop;
get_max_content_width();
padding-left: 260px;

+tablet() {
Expand Down