First create menu in shopify navigation and then add below code in liquid file.
<ul class="ctg">
{% for link in linklists.blog.links %}
<li class="{% if link.active or link.child_active %}active{% endif %}">
<a href="{{ link.url }}">{{ link.title }}</a>
{% if blog.all_tags != blank %}
<ul class="tag">
{% for tag in blog.all_tags %}
<li class="tag">
<a href="{{ shop.url}}/blogs/{{ blog.handle }}/tagged/{{ tag | handleize }}">{{ tag }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
Hiring a website developer from India offers several advantages that make it an attractive option for businesses worldwide. Here are some compelling reasons:
By hiring a website developer from India, businesses can benefit from cost savings, access to a talented and diverse pool of developers, high-quality work, and effective communication, making it a smart choice for many companies looking to enhance their digital presence.
The difference between a regular B.Tech (Bachelor of Technology) and a B.Tech Integrated program lies primarily in their structure, duration, and curriculum:
In summary, while both B.Tech and B.Tech Integrated programs focus on technical education, B.Tech Integrated programs offer a more integrated approach, combining undergraduate and postgraduate studies into a single curriculum and providing students with a broader and more comprehensive educational experience.
Learning website development can be an exciting journey, and there are several approaches to make the process easier and more enjoyable:
By following these tips and staying dedicated to your learning journey, you'll be well on your way to mastering website development. Remember, the key is to keep learning, experimenting, and enjoying the process!
macOS includes a variety of keyboard shortcuts that can help you perform tasks more efficiently. Here are some commonly used macOS keyboard shortcuts:
General Shortcuts:
File and Folder Shortcuts:
Text Editing Shortcuts:
Screenshot Shortcuts:
Mission Control and Spaces Shortcuts:
System Preferences:
Spotlight Shortcuts:
Safari Shortcuts:
These are some of the most common keyboard shortcuts in macOS. Keep in mind that different applications may have their own unique shortcuts, and you can often customize shortcuts in macOS to suit your preferences. To view and customize keyboard shortcuts for a specific application, go to the "App Name" menu > Preferences > Keyboard.
Add current date using javascript
<span id="current_date"></span>
const month = ["January","February","March","April","May","June","July","August","September","October","November","December"];
const d = new Date();
let name = month[d.getMonth()];
year = d.getFullYear();
mnth = d.getMonth() + 1;
day = d.getDate() + 3;
document.getElementById("current_date").innerHTML = name + ", " + day + " " + year;
Show different style of div for mobile and desktop using css
Certainly! Here's an example of how you can apply different styles to a <div>
for mobile and desktop devices using CSS:
/* Styles for mobile devices */
@media (max-width: 767px) {
.my-div {
background-color: lightblue;
color: white;
}
}
/* Styles for desktop devices */
@media (min-width: 768px) {
.my-div {
background-color: lightgreen;
color: black;
}
}
In the example above, we use media queries to target different screen widths. The first media query targets devices with a maximum width of 767px, representing mobile devices. Within this media query, the .my-div
class is styled with a light blue background color, white text color, a font size of 16 pixels, and a padding of 20 pixels.
The second media query targets devices with a minimum width of 768px, representing desktop devices. Within this media query, the .my-div
class is styled with a light green background color, black text color, a font size of 20 pixels, and a padding of 30 pixels.
By applying different styles within each media query, you can create distinct visual presentations for mobile and desktop versions of the <div>
. Feel free to adjust the styles and properties according to your specific design needs.
Send email using php
HTML Code:
<form action="contactform.php" name="contactForm" method="post" id="contactForm">
<div class="row form-group">
<div class="col-md-6">
<label for="fname">First Name</label>
<input type="text" id="fname" name="fname" class="form-control" placeholder="Your firstname" required />
</div>
<div class="col-md-6">
<label for="lname">Last Name</label>
<input type="text" id="lname" name="lname" class="form-control" placeholder="Your lastname" required />
</div>
</div>
<div class="row form-group">
<div class="col-md-12">
<label for="email">Email</label>
<input type="text" id="email" name="email" class="form-control" placeholder="Your email address" required />
</div>
</div>
<div class="row form-group">
<div class="col-md-12">
<label for="subject">Subject</label>
<input type="text" id="subject" name="subject" class="form-control" placeholder="Your subject of this message" required />
</div>
</div>
<div class="row form-group">
<div class="col-md-12">
<label for="message">Message</label>
<textarea name="message" id="message" cols="30" rows="10" class="form-control" placeholder="Say something about your project" required /></textarea>
</div>
</div>
<div class="form-group">
<input type="submit" value="Send Message" class="btn btn-primary">
</div>
</form>
PHP Code:
<?php
ini_set("display_errors", 1);
error_reporting(E_ALL);
ini_set("SMTP", "smtp.secureserver.net");
ini_set("smtp_port", 25);
?>
<?php
$to = "demo@demo.com";
$firstname = $_POST["fname"];
$lastname = $_POST["lname"];
$email = $_POST["email"];
$subjects = $_POST["subject"];
$message = $_POST["message"];
$subject = "Inquiry Received";
if ($email != "") {
function get_client_ip()
{
$ipaddress = "";
if (getenv("HTTP_CLIENT_IP")) {
$ipaddress = getenv("HTTP_CLIENT_IP");
} elseif (getenv("HTTP_X_FORWARDED_FOR")) {
$ipaddress = getenv("HTTP_X_FORWARDED_FOR");
} elseif (getenv("HTTP_X_FORWARDED")) {
$ipaddress = getenv("HTTP_X_FORWARDED");
} elseif (getenv("HTTP_FORWARDED_FOR")) {
$ipaddress = getenv("HTTP_FORWARDED_FOR");
} elseif (getenv("HTTP_FORWARDED")) {
$ipaddress = getenv("HTTP_FORWARDED");
} elseif (getenv("REMOTE_ADDR")) {
$ipaddress = getenv("REMOTE_ADDR");
} else {
$ipaddress = "UNKNOWN";
}
return $ipaddress;
}
$IPAddress = get_client_ip();
$header = "From: $email \r\n";
$header .= "MIME-Version: 1.0\r\n";
$header .= "Content-type: text/html\r\n";
$header .= "X-Mailer: PHP \r\n";
$message = "<table width='900' style='border:1px solid #798eea;' cellpadding='5' cellspacing='0' align='center'><tr><td width='150' style='margin:0; padding:0 0 0 10px; background-color:#798eea; color:#FFFFFF;'>First Name</td><td width='8' style='margin:0; padding:0 0 0 10px; background-color:#798eea; color:#FFFFFF;'>:</td><td style='padding-left:15px; margin:0; color:#000000; border-bottom:1px solid #798eea'>$firstname</td></tr><tr><td width='150' style='margin:0; padding:0 0 0 10px; background-color:#798eea; color:#FFFFFF;'>Last Name</td><td width='8' style='margin:0; padding:0 0 0 10px; background-color:#798eea; color:#FFFFFF;'>:</td><td style='padding-left:15px; margin:0; color:#000000; border-bottom:1px solid #798eea'>$lastname</td></tr><tr><td width='150' style='margin:0; padding:0 0 0 10px; background-color:#798eea; color:#FFFFFF;'>Email</td><td width='8' style='margin:0; padding:0 0 0 10px; background-color:#798eea; color:#FFFFFF;'>:</td><td style='padding-left:15px; margin:0; color:#000000; border-bottom:1px solid #798eea'>$email</td></tr><tr><td width='150' style='margin:0; padding:0 0 0 10px; background-color:#798eea; color:#FFFFFF;'>Subject</td><td width='8' style='margin:0; padding:0 0 0 10px; background-color:#798eea; color:#FFFFFF;'>:</td><td style='padding-left:15px; margin:0; color:#000000; border-bottom:1px solid #798eea'>$subjects</td></tr><tr><td width='150' style='margin:0; padding:0 0 0 10px; background-color:#798eea; color:#FFFFFF;'>Message</td><td width='8' style='margin:0; padding:0 0 0 10px; background-color:#798eea; color:#FFFFFF;'>:</td><td style='padding-left:15px; margin:0; color:#000000; border-bottom:1px solid #798eea'>$message</td></tr></table>";
if (mail($to, $subject, $message, $header)) {
echo "<script>alert('Thank you for Applying. We will contact you as a possible');window.location = '/';</script>";
}
} else {
header("Location: http://{$_SERVER["SERVER_NAME"]}/");
die();
}
?>
The mail()
function is a built-in PHP function for sending email. It requires a working email server configuration on your server to send the email successfully. Note that the mail()
function may not work properly on all systems or configurations.
Which is best option for responsive website? Custom css media query or framework?
The choice between using custom CSS media queries or a framework for building a responsive website depends on various factors, including your project requirements, development expertise, and personal preference. Both options have their advantages and considerations:
Custom CSS Media Queries:
Frameworks:
Ultimately, the best option depends on your specific project requirements, your familiarity with CSS, and your development approach. If you prefer maximum control and have the necessary expertise, custom CSS media queries can offer a tailored solution. On the other hand, if you prioritize efficiency, consistent design, and a faster development process, using a framework may be a suitable choice.