-
-
Notifications
You must be signed in to change notification settings - Fork 567
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
header image example #128
Comments
Hello, |
I think the header image page might refer to a layout where you can put an image before the post title/h1 tag. |
This is pure speculation since OP isn't clear, but they might be referring to this: https://astro-paper.pages.dev/posts/how-to-configure-astropaper-theme/#configuring-logo-or-title I was playing around with "LOGO_IMAGE.enable => true" the other day and ran into some trouble myself. The main problem is, that there is one fixed size for the LOGO_IMAGE, but there are, as far as I understand it, two possible screen sizes, below 640px and above. If I adjust the image size for above 640px, it's too big for smaller screens, and vice versa. It would be nice, if there was an option to dynamically adjust the image size. Or maybe there is one and I just missed it? |
it's actually cover image in a blog that I want example of |
@Because789 Then inside /* Header.astro */
<style>
/* other styles */
.logo {
@apply absolute py-1 text-xl font-semibold sm:static sm:text-2xl
mt-1 flex max-w-[110px] sm:mt-0 sm:max-w-none; /* add this line */
}
</style> Make sure to adjust |
If so, it can be configured inside the frontmatter property ---
ogImage: https://github.com/satnaing/astro-paper/assets/53733092/1ef0cf03-8137-4d67-ac81-84a032119e3a
--- Or do you want an example of adding an image inside the blog post? |
I was thinking of something like this: https://tailwindflex.com/@anonymous/blog-article-template/fullscreen-preview |
@satnaing Thanks so much for coming back to me! You have no idea how many hours I struggled with this (I guess that I've never heard of Astro or Tailwind like a week ago, only had a vague understanding of CSS and never worked with JS ever, wasn't helpful at all :)). Sadly, your solution didn't work for me. Maybe because I use a png image? Anyway, with your hints I finally found a way I'm satisfied with. For that I had to change the wrapper as well: <style>
.top-nav-wrap {
/* @apply relative flex w-full items-start justify-between p-4 sm:items-center sm:py-8; */
@apply flex w-full items-start justify-between p-4 sm:items-center;
}
.logo {
/* @apply absolute py-1 text-xl font-semibold sm:static sm:text-2xl; */
@apply flex max-w-[60px] sm:max-w-none;
}
</style> This probably breaks the template if you use a text based logo, since I removed the text-classes for readability. Considering I'm only using the logo, I'm happy with that. Thanks so much for your work here, it's an amazing template and I already learned so much digging into it! |
Oh! For that, we have to deal with CSS for customization. Currently, AstroPaper doesn't support that style of cover image out of the box. But, if you wish, you can customize |
Sir please tell me how can we do this and please add this feature in theme |
please make page with header image example
The text was updated successfully, but these errors were encountered: