Simple pull quote
How do I make an simple pull quote?
This builds on the work of Maykel Loomans: http://miekd.com/articles/pull-quotes-with-html5-and-css/ and makes it a little less repetitious and brings JavaScript in to make it an enhancement.. What is a simple pull quote? How do you make a simple pull quote? This script and codes were developed by Aaron Gustafson on 13 August 2022, Saturday.
Simple pull quote - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Simple pull quote</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <p>A pull quote is a typographical technique in which an excerpt or quote from an article is duplicated within the article using a different formatting style so that it jumps out at the reader.</p>
<p data-pullquote="b">Blatantly copying the excerpt of the pull quote into it’s own element is not the way to go. <b>A pull quote is a purely visual technique, and therefore should not change the structure of the body.</b> Next to that, a structural representation of the excerpt would be seen twice by people using feed readers or services like <a href="http://www.instapaper.com/">Instapaper</a>, as well as be re-read for people who use screen readers. So how can we best author this into our mark-up?</p>
<h3>Our good friend, the data attribute</h3>
<p><span class="caps">HTML5 </span>introduced the ability for authors to create custom non-visible data-attributes. These attributes can contain data that will not affect layout or presentation.</p>
<blockquote><p>Custom data attributes are intended to store custom data private to the page or application, for which there are no more appropriate attributes or elements.</p></blockquote>
<p>By adding a <code>data-pullquote</code> attribute to an element, we attach the text of the pull quote to it, yet do not add visible content.</p>
<hr/>
<p>Original source: <a href="http://miekd.com/articles/pull-quotes-with-html5-and-css/">http://miekd.com/articles/pull-quotes-with-html5-and-css/</a></p> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Simple pull quote - Script Codes CSS Codes
body { margin: 0 140px 0 0; padding: 1em;
}
b { font-weight: inherit;
}
.has-pullquote::before { /* Reset metrics. */ padding: 0; border: none; /* Content */ content: attr(data-pullquote); /* Pull out to the right, modular scale based margins. */ float: right; width: 320px; margin: 12px -140px 24px 36px; /* Baseline correction */ position: relative; top: 5px; /* Typography (30px line-height equals 25% incremental leading) */ font-size: 23px; line-height: 30px;
}
.pullquote-left::before { float: left; margin: 12px 31px 24px -102px; width: 251px;
}
Simple pull quote - Script Codes JS Codes
(function( $ ){ var PULLQUOTE = 'data-pullquote'; $('[' + PULLQUOTE + ']').each(function(){ var $parent = $(this), $quote = $parent.find( $parent.data('pullquote') ); if ( $quote.length > 0 ) { $parent .attr( PULLQUOTE, $quote.eq(0).text() ) .addClass( 'has-pullquote '); } });
}( jQuery ));
Developer | Aaron Gustafson |
Username | aarongustafson |
Uploaded | August 13, 2022 |
Rating | 4 |
Size | 3,392 Kb |
Views | 36,432 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Footnote references that maintain good user focus | 2,167 Kb |
Pure CSS knockout arrow | 2,344 Kb |
Easy Obfuscated Field | 2,393 Kb |
Visualizing CSS Transforms | 3,155 Kb |
Simplified JS-based MQ Inspector | 2,353 Kb |
Zoom Layouts v2 | 2,098 Kb |
MQ-based Content-controlled Optional Image Loading | 3,047 Kb |
Pure CSS Modal | 3,569 Kb |
Simple Compact Labels | 1,978 Kb |
Auto-advance example | 3,328 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Scrolling Horizontal Isotope | Bramus | 2,017 Kb |
CSS Clip and Shape Module clearly | Pestov | 2,640 Kb |
Simple personal profile | Miroot | 2,856 Kb |
Side Sliding Menu CSS | EduardL | 4,388 Kb |
Nice textured background | Hans | 2,659 Kb |
Shopping cart | Andiio | 6,581 Kb |
Growing Root - Scroll control - CANVAS | Cjonasw | 2,342 Kb |
Wip elementary os navbar | Nickcolley | 2,993 Kb |
Multicolumns 2 | Raphaelgoetter | 1,857 Kb |
Part 19 Bootstrap split button dropdown | Venkatesha | 1,601 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!