<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mahesh Prajapati</title>
    <description>The latest articles on DEV Community by Mahesh Prajapati (@maheshprajapati).</description>
    <link>https://dev.to/maheshprajapati</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2581762%2F2986edcc-cb54-427a-914c-69d99533417c.jpg</url>
      <title>DEV Community: Mahesh Prajapati</title>
      <link>https://dev.to/maheshprajapati</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/maheshprajapati"/>
    <language>en</language>
    <item>
      <title>Fetch and Convert Google Sheets Data to JSON with PHP</title>
      <dc:creator>Mahesh Prajapati</dc:creator>
      <pubDate>Thu, 09 Jan 2025 09:51:31 +0000</pubDate>
      <link>https://dev.to/maheshprajapati/fetch-and-convert-google-sheets-data-to-json-with-php-53aj</link>
      <guid>https://dev.to/maheshprajapati/fetch-and-convert-google-sheets-data-to-json-with-php-53aj</guid>
      <description>&lt;p&gt;If you're working with Google Sheets and you need to make its data accessible as JSON for a web application or API, PHP provides a simple way to get, parse, and convert CSV data from Google Sheets. In this post, I'll walk you through a PHP script that gets data from public Google Sheets in CSV format and converts it into a structured JSON response.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why use Google Sheets as JSON?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Google Sheets are widely used to organize data. Whether for prototyping, content management, or a lightweight database solution, having the ability to convert Google Sheets to JSON opens up many possibilities for dynamic web applications.&lt;/p&gt;

&lt;p&gt;Here’s the complete PHP script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php
// Array of sheet URLs with their respective IDs
$sheets = [
    'sheet1' =&amp;gt; "https://docs.google.com/spreadsheets/d/e/2PACX-1vQawhdv3OZSq4n3DTEIwY6aID5otU3KTk_BYUUHc8nuCQNerFA0xdWRsd68z4aIpUs3JDFXohjsvJKy/pub?gid=0&amp;amp;single=true&amp;amp;output=csv",
    'sheet2' =&amp;gt; "https://docs.google.com/spreadsheets/d/e/2PACX-1vQawhdv3OZSq4n3DTEIwY6aID5otU3KTk_BYUUHc8nuCQNerFA0xdWRsd68z4aIpUs3JDFXohjsvJKy/pub?gid=1073107567&amp;amp;single=true&amp;amp;output=csv",
];

// Set response type as JSON
header('Content-Type: application/json');

