A Pen by Fedor Makareev on CodePen.
Created
February 24, 2018 16:47
-
-
Save FMakareev/cab3550da07f49f81e6f6ffa59a98a0c to your computer and use it in GitHub Desktop.
Andrey-resume
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="wrapper"> | |
| <div id="container"> | |
| <header class="header" > | |
| <div class="header_logo"> | |
| <img src="https://lh3.google.com/u/0/d/1TB7iumIGpDJPrcAh_FPUOoTFBb5Kn7nT=w1920-h925-iv1" alt="" class="header_logo-img"> | |
| </div> | |
| </header> | |
| <main> | |
| <div class="user-info_wrapper"> | |
| <div class="user-info_photo"> | |
| <img id="avatar" src="" alt="" class="user-info_photo-img"> | |
| </div> | |
| <div class="user-info_content" id="user-info_content"> | |
| <h2 class="user-info_name" id="username"> | |
| Helmut Grunther | |
| </h2> | |
| <ul class="user-info_list" id="skils_list"> | |
| <li class="user-info_item"> | |
| <div class="user-info_item-title">Health</div> | |
| <div class="user-info_item-content">82</div> | |
| </li> | |
| <li class="user-info_item"> | |
| <div class="user-info_item-title">Health</div> | |
| <div class="user-info_item-content">82</div> | |
| </li> | |
| </ul> | |
| </div> | |
| </div> | |
| <p class="introtext" id="introtext"> | |
| "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. | |
| </p> | |
| <h3 class="section_title">Additional Info</h3> | |
| <p class="introtext" id="sv"> | |
| </p> | |
| </main> | |
| </div> | |
| </div> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var user_profile = { | |
| username: 'Andrey Odintsov', | |
| avatar: 'https://lh3.google.com/u/0/d/1BGvMcx1UxwtERr7luM-EL2tNb-xZb8Mp=w2000-h5542-iv1', | |
| skils_list: [ | |
| { | |
| title: 'Width', | |
| value: '100' | |
| }, | |
| { | |
| title: 'Height', | |
| value: '180' | |
| },{ | |
| title: 'Background', | |
| value: '150' | |
| },{ | |
| title: 'Color', | |
| value: '#ffffff' | |
| }, | |
| ], | |
| introtext: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.', | |
| sv: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.', | |
| } | |
| const createSkillsRow = (item) => { | |
| var row = document.createElement('li'); | |
| row.className = 'user-info_item'; | |
| row.innerHTML = `<div class="user-info_item-title">${item.title}</div> | |
| <div class="user-info_item-content">${item.value}</div>`; | |
| return row; | |
| } | |
| const init = (user_profile) => { | |
| let avatar = document.getElementById('avatar'); | |
| let username = document.getElementById('username'); | |
| let introtext = document.getElementById('introtext'); | |
| let sv = document.getElementById('sv'); | |
| let ul = document.createElement('ul'); | |
| ul.className = 'user-info_list'; | |
| username.innerText = user_profile.username; | |
| avatar.setAttribute('src',user_profile.avatar); | |
| for(let i = 0; i < user_profile.skils_list.length; i++) { | |
| ul.appendChild(createSkillsRow(user_profile.skils_list[i])); | |
| } | |
| document.getElementById('user-info_content').appendChild(ul); | |
| introtext.innerText = user_profile.introtext; | |
| sv.innerText = user_profile.sv; | |
| } | |
| init(user_profile); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @mixin border { | |
| border-top: 2px solid rgba(255, 255, 255, 0.5); | |
| border-left: 2px solid rgba(255, 255, 255, 0.5); | |
| border-bottom: 2px solid rgba(0, 0, 0, 0.5); | |
| border-right: 2px solid rgba(0, 0, 0, 0.5); | |
| } | |
| *{ | |
| box-sizing: border-box; | |
| } | |
| body,html { | |
| padding: 0; | |
| margin: 0; | |
| background-color: #e6e6e6; | |
| background-color: #5d3c2a; | |
| background-image: url(https://lh3.google.com/u/0/d/1vZ-VA6vZwn7kBolRUk6Eddiz5OwC5A3D=w1920-h974-iv1); | |
| } | |
| .wrapper { | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| width: 100%; | |
| min-height: 100vh; | |
| } | |
| #container { | |
| padding: 10px; | |
| max-width: 768px; | |
| width: 100%; | |
| min-height: 400px; | |
| } | |
| .header { | |
| &_logo{ | |
| } | |
| &_logo-img { | |
| width: auto; | |
| display: block; | |
| margin: 0 auto 20px; | |
| } | |
| } | |
| .user-info { | |
| &_wrapper{ | |
| margin-bottom: 10px; | |
| @media(min-width: 700px) { | |
| display: flex; | |
| justify-content: space-between; | |
| } | |
| } | |
| &_photo{ | |
| max-width: 250px; | |
| min-height: 250px; | |
| margin: 0 auto 15px; | |
| overflow: hidden; | |
| @include border; | |
| @media(min-width: 700px) { | |
| margin-bottom: 0; | |
| } | |
| } | |
| &_photo-img{ | |
| display: block; | |
| width: 100%; | |
| } | |
| &_content{ | |
| padding: 10px; | |
| @include border; | |
| @media(min-width: 700px) { | |
| width: calc(100% - 260px); | |
| } | |
| } | |
| &_name{ | |
| margin-top: 0; | |
| color: #fff; | |
| } | |
| &_list{ | |
| padding: 0; | |
| margin: 0; | |
| @media(min-width: 500px) { | |
| column-count: 2; | |
| } | |
| } | |
| &_item { | |
| display: flex; | |
| justify-content: space-between; | |
| list-style: none; | |
| margin-bottom: 10px; | |
| } | |
| &_item-title{ | |
| color: #c2a658; | |
| position: relative; | |
| overflow: hidden; | |
| width: 100%; | |
| &:after { | |
| content: '.....................................................'; | |
| display: inline-block; | |
| position: absolute; | |
| margin-left: .3em; | |
| bottom: 0; | |
| width: 100%; | |
| font-size: 35px; | |
| letter-spacing: 13px; | |
| line-height: .9; | |
| } | |
| } | |
| &_item-content{ | |
| color: #ffffff; | |
| } | |
| } | |
| .introtext { | |
| color: #fff; | |
| } | |
| .section_title { | |
| color: #c2a658; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment