Camper News

3,194 Kb

How do I make an camper news?

Objective: Build a app that is functionally similar to this: What is a camper news? How do you make a camper news? This script and codes were developed by Sam Koshy on 06 November 2022, Sunday.

Camper News Previews

Camper News - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Camper News</title> <link rel='stylesheet prefetch' href=''>
<link rel='stylesheet prefetch' href=''> <link rel="stylesheet" href="css/style.css">
<body> <link href='|Oswald|Roboto:400,500' rel='stylesheet' type='text/css'>
<div class="container-fluid text-center title"> <h2>freeCodeCamp (<i class="fa fa-fire"></i>)</h2> <h1> Camper News</h1> <br> <div class='camperNews'></div>
</div> <script src=''></script> <script src="js/index.js"></script>

Camper News - Script Codes CSS Codes

body { background: #90A5A6; //url( center fixed;
.title h2 { font-family: 'Abel', sans-serif;
.title h1 { font-family: 'Oswald', sans-serif;
.newsContainerStyle { width: 230px; height: 300px; background: rgb(240, 240, 240); font-family: 'Roboto', sans-serif; //border:2px solid black; border-radius: 10px; display: inline-block; margin: 0 20px 20px 0; text-align: left; box-shadow: 10px 10px 10px 2px rgba(0, 0, 0, 0.5); /*The first two values set the offset of the shadow, the third value is the amount of blur and the last value is the spread of the shadow*/
.newsContainerStyle img { width: 230.5px; height: 206px; border-radius: 10px 10px 0 0; padding-right:0;
.storyTitle { position: relative; top: 6px; left: 8px; font-size: 110%; font-weight: 500;
.storyDetails { position: relative; top: 6px; left: 8px;
.fa-heart { color: #8A0707;

Camper News - Script Codes JS Codes

var defaultImg = " onerror=\"this.src=''\" >"; //replace any broken image link with default image
$(document).ready(function() { $.getJSON('', function(news) { //$(".camperNews").html(news.length); var post = "", articleTitle; news.forEach(function(article) { var datePosted = new Date(article.timePosted); var image = ""; //if image field is empty replace with author picture if (article.image !== "") { image = article.image; } else { image =; } if (article.headline.length<25){ //title is limited to 25 characters articleHeadline=article.Title; } else {articleHeadline=article.headline.substring(0, 25)+"...";} post += "<div class='newsContainerStyle'><a href='" + + "'><img src='" + image + "'" + defaultImg + "<span class='storyTitle'>" + articleHeadline + "</span></a><br><span class='storyDetails'>by&#8201;&#8201;- <a href='" + + "'>" + + "</a><br><i class='fa fa-heart'></i>&nbsp;" + article.rank + "<br> Posted on: " + datePosted.toDateString().substring(0, 3) + ", " + datePosted.toDateString().substring(4, datePosted.toDateString().length) + "</span></div>"; }); $(".camperNews").html(post); });
Camper News - Script Codes
Camper News - Script Codes
Home Page Home
Developer Sam Koshy
Username codinger
Uploaded November 06, 2022
Rating 3
Size 3,194 Kb
Views 20,240
Do you need developer help for Camper News?

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!

Sam Koshy (codinger) Script Codes
Create amazing web content with AI!

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!