FCC: Camper Leaderboard
How do I make an fcc: camper leaderboard?
What is a fcc: camper leaderboard? How do you make a fcc: camper leaderboard? This script and codes were developed by Jeanine on 12 September 2022, Monday.
FCC: Camper Leaderboard - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>FCC: Camper Leaderboard</title> <link rel='stylesheet prefetch' href='http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css'>
<link rel='stylesheet prefetch' href='http://fonts.googleapis.com/css?family=Kaushan+Script'>
<link rel='stylesheet prefetch' href='http://netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="app">
</div>
<footer><p>Coded with <span>♥</span> by <a href="http://satinflame.com">satinflame design</a></p></footer> <script src='http://cdnjs.cloudflare.com/ajax/libs/react/15.3.1/react.js'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/react/15.3.1/react-dom.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
FCC: Camper Leaderboard - Script Codes CSS Codes
body, html { background: #333;
}
html, body { background-color: #001; background-image: radial-gradient(#b54c68 15%, rgba(0, 0, 0, 0) 16%), radial-gradient(#ff9999 15%, rgba(0, 0, 0, 0) 16%); background-size: 30px 30px; background-position: 0 0, 15px 15px;
}
.container { max-width: 800px;
}
body { padding: 10px;
}
table img { width: 30px; height: 30px; padding: 1px; border: 1px solid #ccc; margin-right: 8px;
}
td, th { background: #fff;
}
table { border: 3px solid #000;
}
caption { color: #fff; font-size: 24px; padding: 10px; background: rgba(0, 0, 0, 0.5); margin-top: 10px; border: 5px solid #f99; border-bottom: 0;
}
.fancy { text-align: center; font-family: 'Kaushan Script';
}
#recent.active:after, #alltime.active:after { content: "\25bc"; float: right; font-size: 14px;
}
th#recent, th#alltime { width: 30%; cursor: pointer;
}
table th { font-family: 'Kaushan Script'; font-size: 1.6rem;
}
footer { color: #ccc; font-family: 'Kaushan Script'; text-align: center; background: rgba(0, 0, 0, 0.5); padding: 10px;
}
footer a, footer span { color: #b54c68;
}
table tr:first-of-type td { font-weight: bold; font-size: 1.8rem; border-top: 3px solid #b54c68; border-bottom: 3px solid #b54c68;
}
table.table-bordered.table td { vertical-align: middle;
}
table.table-bordered.table td:first-child { text-align: center;
}
table a { color: #b54c68;
}
#app table { border: 5px solid #f99;
}
FCC: Camper Leaderboard - Script Codes JS Codes
"use strict";
var Display = React.createClass({ displayName: "Display", getInitialState: function getInitialState() { return { users: [], orderby: "recent", orderbyprev: "alltime" }; this.onClick = this.handleClick.bind(this); this.getData(); }, handleClick: function handleClick(e) { //console.log("e " +e); var passedState = e; // what is clicke var orderState = this.state.orderby; // what it currently is if (passedState !== "alltime" && orderState === "alltime") { this.setState({ orderby: "recent", orderbyprev: "alltime" }); } else if (passedState !== "recent" && orderState === "recent") { this.setState({ orderby: "alltime", orderbyprev: "recent" }); } //this.getData(); //console.log('click: '+ this.state.orderby); }, getData: function getData() { $.ajax({ url: this.props.apiroot + this.state.orderby, dataType: 'json', cache: false, success: function (data) { var users = data; this.setState({ users: users }); }.bind(this), error: function (xhr, status, err) { console.error(this.props.apiroot, status, err.toString()); }.bind(this) }); }, componentDidMount: function componentDidMount() { this.getData(); }, componentDidUpdate: function componentDidUpdate() { this.getData(); }, render: function render() { var alltimeClass = this.state.orderby === "alltime" ? 'active' : ''; var recentClass = this.state.orderby === "recent" ? 'active' : ''; //console.log(this.state.orderby); return React.createElement( "div", { className: "editor container" }, React.createElement( "div", { className: "row" }, React.createElement( "div", { className: "markdown-input col-sm-12" }, React.createElement( "table", { className: "table-responsive table table-bordered" }, React.createElement( "caption", { className: "fancy" }, React.createElement("span", { className: "fa fa-free-code-camp", "aria-hidden": "true" }), " freeCodeCamp Leaderboard" ), React.createElement( "thead", null, React.createElement( "tr", null, React.createElement( "th", null, "Rank" ), React.createElement( "th", null, "Username" ), React.createElement( "th", { id: "recent", className: recentClass, onClick: this.handleClick.bind(this, "recent") }, "Points in the past 30 days" ), React.createElement( "th", { id: "alltime", className: alltimeClass, onClick: this.handleClick.bind(this, "alltime") }, "All-time Points" ) ) ), React.createElement(Output, { users: this.state.users }) ) ) ) ); }
});
var Output = React.createClass({ displayName: "Output", render: function render() { var count = 0; var userlist = this.props.users.map(function (user) { count++; return React.createElement(UserDetails, { user: user, key: user.username, img: user.img, username: user.username, recent: user.recent, alltime: user.alltime, count: count, apiroot: this.props.apiroot, updatePage: this.props.updatePage }); }.bind(this)); return React.createElement( "tbody", null, userlist ); }
});
function UserDetails(props) { return React.createElement( "tr", null, React.createElement( "td", null, props.count ), React.createElement( "td", null, React.createElement( "a", { href: "https://www.freecodecamp.com/" + props.username }, React.createElement("img", { src: props.img }), props.username ) ), React.createElement( "td", null, props.recent ), React.createElement( "td", null, props.alltime ) );
}
ReactDOM.render(React.createElement(Display, { apiroot: "https://fcctop100.herokuapp.com/api/fccusers/top/" }), document.getElementById("app"));
Developer | Jeanine |
Username | virtual |
Uploaded | September 12, 2022 |
Rating | 3 |
Size | 5,425 Kb |
Views | 16,192 |
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 |
Bootstrap 4 | 2,121 Kb |
Simple Event Box | 1,623 Kb |
Table Sorter Data | 3,347 Kb |
Parallax Cats | 6,553 Kb |
Expanding Info Boxes | 5,141 Kb |
3 Piece Slider | 3,881 Kb |
Font-Awesome Icon Card with heading | 2,882 Kb |
3 Piece Slider with featured center | 3,920 Kb |
Flexbox | 2,263 Kb |
Simple React Template | 2,233 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 |
Random Gradients - JS | Aldlevine | 2,026 Kb |
Alumni ECA | MatheusLima92 | 3,777 Kb |
OnScreenAction | Ozgursagiroglu | 2,647 Kb |
A simple log in form made with css | Mayurelbhar | 2,160 Kb |
Drill-down Map | Good886 | 8,484 Kb |
Animated Logo | Shakdaniel | 2,672 Kb |
Drag in vanilla js using dotval math instead of translate | Paulq | 2,662 Kb |
Material Design-Layout-Principles Practice | Fraina | 2,331 Kb |
CSS Letter animations | Sladix | 2,116 Kb |
Slider | Mohammed-fawzy | 2,634 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!