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

[gnoweb] Scale images in relation to page size #2166

Closed
leohhhn opened this issue May 22, 2024 · 0 comments · Fixed by #2223
Closed

[gnoweb] Scale images in relation to page size #2166

leohhhn opened this issue May 22, 2024 · 0 comments · Fixed by #2223
Assignees

Comments

@leohhhn
Copy link
Contributor

leohhhn commented May 22, 2024

Description

I realized this issue when viewing a recent blog post on mobile. The images, and more broadly I assume, the max width of objects is not properly scaled in relation to the size of the screen.

WhatsApp Image 2024-05-22 at 13 00 05

@alexiscolin alexiscolin self-assigned this May 23, 2024
leohhhn pushed a commit that referenced this issue May 28, 2024
This PR is a hotfix to markdown style.

fixes: #1967 
fixes: #2166

Maybe not the best way to handle it, but as we are gonna refactor gnoweb
and pages are rendered as blog, what is not very clean, this is a quick
fix before a better refactor.

It create a `Kind` variable for rendered pages in `gnoweb`, that is used
as CSS classname to wrap the body content. This is made to separate
`Section` and `Page` contents: while first ones are created with a
detailed architecture of sub-sections (invisible list, columns etc), the
second kind is made for generic content.

This separation allow to create different styles for the two kinds of
structure we have on gno.land website:
"page" one will have bullet lists, centered images etc by default and
"section" one will be more transparent regarding the style.

To achieve this, the PR creates a dedicated package for "events" instead
of a blog rendered page (because this page is a `section`) and adds a
default `page` CSS classname in blog content.

In the future, we should use dedicated md / web components to display
elements whatever the page type.

---------

Co-authored-by: Morgan Bazalgette <morgan@morganbaz.com>
omarsy pushed a commit to TERITORI/gno that referenced this issue Jun 3, 2024
This PR is a hotfix to markdown style.

fixes: gnolang#1967 
fixes: gnolang#2166

Maybe not the best way to handle it, but as we are gonna refactor gnoweb
and pages are rendered as blog, what is not very clean, this is a quick
fix before a better refactor.

It create a `Kind` variable for rendered pages in `gnoweb`, that is used
as CSS classname to wrap the body content. This is made to separate
`Section` and `Page` contents: while first ones are created with a
detailed architecture of sub-sections (invisible list, columns etc), the
second kind is made for generic content.

This separation allow to create different styles for the two kinds of
structure we have on gno.land website:
"page" one will have bullet lists, centered images etc by default and
"section" one will be more transparent regarding the style.

To achieve this, the PR creates a dedicated package for "events" instead
of a blog rendered page (because this page is a `section`) and adds a
default `page` CSS classname in blog content.

In the future, we should use dedicated md / web components to display
elements whatever the page type.

---------

Co-authored-by: Morgan Bazalgette <morgan@morganbaz.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

2 participants