Skip to content

Instantly share code, notes, and snippets.

@CodeMyUI CodeMyUI/index.html
Created Mar 9, 2017

Embed
What would you like to do?
Loader to information card
<div id="loadingCard">
<div class="cover">
<svg class="stagger" version="1.1" id="brain" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 500 500" enable-background="new 0 0 500 500" xml:space="preserve">
<g>
<path fill="#FFFFFF" d="M128.2,153.4c0-5.2-0.3-9.8,0.1-14.3c1.4-16.6,20.1-28,35.3-21.4c3.3,1.4,4.6,0.6,6.5-1.8
c5.8-7.3,12.8-13.3,21.8-16.2c4-1.3,8.4-1.1,12.7-1.6c2.5-0.3,5.4-0.2,7.4-1.4c8.4-4.8,17.7-5.5,26.9-6.5c2-0.2,4.5,0.1,6.3,1.2
c4.3,2.7,8,1.9,12.4-0.1c12.2-5.4,24.9-4.3,37-0.1c8.2,2.9,13.6,10,17,18.1c1.5,3.5,3.3,3.8,6.9,3.5c8.1-0.7,16.2-0.8,24.3-0.2
c11.5,0.9,25.1,14,25.2,31.3c1.5,0.3,3.1,0.6,4.6,1c5.9,1.4,9.7,5,10.7,11.1c0.2,1,0.5,2,0.5,2.9c0.2,6.4,2.9,10.7,7.9,15.4
c11.5,10.8,13.6,25.2,11,40.5c-1.1,6.5-1.9,13.1-1.7,19.7c0.4,13.5-2.5,26.3-8.6,38c-2.9,5.6-7.9,10.1-12.3,14.8
c-3.7,3.8-6.9,7.3-9.1,12.6c-2.9,7.1-2.7,13.5-1.7,20.7c1.9,14.6,4.2,29.3,0.7,44.2c-2.6,11-8.3,16.6-19.7,16.2
c-19.2-0.8-36.9-7.2-53-17.3c-5.9-3.7-11-4.7-17.4-2c-9.7,4.1-19.8,2.7-29.4-0.3c-4.4-1.3-8.1-4.9-12.7-7.8c-6.8,3.4-14.9,5-23,1.4
c-3.9-1.8-7.5-4.6-10.8-7.6c-2.3-2.1-3.7-2.1-6.4-0.9c-9.1,4.1-18.3,7.3-28.7,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-1.3,5.4c-2.5,8.2-4.4,16.4-2.2,25c2.3,9.3,14.6,13.6,22.9,7.5c-2.4-5-5.4-9.9-7.1-15.2c-1.2-3.5-1.7-8-0.7-11.4
c2.7-8.7,9.1-15.5,18.2-15.6c10.1-0.1,13.9-5,16-13.4c0.2-0.6,0.4-1.3,0.7-1.9c1.9-3.3,0.6-5.5-2.1-7.6c-6.5-5-14.3-6-22.1-7
C119.5,180.6,117.9,180.2,116.3,180z M353.8,375.6c-6.5-8.7-13.2-16.4-18.4-25c-4.4-7.2-10-6.4-16.9-5.3c0.6,1,1,1.8,1.5,2.3
c6.8,7.3,13.7,14.5,20.3,21.9C343.8,373.6,347.3,376.6,353.8,375.6z M304.6,343.1c-0.3,0.5-0.6,1.1-1,1.6
c9.3,8.7,18.4,17.7,27.9,26.1c2,1.8,5.5,1.7,8.3,2.5c0.3-0.5,0.6-1.1,0.9-1.6c-7.2-7.8-14.5-15.5-21.5-23.4
C315.2,343.7,309.9,343.6,304.6,343.1z M356,376.5c0.7-0.5,1.5-0.9,2.2-1.4c-0.6-1.4-1.1-2.9-1.9-4.2c-4.9-8.7-9.7-17.5-14.7-26.1
c-2.8-4.9-3.9-4.9-9.1-0.5C340.4,354.9,348.2,365.7,356,376.5z M294.7,341c-0.5,0.5-1.1,1.1-1.6,1.6c1.8,2.4,3.4,5.1,5.6,7.2
c5.4,5.3,10.9,10.6,16.7,15.5c2.8,2.3,6.3,3.7,9.6,5.4c0.3-0.5,0.5-1,0.8-1.5c-8.8-8.9-17.6-17.9-26.5-26.7
C298.2,341.5,296.3,341.5,294.7,341z M363.2,323.5c-2.1,14.8-4.2,29.6-6.3,44.4c0.5,0.1,1,0.1,1.5,0.2
C364.5,353.8,366.8,339,363.2,323.5z M361.7,317.7c-0.7-0.3-1.4-0.6-2.2-0.9c-1.1,2.5-3,4.8-3.3,7.4c-1.3,9.8-2.3,19.7-3.2,29.6
c-0.2,2.6,0.5,5.2,0.8,7.8c0.5,0,0.9-0.1,1.4-0.1C357.4,346.9,359.5,332.3,361.7,317.7z M351,352.2c0.9-8.1,1.6-15.4,2.5-23.2
C347.8,334.9,346.3,346.8,351,352.2z M309.2,364.1c0.4-0.4,0.7-0.8,1.1-1.1c-5.5-4.8-10.9-9.5-16.4-14.3c-0.4,0.4-0.7,0.8-1.1,1.2
C295.9,357.2,303.3,359.8,309.2,364.1z"/>
<path fill="#FFFFFF" d="M277.3,172.8c0.2,2,0.6,4.1,0.7,6.1c1.3,16.7,2.5,33.5,3.9,50.2c0.4,4.5,1.2,8.9,2.2,13.3
c0.5,2.2,1.4,4.8,3,6.2c6.9,6.1,12.9,13.8,22.5,15.9c9.5,2.1,24.8-3.5,28.1-16.8c3.1-12.8,4.4-25.6,2.2-38.6
c-1.2-7.2-2.7-14.4-4-21.5c-0.4-2-0.5-4.1-0.2-6.2c5.8,5.2,7.1,12.4,7.8,19.3c1.3,12.9,2.1,25.9,1.9,38.8
c-0.2,15.3-12.2,27.6-27.5,29.7c-1.1,0.2-2.2,0.6-3.3,0.8c1.1,15.8,0.9,31.4-3.3,46.7c-0.6-9.9-0.8-19.9-2-29.8
c-1-8.8-4.4-16.6-13.1-20.9c-3.4-1.7-6.4-4.2-9.7-5.9c-12.4-6.6-29,4.9-29.4,18.1c-0.4,11.7,0.9,22.9,8.4,32.6c1.3,1.7,1.8,4,2.7,6
c-0.5,0.4-1,0.8-1.4,1.2c-1.5-1.2-3.3-2.1-4.5-3.5c-10.9-13.4-11.8-28.8-8.3-44.9c0.1-0.6,0.3-1.3,0.5-2.6
c-8.4-2.1-16.6-1.6-23.3,3.4c-12,8.9-17.3,21.5-15.3,36.3c1.3,9.3,4.1,18.3,6.4,28.1c-1.4-1.5-3-2.6-3.8-4.1
c-6.6-12.1-10.7-24.8-8.9-38.8c0.4-3.5-0.2-5.6-4-5.7c-6.3-0.1-12.6-0.8-18.7,0.2c-8.5,1.4-14.1,9.3-15,19.4
c-0.3,3.1-0.3,6.3-0.6,9.5c-0.2,1.5-0.9,2.9-1.4,4.3c-0.7,0-1.4,0-2,0.1c-0.7-3.3-2.5-6.8-2-10c0.9-6,3.1-11.7,4.5-17.7
c0.3-1.5,0-3.9-1-4.9c-6.9-6.8-14.9-9.1-24.2-5.3c-1.6,0.7-3.3,1.2-4.9,1.8c-0.3-0.6-0.5-1.1-0.8-1.7c4.5-2.5,8.9-4.9,13.8-7.7
c1.5-8.8-6.2-14.1-10.8-21.6c8.4,0.8,12.6,5.9,14.9,11.9c3.2,8.3,8.5,14.1,16.4,17.8c2,0.9,4.9,1.4,6.8,0.6
c9.3-3.4,18.5-5.4,28.3-2.6c1.2,0.3,3.2-0.4,4-1.4c4.6-5.3,8.9-10.8,13.4-16.4c0.1,0.1-0.8-0.6-1.8-0.9
c-7.3-1.7-11.5-6.6-12.8-13.7c-1.1-6-1.9-12.2-1.8-18.3c0.1-9.9,1.1-19.9,1.8-29.8c0.1-1.5,0.9-3,1.3-4.5c0.4,0,0.9,0,1.3,0
c0.2,1.1,0.7,2.2,0.7,3.3c-0.4,5.8-1.3,11.6-1.3,17.4c0.1,9.3,0.4,18.6,1.3,27.8c1.4,13.1,11.3,15.8,21.2,15.4
c9.1-0.4,18.2-1.9,27.2-3.1c10.6-1.4,17.9-11.5,16.6-22.1c-2-17-3.8-34.1-5.4-51.1c-0.3-3.5,0.5-7,0.9-10.6
C275.9,172.8,276.6,172.8,277.3,172.8z"/>
<path fill="#FFFFFF" d="M189.5,269.8c-3.8-2-8.6-3-11.2-6c-14-15.9-20.5-34.1-14.1-55.2c1.1-3.6,4.1-6.6,7.4-9.6
c-11.7,28.3-3.8,50.7,19.3,68.9C190.5,268.5,190,269.2,189.5,269.8z"/>
<path fill="#FFFFFF" d="M352.1,274.3c14.7-7.4,17.9-22.7,25.9-36.5c2.2,9,0.3,15.8-4.1,21.5c-4.3,5.6-9.6,10.6-14.8,15.5
c-1.3,1.2-3.9,0.9-5.8,1.3C352.9,275.5,352.5,274.9,352.1,274.3z"/>
<path fill="#FFFFFF" d="M160.6,140.1c12.7-1,20.5,16.9,17.8,24.3c-0.9,2.5-3.5,4.3-6.5,6.3C176.4,157.5,172,147.7,160.6,140.1z"/>
<path fill="#FFFFFF" d="M220.5,128.1c2.4-2.2,4.6-4.4,7.1-6.4c0.6-0.5,2,0.2,3.1,0.3c-0.2,0.9,0,2.1-0.5,2.7
c-2.3,2.8-4.8,5.2-8.6,5.1C221.2,129.3,220.8,128.7,220.5,128.1z"/>
<path fill="#FFFFFF" d="M290.6,113.9c3.3,2.2,2.6,5.4,1.8,8.5c-0.5,0.1-1,0.2-1.5,0.3c-0.6-2.8-1.3-5.7-1.9-8.5
C289.5,114.1,290.1,114,290.6,113.9z"/>
<path fill="#FFFFFF" d="M94,209.8c-0.2-5.1,3.5-8.3,6.5-11.4c2.6-2.7,3.2-5.1,2.8-8.8c-0.6-4.5,0-9.2,1-13.9
c2.9,7.3,3.4,15.6,13,19C109.1,200,101.8,204.8,94,209.8z"/>
</g>
</svg>
<h1 class="stagger title">The Brain</h1>
</div>
<div class="content">
</div>
</div>

