<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[James Bhatta's blog]]></title><description><![CDATA[Software engineer from Nepal with 3.5+ years of experience in developing & implementing interactive web applications. Works primarily with PHP (Laravel) and vue]]></description><link>https://blog.manojbhatta.com.np</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Apr 2026 17:22:59 GMT</lastBuildDate><atom:link href="https://blog.manojbhatta.com.np/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Anchor tag within anchor tag]]></title><description><![CDATA[To place an link within a link, you can set the outer element's position to relative and then create an empty a tag with css property position: absolute and inset: 0 . This will be the target link for the whole card. Any other links within this eleme...]]></description><link>https://blog.manojbhatta.com.np/anchor-tag-within-anchor-tag</link><guid isPermaLink="true">https://blog.manojbhatta.com.np/anchor-tag-within-anchor-tag</guid><category><![CDATA[css-tricks]]></category><dc:creator><![CDATA[James Bhatta]]></dc:creator><pubDate>Sun, 16 Jun 2024 15:49:21 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1718552428147/39d1bd1f-6aab-491b-a071-56e6f54c9fc3.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>To place an link within a link, you can set the outer element's position to <code>relative</code> and then create an empty <code>a</code> tag with css property <code>position: absolute</code> and <code>inset: 0</code> . This will be the target link for the whole card. Any other links within this element can be made clickable by setting <code>position: relative</code> . Here's a tailwindcss example:</p>
<pre><code class="lang-xml">
<span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"bg-gray-100 p-6"</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"relative bg-white px-6 pb-8 pt-10 shadow-sm"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://example.com"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"absolute inset-0"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">h1</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"mb-4 text-lg font-semibold"</span>&gt;</span>Some Dummy Title<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"text-gray-600"</span>&gt;</span>Clicking anywhere in the card will take you to one link while clicking in the button below will take you to another link<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"pt-4 text-base font-semibold leading-7"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://www.iana.org/help/example-domains"</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"text-sky-500 hover:text-sky-600 relative"</span>&gt;</span>Another link<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
</code></pre>
<p>Source: <a target="_blank" href="https://laracasts.com/series/jeffreys-larabits/episodes/38">https://laracasts.com/series/jeffreys-larabits/episodes/38</a></p>
]]></content:encoded></item><item><title><![CDATA[Optimal Images in HTML]]></title><description><![CDATA[https://www.builder.io/blog/fast-images]]></description><link>https://blog.manojbhatta.com.np/optimal-images-in-html</link><guid isPermaLink="true">https://blog.manojbhatta.com.np/optimal-images-in-html</guid><dc:creator><![CDATA[James Bhatta]]></dc:creator><pubDate>Sun, 29 Jan 2023 12:59:38 GMT</pubDate><content:encoded><![CDATA[<p>https://www.builder.io/blog/fast-images</p>
]]></content:encoded></item><item><title><![CDATA[Ultimate Tools for Developers 🛠]]></title><description><![CDATA[https://dev.to/dostonnabotov/ultimate-tools-for-developers-2aj2]]></description><link>https://blog.manojbhatta.com.np/ultimate-tools-for-developers</link><guid isPermaLink="true">https://blog.manojbhatta.com.np/ultimate-tools-for-developers</guid><category><![CDATA[links]]></category><dc:creator><![CDATA[James Bhatta]]></dc:creator><pubDate>Mon, 26 Dec 2022 14:32:47 GMT</pubDate><content:encoded><![CDATA[<p>https://dev.to/dostonnabotov/ultimate-tools-for-developers-2aj2</p>
]]></content:encoded></item><item><title><![CDATA[Change GitHub default branch from master to main]]></title><description><![CDATA[Step 1
Create main branch locally, taking the history from master
git branch -m master main

Step 2
Push the new local main branch to the remote repo (GitHub) 
git push -u origin main

Step 3
Switch the current HEAD to the main branch
git symbolic-re...]]></description><link>https://blog.manojbhatta.com.np/change-github-default-branch-from-master-to-main</link><guid isPermaLink="true">https://blog.manojbhatta.com.np/change-github-default-branch-from-master-to-main</guid><category><![CDATA[GitHub]]></category><dc:creator><![CDATA[James Bhatta]]></dc:creator><pubDate>Fri, 26 Aug 2022 15:09:12 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1661526536320/tbK2DZLwL.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3 id="heading-step-1">Step 1</h3>
<p>Create main branch locally, taking the history from master</p>
<pre><code class="lang-bash">git branch -m master main
</code></pre>
<h3 id="heading-step-2">Step 2</h3>
<p>Push the new local main branch to the remote repo (GitHub) </p>
<pre><code class="lang-bash">git push -u origin main
</code></pre>
<h3 id="heading-step-3">Step 3</h3>
<p>Switch the current HEAD to the main branch</p>
<pre><code class="lang-bash">git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main
</code></pre>
<h3 id="heading-step-4">Step 4</h3>
<p>Change the default branch on GitHub to main</p>
<p>At this point you’ve succesfully transitioned everything to the ‘main’ branch, but you can’t delete the ‘master’ branch without changing the default branch in GitHub to something other than ‘master’. For this:</p>
<ul>
<li>Navigate to your github repository</li>
<li>click "Settings" -&gt; "Branches"  on the sidebar</li>
<li>Change the default branch to ‘main’. </li>
</ul>
<p><em>For detail instruction check <a target="_blank" href="https://docs.github.com/en/github/administering-a-repository/setting-the-default-branch">setting the default branch on github</a></em></p>
<h3 id="heading-step-5">Step 5</h3>
<p>Delete the master branch on the remote</p>
<pre><code class="lang-bash">git push origin --delete master
</code></pre>
]]></content:encoded></item><item><title><![CDATA[100 underline/overlay animations | The ultimate CSS collection 🥇]]></title><description><![CDATA[https://dev.to/afif/100-underline-overlay-animation-the-ultimate-css-collection-4p40]]></description><link>https://blog.manojbhatta.com.np/100-underlineoverlay-animations-the-ultimate-css-collection</link><guid isPermaLink="true">https://blog.manojbhatta.com.np/100-underlineoverlay-animations-the-ultimate-css-collection</guid><dc:creator><![CDATA[James Bhatta]]></dc:creator><pubDate>Wed, 17 Aug 2022 16:24:57 GMT</pubDate><content:encoded><![CDATA[<p><a target="_blank" href="https://dev.to/afif/100-underline-overlay-animation-the-ultimate-css-collection-4p40">https://dev.to/afif/100-underline-overlay-animation-the-ultimate-css-collection-4p40</a></p>
]]></content:encoded></item><item><title><![CDATA[100 CSS loaders for your next project]]></title><description><![CDATA[https://dev.to/afif/i-made-100-css-loaders-for-your-next-project-4eje]]></description><link>https://blog.manojbhatta.com.np/100-css-loaders-for-your-next-project</link><guid isPermaLink="true">https://blog.manojbhatta.com.np/100-css-loaders-for-your-next-project</guid><category><![CDATA[CSS]]></category><category><![CDATA[css-loader]]></category><dc:creator><![CDATA[James Bhatta]]></dc:creator><pubDate>Wed, 17 Aug 2022 16:21:10 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1660753397277/fmCRAqvBm.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><a target="_blank" href="https://dev.to/afif/i-made-100-css-loaders-for-your-next-project-4eje">https://dev.to/afif/i-made-100-css-loaders-for-your-next-project-4eje</a></p>
]]></content:encoded></item><item><title><![CDATA[Styling active route menu item in laravel]]></title><description><![CDATA[You can check if the current route is active just with
request()->routeIs('admin.cities')

Or even sub-routes (like editing, creating, or whatever with
request()->routeIs('admin.cities*')

If you prefer to use the route facade, you still can do that ...]]></description><link>https://blog.manojbhatta.com.np/styling-active-route-menu-item-in-laravel</link><guid isPermaLink="true">https://blog.manojbhatta.com.np/styling-active-route-menu-item-in-laravel</guid><category><![CDATA[Laravel]]></category><dc:creator><![CDATA[James Bhatta]]></dc:creator><pubDate>Tue, 17 May 2022 03:17:27 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1688264479392/3232859f-f904-4c91-a8e1-2edc481226bb.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>You can check if the current route is active just with</p>
<pre><code class="lang-php">request()-&gt;routeIs(<span class="hljs-string">'admin.cities'</span>)
</code></pre>
<p>Or even sub-routes (like editing, creating, or whatever with</p>
<pre><code class="lang-php">request()-&gt;routeIs(<span class="hljs-string">'admin.cities*'</span>)
</code></pre>
<p>If you prefer to use the route facade, you still can do that with</p>
<pre><code class="lang-php">Route::named(<span class="hljs-string">'admin.cities*'</span>)
</code></pre>
<p>By using the * character, you can apply the active class to submenus easily:</p>
<pre><code class="lang-php">routeIs(<span class="hljs-string">'admin.cities*'</span>) ? <span class="hljs-string">'active'</span> : <span class="hljs-string">''</span> }}<span class="hljs-string">"&gt; Cities
routeIs('admin.cities.index') ? 'active' : '' }}&gt;&lt;a&gt;List&lt;/a&gt;
routeIs('admin.cities.create') ? 'active' : '' }}&gt;&lt;a&gt;Create&lt;/a&gt;</span>
</code></pre>
]]></content:encoded></item></channel></rss>