Popular Pens with ReactJS
How do I make an popular pens with reactjs?
Pen that I've created while learning React.js. . What is a popular pens with reactjs? How do you make a popular pens with reactjs? This script and codes were developed by Mario Duarte on 23 August 2022, Tuesday.
Popular Pens with ReactJS - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Popular Pens with ReactJS</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="myApp"></div> <script src='https://cdnjs.cloudflare.com/ajax/libs/react/15.3.1/react.min.js'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/axios/0.8.1/axios.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/react/15.3.1/react-dom.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Popular Pens with ReactJS - Script Codes CSS Codes
html, body { height: 100%; margin: 0; padding: 0; font-family: 'helvetica', sans-serif; background: #d0e4f7; background: -webkit-linear-gradient(-45deg, #d0e4f7 0%, #73b1e7 24%, #0a77d5 50%, #539fe1 79%, #87bcea 100%); background: -webkit-linear-gradient(315deg, #d0e4f7 0%, #73b1e7 24%, #0a77d5 50%, #539fe1 79%, #87bcea 100%); background: linear-gradient(135deg, #d0e4f7 0%, #73b1e7 24%, #0a77d5 50%, #539fe1 79%, #87bcea 100%);
}
.container { position: relative; width: 100%; padding: 40px; box-sizing: border-box;
}
.container .popular-pens { width: 100%; max-width: 960px; margin: 0 auto;
}
.container .popular-pens .inner { width: 100%;
}
.container .popular-pens .inner > h1 { font-size: 22px; text-transform: uppercase; font-weight: lighter; text-align: center; color: white;
}
.container .popular-pens .inner > p { font-size: 12px; text-align: center; color: #eeeeee;
}
.pens { position: relative; width: 100%; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: horizontal; -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row; -ms-flex-wrap: wrap; flex-wrap: wrap; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; -webkit-box-align: stretch; -ms-flex-align: stretch; align-items: stretch; margin-top: 40px;
}
.pens .pen-single { width: calc(33.333333% - 10px); background-color: white; border-radius: 3px; margin-bottom: 20px; box-shadow: 0 1px 5px 1px rgba(0, 0, 0, 0.2); overflow: hidden;
}
@media screen and (max-width: 540px) { .pens .pen-single { width: 100%; }
}
@media screen and (min-width: 541px) and (max-width: 768px) { .pens .pen-single { width: calc(50% - 10px); }
}
.pens .pen-single:hover .pen-image .love, .pens .pen-single:hover .pen-image .views { opacity: 1;
}
.pens .pen-single:hover .pen-image img { opacity: 0.5;
}
.pens .pen-single .pen-image { position: relative; background-color: #212121;
}
.pens .pen-single .pen-image .love { position: absolute; bottom: 20px; left: 20px; color: #E8E8E8; opacity: 0; z-index: 9; -webkit-transition: opacity 0.2s ease-in-out; transition: opacity 0.2s ease-in-out;
}
.pens .pen-single .pen-image .love i { color: #E74C3C;
}
.pens .pen-single .pen-image .views { position: absolute; bottom: 20px; right: 20px; color: #E8E8E8; opacity: 0; z-index: 9; -webkit-transition: opacity 0.2s ease-in-out; transition: opacity 0.2s ease-in-out;
}
.pens .pen-single .pen-image .views i { color: #3498DB;
}
.pens .pen-single .pen-image img { width: 100%; height: auto; padding: 0; margin: 0; opacity: 1; -webkit-transition: opacity 0.2s ease-in-out; transition: opacity 0.2s ease-in-out;
}
.pens .pen-single .pen-info { width: 100%; padding: 15px; box-sizing: border-box;
}
.pens .pen-single .pen-info a { text-decoration: none; text-align: center; color: #555555;
}
.pens .pen-single .pen-info a h1 { margin: 0; padding: 0; font-size: 18px; font-weight: normal;
}
@media screen and (max-width: 540px) { .pens .pen-single .pen-info a h1 { font-size: 14px; }
}
@media screen and (min-width: 541px) and (max-width: 768px) { .pens .pen-single .pen-info a h1 { font-size: 16px; }
}
.pens .pen-single .pen-info a:hover { color: #2980B9;
}
Popular Pens with ReactJS - Script Codes JS Codes
"use strict";
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var Application = function (_React$Component) { _inherits(Application, _React$Component); function Application() { _classCallCheck(this, Application); var _this2 = _possibleConstructorReturn(this, _React$Component.call(this)); _this2.state = { pens: [] }; return _this2; } Application.prototype.componentWillMount = function componentWillMount() { var _this3 = this; var _this = this; this.serverRequest = axios.get(this.props.url).then(function (result) { var pens = result.data.data; //console.log(pens); _this3.setState({ pens: pens }); }); }; Application.prototype.componentWillUnmount = function componentWillUnmount() { this.serverRequest.abort(); }; Application.prototype.render = function render() { return React.createElement( "div", { className: "container" }, React.createElement( "div", { className: "popular-pens" }, React.createElement( "div", { className: "inner" }, React.createElement( "h1", null, "Popular Pens" ), React.createElement( "p", null, "This is a popular pens React component" ), React.createElement( "div", { className: "pens" }, this.state.pens.map(function (pen) { return React.createElement( "div", { className: "pen-single" }, React.createElement( "div", { className: "pen-image" }, React.createElement( "div", { className: "love" }, React.createElement("i", { className: "fa fa-heart", "aria-hidden": "true" }), " ", pen.loves ), React.createElement( "div", { className: "views" }, React.createElement("i", { className: "fa fa-eye", "aria-hidden": "true" }), " ", pen.views ), React.createElement( "a", { href: pen.link, target: "_blank" }, React.createElement("img", { src: pen.images.large, alt: pen.title }) ) ), React.createElement( "div", { className: "pen-info" }, React.createElement( "a", { href: pen.link, target: "_blank" }, React.createElement( "h1", null, pen.title ) ) ) ); }) ) ) ) ); }; return Application;
}(React.Component);
ReactDOM.render(React.createElement(Application, { url: "http://crossorigin.me/http://cpv2api.com/pens/popular/MarioDesigns/" }), document.getElementById('myApp'));
Developer | Mario Duarte |
Username | MarioDesigns |
Uploaded | August 23, 2022 |
Rating | 3 |
Size | 5,327 Kb |
Views | 30,360 |
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 |
Carbon Atom Animation | 5,507 Kb |
Interactive 3D Video Thumbnail | 7,015 Kb |
MDesigns Animated Background | 2,888 Kb |
Arcade Buttons | 3,213 Kb |
Flying Bird Animation | 2,873 Kb |
Minimalist Mobile Mockup | 2,748 Kb |
Pure CSS circonferences | 4,471 Kb |
Door Animation | 3,292 Kb |
Menu Animation - push in | 4,401 Kb |
3D Pyramid Animation | 4,521 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 |
Project Euler Problem 17 | Bfillmer | 2,739 Kb |
CSS Bot Confusion | Jpod | 3,456 Kb |
Infractions - Attitude | Kylie_Joseph | 7,672 Kb |
Segments mouse following | Nosir | 2,909 Kb |
Parallax-ish Sliding Content | Jdsteinbach | 2,748 Kb |
Pure CSS Tooltip | APinix | 2,815 Kb |
Octopus Bar iPad App Interactions | Davidkpiano | 6,735 Kb |
Flat UI Button | Honchoman | 2,289 Kb |
Box Shadow Effects | Retrofuturistic | 2,143 Kb |
A Pen by Eka Risyana | Risyana | 3,705 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!