Loader to information card

An element faking a loading process, to then display some content in two steps.

A Pen by Andres Fulla on CodePen.

License.

(function() {
var appendContent = function() {
var text = '<p>The <b>brain</b> is an <a href="/wiki/Organ_(anatomy)" title="Organ (anatomy)">organ</a> that serves as the center of the <a href="/wiki/Nervous_system" title="Nervous system">nervous system</a> in all <a href="/wiki/Vertebrate" title="Vertebrate">vertebrate</a> and most <a href="/wiki/Invertebrate" title="Invertebrate">invertebrate</a> animals. Only a few invertebrates such as <a href="/wiki/Sponge" title="Sponge">sponges</a>, <a href="/wiki/Cnidaria" title="Cnidaria">jellyfish</a>, adult <a href="/wiki/Tunicate" title="Tunicate">sea squirts</a> and <a href="/wiki/Echinoderm" title="Echinoderm">starfish</a> do not have a brain; diffuse or localised <a href="/wiki/Nerve_net" title="Nerve net">nerve nets</a> are present instead. The brain is located in the head, usually close to the primary sensory organs for such <a href="/wiki/Sense" title="Sense">senses</a> as <a href="/wiki/Visual_perception" title="Visual perception">vision</a>, <a href="/wiki/Hearing" title="Hearing">hearing</a>, <a href="/wiki/Balance_(ability)" title="Balance (ability)">balance</a>, <a href="/wiki/Taste" title="Taste">taste</a>, and <a href="/wiki/Olfaction" title="Olfaction">smell</a>. The brain is the most complex organ in a vertebrate\'s body. In a typical human, the <a href="/wiki/Cerebral_cortex" title="Cerebral cortex">cerebral cortex</a> (the largest part) is estimated to contain 15–33 billion <a href="/wiki/Neuron" title="Neuron">neurons</a>,<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span>[</span>1<span>]</span></a></sup> each connected by <a href="/wiki/Synapse" title="Synapse">synapses</a> to several thousand other neurons. These neurons communicate with one another by means of long <a href="/wiki/Protoplasm" title="Protoplasm">protoplasmic</a> fibers called <a href="/wiki/Axon" title="Axon">axons</a>, which carry trains of signal pulses called <a href="/wiki/Action_potential" title="Action potential">action potentials</a> to distant parts of the brain or body targeting specific recipient cells.</p><p><a href="/wiki/Physiology" title="Physiology">Physiologically</a>, the function of the brain is to exert centralized control over the other organs of the body. The brain acts on the rest of the body both by generating patterns of muscle activity and by driving the secretion of chemicals called <a href="/wiki/Hormone" title="Hormone">hormones</a>. This centralized control allows rapid and coordinated responses to changes in the <a href="/wiki/Environment_(biophysical)" title="Environment (biophysical)">environment</a>. Some basic types of responsiveness such as <a href="/wiki/Reflex" title="Reflex">reflexes</a> can be mediated by the spinal cord or peripheral <a href="/wiki/Ganglion" title="Ganglion">ganglia</a>, but sophisticated purposeful control of behavior based on complex sensory input requires the information integrating capabilities of a centralized brain.</p><p>The operations of individual brain cells are now understood in considerable detail but the way they cooperate in ensembles of millions is yet to be solved.<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span>[</span>2<span>]</span></a></sup> Recent models in modern neuroscience treat the brain as a biological <a href="/wiki/Computer" title="Computer">computer</a>, very different in mechanism from an electronic computer, but similar in the sense that it acquires information from the surrounding world, stores it, and processes it in a variety of ways, analogous to the <a href="/wiki/Central_processing_unit" title="Central processing unit">central processing unit</a> (CPU) in a computer.</p><p>This article compares the properties of brains across the entire range of animal species, with the greatest attention to vertebrates. It deals with the <a href="/wiki/Human_brain" title="Human brain">human brain</a> insofar as it shares the properties of other brains. The ways in which the human brain differs from other brains are covered in the human brain article. Several topics that might be covered here are instead covered there because much more can be said about them in a human context. The most important is <a href="/wiki/Brain_disease" title="Brain disease" class="mw-redirect">brain disease</a> and the effects of brain damage, covered in the human brain article because the most common diseases of the human brain either do not show up in other species, or else manifest themselves in different ways.</p>',
contentDiv = document.querySelector('.content'),
card = document.querySelector('#loadingCard');
var letShow = function() {
TweenMax.to(contentDiv, .3,
{
x: 50,
rotation: '5deg'
})},
letHide = function() {
TweenMax.to(contentDiv, .3,
{
x: 0,
rotation: '0deg'
})
};
card.addEventListener('mouseover', letShow)
card.addEventListener('mouseleave', letHide)
contentDiv.innerHTML = text;
contentDiv.offsetWidth = loadingWidth;
card.addEventListener('click', function() {
var contentAnimation = new TimelineMax();
this.removeEventListener('mouseover', letShow);
letHide();
contentAnimation.add(TweenMax.to(card, 1.2, {
width: loadingWidth*2,
ease: Elastic.easeOut
}));
console.log( loadingWidth );
})
}
var animation = new TimelineMax(),
loadingWidth = document.querySelector('#loadingCard').offsetWidth;
animation.add(TweenMax.to('.cover', 3, {
width: loadingWidth
}));
animation.add(TweenMax.to('#loadingCard', 1, {
height: 384,
ease: Elastic.easeOut,
cursor: 'pointer'
}));
animation.add(TweenMax.staggerTo('.stagger', .7, {
opacity: 1,
display: 'block',
delay: -1,
}, 0.2, appendContent));
}())
<script src="//cdnjs.cloudflare.com/ajax/libs/gsap/1.16.1/TweenMax.min.js"></script>
@import url(http://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic);
$blue: #3a7bd3;
$grey: #e1e1e1;
html {
box-sizing: border-box;
background-color: #D38A3A;
*, *:after, *:before {
box-sizing: border-box;
}
}
#loadingCard {
height: 30px;
width: 337px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
#brain {
margin-bottom: -40px;
}
.stagger {
opacity: 0;
display: none;
}
.title {
text-align: center;
margin: 0;
color: #fff;
text-transform: uppercase;
font-weight: 100;
}
.cover {
height: 100%;
width: 0;
background-color: $blue;
margin: 0;
position: relative;
z-index: 1;
}
.content {
display: block;
width: 337px;
padding: .5em 2em;
font-family: 'Droid Serif', serif;
color: #2E3846;
font-size: 20px;
position: absolute;
top: 0;
right: 0;
overflow-y: scroll;
height: 100%;
z-index: 0;
line-height: 1.4;
background-color: $grey;
transform: perspective( 337px );
&:before {
}
a {
color: #245598;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.