Monday, April 17, 2023

Image CSS property aspect-ratio, object-fit and mix-blend-mode

Three CSS properties will help you to display images

1) The aspect-ratio property maintains the aspect ratio of an element, even if its size changes.

2) Object-fit controls how an image or video is displayed within its container, allowing for versatile scaling and cropping options.

3) Mix-blend-mode creates stunning visual effects by blending the colors of overlapping elements.

These powerful techniques can elevate your website's design to the next level, impressing your visitors with visually stunning layouts.


Before


After



Monday, April 10, 2023

_sppagecontextinfo Get current user details

While using CSOM, we have mostly required some details of the current users, like, Name, Email, Title (Designation), Manager, etc., Following code, will help to know all this with simple API calls.


Monday, April 3, 2023

Get week number of month from Date

People struggle a lot when it needs to get a week from a date, here below is a simple example to get the week number of the month from a Date.