Camper News
How do I make an camper news?
What is a camper news? How do you make a camper news? This script and codes were developed by Fred Hawk on 14 November 2022, Monday.
Camper News - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Camper News</title> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href='https://fonts.googleapis.com/css?family=Indie+Flower' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <h1 class="page-title">Camper News</h1> <div class="wrapper"></div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Camper News - Script Codes CSS Codes
h1 { color: #0287cf; font-family: 'Indie Flower', cursive; font-size: 3em;
}
.page-title { text-align: center;
}
.wrapper { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-flow: row wrap; flex-flow: row wrap; -ms-flex-pack: distribute; justify-content: space-around;
}
.item { width: 276px; display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-flow: column wrap; flex-flow: column wrap; border-radius: 15px 15px 9px 9px; box-shadow: 4px 4px 5px grey; margin: 10px 10px; background-color: #02a6f2; -webkit-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; -webkit-transform: scale(1); transform: scale(1);
}
.item:hover { z-index: 2; -webkit-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; -webkit-transform: scale(1.15); transform: scale(1.15);
}
.item-img { border-radius: 15px 15px 0 0; width: 276px; height: 240px; overflow: hidden;
}
.item-title { color: white; padding-left: 10px; margin: 5px 0; font-size: 1.25em;
}
.item-title:hover { color: #012438;
}
.item-link { text-decoration: none;
}
.post-date { color: white; padding-left: 10px; margin: 5px 0;
}
.author { color: white; padding-left: 10px; margin: 5px 0;
}
.author-link { text-decoration: none;
}
.author:hover { color: #012438;
}
.upvote { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: start; -ms-flex-pack: start; justify-content: flex-start; padding-bottom: 10px;
}
.upvote-icon { width: 20px; height: 20px; padding: 0 10px;
}
.upvotes { color: white; margin: 0;
}
Camper News - Script Codes JS Codes
$(document).ready(function() { var newsItemsAPI = "https://www.freecodecamp.com/news/hot"; var html = ""; // Call the newsArticle function with the API as an argument newsArticles(newsItemsAPI); function newsArticles(newsItemsAPI) { $.ajax({ url: newsItemsAPI, data: { format: 'json' }, dataType: 'json', success: function(newsItem){ newsItem.forEach(function(newsStory) { // Put all the needed values into variables for use var newsImage = newsStory.image; var newsLink = newsStory.link; var newsTitle = newsStory.headline.substring(0, 50)+"..."; var newsPoster = newsStory.author.username; var newsPostedDate = newsStory.timePosted; var newsUpvotes = newsStory.rank; var newsAuthorPic = newsStory.author.picture; // If the article doesn't have an image, use the authors image instead if (newsImage === "" || newsImage === "/web/imgs/logo.png") { newsImage = newsAuthorPic; } // Format the date to "Mon Feb 08 2016" newsPostedDate = new Date(newsPostedDate); newsPostedDate = newsPostedDate.toDateString(); // Create the newsarticle html += '<article class="item">'; html += '<a href="' + newsLink + '" target="_blank" class="item-link">'; html += '<img src ="' + newsImage + '" class="item-img" alt="'; html += + newsTitle + '">'; html += '<h2 class="item-title">' + newsTitle + '</h2></a>'; html += '<p class="post-date">Posted on: ' + newsPostedDate + '</p>'; html += '<a href="https://www.freecodecamp.com/'; html += + newsPoster + '" class="author-link" target="_blank" alt="'; html += + newsPoster + '">'; html += '<p class="author">By ' + newsPoster + '</p></a>'; html += '<div class="upvote">'; html += '<img src="https://dl.dropboxusercontent.com/'; html += 's/z8rn5ckfr5suuas/heart.svg?raw=1"'; html += ' class="upvote-icon" alt="Upvotes">'; html += '<p class="upvotes">' + newsUpvotes + '</p></div></article>' }); // Add html to .wrapper class for each newsarticle $(".wrapper").html(html); } }); }
});
Developer | Fred Hawk |
Username | osycon |
Uploaded | November 14, 2022 |
Rating | 3 |
Size | 3,606 Kb |
Views | 12,144 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Weekly UI - Airbnb Footer Component | 15,526 Kb |
Portfolio example FCC | 5,105 Kb |
Weekly UI - Become a member | 9,835 Kb |
Weekly UI - Invisionapp Sign up | 4,382 Kb |
Pomodoro Clock | 3,705 Kb |
CSS Flexbox 3 col example | 3,013 Kb |
Lilli | 6,117 Kb |
Weather App | 4,171 Kb |
Weekly UI - Dropbox Hero Component | 3,811 Kb |
Weekly UI - Stripe - Pricing section | 5,848 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Infractions - Attitude | Kylie_Joseph | 7,672 Kb |
CSS Bot Confusion | Jpod | 3,456 Kb |
About Mazano | Kiti | 2,585 Kb |
Comment Jquery | SquishyAndroid | 2,421 Kb |
Testimonial Fancy tabs responsive | Amit-webdesigner | 3,056 Kb |
SVG Circle Progress | JMChristensen | 3,368 Kb |
A Pen by James Podles | Jpod | 2,656 Kb |
Starfield old school style | Bolloxim | 5,214 Kb |
TweetBox with React JS | J0zelito | 3,325 Kb |
Sassy Buttons | Elyseholladay | 2,299 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!