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

Custom Background Image and Side Bar Image #1660

Closed
1 task done
ZiercPro opened this issue Apr 9, 2024 · 3 comments
Closed
1 task done

Custom Background Image and Side Bar Image #1660

ZiercPro opened this issue Apr 9, 2024 · 3 comments

Comments

@ZiercPro
Copy link

ZiercPro commented Apr 9, 2024

Checklist

Is your feature request related to a problem? Please describe

no

Describe the solution you'd like

I hope that we can customize the transparent background image and sidebar transparent image.

Describe alternatives you've considered

It would be better if we could set the blur and acrylic texture.

Additional context

No response

@ZiercPro ZiercPro added the enhancement New feature or request label Apr 9, 2024
@huanyushi
Copy link
Contributor

I happened to consider the same question last week and have already implemented changing the background image of the sidebar. You can visit my blog huanyushi.github.io to see the effect.

I have documented the specific setup process on my blog, which you can view Chirpy Blog Customization (However, it's written in Chinese).

To be specific, you need to add code in assets/css/jekyll-theme-chirpy.scss to modify the background image of the sidebar. This is my setting,

/* set background figure for side bar */
#sidebar {
    padding-left: 0;
    padding-right: 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    overflow-y: auto;
    width: 260px;
    z-index: 99;
    /* background: var(--sidebar-bg); */
    background-image: url( ... ); /* <- url of your background image */
    background-size: cover; /* <- customize the image size */
    background-repeat: no-repeat; /* <- no repeat */
    background-position: top; /* <- postion */
    border-right: 1px solid var(--sidebar-border-color);
    -ms-overflow-style: none;
    scrollbar-width: none;
}

Note that when you change the background image, also consider the color of the fonts; they might also need adjustments. Additionally, I didn't modify the background of the entire blog, but the setup methods are similar.

@ZiercPro
Copy link
Author

I happened to consider the same question last week and have already implemented changing the background image of the sidebar. You can visit my blog huanyushi.github.io to see the effect.

I have documented the specific setup process on my blog, which you can view Chirpy Blog Customization (However, it's written in Chinese).

To be specific, you need to add code in assets/css/jekyll-theme-chirpy.scss to modify the background image of the sidebar. This is my setting,

/* set background figure for side bar */
#sidebar {
    padding-left: 0;
    padding-right: 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    overflow-y: auto;
    width: 260px;
    z-index: 99;
    /* background: var(--sidebar-bg); */
    background-image: url( ... ); /* <- url of your background image */
    background-size: cover; /* <- customize the image size */
    background-repeat: no-repeat; /* <- no repeat */
    background-position: top; /* <- postion */
    border-right: 1px solid var(--sidebar-border-color);
    -ms-overflow-style: none;
    scrollbar-width: none;
}

Note that when you change the background image, also consider the color of the fonts; they might also need adjustments. Additionally, I didn't modify the background of the entire blog, but the setup methods are similar.

okk,我去试试

@cotes2020 cotes2020 removed the enhancement New feature or request label Apr 11, 2024
@cotes2020
Copy link
Owner

@cotes2020 cotes2020 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants