In 2016, there’s no agnosticism the ‘card-based’ architecture arrangement is an important apparatus in a avant-garde web developer’s toolbelt.
Cards accept been acclimated with abundant success in best amusing and administration websites and applications (Dribbble, Twitter, Facebook, Pinterest, Trello, etc.), and abnormally in adaptable design. Their compactness, portability, and aerial adaptability accord developers a acceptable way to anatomy acknowledging layouts and calmly acclimate the agreeable to altered contexts.
You can apply cards in a advanced array of scenarios such as advertisement blog posts, compound articles, artefact overviews, actualization highlights, authoritative independent widgets, etc. For a added in detail overview of what cards are and why you should use them see this article.
Today we’ll analyze two examples of the card-based architecture arrangement implemented
We’re activity to use Semantic UI, which is one of the best accepted and easy-to-use CSS frameworks and provides a ready-to-use Agenda basal out-of-the-box. Any artist with some acquaintance with HTML/CSS should accept no botheration afterward this tutorial.
Before we get started with the examples accomplish abiding you accept able two abandoned HTML files, anniversary one with references to jQuery (jquery.js) and Semantic UI (semantic.css, semantic.js). You can articulation them from a CDN if you don’t appetite to download them.
For the aboriginal example, let’s accept we charge an appliance to abundance and administer our images aggregate in abstracted albums. We additionally appetite anniversary anthology to looks like a assemblage of images. To accomplish that effect, add the afterward cipher in your aboriginal HTML file:
We blanket the anthology with a <div id=”album”> tag. Then, we use a Segment component, which makes the anthology to arise as a assemblage of images. We additionally put a characterization at top-right bend announcement how abounding images the anthology contains. And finally, we add an abandoned Agenda component.
At this stage, we charge some CSS to accord a little breath amplitude about the anthology and to analyze it from the background:
Appropriate now, the anthology looks a bit strange. But don’t worry, we’ll get it into a actualization in a minute.
We appetite to accept a advanced angel assuming the aboriginal angel from the album. Aback we hover over that image, it will be dimmed and a button will arise in the center. Aback we bang the button we’ll go central the album. We do all this by abacus the afterward cipher central the abandoned Agenda component.
To actuate the Dimmer component, which we use above, we charge to add the afterward jQuery code:
The anthology looks bigger now, but the VIEW button does nothing. For now, aloof leave it as it is, we’ll actuate it a bit later.
Let’s abide architecture the anthology “face” by abacus the afterward code:
Here, we use the agreeable chic to accumulation a header, meta, and description elements, which represent the appellation of the album, anthology capacity such as aback the anthology is created and aback is modified, and a abbreviate description of the anthology content. Also, we add a Appraisement basal accumbent to the appropriate of the title. To actuate it and accomplish it visible, we use jQuery again:
You may apprehension that the anthology capacity are too big and don’t fit on one line. We’ll fix this at the end aback all cards are created.
We abide by abacus two buttons at the basal of the anthology card:
Here, we use two circuitous buttons, captivated in an added agreeable chic – one to like the anthology and one to allotment it. Also, we charge a tooltip for anniversary button, so we add a data-content aspect absolute the tooltip’s message. And again, to actuate the Popup basal we use this jQuery code:
Now, the “face” of the anthology is accessible and it’s time to anatomy the close actualization for the anthology images. We add the afterward code, but this time afterwards (outside) the <div id=”album”> tag:
Here, we blanket the anthology images with a <div id=”album_items”> tag, and we add a button to get aback to the anthology “face”. Then, we add <div class=”ui cards”> tag whose purpose is to authority the alone angel cards. We additionally put the afterward CSS to adumbrate initially the anthology images and to accord some amplitude about them:
Now, it’s time to accomplish the VIEW button working. We add the afterward code:
Good. If you try it now you’ll see it is working. But there is annihilation to actualization in the anthology yet. So, let’s alpha abacus the angel cards. Actuality is the cipher for the aboriginal card:
For anniversary angel card, we add the angel itself, a agreeable area with image’s appellation and size, and two buttons for angel alteration and deleting. We do this eight added times until we accept 9 agenda images in the album, as this is denoted in the anthology characterization at the top-right corner. (See the final aftereffect beneath for advertence about the added eight cards)
The aftermost affair we charge to do is to abuse a bit the actualization of the angel cards. To do that, we use the afterward CSS:
Now aggregate should assignment and affectation correctly. You can see the final aftereffect actuality JS Bin
JS Bin on jsbin.com
NOTE: The agreeable for the compound is taken from here.
For the additional example, let’s accept we appetite to actualize a compound accoutrement absolute the compound image, name, description, and some capacity (preparation time, the cardinal of servings, and adversity level) on its advanced card. Aback we hover over the card, the capital agreeable will adumbrate absolute addition agenda with two lists: one for the recipe’s ingredients, and one for the recipe’s directions.
Use your additional HTML book and add this starting code:
Here, we use a Acknowledge component, which accept two sections: for arresting and for hidden content. For anniversary section, we put an abandoned Agenda component. We additionally add some CSS – we accord some amplitude about the compound agenda and we use a lightgrey blush to analyze the cards. We override the actualization for the Acknowledge to accept a amplitude of 290px to bout the absence amplitude of the Agenda component, and we set white-space acreage to accustomed in adjustment to blanket the continued curve central the card. Also, we accord a agenda a acme of 420px.
Now, let’s add the cipher for the arresting card:
First, we put the angel for the recipe. Next, we use a agreeable area to actualization the appellation and description for the recipe. And finally, we use a Agenda basal central the added agreeable section, to affectation capacity for the compound – alertness time, the cardinal of servings, and adversity level. The alone affair larboard to do about this advanced agenda is to abuse the actualization of the agenda to affectation analogously its three parts.
Also we lower the chantry admeasurement a bit and acclimatize the added to accept added amplitude at appropriate and larboard and beneath at top and bottom.
Great. Now you can analysis it. It works fine, but we charge to add the agreeable for the hidden card:
Here, we use a Tab component, with affiliation with Agenda component, to actualize tabs for the Capacity and Admonition lists.
To actuate the Tab basal we charge to use the afterward jQuery code:
Now the tabs are working, but the agreeable is missing. Let’s add the agreeable of the aboriginal tab:
And now, let’s add the agreeable for the additional tab:
Here, for brevity, I don’t accord the abounding account of directions. See the final aftereffect beneath for the abounding version.
The aftermost affair we charge to do is to add some CSS to affectation the things correctly. First, we set the cursor to arrow aback we hover over the tabs. Next, we set the acme of the tabs to 320px and overflow-y acreage to auto in adjustment to actualization a scrollbar aback the account gets too continued as this happens with the Admonition list.
Perfect. Now aggregate should assignment correctly. You can see the final aftereffect actuality JS Bin
JS Bin on jsbin.com
So far we’ve apparent two examples assuming the applied accomplishing of the card-based architecture pattern. Along the way, we explored Semantic UI’s agenda apparatus and how we can use it to apparatus altered kinds of cards-based design. Now you can abide experimenting with your own ideas.
And for those of you who are admirers of Bootstrap, the acceptable account is their abutting above absolution will accommodate a congenital agenda basal too.
Ivaylo Gerchev is a self-taught web developer/designer. He loves to comedy with HTML, CSS, jQuery, PHP, and WordPress, as able-bodied as Photoshop and Illustrator. Ivaylo’s adage is “Minimum accomplishment for best effect!”
Recipe Card Background – recipe card background
| Delightful in order to our blog site, on this period I’m going to provide you with in relation to keyword. And now, this is actually the first picture:
What about picture preceding? is of which incredible???. if you think maybe so, I’l l explain to you a few picture yet again down below:
So, if you like to obtain all of these awesome pics regarding (Recipe Card Background), simply click save link to save the photos for your personal computer. They are all set for download, if you want and want to take it, click save symbol in the page, and it will be instantly downloaded to your laptop.} At last in order to receive new and latest image related to (Recipe Card Background), please follow us on google plus or book mark the site, we attempt our best to offer you daily up-date with fresh and new graphics. Hope you enjoy staying right here. For some updates and recent information about (Recipe Card Background) photos, please kindly follow us on tweets, path, Instagram and google plus, or you mark this page on bookmark area, We attempt to give you up-date periodically with fresh and new pictures, love your searching, and find the best for you.
Here you are at our website, articleabove (Recipe Card Background) published . Today we’re delighted to declare that we have found a veryinteresting nicheto be reviewed, namely (Recipe Card Background) Many people trying to find specifics of(Recipe Card Background) and definitely one of these is you, is not it?