HTML
SCSS
JS
Result
Skip Results Iframe
EDIT ON
Live
Live
Live
This Pen is owned by
Shrawan Shrestha
on
CodePen
.
See more by @shra-one on CodePen
External CSS
https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap.min.css
External JavaScript
https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js
https://cdnjs.cloudflare.com/ajax/libs/Clamp.js/0.5.1/clamp.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\":\"daxBBR\",\"auto_save\":true},\"hashid\":\"daxBBR\",\"itemType\":\"pen\",\"resources\":[{\"url\":\"https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap.min.css\",\"order\":0,\"resource_type\":\"css\",\"par_content\":\"\"},{\"url\":\"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js\",\"order\":0,\"resource_type\":\"js\",\"par_content\":\"\"},{\"url\":\"https://cdnjs.cloudflare.com/ajax/libs/Clamp.js/0.5.1/clamp.min.js\",\"order\":1,\"resource_type\":\"js\",\"par_content\":\"\"}],\"tags\":[],\"id\":33204646,\"user_id\":1861956,\"html\":\"<div class=\\\"center-div\\\">\\n <div class=\\\"container\\\">\\n <div class=\\\"grid grid--user-profile\\\">\\n <div class=\\\"grid__column\\\">\\n <div class=\\\"card card--user-profile \\\">\\n <div class=\\\"card--user-profile__cover\\\"></div>\\n <div class=\\\"card-body\\\">\\n <figure class=\\\"avatar avatar--online\\\">\\n <div class=\\\"avatar__thumbnail\\\">\\n <img src=\\\"https://randomuser.me/api/portraits/women/81.jpg\\\" class=\\\"avatar__image\\\" alt=\\\"Picture of avatar\\\">\\n\\n </div>\\n <figcaption class=\\\"avatar__meta\\\">\\n <h5 class=\\\"avatar__title js-user-name\\\">Kelly Shaw</h5>\\n <div class=\\\"avatar__summery js-multiline-truncate\\\">Team Lead/ Sr. Laravel Developer at XZY Company </div>\\n\\n </figcaption>\\n </figure>\\n\\n <figure class=\\\"mutual-connection mb-4\\\">\\n <img src=\\\"https://randomuser.me/api/portraits/women/96.jpg\\\" class=\\\"mutual-connection__image\\\" alt=\\\"Picture of user\\\">\\n <img src=\\\"https://randomuser.me/api/portraits/men/81.jpg\\\" class=\\\"mutual-connection__image\\\" alt=\\\"Picture of user\\\">\\n <img src=\\\"https://randomuser.me/api/portraits/men/51.jpg\\\" class=\\\"mutual-connection__image\\\" alt=\\\"Picture of user\\\">\\n <figcaption class=\\\"mutual-connection__caption\\\">10 mutual connections</figcaption>\\n </figure>\\n\\n <a href=\\\"#\\\" role=\\\"button\\\" class=\\\"btn btn-outline-dark\\\">Invite Now</a>\\n </div>\\n\\n </div>\\n </div>\\n <div class=\\\"grid__column\\\">\\n <div class=\\\"card card--user-profile \\\">\\n <div class=\\\"card--user-profile__cover\\\"></div>\\n <div class=\\\"card-body\\\">\\n <figure class=\\\"avatar avatar--online\\\">\\n <div class=\\\"avatar__thumbnail\\\">\\n \\n\\n </div>\\n <figcaption class=\\\"avatar__meta\\\">\\n <h5 class=\\\"avatar__title js-user-name\\\">Kelly Shaw</h5>\\n <div class=\\\"avatar__summery js-multiline-truncate\\\">Team Lead/ Sr. Laravel Developer at XZY Company </div>\\n\\n </figcaption>\\n </figure>\\n\\n <figure class=\\\"mutual-connection mb-4\\\">\\n <img src=\\\"https://randomuser.me/api/portraits/women/96.jpg\\\" class=\\\"mutual-connection__image\\\" alt=\\\"Picture of user\\\">\\n <img src=\\\"https://randomuser.me/api/portraits/men/81.jpg\\\" class=\\\"mutual-connection__image\\\" alt=\\\"Picture of user\\\">\\n <img src=\\\"https://randomuser.me/api/portraits/men/51.jpg\\\" class=\\\"mutual-connection__image\\\" alt=\\\"Picture of user\\\">\\n <figcaption class=\\\"mutual-connection__caption\\\">10 mutual connections</figcaption>\\n </figure>\\n\\n <a href=\\\"#\\\" role=\\\"button\\\" class=\\\"btn btn-outline-dark\\\">Invite Now</a>\\n </div>\\n\\n </div>\\n </div>\\n <div class=\\\"grid__column\\\">\\n <div class=\\\"card card--user-profile \\\">\\n <div class=\\\"card--user-profile__cover\\\"></div>\\n <div class=\\\"card-body\\\">\\n <figure class=\\\"avatar avatar--online\\\">\\n <div class=\\\"avatar__thumbnail\\\">\\n <img src=\\\"https://randomuser.me/api/portraits/women/81.jpg\\\" class=\\\"avatar__image\\\" alt=\\\"Picture of avatar\\\">\\n\\n </div>\\n <figcaption class=\\\"avatar__meta\\\">\\n <h5 class=\\\"avatar__title js-user-name\\\">Kelly Shaw</h5>\\n <div class=\\\"avatar__summery js-multiline-truncate\\\">Team Lead/ Sr. Laravel Developer at XZY Company </div>\\n\\n </figcaption>\\n </figure>\\n\\n <figure class=\\\"mutual-connection mb-4\\\">\\n <img src=\\\"https://randomuser.me/api/portraits/women/96.jpg\\\" class=\\\"mutual-connection__image\\\" alt=\\\"Picture of user\\\">\\n <img src=\\\"https://randomuser.me/api/portraits/men/81.jpg\\\" class=\\\"mutual-connection__image\\\" alt=\\\"Picture of user\\\">\\n <img src=\\\"https://randomuser.me/api/portraits/men/51.jpg\\\" class=\\\"mutual-connection__image\\\" alt=\\\"Picture of user\\\">\\n <figcaption class=\\\"mutual-connection__caption\\\">10 mutual connections</figcaption>\\n </figure>\\n\\n <a href=\\\"#\\\" role=\\\"button\\\" class=\\\"btn btn-outline-dark\\\">Invite Now</a>\\n </div>\\n\\n </div>\\n </div>\\n <div class=\\\"grid__column\\\">\\n <div class=\\\"card card--user-profile \\\">\\n <div class=\\\"card--user-profile__cover\\\"></div>\\n <div class=\\\"card-body\\\">\\n <figure class=\\\"avatar avatar--online\\\">\\n <div class=\\\"avatar__thumbnail\\\">\\n <img src=\\\"https://s.cdpn.io/profiles/user/1861956/80.jpg\\\" class=\\\"avatar__image\\\" alt=\\\"Picture of avatar\\\">\\n\\n </div>\\n <figcaption class=\\\"avatar__meta\\\">\\n <h5 class=\\\"avatar__title js-user-name\\\">Shrawan Kumar</h5>\\n <div class=\\\"avatar__summery js-multiline-truncate\\\">Team Lead/ Sr. Laravel Developer at XZY Company </div>\\n\\n </figcaption>\\n </figure>\\n\\n <figure class=\\\"mutual-connection mb-4\\\">\\n <img src=\\\"https://randomuser.me/api/portraits/women/96.jpg\\\" class=\\\"mutual-connection__image\\\" alt=\\\"Picture of user\\\">\\n <img src=\\\"https://randomuser.me/api/portraits/men/81.jpg\\\" class=\\\"mutual-connection__image\\\" alt=\\\"Picture of user\\\">\\n <img src=\\\"https://randomuser.me/api/portraits/men/51.jpg\\\" class=\\\"mutual-connection__image\\\" alt=\\\"Picture of user\\\">\\n <figcaption class=\\\"mutual-connection__caption\\\">10 mutual connections</figcaption>\\n </figure>\\n\\n <a href=\\\"#\\\" role=\\\"button\\\" class=\\\"btn btn-outline-dark\\\">Invite Now</a>\\n </div>\\n\\n </div>\\n </div>\\n \\n </div>\\n\\n</div>\\n</div>\",\"css\":\"//mixin partial\\n//size mixin\\n@mixin size($width, $height:$width) {\\n width: $width;\\n height: $height;\\n}\\n//truncate mixing\\n@mixin truncate($max-width:null) {\\n @if $max-width {\\n max-width: $max-width;\\n }\\n white-space: nowrap;\\n overflow: hidden;\\n text-overflow: ellipsis;\\n display: block;\\n}\\n\\n//Placeholder Partial\\n%round-circle {\\n border-radius: 50%;\\n overflow: hidden;\\n}\\n\\n//Global Setting\\n@import url(\\\"https://fonts.googleapis.com/css?family=Poppins:300,400,500,600\\\");\\n$green: #2ecc71;\\n$textcolor: #00120b;\\n$lightgray: #5c6863;\\n$font-family: \\\"Poppins\\\", sans-serif;\\n $colors: #F44336, #E91E63, #9C27B0, #009688, #3F51B5, #2196F3, #4CAF50, #FF5722, #9E9E9E, #607D8B ;\\n\\nbody {\\n font-family: $font-family;\\n padding:2rem 0;\\n}\\n.center-div {\\n display:flex;\\n height:100vh;\\n align-items:center;\\n justify-content:center;\\n}\\n\\n//avatar Compoment\\n.avatar {\\n $p: &;\\n --size: 6rem; //css variables/ custom property\\n $thumbnail: var(--size, 6rem); // fallback values assigned to custom property\\n &__thumbnail {\\n position: relative;\\n display: inline-flex;\\n @include size($thumbnail);\\n background-color: #eee;\\n border-radius:50%;\\n @at-root #{$p}--online & {\\n &:after {\\n @include size(1rem);\\n content: \\\" \\\";\\n position: absolute;\\n right: 0px;\\n bottom: 6px;\\n background-color: $green;\\n border:2px solid white;\\n @extend %round-circle;\\n z-index:1;\\n }\\n &:before {\\n content:attr(data-name);\\n position:absolute;\\n top:50%;\\n left:50%;\\n transform:translateX(-50%) translateY(-50%);\\n color:white;\\n font-size:1.5rem;\\n z-index:0;\\n letter-spacing:1.5px;\\n }\\n }\\n }\\n &__image {\\n @include size($thumbnail);\\n @extend %round-circle;\\n z-index:1;\\n }\\n\\n //avatar meta\\n &__title {\\n font-weight: 600;\\n @include truncate();\\n }\\n &__summery {\\n color: $lightgray;\\n }\\n}\\n\\n//Mutual Connection Component\\n.mutual-connection {\\n $p: &;\\n --size: 3rem; //css variables/ custom property\\n $thumbnail: var(--size, 6rem);\\n $overlapping-space: 1.5rem;\\n margin-left: $overlapping-space;\\n $color: #05668d;\\n display: flex;\\n align-items: center;\\n color: $color;\\n &__image {\\n @include size($thumbnail);\\n @extend %round-circle;\\n border: 2px solid white;\\n margin-left: -$overlapping-space;\\n flex: 0 0 auto;\\n box-sizing:border-box;\\n }\\n &__caption {\\n padding-left: $overlapping-space/2;\\n }\\n}\\n\\n//bootstrap card modifier : user-profile\\n.card {\\n &--user-profile {\\n $p: &;\\n // padding:1.5em;\\n box-shadow: 0px 1px 10px 0px rgba(black, 0.1);\\n position:relative;\\n $cover-height:6rem - 1.25rem;\\n border-radius:10px;\\n overflow:hidden;\\n transition:all 0.3s;\\n transform:translateY(0px);\\n &:hover {\\n transform:translateY(-15px);\\n box-shadow: 0px 6px 15px 0px rgba(black, 0.3);\\n }\\n\\n &__cover {\\n height: $cover-height;\\n opacity:0.5; \\n width:100%;\\n position:absolute;\\n top:0;\\n @for $i from 1 through length($colors) {\\n @at-root .grid__column:nth-of-type(#{length($colors)}n+#{$i}) & {\\n background-color: nth($colors, $i);\\n }\\n }\\n }\\n \\n .avatar {\\n position:relative;\\n // margin-top:-6rem + 1.25rem;\\n &__thumbnail {\\n @for $i from 1 through length($colors) {\\n @at-root .grid__column:nth-of-type(#{length($colors)}n+#{$i}) & {\\n background-color: nth($colors, $i);\\n }\\n }\\n }\\n }\\n }\\n&.text-center {\\n .mutual-connection {\\n justify-content:center;\\n }\\n}\\n}\\n\\n\\n.grid{\\n $p:&;\\n &--user-profile {\\n display:flex;\\n flex-wrap:wrap;\\n margin:-15px;\\n justify-content:center;\\n \\n #{$p}__column {\\n flex: 1 1 100%;\\n padding:15px;\\n @media(min-width:576px){\\n flex:1 1 50% ;\\n }\\n @media(min-width:767px){\\n flex:0 1 33.33% ;\\n }\\n @media(min-width:992px){\\n flex:0 1 25% ;\\n }\\n }\\n }\\n \\n \\n \\n}\",\"js\":\" let truncateText = document.querySelectorAll(\\\".js-multiline-truncate\\\"); \\n\\n \\n\\n\\n\\nfor (i = 0; i < truncateText.length; i++) { \\n // console.log(truncateText[i][0]); \\n let truncateTextEach =truncateText[i];\\n $clamp(truncateTextEach, {clamp: 2}); \\n \\n}\\n\\nlet names= document.querySelectorAll('.js-user-name');\\nnames.forEach((name, i) => {\\n let shortName = name.innerText.split(' ').map(w => w[0]).join(\\\"\\\");\\n document.getElementsByClassName(\\\"avatar__thumbnail\\\")[i].dataset.name = shortName;\\n})\\n \\n\\n\\n \",\"html_pre_processor\":\"none\",\"css_pre_processor\":\"scss\",\"js_pre_processor\":\"none\",\"html_classes\":\"\",\"css_starter\":\"neither\",\"js_library\":null,\"created_at\":\"2019-02-24T12:07:15.000Z\",\"updated_at\":\"2019-02-28T09:54:40.000Z\",\"title\":\"WIP\",\"description\":\"\",\"slug_hash\":\"daxBBR\",\"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\":\"01691f66-f538-70f2-bbd9-8e252501123a\",\"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-a869f8a6d2782490df0d.js"}