AMP : Engineer Naturally Lean Web Pages and Leverage the Latest Web Platform Features to Dramatically Boost Page Speed.
Material type:
- text
- computer
- online resource
- 9781786462190
- 5.2759999999999998
- TK5105.888.O366 2017
Cover -- Copyright -- Credits -- About the Author -- Acknowledgements -- About the Reviewer -- www.Packtpub.com -- Customer Feedback -- Table of Contents -- Preface -- Chapter 1: Ride the Lightning with AMP -- What do AMP pages look like? -- Why now? -- Why performance is important on mobile -- Mobile technology advances won't make websites fast -- Business cases behind AMP -- Web performance - why are web pages slow? -- What exactly is AMP? -- AMP-HTML -- AMP-JS -- AMP Cache -- AMP URLs -- Preparing your web server environment -- AMP Hello World - your first AMP page -- Optional but recommended boilerplate -- Structured metadata and the AMP carousel -- Validating your AMP pages -- What's with the & -- lt -- style amp-boilerplate& -- gt -- code? -- How AMP solves mobile web performance -- Optimizations that make AMP fast -- AMP pre-rendering -- Controversy and criticisms of AMP -- Benefits of AMP -- AMP adoption -- So, do you need AMP? -- Summary -- Chapter 2: Building Your First AMP Page -- Going from HTML to AMP-HTML -- Including the AMP-JS library -- Validating your AMP pages -- Developer tools console -- Online validator -- Command line validation -- Fixing AMP validation errors -- AMP boilerplate validation errors -- Using JavaScript in AMP pages -- Using CSS in AMP pages -- Your first AMP component - & -- lt -- amp-img& -- gt -- -- Layout in AMP -- HTML tags that aren't allowed in AMP -- Forbidden HTML tags -- HTML tags with AMP-HTML replacements -- HTML tags that are allowed, but with restrictions -- AMP components -- Measuring AMP page performance -- Measuring mobile web performance -- What is "good" web performance? -- Waterfall charts -- WebPagetest.org -- PageSpeed Insights -- Remote debugging with developer tools -- Summary -- Chapter 3: Making an Impression - Layout and Page Design in AMP.
Laying out elements in AMP pages -- The AMP-HTML layout system -- The layout attribute -- Using responsive layout -- Canonical AMP pages -- Art-direction and responsive images -- Using srcset to optimize image loading -- Using the heights and sizes attributes -- Adding a related articles section with thumbnail images -- Using CSS3 flexbox for layout in AMP -- Scaling up for larger screens -- Using flex and media queries for horizontal layout -- Using responsive images and srcset to deliver high quality images on all screen sizes -- Using element media queries to display art-directed images -- Using flex-item layout -- Horizontal flex items -- Vertical flex items -- Full width flex item container -- Flex items with specific proportions -- Mixing flex and non-flex items -- Using placeholders and fallbacks to improve user experience -- Placeholders -- Fallbacks -- Using custom CSS in AMP pages -- Adding custom fonts to AMP pages -- Using custom fonts to improve page design -- Text layout with CSS and HTML -- Text layout with & -- lt -- amp-fit-text& -- gt -- -- Adding SVG graphics to AMP pages -- Summary -- Chapter 4: Engaging Users with Interactive AMP Components -- Building collapsible content with & -- lt -- amp-accordion& -- gt -- -- Building an expandable top stories category list -- Styling & -- lt -- amp-accordion& -- gt -- -- Improving the accordion with an expanded state indicator -- It's accordions all the way down! -- Building navigation menus -- Horizontal navigation menus -- Scrollable horizontal navigation -- Building a navigation menu with & -- lt -- amp-carousel& -- gt -- -- Adding side navigation with & -- lt -- amp-sidebar& -- gt -- -- Triggering the sidebar -- Styling the sidebar with CSS -- Adding an SVG hamburger menu button -- A note on accessibility -- Hierarchical navigation menus with &.
lt -- amp-sidebar& -- gt -- and & -- lt -- amp-accordion& -- gt -- -- Scaling up -- Implementing tabbed content with & -- lt -- amp-selector& -- gt -- -- Displaying user notifications -- Using server endpoints to store the dismissal state of user notifications -- The Action and Event model in AMP -- Attaching event handlers with the on attribute -- Events and actions -- Handling multiple events on a single element -- Triggering multiple actions for a single event -- Using actions on any HTML element -- Summary -- Chapter 5: Building Rich Media Pages in AMP -- Showcasing products with & -- lt -- amp-carousel& -- gt -- -- Building a carousel of products -- Hero promotion with & -- lt -- amp-carousel& -- gt -- slides -- Autoplaying & -- lt -- amp-carousel& -- gt -- slides -- Adding call-to-action text to carousel images -- Building a product image gallery -- Product image gallery with thumbnail previews -- Jumping to a specific image with goToSlide() -- Highlighting the selected thumbnail -- Reducing code with & -- lt -- amp-selector& -- gt -- -- Adding video to AMP pages -- Hosting your own videos with & -- lt -- amp-video& -- gt -- -- Embedding hosted videos -- Adding audio to AMP pages -- Embedding self-hosted audio with & -- lt -- amp-audio& -- gt -- -- Embedding third-party hosted audio -- Showcasing your products with & -- lt -- amp-lightbox& -- gt -- -- Lightboxing product images -- Closing the lightbox -- Using social media in AMP pages -- Facebook -- Twitter -- Instagram -- Promoting products with social media -- Setting default share text -- Improving product SEO with metadata -- Using tabs in product pages -- Summary -- Chapter 6: Making Contact - Forms in AMP -- Using forms in AMP -- Submitting forms in AMP -- A simple newsletter sign-up form -- Submitting XHR AJAX forms in AMP.
Handling XHR responses with & -- lt -- amp-mustache& -- gt -- -- Creating the server in PHP -- Hiding the form on success -- Custom form validation -- UX improvement - visual feedback on submission -- Building a product search form -- Styling the search form -- The server response - a JSON list of products -- Iterating over JSON data with & -- lt -- amp-mustache& -- gt -- -- Showing the search status -- Animating the search icon -- A caveat with the submit-success approach -- Implementing a shopping cart in AMP -- Variable substitution in AMP -- Using CLIENT_ID to identify a shopping cart -- Building the shopping cart server -- Handling the shopping cart server response -- Dismissing the cart summary -- Redirecting after form submission -- Summary -- Chapter 7: Dynamic Content and Data-Driven Interaction -- Dynamic content - fetching JSON data on page load -- The & -- lt -- amp-list& -- gt -- component -- Fetching a list of related products with & -- lt -- amp-list& -- gt -- -- Using list tags & -- lt -- ul& -- gt -- and & -- lt -- li& -- gt -- with & -- lt -- amp-list& -- gt -- -- A note on & -- lt -- amp-list& -- gt -- container size -- Fetching the shopping cart on page load -- Showing the cart contents with & -- lt -- amp-mustache& -- gt -- -- Sharing a mustache template between & -- lt -- amp-list& -- gt -- and & -- lt -- amp-form& -- gt -- -- Removing items from the cart -- Retrieving URL parameters with AMP's variable substitution -- Live content updates with & -- lt -- amp-live-list& -- gt -- -- Using & -- lt -- amp-live-list& -- gt -- -- A simple & -- lt -- amp-live-list& -- gt -- example -- A live Twitter search listing -- Adding a search form to use with & -- lt -- amp-live-list& -- gt -- -- Why is it more complicated with the AMP Cache?.
Implementing a live leaderboard -- Summary -- Chapter 8: Programming in AMP - amp-bind -- Introducing & -- lt -- amp-bind& -- gt -- -- State, expressions, and data-binding -- Stateful data in & -- lt -- amp-bind& -- gt -- with & -- lt -- amp-state& -- gt -- -- Initializing state with & -- lt -- amp-state& -- gt -- -- Updating state with AMP.setState() -- Debugging state with AMP.printState() -- Expressions in & -- lt -- amp-bind& -- gt -- -- Text manipulation expression -- Arithmetic expression -- Branching if...else expression -- Using & -- lt -- amp-bind& -- gt -- -- Changing text with & -- lt -- amp-bind& -- gt -- -- Setting default values for AMP state properties -- Changing CSS class with & -- lt -- amp-bind& -- gt -- -- Removing cart items with & -- lt -- amp-bind& -- gt -- -- User-triggered updates with & -- lt -- amp-list& -- gt -- and & -- lt -- amp-bind& -- gt -- -- Ensuring that & -- lt -- amp-list& -- gt -- has a unique URL -- Improving search with & -- lt -- amp-list& -- gt -- and & -- lt -- amp-bind& -- gt -- -- Sorting, filtering, and updating search results -- Using amp-list to show search results -- Search results JSON response -- Filtering by color, and sorting by price -- Adding search autosuggest -- Improving the product image carousel with & -- lt -- amp-bind& -- gt -- -- Configuring product options with & -- lt -- amp-bind& -- gt -- -- Product configuration: basic version -- Choosing options with & -- lt -- amp-selector& -- gt -- and & -- lt -- amp-bind& -- gt -- -- Binding selection options to the shopping cart -- Product configuration: advanced version -- Initializing product data with & -- lt -- amp-state& -- gt -- -- Creating the product carousels -- Adding a size option -- Using & -- lt.
amp-selector&.
Description based on publisher supplied metadata and other sources.
Electronic reproduction. Ann Arbor, Michigan : ProQuest Ebook Central, 2024. Available via World Wide Web. Access may be limited to ProQuest Ebook Central affiliated libraries.
There are no comments on this title.