try {
    // Get the requested sheet identifier from the query parameter
    $sheet = $_GET['sheet'];

    // Validate the sheet identifier
    if (!isset($sheets[$sheet])) {
        throw new Exception("Invalid sheet identifier.");
    }

    // Fetch CSV data from Google Sheets
    $csvData = file_get_contents($sheets[$sheet]);
    if ($csvData === FALSE) {
        throw new Exception("Failed to fetch data from Google Sheets.");
    }

    // Parse CSV data into an array
    $rows = array_filter(array_map('str_getcsv', explode("\n", $csvData))); // Remove empty rows
    $headers = array_shift($rows); // First row as headers

    if (!$headers || empty($rows)) {
        throw new Exception("Invalid or empty CSV data.");
    }

    // Convert CSV rows to associative array
    $menu = array_map(function($row) use ($headers) {
        $row = array_map('trim', $row); // Trim whitespace
        if (count($row) !== count($headers)) {
            return null; // Skip rows with missing fields
        }
        return array_combine($headers, $row);
    }, $rows);

    // Filter out invalid rows
    $menu = array_filter($menu);

    // Return JSON response
    echo json_encode($menu);

} catch (Exception $e) {
    // Handle errors
    http_response_code(500);
    echo json_encode(['error' =&amp;gt; $e-&amp;gt;getMessage()]);
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Google Sheets Setup:&lt;/strong&gt;&lt;br&gt;
Ensure your Google Sheet is published as a CSV. Go to &lt;strong&gt;File &amp;gt; Share &amp;gt; Publish to Web&lt;/strong&gt; and copy the CSV link.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Mapping Sheet URLs:&lt;/strong&gt;&lt;br&gt;
The &lt;code&gt;$sheets&lt;/code&gt; array maps user-friendly sheet identifiers (e.g., &lt;code&gt;sheet1&lt;/code&gt;, &lt;code&gt;sheet2&lt;/code&gt;) to their corresponding Google Sheets URLs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Fetching Data:&lt;/strong&gt;&lt;br&gt;
The script uses PHP’s &lt;code&gt;file_get_contents()&lt;/code&gt; to retrieve the CSV content.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Parsing CSV:&lt;/strong&gt;&lt;br&gt;
The data is parsed into an array using &lt;code&gt;str_getcsv()&lt;/code&gt; and converted into an associative array with headers as keys.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. JSON Conversion:&lt;/strong&gt;&lt;br&gt;
The processed data is encoded as JSON and sent back as the response.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Error Handling:&lt;/strong&gt;&lt;br&gt;
Errors such as invalid sheet identifiers, failed fetches, or malformed data are handled gracefully, returning appropriate error messages.&lt;/p&gt;


&lt;h2&gt;
  
  
  Example Usage
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Request Format:&lt;/strong&gt;&lt;br&gt;
Call the script via URL, passing the sheet identifier as a query parameter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://yourdomain.com/sheet-fetcher.php?sheet=sheet1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Expected JSON Response:&lt;/strong&gt;&lt;br&gt;
For a sheet with the following content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Name,Age,City
Alice,30,New York
Bob,25,San Francisco

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The JSON output will be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[
    { "Name": "Alice", "Age": "30", "City": "New York" },
    { "Name": "Bob", "Age": "25", "City": "San Francisco" }
]

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Error Responses
&lt;/h2&gt;

&lt;p&gt;The script includes robust error handling. For example:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Invalid Sheet Identifier:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{ "error": "Invalid sheet identifier." }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Fetch Error:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{ "error": "Failed to fetch data from Google Sheets." }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Advantages of This Approach&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic Data:&lt;/strong&gt; Updates in Google Sheets are reflected in real-time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Simple Integration:&lt;/strong&gt; No external libraries required; works with plain PHP.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flexible:&lt;/strong&gt; Can handle multiple sheets using a single script.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;This script is a simple yet powerful way to make Google Sheets data accessible via a JSON API. Whether you’re building a frontend app, creating dashboards, or exposing APIs, this technique will save you time and effort.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Creating a Social Media Marketing Strategy for FMCG Brands in 2025</title>
      <dc:creator>Mahesh Prajapati</dc:creator>
      <pubDate>Mon, 30 Dec 2024 12:33:18 +0000</pubDate>
      <link>https://dev.to/maheshprajapati/creating-a-social-media-marketing-strategy-for-fmcg-brands-in-2025-2f7h</link>
      <guid>https://dev.to/maheshprajapati/creating-a-social-media-marketing-strategy-for-fmcg-brands-in-2025-2f7h</guid>
      <description>&lt;p&gt;In 2025, the FMCG sector is rapidly evolving, with social media becoming an integral part of connecting brands with consumers. As shopping habits are changing and digital platforms are growing, it is important for brands to optimize their social media presence for meaningful engagement. Let’s explore how FMCG brands can create effective strategies to thrive in this constantly changing landscape.&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Social Media Strategies for FMCG Brands in 2025
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Social Commerce Integration into the Customer Journey&lt;/strong&gt;&lt;br&gt;
Social commerce has become a cornerstone for FMCG brands. With platforms like Instagram Shops and TikTok Shopping enabling seamless buying experiences directly within feeds, brands must focus on creating shoppable content that reduces barriers to impulse purchases.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Video as the Primary Form of Content&lt;/strong&gt;&lt;br&gt;
Short videos continue to dominate, but in 2025, they go beyond mere entertainment. Brands should focus on value-driven content, such as product demonstrations, behind-the-scenes sustainability practices, quick recipes, and real-time customer experiences.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Transparency and Direct Customer Engagement&lt;/strong&gt;&lt;br&gt;
Consumers demand transparency from FMCG brands. Clear communication regarding ingredients, sustainability initiatives, and price-value propositions helps foster trust. Direct engagement through customer feedback and addressing complaints in real-time is crucial.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Personalization at Scale&lt;/strong&gt;&lt;br&gt;
Leveraging AI for hyper-personalization enables brands to deliver tailored experiences. From personalized product recommendations based on behavior to culturally aligned content, personalization enhances the customer journey across social media.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Building and Strengthening Communities&lt;/strong&gt;&lt;br&gt;
Community-building is the future. Exclusive groups, product launches, live Q&amp;amp;A sessions, and social challenges create deeper connections with customers and amplify brand advocacy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sustainability Storytelling&lt;/strong&gt;&lt;br&gt;
Sustainability is no longer optional. Brands should showcase eco-friendly packaging, waste minimization techniques, and their journey towards carbon neutrality. Social media becomes a powerful platform for storytelling in sustainability efforts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Influencer Alliances and Augmented Reality&lt;/strong&gt;&lt;br&gt;
Collaborating with micro-influencers who align with brand values and integrating Augmented Reality for virtual product trials and interactive experiences enhances engagement and builds meaningful connections.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cross-Platform Integration&lt;/strong&gt;&lt;br&gt;
Consistency across platforms is vital. A unified brand message with platform-optimized content ensures a seamless experience for customers, regardless of where they interact.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Informed Decisions with Advanced Analytics&lt;/strong&gt;&lt;br&gt;
Using advanced analytics to track consumer sentiment, competitive positioning, and campaign impact helps brands refine their strategies for better performance.&lt;/p&gt;




&lt;p&gt;In 2025, FMCG brands must balance new-age technologies with human-centric approaches to create meaningful relationships with consumers. Social media marketing is no longer just about promotion; it’s about fostering ecosystems where consumers explore, engage, and advocate for brands they trust. Embracing these strategies thoughtfully will lead to both short-term sales growth and long-term brand equity.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Why CSS Grid Isn’t Enough for Masonry Layouts</title>
      <dc:creator>Mahesh Prajapati</dc:creator>
      <pubDate>Thu, 26 Dec 2024 09:56:10 +0000</pubDate>
      <link>https://dev.to/maheshprajapati/why-css-grid-isnt-enough-for-masonry-layouts-35ej</link>
      <guid>https://dev.to/maheshprajapati/why-css-grid-isnt-enough-for-masonry-layouts-35ej</guid>
      <description>&lt;p&gt;An easy-to-use method for implementing masonry layouts has long been sought for by the web developer community. It has been difficult to create these aesthetically dynamic grids using only CSS, thanks to Pinterest and related designs. The Chrome team contends that this strategy might not be the best one, despite recent recommendations that call for masonry capabilities to be added to the CSS Grid Layout specification. Here are some reasons why we think masonry should have its own layout technique and some potential advantages for developers.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Case Against Adding Masonry to CSS Grid
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Performance Concerns&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;CSS Grid and masonry layouts handle item placement in fundamentally different ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CSS Grid: All items are placed before layout, allowing the browser to calculate exact track sizes and placements.&lt;/li&gt;
&lt;li&gt;Masonry: Items are placed as they are laid out, requiring dynamic calculations that can lead to significant performance issues when mixing fixed and intrinsic track sizes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Consider a grid with mixed track definitions like grid-template-columns: 200px auto 200px. With masonry, the browser must pre-layout every item in every possible configuration, creating exponential complexity in large grids. This is especially problematic when using advanced features like subgrids.&lt;/p&gt;

&lt;p&gt;To avoid shipping a layout method with such inherent limitations, we propose a solution that separates masonry from CSS Grid.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Specification Complexity&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Merging masonry into the grid specification introduces inconsistencies that conflict with the core principles of formatting contexts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Alignment Properties: Grid supports six alignment properties, but masonry would only use a subset, like flexbox.&lt;/li&gt;
&lt;li&gt;Placement Properties: Grid has four placement properties (e.g., grid-column-start), while masonry would need only two.&lt;/li&gt;
&lt;li&gt;Track Sizing: Certain patterns like grid-template-columns: repeat(auto-fill, max-content) make sense in masonry but must remain invalid in grid.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Introducing these discrepancies increases the cognitive load for developers, as they would need to remember which features work in which context. This fragmentation could lead to confusion and errors.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Proposal: Masonry as a Separate Layout Method
&lt;/h2&gt;

&lt;p&gt;Instead of bundling masonry with CSS Grid, we advocate defining it as a standalone layout method using &lt;code&gt;display: masonry&lt;/code&gt;. This approach retains all the flexibility developers love about grid while avoiding the pitfalls outlined above.&lt;/p&gt;

&lt;p&gt;Example&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Classic Masonry Layout&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A simple masonry layout with equal-sized columns can be achieved with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.masonry {
  display: masonry;
  masonry-template-tracks: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1rem;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Mixed Track Sizes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For layouts with alternating narrow and wide columns:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.masonry {
  display: masonry;
  masonry-template-tracks: repeat(auto-fill, minmax(8rem, 1fr) minmax(16rem, 2fr)) minmax(8rem, 1fr);
  gap: 1rem;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Auto-Sized Tracks&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Allow tracks to auto-size based on content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.masonry {
  display: masonry;
  masonry-template-tracks: repeat(auto-fill, auto);
  gap: 1rem;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Spanning and Placement&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Enable items to span multiple tracks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.masonry {
  display: masonry;
  masonry-template-tracks: repeat(auto-fill, auto);
}

.span-2 {
  masonry-track: span 2; /* spans two columns */
}

.placed {
  masonry-track: 2 / 5; /* covers tracks 2, 3, and 4 */
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Benefits of a Separate Masonry Layout&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Clarity:&lt;/strong&gt; Developers can use masonry without worrying about the nuances of CSS Grid compatibility.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Flexibility:&lt;/strong&gt; All grid-like features remain available without introducing new constraints.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Future-Proofing:&lt;/strong&gt; A dedicated masonry specification ensures consistent behavior across browsers and avoids unnecessary complexity.&lt;/p&gt;

</description>
      <category>css</category>
      <category>html</category>
      <category>ui</category>
      <category>ux</category>
    </item>
    <item>
      <title>Understand SessionStorage and LocalStorage for Controlling Popups</title>
      <dc:creator>Mahesh Prajapati</dc:creator>
      <pubDate>Tue, 24 Dec 2024 12:05:59 +0000</pubDate>
      <link>https://dev.to/maheshprajapati/understanding-sessionstorage-and-localstorage-for-controlling-popups-27m6</link>
      <guid>https://dev.to/maheshprajapati/understanding-sessionstorage-and-localstorage-for-controlling-popups-27m6</guid>
      <description>&lt;p&gt;When considering sessionStorage and localStorage for managing website popups, the main difference is in the duration of data storage and the way the popup is displayed.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. sessionStorage
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Data Life:&lt;/strong&gt; Data persists only for the duration of the browser session. Once the tab or browser is closed, the data is cleared.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Case:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;code&gt;sessionStorage&lt;/code&gt;if the popup should reappear each time the user opens the site in a new browser session.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Example:&lt;/strong&gt; You want to show a welcome popup only during a user's current session and not if they refresh the page or open the site in a different tab.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (!sessionStorage.getItem('popupDisplayed')) {
    // Display popup
    alert('Welcome to the website!');
    sessionStorage.setItem('popupDisplayed', 'true');
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  2. localStorage
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Data Life:&lt;/strong&gt; Data persists even after the browser is closed, until explicitly cleared by the user or via script.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Case:&lt;/strong&gt;&lt;br&gt;
Use localStorage if the popup should remain hidden across multiple sessions once a user has seen it.&lt;br&gt;
&lt;strong&gt;Example:&lt;/strong&gt; You want to display a promo popup only once a week or never again after the user dismisses it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (!localStorage.getItem('popupDisplayed')) {
    // Display popup
    alert('Check out our special offer!');
    localStorage.setItem('popupDisplayed', 'true');
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;em&gt;&lt;strong&gt;Key Differences for Popup Management:&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;sessionStorage&lt;/th&gt;
&lt;th&gt;localStorage&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Data Persistence&lt;/td&gt;
&lt;td&gt;Only for the current session.&lt;/td&gt;
&lt;td&gt;Persists indefinitely or until cleared.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scope&lt;/td&gt;
&lt;td&gt;Tab-specific.&lt;/td&gt;
&lt;td&gt;Shared across all tabs/windows of the same origin.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;When to Use&lt;/td&gt;
&lt;td&gt;Temporary popups (e.g., session-only welcome message).&lt;/td&gt;
&lt;td&gt;Persistent control (e.g., don't show again for a returning user).&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Decision Criteria:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Short-term Popup Logic:&lt;/strong&gt; Use sessionStorage if you want the popup to reappear in a new session.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Persistent Popup Logic:&lt;/strong&gt; Use localStorage if the popup logic needs to persist even after the browser or tab is closed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For more complicated situations, you may even use custom logic to mix both storages (e.g., session-based for a week).&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>html</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Creating a Festive Christmas Web Page with Snowfall Animation</title>
      <dc:creator>Mahesh Prajapati</dc:creator>
      <pubDate>Mon, 23 Dec 2024 12:56:13 +0000</pubDate>
      <link>https://dev.to/maheshprajapati/creating-a-festive-christmas-web-page-with-snowfall-animation-525c</link>
      <guid>https://dev.to/maheshprajapati/creating-a-festive-christmas-web-page-with-snowfall-animation-525c</guid>
      <description>&lt;p&gt;In this post, I'll demonstrate how to use HTML, CSS, and JavaScript to construct a straightforward yet captivating Christmas-themed webpage with a snowfall animation. &lt;/p&gt;

&lt;h2&gt;
  
  
  Features:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Snowfall Effect:&lt;/strong&gt; Falling snowflakes animated using JavaScript and CSS.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Christmas Greeting:&lt;/strong&gt; A festive greeting message styled with CSS.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interactive:&lt;/strong&gt; Snowflakes move randomly and reset after reaching the bottom of the screen.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/mahesh-prajapati-developer/embed/GgKEovW?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Works:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Canvas Animation:&lt;/strong&gt; The canvas element is used for the snowfall effect. JavaScript manages the properties and animations of the snowflakes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Responsive Design:&lt;/strong&gt; The canvas adapts to window size, ensuring the snowfall covers the entire screen.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Festive Styling:&lt;/strong&gt; CSS enhances the visual experience with vibrant colors and glowing text effects.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>css</category>
      <category>javascript</category>
      <category>html</category>
      <category>development</category>
    </item>
    <item>
      <title>How to Install Magento 2 on Shared Hosting ?</title>
      <dc:creator>Mahesh Prajapati</dc:creator>
      <pubDate>Fri, 20 Dec 2024 09:26:15 +0000</pubDate>
      <link>https://dev.to/maheshprajapati/how-to-install-magento-2-on-shared-hosting--5h49</link>
      <guid>https://dev.to/maheshprajapati/how-to-install-magento-2-on-shared-hosting--5h49</guid>
      <description>&lt;p&gt;Because of its resource requirements and server limitations, Magento 2 might be difficult to install on shared hosting. If the hosting environment satisfies Magento's minimal criteria, it is feasible. &lt;/p&gt;

&lt;h2&gt;
  
  
  Pre-Installation Checklist
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Verify Hosting Requirements:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PHP version: 7.4+ (or the latest version supported by Magento).&lt;/li&gt;
&lt;li&gt;MySQL version: 5.7+ or MariaDB 10.4+.&lt;/li&gt;
&lt;li&gt;Elasticsearch: May not be available on shared hosting (required for Magento 2.4+).&lt;/li&gt;
&lt;li&gt;PHP Extensions: &lt;code&gt;intl&lt;/code&gt;, &lt;code&gt;soap&lt;/code&gt;, &lt;code&gt;bcmath&lt;/code&gt;, &lt;code&gt;gd&lt;/code&gt;, &lt;code&gt;mbstring&lt;/code&gt;, &lt;code&gt;xsl&lt;/code&gt;, &lt;code&gt;cURL&lt;/code&gt;, &lt;code&gt;zip&lt;/code&gt;, etc.&lt;/li&gt;
&lt;li&gt;Composer Support: Some shared hosting providers include Composer, or you can use it locally.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Secure FTP and Database Access:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;FTP credentials for uploading files.&lt;/li&gt;
&lt;li&gt;A database (MySQL/MariaDB) created through cPanel.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Magento Package:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Download the Magento 2 ZIP file from the Magento Downloads page.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. Domain or Subdomain:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ensure your domain or subdomain points to the shared hosting account.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Step-by-Step Installation
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Upload Magento Files&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Download the Magento 2 ZIP package.&lt;/li&gt;
&lt;li&gt;Extract it locally and upload the contents to your server using FTP or cPanel's File Manager.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;2. Set File Permissions&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After uploading, set the correct permissions:
Folders: &lt;code&gt;755&lt;/code&gt;
Files: &lt;code&gt;644&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Some shared hosting environments might require additional permission adjustments for &lt;code&gt;pub&lt;/code&gt;, &lt;code&gt;var&lt;/code&gt;, and &lt;code&gt;generated&lt;/code&gt; directories.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;3. Create a Database&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Log in to cPanel.&lt;/li&gt;
&lt;li&gt;Go to MySQL Databases:&lt;/li&gt;
&lt;li&gt;Create a new database.&lt;/li&gt;
&lt;li&gt;Create a new user and assign it to the database with ALL PRIVILEGES.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;4. Configure Magento Installation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Navigate to your domain or subdomain in a browser (e.g., &lt;code&gt;https://yourdomain.com&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;The Magento Setup Wizard will start:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Readiness Check: Ensure your hosting meets the requirements.&lt;/li&gt;
&lt;li&gt;Add Database Details: Enter the database name, username, and password.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Web Configuration:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Specify the Base URL (e.g., &lt;code&gt;https://yourdomain.com&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Enable/disable HTTPS based on your SSL setup.&lt;/li&gt;
&lt;li&gt;Admin Account: Create an admin username, password, and email.&lt;/li&gt;
&lt;li&gt;Installation Path: Magento will configure itself.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;5. Post-Installation Tasks&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set File Permissions Again:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chmod -R 775 pub var generated
chmod u+x bin/magento

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You may need to do this via SSH or ask your hosting provider for assistance.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run Indexers (Optional): If SSH access is available:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php bin/magento indexer:reindex
php bin/magento cache:flush
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Without SSH, Magento automatically handles this after installation.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;6. Fix Common Shared Hosting Issues&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cron Jobs:&lt;/strong&gt; Configure cron jobs via cPanel for Magento's background processes. Example:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*/5 * * * * php /home/username/public_html/bin/magento cron:run
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Elasticsearch Workaround:&lt;/strong&gt; Magento 2.4+ requires Elasticsearch. If not available, use an earlier Magento version (like 2.3.x) or request Elasticsearch from your hosting provider.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Troubleshooting Tips&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Slow Performance:&lt;/strong&gt; Shared hosting is limited in resources; consider upgrading to VPS or cloud hosting.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Readiness Check Fails:&lt;/strong&gt; Ensure all required PHP extensions are installed/enabled. Contact your hosting provider for assistance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Composer Errors:&lt;/strong&gt; Use Composer locally to install dependencies, then upload the files to the server.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Magento 2 may work on shared hosting for small-scale stores or testing environments. For a production site, VPS or dedicated hosting is highly recommended for better performance, security, and scalability.&lt;/p&gt;

</description>
      <category>magneto</category>
      <category>frontend</category>
      <category>developer</category>
    </item>
    <item>
      <title>Magento 2 commands for maintenance and deployment</title>
      <dc:creator>Mahesh Prajapati</dc:creator>
      <pubDate>Thu, 19 Dec 2024 06:57:07 +0000</pubDate>
      <link>https://dev.to/maheshprajapati/magento-2-commands-for-maintenance-and-deployment-4k68</link>
      <guid>https://dev.to/maheshprajapati/magento-2-commands-for-maintenance-and-deployment-4k68</guid>
      <description>&lt;p&gt;These commands are essential for maintaining Magento 2 and ensuring smooth operations in both development and production environments. They handle tasks like database migrations, optimizing code execution, preparing frontend assets, and clearing cache.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. php bin/magento setup:upgrade
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Purpose:&lt;/strong&gt; Applies any new database schema updates, runs data patches, and sets up newly installed or upgraded modules.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to use:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After installing/upgrading modules or themes.&lt;/li&gt;
&lt;li&gt;After modifying database-related configurations.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. php bin/magento setup:di:compile
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Purpose:&lt;/strong&gt; Compiles dependency injection (DI) configurations into generated code for faster execution and performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to use:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After making changes to module code.&lt;/li&gt;
&lt;li&gt;After enabling/disabling a module.&lt;/li&gt;
&lt;li&gt;In production mode, before deploying.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. php bin/magento setup:static-content:deploy –f
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Purpose:&lt;/strong&gt; Deploys static view files (CSS, JavaScript, images) into the pub/static directory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to use:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After making changes to frontend files (e.g., LESS, CSS, JS).&lt;/li&gt;
&lt;li&gt;Before deploying your store in production mode.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  4. php -dmemory_limit=6G bin/magento setup:static-content:deploy -f
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Purpose:&lt;/strong&gt; Same as above, but this version overrides PHP’s default memory limit to 6 GB during the deployment process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to use:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use this when you encounter memory-related errors during static content deployment.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  5. php bin/magento indexer:reindex
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Purpose:&lt;/strong&gt; Rebuilds Magento’s indexes to optimize database queries and improve store performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to use:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After making changes to product, category, or other data in the database that affects storefront performance.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  6. php bin/magento c:f
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Purpose:&lt;/strong&gt; This is shorthand for php bin/magento cache:flush, which clears all cached data from Magento.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to use:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After making any configuration changes.&lt;/li&gt;
&lt;li&gt;When cached data might cause unexpected behavior or prevent new changes from appearing.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>magneto</category>
      <category>cli</category>
      <category>developer</category>
      <category>frontend</category>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>Mahesh Prajapati</dc:creator>
      <pubDate>Thu, 19 Dec 2024 04:48:08 +0000</pubDate>
      <link>https://dev.to/maheshprajapati/-36f3</link>
      <guid>https://dev.to/maheshprajapati/-36f3</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/maheshprajapati" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2581762%2F2986edcc-cb54-427a-914c-69d99533417c.jpg" alt="maheshprajapati"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/maheshprajapati/heres-an-easy-way-to-create-a-magento-2-ecommerce-custom-theme-6h0" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Here's an easy way to create a Magento 2 eCommerce custom theme&lt;/h2&gt;
      &lt;h3&gt;Mahesh Prajapati ・ Dec 18&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#magneto&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#themes&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#frontend&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#coding&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>tutorial</category>
      <category>magento</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Here's an easy way to create a Magento 2 eCommerce custom theme</title>
      <dc:creator>Mahesh Prajapati</dc:creator>
      <pubDate>Wed, 18 Dec 2024 12:32:28 +0000</pubDate>
      <link>https://dev.to/maheshprajapati/heres-an-easy-way-to-create-a-magento-2-ecommerce-custom-theme-6h0</link>
      <guid>https://dev.to/maheshprajapati/heres-an-easy-way-to-create-a-magento-2-ecommerce-custom-theme-6h0</guid>
      <description>&lt;p&gt;&lt;strong&gt;1. Understand Magento's Theme Structure&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Magento themes are located in the directory:&lt;br&gt;
app/design/frontend/&lt;code&gt;&amp;lt;Vendor&amp;gt;&lt;/code&gt;/&lt;code&gt;&amp;lt;ThemeName&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;Vendor&amp;gt;&lt;/code&gt;: Your company or brand name (e.g., MyCompany).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;ThemeName&amp;gt;&lt;/code&gt;: The name of your theme (e.g., MyTheme).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Create the Directory Structure&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Navigate to the &lt;code&gt;app/design/frontend/&lt;/code&gt; directory.&lt;/p&gt;

&lt;p&gt;Create your custom folders:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app/design/frontend/MyCompany/MyTheme
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inside the MyTheme folder, create these subdirectories:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;etc
web
templates
layouts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;etc: Configuration files.&lt;/li&gt;
&lt;li&gt;web: Static assets (CSS, JavaScript, images).&lt;/li&gt;
&lt;li&gt;templates: HTML and PHTML files.&lt;/li&gt;
&lt;li&gt;layouts: XML layout files.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Create the theme.xml File&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This file declares your theme. Place it inside the &lt;code&gt;etc&lt;/code&gt; folder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app/design/frontend/MyCompany/MyTheme/etc/theme.xml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?xml version="1.0"?&amp;gt;
&amp;lt;theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd"&amp;gt;
    &amp;lt;title&amp;gt;MyCompany MyTheme&amp;lt;/title&amp;gt;
    &amp;lt;parent&amp;gt;Magento/blank&amp;lt;/parent&amp;gt;
    &amp;lt;media&amp;gt;
        &amp;lt;preview_image&amp;gt;media/preview.jpg&amp;lt;/preview_image&amp;gt;
    &amp;lt;/media&amp;gt;
&amp;lt;/theme&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Register Your Theme&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Create a &lt;code&gt;registration.php&lt;/code&gt; file in the root of your theme directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app/design/frontend/MyCompany/MyTheme/registration.php
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php
use Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(
    ComponentRegistrar::THEME,
    'frontend/MyCompany/MyTheme',
    __DIR__
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;5. Add Static Assets&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CSS: Create a custom stylesheet in &lt;code&gt;web/css/styles.css&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;JavaScript: Place your JS files in &lt;code&gt;web/js/&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Images: Add images to &lt;code&gt;web/images/&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;6. Configure Layouts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Define layout changes using XML files in the &lt;code&gt;layout&lt;/code&gt; folder.&lt;br&gt;
Example: &lt;code&gt;default.xml&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app/design/frontend/MyCompany/MyTheme/layout/default.xml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?xml version="1.0"?&amp;gt;
&amp;lt;page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"&amp;gt;
    &amp;lt;body&amp;gt;
        &amp;lt;referenceContainer name="header"&amp;gt;
            &amp;lt;block class="Magento\Framework\View\Element\Template" name="custom.block" template="Magento_Theme::html/header.phtml"/&amp;gt;
        &amp;lt;/referenceContainer&amp;gt;
    &amp;lt;/body&amp;gt;
&amp;lt;/page&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;7. Configure Your Theme in Admin Panel&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to the Magento Admin Panel.&lt;/li&gt;
&lt;li&gt;Navigate to Content &amp;gt; Design &amp;gt; Themes.&lt;/li&gt;
&lt;li&gt;Your theme should appear here. Assign it as the default theme.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;8. Test Your Theme&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Clear caches: &lt;code&gt;php bin/magento cache:clean&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Test your changes by visiting your store.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;9. Customize as Needed&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Modify &lt;code&gt;PHTML&lt;/code&gt; templates for frontend changes.&lt;/li&gt;
&lt;li&gt;Add widgets and blocks for dynamic content.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;This step-by-step process should help you get started with a Magento custom theme. Let me know if you need detailed guidance on specific steps!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>magneto</category>
      <category>themes</category>
      <category>frontend</category>
      <category>coding</category>
    </item>
    <item>
      <title>Building Modern Websites and Managing Online Presence with Expertise in Magento, WordPress, &amp; Shopify</title>
      <dc:creator>Mahesh Prajapati</dc:creator>
      <pubDate>Wed, 18 Dec 2024 06:48:28 +0000</pubDate>
      <link>https://dev.to/maheshprajapati/building-modern-websites-and-managing-online-presence-with-expertise-in-magento-wordpress--5644</link>
      <guid>https://dev.to/maheshprajapati/building-modern-websites-and-managing-online-presence-with-expertise-in-magento-wordpress--5644</guid>
      <description>&lt;p&gt;👋 Hi there! I'm Mahesh Prajapati, a passionate frontend developer with experience in creating beautiful, responsive, and user-friendly websites and web applications.&lt;br&gt;
About Me&lt;/p&gt;

&lt;p&gt;I specialize in crafting modern, intuitive, and accessible web experiences using a variety of technologies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Frontend Technologies: HTML5, CSS3, JavaScript, React, Next.js, Tailwind CSS&lt;/li&gt;
&lt;li&gt;E-Commerce Platforms: Magento, WordPress, Shopify&lt;/li&gt;
&lt;li&gt;SEO, Performance Optimization, and UI/UX Design&lt;/li&gt;
&lt;li&gt;Social Media Management for growing online presence&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With 10+ of experience, I focus on delivering clean, optimized, and engaging web solutions tailored to meet client needs. Whether it's building a custom website or managing a brand's online presence, I strive to exceed expectations in every project.&lt;br&gt;
Freelance Work&lt;/p&gt;

&lt;p&gt;I'm excited to take on freelance projects where I can leverage my skills in front-end development and digital marketing. Whether it's a complete website overhaul or managing social media accounts for brand growth, I provide comprehensive solutions tailored to your business needs.&lt;br&gt;
What I Offer&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Responsive Web Design &amp;amp; Development&lt;/li&gt;
&lt;li&gt;Custom Front-end Solutions&lt;/li&gt;
&lt;li&gt;Tailwind CSS for Modern UI Design&lt;/li&gt;
&lt;li&gt;Next.js &amp;amp; Static Site Generation&lt;/li&gt;
&lt;li&gt;Magento, WordPress, Shopify E-commerce Development&lt;/li&gt;
&lt;li&gt;Social Media Management &amp;amp; Marketing&lt;/li&gt;
&lt;li&gt;Performance Optimization &amp;amp; SEO Best Practices
Contact Me&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Feel free to reach out to discuss your project or just to connect!&lt;/p&gt;

&lt;p&gt;Email: &lt;a href="mailto:thepixxel@gmail.com"&gt;thepixxel@gmail.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looking forward to collaborating and building something amazing together!&lt;/p&gt;

</description>
      <category>freelance</category>
      <category>developer</category>
      <category>frontend</category>
      <category>uidesign</category>
    </item>
    <item>
      <title>Dynamic Box Shadow on Mouse Move</title>
      <dc:creator>Mahesh Prajapati</dc:creator>
      <pubDate>Wed, 18 Dec 2024 06:14:10 +0000</pubDate>
      <link>https://dev.to/maheshprajapati/dynamic-box-shadow-on-mouse-move-3b9j</link>
      <guid>https://dev.to/maheshprajapati/dynamic-box-shadow-on-mouse-move-3b9j</guid>
      <description>&lt;p&gt;Interactive UI effects can significantly enhance the user experience of your website. One such effect is the Dynamic Box Shadow, where the shadow of an element moves in response to the mouse position, creating a subtle yet engaging interaction.&lt;/p&gt;

&lt;p&gt;This effect is achieved by combining basic HTML, CSS, and JavaScript to track mouse movements and dynamically adjust the box shadow properties of an element. It's a great way to add depth and interactivity to your design.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/mahesh-prajapati-developer/embed/emOvNVE?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Use Dynamic Box Shadows?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Enhanced Visual Appeal: Moving shadows add a touch of sophistication and interactivity to otherwise static designs.&lt;/p&gt;

&lt;p&gt;User Engagement: Such effects create a more interactive experience, encouraging users to explore your site.&lt;/p&gt;

&lt;p&gt;Lightweight Implementation: This effect is simple to implement without relying on heavy libraries or plugins.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Customization Ideas&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Intensity Adjustment: You can control the shadow's movement intensity to suit your design style.&lt;/p&gt;

&lt;p&gt;Color Variations: Experiment with different shadow colors to complement your theme.&lt;/p&gt;

&lt;p&gt;Interactive Elements: Apply the effect to buttons, cards, or other focus elements for better user engagement.&lt;/p&gt;

&lt;p&gt;Bring your designs to life with this simple yet powerful effect. Check out the implementation and customize it for your projects!&lt;/p&gt;

&lt;p&gt;Happy coding! &lt;/p&gt;

</description>
      <category>css</category>
      <category>html</category>
      <category>javascript</category>
      <category>animation</category>
    </item>
    <item>
      <title>Interactive Snowfall Cursor Effect with CSS and JavaScript</title>
      <dc:creator>Mahesh Prajapati</dc:creator>
      <pubDate>Tue, 17 Dec 2024 13:08:24 +0000</pubDate>
      <link>https://dev.to/maheshprajapati/interactive-snowfall-cursor-effect-with-css-and-javascript-18h3</link>
      <guid>https://dev.to/maheshprajapati/interactive-snowfall-cursor-effect-with-css-and-javascript-18h3</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Creating visually engaging web effects can significantly enhance the user experience on websites. One such captivating effect is the Interactive Snowfall Cursor Effect, where snowflakes are generated as the user moves the mouse. In this post, we’ll walk through how to create this stunning effect using a combination of CSS and JavaScript.&lt;/p&gt;

&lt;p&gt;Check out the full implementation on CodePen:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://codepen.io/mahesh-prajapati-developer/pen/NPKdOwN" rel="noopener noreferrer"&gt;Interactive Snowfall Cursor Effect&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What You'll Learn&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How to create a snowfall effect using CSS and JavaScript.&lt;/li&gt;
&lt;li&gt;Implementing a dynamic cursor interaction for generating snowflakes.&lt;/li&gt;
&lt;li&gt;Adding random sizes and speeds to enhance visual variety.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The combination of CSS for styling and JavaScript for interactivity creates a stunning snowfall effect that enhances user engagement. This approach allows for endless customization, from different shapes and colors to varied animation speeds, making your website more dynamic and visually appealing.&lt;/p&gt;

&lt;p&gt;If you have any questions or suggestions, feel free to leave a comment below. Happy coding! ❄️&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>css</category>
      <category>animation</category>
    </item>
  </channel>
</rss>
