HTML
CSS
JS
Result
Skip Results Iframe
EDIT ON
Live
Live
Live
This Pen is owned by
Michael Bajar
on
CodePen
.
See more by @michael-bajar on CodePen
External CSS
https://fonts.googleapis.com/icon?family=Material+Icons
https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.0/css/materialize.min.css
External JavaScript
https://code.jquery.com/jquery-3.1.1.min.js
https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.8/js/materialize.min.js
{"__browser":{"country":"US","device":"unknown_device","mobile":false,"name":"unknown browser","platform":"unknown_platform","version":"0"},"__constants":{},"__CPDATA":{"domain_iframe":"https://cdpn.io","environment":"production","host":"codepen.io","iframe_allow":"accelerometer *; ambient-light-sensor *; camera *; display-capture *; encrypted-media *; geolocation *; gyroscope *; microphone *; midi *; payment *; vr *; web-share *; serial *; xr-spatial-tracking *","iframe_sandbox":"allow-downloads allow-forms allow-modals allow-pointer-lock allow-popups-to-escape-sandbox allow-popups allow-presentation allow-same-origin allow-scripts allow-top-navigation-by-user-activation"},"__graphql":{"data":{"errors":[{"message":"Cannot return null for non-nullable field Query.sessionUser"}],"data":null},"url":"https://codepen.io/graphql","api":"cprails"},"__pay_stripe_public_key":"pk_live_2GndomDfiklqpSNQn8FrGuwZSMIMzha7DkLJqlYe7IR0ihKAlKdiHg68JJc5eVPt68rzAjzAAVXcUwjySHRCsgjQQ00gtRBUFNH","__pay_braintree_env":"production","__boomboom":{"serve_url":"https://cdpn.io/cpe/boomboom","store_url":"https://codepen.io/cpe/boomboom/store"},"__pageType":"embed","__item":"{\"editor_settings\":{\"auto_run\":true,\"autocomplete\":false,\"code_folding\":true,\"css_pre_processor\":\"none\",\"css_prefix\":\"neither\",\"css_starter\":\"neither\",\"emmet_active\":true,\"font_size\":14,\"font_type\":\"system\",\"format_on_save\":false,\"html_pre_processor\":\"none\",\"indent_with\":\"spaces\",\"js_pre_processor\":\"none\",\"key_bindings\":\"normal\",\"line_numbers\":true,\"line_wrapping\":true,\"match_brackets\":true,\"snippets\":{\"markupSnippets\":{},\"stylesheetSnippets\":{}},\"tab_size\":2,\"theme\":\"twilight\",\"id\":\"PomZqyM\",\"auto_save\":true},\"hashid\":\"PomZqyM\",\"itemType\":\"pen\",\"resources\":[{\"url\":\"https://fonts.googleapis.com/icon?family=Material+Icons\",\"order\":0,\"resource_type\":\"css\",\"par_content\":\"\"},{\"url\":\"https://code.jquery.com/jquery-3.1.1.min.js\",\"order\":0,\"resource_type\":\"js\",\"par_content\":\"\"},{\"url\":\"https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.8/js/materialize.min.js\",\"order\":1,\"resource_type\":\"js\",\"par_content\":\"\"},{\"url\":\"https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.0/css/materialize.min.css\",\"order\":1,\"resource_type\":\"css\",\"par_content\":\"\"}],\"tags\":[\"material-design\",\"product-card\",\"ecommerce\",\"web-design\"],\"id\":53550221,\"user_id\":6445505,\"html\":\"<div class=\\\"row\\\">\\n <div class=\\\"col 14 m3 s14 offset-m0 offset-14\\\">\\n <div class=\\\"product-card\\\">\\n <div class=\\\"card z-depth-4\\\">\\n <div class=\\\"card-image\\\">\\n <a href=\\\"#\\\" class=\\\"btn-floating btn-large price waves-effect waves-light brown darken-3\\\">5 €</a>\\n<!-- alternative image links:\\nhttp://i58.photobucket.com/albums/g249/Landry_Bete/dessert14_zpsg6u4skv6.jpg\\nhttps://www.dropbox.com/s/15xhr85exkhusgi/dessert14.jpg?raw=1 -->\\n <img src=\\\"https://res.cloudinary.com/landry-bete/image/upload/v1488769144/dessert14_trnhnj.jpg\\\" alt=\\\"product-img\\\">\\n <span class=\\\"card-title\\\"><span>Macaron</span></span>\\n </div>\\n <ul class=\\\"card-action-buttons\\\">\\n <li><a href=\\\"https://www.facebook.com/sharer/sharer.php?u=https://codepen.io/lybete/full/jBMNzM/\\\" target=\\\"_blank\\\" class=\\\"btn-floating waves-effect waves-light white\\\"><i class=\\\"material-icons grey-text text-darken-3\\\">share</i></a>\\n </li>\\n <li><a class=\\\"btn-floating waves-effect waves-light red accent-2\\\"><i class=\\\"material-icons like\\\">favorite_border</i></a>\\n </li>\\n <li><a id=\\\"buy\\\" class=\\\"btn-floating waves-effect waves-light blue\\\"><i class=\\\"material-icons buy\\\">add_shopping_cart</i></a>\\n </li>\\n </ul>\\n <div class=\\\"card-content\\\">\\n <div class=\\\"row\\\">\\n <div class=\\\"col s12\\\">\\n <p>\\n <strong>Description:</strong> <br />\\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur ornare auctor metus vel mollis.\\n </p>\\n </div>\\n \\n </div>\\n <div class=\\\"row\\\">\\n <div style=\\\"width: 95%; margin: auto;\\\">\\n <div class=\\\"chip\\\">Dessert</div>\\n <div class=\\\"chip\\\">French</div>\\n <div class=\\\"chip\\\">Sweet</div>\\n <div class=\\\"chip\\\">Chocolate</div>\\n <div class=\\\"chip\\\"><a href=\\\"#\\\">More...</a></div>\\n </div>\\n </div>\\n </div>\\n </div>\\n </div>\\n </div>\\n <div class=\\\"col 14 m3 s14 offset-m0 offset-14\\\">\\n <div class=\\\"product-card\\\">\\n <div class=\\\"card z-depth-4\\\">\\n <div class=\\\"card-image\\\">\\n <a href=\\\"#\\\" class=\\\"btn-floating btn-large price waves-effect waves-light brown darken-3\\\">5 €</a>\\n<!-- alternative image links:\\nhttp://i58.photobucket.com/albums/g249/Landry_Bete/dessert14_zpsg6u4skv6.jpg\\nhttps://www.dropbox.com/s/15xhr85exkhusgi/dessert14.jpg?raw=1 -->\\n <img src=\\\"https://res.cloudinary.com/landry-bete/image/upload/v1488769144/dessert14_trnhnj.jpg\\\" alt=\\\"product-img\\\">\\n <span class=\\\"card-title\\\"><span>Macaron</span></span>\\n </div>\\n <ul class=\\\"card-action-buttons\\\">\\n <li><a href=\\\"https://www.facebook.com/sharer/sharer.php?u=https://codepen.io/lybete/full/jBMNzM/\\\" target=\\\"_blank\\\" class=\\\"btn-floating waves-effect waves-light white\\\"><i class=\\\"material-icons grey-text text-darken-3\\\">share</i></a>\\n </li>\\n <li><a class=\\\"btn-floating waves-effect waves-light red accent-2\\\"><i class=\\\"material-icons like\\\">favorite_border</i></a>\\n </li>\\n <li><a id=\\\"buy\\\" class=\\\"btn-floating waves-effect waves-light blue\\\"><i class=\\\"material-icons buy\\\">add_shopping_cart</i></a>\\n </li>\\n </ul>\\n <div class=\\\"card-content\\\">\\n <div class=\\\"row\\\">\\n <div class=\\\"col s12\\\">\\n <p>\\n <strong>Description:</strong> <br />\\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur ornare auctor metus vel mollis.\\n </p>\\n </div>\\n \\n </div>\\n <div class=\\\"row\\\">\\n <div style=\\\"width: 95%; margin: auto;\\\">\\n <div class=\\\"chip\\\">Dessert</div>\\n <div class=\\\"chip\\\">French</div>\\n <div class=\\\"chip\\\">Sweet</div>\\n <div class=\\\"chip\\\">Chocolate</div>\\n <div class=\\\"chip\\\"><a href=\\\"#\\\">More...</a></div>\\n </div>\\n </div>\\n </div>\\n </div>\\n </div>\\n </div>\\n <div class=\\\"col 14 m3 s14 offset-m0 offset-14\\\">\\n <div class=\\\"product-card\\\">\\n <div class=\\\"card z-depth-4\\\">\\n <div class=\\\"card-image\\\">\\n <a href=\\\"#\\\" class=\\\"btn-floating btn-large price waves-effect waves-light brown darken-3\\\">5 €</a>\\n<!-- alternative image links:\\nhttp://i58.photobucket.com/albums/g249/Landry_Bete/dessert14_zpsg6u4skv6.jpg\\nhttps://www.dropbox.com/s/15xhr85exkhusgi/dessert14.jpg?raw=1 -->\\n <img src=\\\"https://res.cloudinary.com/landry-bete/image/upload/v1488769144/dessert14_trnhnj.jpg\\\" alt=\\\"product-img\\\">\\n <span class=\\\"card-title\\\"><span>Macaron</span></span>\\n </div>\\n <ul class=\\\"card-action-buttons\\\">\\n <li><a href=\\\"https://www.facebook.com/sharer/sharer.php?u=https://codepen.io/lybete/full/jBMNzM/\\\" target=\\\"_blank\\\" class=\\\"btn-floating waves-effect waves-light white\\\"><i class=\\\"material-icons grey-text text-darken-3\\\">share</i></a>\\n </li>\\n <li><a class=\\\"btn-floating waves-effect waves-light red accent-2\\\"><i class=\\\"material-icons like\\\">favorite_border</i></a>\\n </li>\\n <li><a id=\\\"buy\\\" class=\\\"btn-floating waves-effect waves-light blue\\\"><i class=\\\"material-icons buy\\\">add_shopping_cart</i></a>\\n </li>\\n </ul>\\n <div class=\\\"card-content\\\">\\n <div class=\\\"row\\\">\\n <div class=\\\"col s12\\\">\\n <p>\\n <strong>Description:</strong> <br />\\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur ornare auctor metus vel mollis.\\n </p>\\n </div>\\n \\n </div>\\n <div class=\\\"row\\\">\\n <div style=\\\"width: 95%; margin: auto;\\\">\\n <div class=\\\"chip\\\">Dessert</div>\\n <div class=\\\"chip\\\">French</div>\\n <div class=\\\"chip\\\">Sweet</div>\\n <div class=\\\"chip\\\">Chocolate</div>\\n <div class=\\\"chip\\\"><a href=\\\"#\\\">More...</a></div>\\n </div>\\n </div>\\n </div>\\n </div>\\n </div>\\n </div>\\n <div class=\\\"col 14 m3 s14 offset-m0 offset-14\\\">\\n <div class=\\\"product-card\\\">\\n <div class=\\\"card z-depth-4\\\">\\n <div class=\\\"card-image\\\">\\n <a href=\\\"#\\\" class=\\\"btn-floating btn-large price waves-effect waves-light brown darken-3\\\">5 €</a>\\n<!-- alternative image links:\\nhttp://i58.photobucket.com/albums/g249/Landry_Bete/dessert14_zpsg6u4skv6.jpg\\nhttps://www.dropbox.com/s/15xhr85exkhusgi/dessert14.jpg?raw=1 -->\\n <img src=\\\"https://res.cloudinary.com/landry-bete/image/upload/v1488769144/dessert14_trnhnj.jpg\\\" alt=\\\"product-img\\\">\\n <span class=\\\"card-title\\\"><span>Macaron</span></span>\\n </div>\\n <ul class=\\\"card-action-buttons\\\">\\n <li><a href=\\\"https://www.facebook.com/sharer/sharer.php?u=https://codepen.io/lybete/full/jBMNzM/\\\" target=\\\"_blank\\\" class=\\\"btn-floating waves-effect waves-light white\\\"><i class=\\\"material-icons grey-text text-darken-3\\\">share</i></a>\\n </li>\\n <li><a class=\\\"btn-floating waves-effect waves-light red accent-2\\\"><i class=\\\"material-icons like\\\">favorite_border</i></a>\\n </li>\\n <li><a id=\\\"buy\\\" class=\\\"btn-floating waves-effect waves-light blue\\\"><i class=\\\"material-icons buy\\\">add_shopping_cart</i></a>\\n </li>\\n </ul>\\n <div class=\\\"card-content\\\">\\n <div class=\\\"row\\\">\\n <div class=\\\"col s12\\\">\\n <p>\\n <strong>Description:</strong> <br />\\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur ornare auctor metus vel mollis.\\n </p>\\n </div>\\n \\n </div>\\n <div class=\\\"row\\\">\\n <div style=\\\"width: 95%; margin: auto;\\\">\\n <div class=\\\"chip\\\">Dessert</div>\\n <div class=\\\"chip\\\">French</div>\\n <div class=\\\"chip\\\">Sweet</div>\\n <div class=\\\"chip\\\">Chocolate</div>\\n <div class=\\\"chip\\\"><a href=\\\"#\\\">More...</a></div>\\n </div>\\n </div>\\n </div>\\n </div>\\n </div>\\n </div>\\n <div class=\\\"col 14 m3 s14 offset-m0 offset-14\\\">\\n <div class=\\\"product-card\\\">\\n <div class=\\\"card z-depth-4\\\">\\n <div class=\\\"card-image\\\">\\n <a href=\\\"#\\\" class=\\\"btn-floating btn-large price waves-effect waves-light brown darken-3\\\">5 €</a>\\n<!-- alternative image links:\\nhttp://i58.photobucket.com/albums/g249/Landry_Bete/dessert14_zpsg6u4skv6.jpg\\nhttps://www.dropbox.com/s/15xhr85exkhusgi/dessert14.jpg?raw=1 -->\\n <img src=\\\"https://res.cloudinary.com/landry-bete/image/upload/v1488769144/dessert14_trnhnj.jpg\\\" alt=\\\"product-img\\\">\\n <span class=\\\"card-title\\\"><span>Macaron</span></span>\\n </div>\\n <ul class=\\\"card-action-buttons\\\">\\n <li><a href=\\\"https://www.facebook.com/sharer/sharer.php?u=https://codepen.io/lybete/full/jBMNzM/\\\" target=\\\"_blank\\\" class=\\\"btn-floating waves-effect waves-light white\\\"><i class=\\\"material-icons grey-text text-darken-3\\\">share</i></a>\\n </li>\\n <li><a class=\\\"btn-floating waves-effect waves-light red accent-2\\\"><i class=\\\"material-icons like\\\">favorite_border</i></a>\\n </li>\\n <li><a id=\\\"buy\\\" class=\\\"btn-floating waves-effect waves-light blue\\\"><i class=\\\"material-icons buy\\\">add_shopping_cart</i></a>\\n </li>\\n </ul>\\n <div class=\\\"card-content\\\">\\n <div class=\\\"row\\\">\\n <div class=\\\"col s12\\\">\\n <p>\\n <strong>Description:</strong> <br />\\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur ornare auctor metus vel mollis.\\n </p>\\n </div>\\n \\n </div>\\n <div class=\\\"row\\\">\\n <div style=\\\"width: 95%; margin: auto;\\\">\\n <div class=\\\"chip\\\">Dessert</div>\\n <div class=\\\"chip\\\">French</div>\\n <div class=\\\"chip\\\">Sweet</div>\\n <div class=\\\"chip\\\">Chocolate</div>\\n <div class=\\\"chip\\\"><a href=\\\"#\\\">More...</a></div>\\n </div>\\n </div>\\n </div>\\n </div>\\n </div>\\n </div>\\n</div>\",\"css\":\".card-title {\\n font-weight: 300;\\n font-size: 2rem;\\n}\\n\\n.product-card .card {\\n margin: 20px;\\n overflow: hidden;\\n}\\n.product-card .card .card-content {\\n padding: 5px;\\n}\\n.product-card .card .price {\\n width: 70px;\\n height: 70px;\\n font-weight: 600;\\n font-size: 1.45rem;\\n line-height: 70px;\\n margin: 10px;\\n position: absolute;\\n top: 0;\\n letter-spacing: 0;\\n}\\n.product-card ul.card-action-buttons {\\n margin: -18px 7px 0 0;\\n text-align: right;\\n}\\n.product-card ul.card-action-buttons li {\\n display: inline-flex;\\n padding-left: 7px;\\n}\\n.product {\\n width: 50%;\\n padding: 10px;\\n}\\n.product .card {\\n margin: 0;\\n}\\n.product .card .card-content {\\n padding: 5px 10px;\\n}\\n\",\"js\":\"jQuery(document).ready(function($) {\\n \\n //Buy button effects\\n $('.buy').on('click', function() {\\n \\n //It is possible to put the 1st argument of setTimeout as callback of the Materialize.toast function but that approach seems significantly slower. I don't know why yet\\n setTimeout (function() {\\n $(\\\"#buy\\\").removeClass(\\\"green\\\");\\n $('.buy').fadeOut(100, function() {\\n $(this).text('add_shopping_cart').fadeIn(150);\\n });\\n }, 5000);\\n \\n \\n $(\\\"#buy\\\").addClass(\\\"green\\\");\\n $('.buy').fadeOut(100, function() {\\n $(this).text('check').fadeIn(150);\\n });\\n \\n var $toastContent = $('<div class=\\\"flow-text\\\">ORDERED!   <a href=\\\"#\\\" class=\\\" amber-text\\\">MY CART</a></div>');\\n Materialize.toast($toastContent, 5000, \\\"rounded\\\");\\n \\n });\\n \\n //Like button effects\\n \\n $('.like').on('click', function() {\\n \\n setTimeout (function() {\\n \\n $('.like').fadeOut(100, function() {\\n $(this).text('favorite_border').fadeIn(150);\\n });\\n }, 5000);\\n \\n $('.like').fadeOut(100, function() {\\n $(this).text('favorite').fadeIn(150);\\n });\\n \\n var $toastContent2 = $('<div class=\\\"flow-text\\\">LIKED!</div>');\\n Materialize.toast($toastContent2, 5000, \\\"pink rounded\\\");\\n \\n });\\n});\\n\\n\\n \",\"html_pre_processor\":\"none\",\"css_pre_processor\":\"none\",\"js_pre_processor\":\"none\",\"html_classes\":\"grey lighten-5\",\"css_starter\":\"neither\",\"js_library\":null,\"created_at\":\"2021-07-05T08:30:10.000Z\",\"updated_at\":\"2021-07-05T09:03:27.000Z\",\"title\":\"Untitled\",\"description\":\"\",\"slug_hash\":\"PomZqyM\",\"head\":\"\",\"private\":false,\"has_animation\":false,\"team_id\":0,\"css_prefix\":\"neither\",\"template\":false,\"parent_id\":0,\"comments_count\":0,\"custom_screenshot_filename\":null,\"loves_count\":0,\"pick\":false,\"popularity_score\":0,\"views_count\":0,\"pick_visible_at\":null,\"cpid\":\"017a75c9-fe50-75a5-afdd-8bfad627b9ad\",\"is_new_editor_pen\":false,\"protected\":false,\"access\":\"Public\",\"pen_hash\":null}","__processorsMap":{"autoprefixer":"autoprefixer-10","babel":"babel-7","coffeescript":"coffeescript-2","format-1":"format-1","flutter":"flutter-1","haml":"haml-4","less":"less-3","lint-1":"lint-1","livescript":"livescript-1","markdown":"markdown-11","postcss":"postcss-7","pug":"pug-2","sass":"sass-1","scss":"sass-1","sass-ruby-3":"sass-ruby-3","sass-ruby-compass-3":"sass-ruby-compass-3","slim":"slim-3","stylus":"stylus-0","typescript":"typescript-4","vue":"vue-2","vue3":"vue-3"},"__favicon_mask_icon":"https://cpwebassets.codepen.io/assets/favicon/logo-pin-b4b4269c16397ad2f0f7a01bcdf513a1994f4c94b8af2f191c09eb0d601762b1.svg","__favicon_shortcut_icon":"https://cpwebassets.codepen.io/assets/favicon/favicon-aec34940fbc1a6e787974dcd360f2c6b63348d4b1f4e06c77743096d55480f33.ico","__path_to_iframe_console_runner":"https://cpwebassets.codepen.io/assets/editor/iframe/iframeConsoleRunner-6d8bf8b4b479137260842506acbb12717dace0823c023e08b96360e60b0840d9.js","__path_to_iframe_refresh_css":"https://cpwebassets.codepen.io/assets/editor/iframe/iframeRefreshCSS-44fe83e49b63affec96918c9af88c0d80b209a862cf87ac46bc933074b8c557d.js","__path_to_iframe_runtime_errors":"https://cpwebassets.codepen.io/assets/editor/iframe/iframeRuntimeErrors-4f205f2c14e769b448bcf477de2938c681660d5038bc464e3700256713ebe261.js","__path_to_processor_worker":"https://cpwebassets.codepen.io/assets/packs/router.js","__path_to_stop_execution_on_timeout":"https://cpwebassets.codepen.io/assets/common/stopExecutionOnTimeout-2c7831bb44f98c1391d6a4ffda0e1fd302503391ca806e7fcc7b9b87197aec26.js","__pen_normalize_css_url":"https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css","__pen_prefix_free_url":"https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js","__pen_reset_css_url":"https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css","__path_to_infinite_loop_detection":"https://cpwebassets.codepen.io/assets/packs/js/infiniteLoopDetection-07db07496998e6dde62c.js"}