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

Feat/improve layout #87

Merged
merged 2 commits into from
Sep 3, 2024
Merged

Conversation

f-hollow
Copy link
Collaborator

@f-hollow f-hollow commented Aug 22, 2024

The current proposed changes in this PR

This PR is created for testing fonts and different layout settings. If we conclude that the changes are beneficial, we will merge them. The following changes are introduced:

  • Using zen mode doesn't make content field wider
    • Fixed by reverting commit c27f19f573c122c84993abf9abca3ce1b3d7ab7b
  • Try different proportions between content and the table of contents
    • Compared with Medium, the width of content basically the same on both platforms
  • Reduce font in code blocks
    • Medium fits 80 characters per line in a code block
    • Devportal with reduced font size (0.85rem in CSS file) offers the same width
  • Choose font
    • Added serif font Charter for body text (similar to Medium, see Research into fonts below),
    • Updated a monospace font in code blocks (looks more elegant now and closer to Medium in style)
  • Show article summaries on list pages (for now, the first sentences of the article)
    • The standard settings look ugly, summaries should be shorter
    • We can use description in YAML header for articles to keep it under control, or we can reduce the number of characters shown
  • The line height of a bullet point is similar to the spacing between bullet points
    • Reduced line height of a bullet point to 1.65 to make individual bullet points more discernable in lists

These CSS might cause small issues and need to be tested. Once we decide on what we want to implement, the CSS code updates will be tested.

Research into fonts and their licensing #

Medium website fonts

According to What font does Medium use on its website?, the body typeface is Charter marked as "free for commercial use."

Safe alternative fonts

The safest option for the Developer portal is to use fonts that are licensed under the SIL Open Font License (OFL). Here is a brief summary on advantages and disadvantages of open-source fonts.

Websites offering open-source fonts:

Useful information

Typeface vs. font, see Monotype FAQ > What is the difference between a typeface and a font?

@f-hollow f-hollow force-pushed the feat/improve_layout branch 3 times, most recently from 7232806 to dbb914e Compare August 23, 2024 10:20
Copy link
Member

@pedrominatel pedrominatel left a comment

Choose a reason for hiding this comment

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

Thanks, @f-hollow!

@f-hollow f-hollow force-pushed the feat/improve_layout branch 2 times, most recently from 2ff2dce to 3beea3d Compare August 28, 2024 11:25
@f-hollow
Copy link
Collaborator Author

As we agreed, I did the following:

  • Reverted the body font change
  • Reduced TOC font size

The other changes will be done tomorrow.

@f-hollow
Copy link
Collaborator Author

Pushed the following changes:

  • Reduced the font size in article summaries.
  • In footers of articles, the article cards had larger font weight, I made it equal with the font weight in blog page's article cards.

Minor fix required:

  • If an article starts with a section, like # Introduction, the hash sign also shows in the summary. There are other similar smaller issues that need to be cleaned up.

@f-hollow
Copy link
Collaborator Author

@pedrominatel I failed to find the issues of images with overlapping text in Zen mode.

Can you please share where you saw such issues?

@f-hollow f-hollow merged commit f93360c into espressif:main Sep 3, 2024
3 checks passed
@f-hollow f-hollow deleted the feat/improve_layout branch September 3, 2024 08:34
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

Successfully merging this pull request may close these issues.

2 participants