monal-im / monal-im.org

Hugo Website
MIT License
4 stars 1 forks source link

Issue22- CSS, shortcodes and README file updated #26

Closed wiseweb-works closed 1 year ago

wiseweb-works commented 1 year ago

Description This pull request focused on issue 22. It also includes other low priority fixes and README file update.

Changes

  1. A new CSS block has been added for devices with display widths between 300px—430px and 430px—620px. Incompatible site parts are hidden for devices with display widths less than 300px.
@media screen and (max-width: 299px) {...
@media screen and (max-width: 430px) {....
@media screen and (min-width: 430px) and (max-width: 620px) {...
  1. Added sub-menu support for menus. You need to use the same weight entry as the identifier and the special parent value. Example for usage:
menu:
  main:
   - identifier: blog
      name: Blog
      url: /post/
      weight: 3
   - parent: blog <---
      name: Test
      url: /test/
      weight: 3 <---
  1. Added entries for the resampling filter and image hints used in resampling stage. EXIF data such as Date, Location and so on will be removing automatically during image resampling for the new files.

  2. The fetchpriority tag, which specifies the load priorities of the files, has been added for CSS, images and other files. Thus, we will get a better FCP result by optimizing the priorities of the content during webpage loading. In addition, the prefetchentry has been added to the homepage. This entry prefetch the (install) page for users who will visit the /install/ page. Once all content is loaded and bandwidth is available, the prefetch hints will be used by the browser.

fetchpriority="X"
values= lowest-low-medium-high-highest
....
<link rel="prefetch" href="/install/" fetchpriority="lowest">
  1. Changes have been made for lazy-loading images. No JS files were used. Using browsers' built-in lazy-load functionality seems enough for now. It is compatible with all the images we use, as well as the AVIF image type for the future.

  2. The README file has been updated. Added entries to the .gitignore file for the test environment.

  3. The absLangURL entry that caused the redirect error on the pre-rendered webpage has been deleted.

  4. Added --gc parameter to remove unused assets and enable to run some cleanup tasks before build.

  5. The filename privacy.de.md (draft) has been changed. Because the filename triggers the translate:DE tag. I also added a few lines to the privacy.md (en) file.