Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Web Accessibility Specialist, Advocate, and Trainer

Stefany Newman Stefany93

💭
Web Accessibility Specialist, Advocate, and Trainer
View GitHub Profile
@Stefany93
Stefany93 / functions.php
Created Jan 5, 2020
functions.php for trucks.php
View functions.php
<?php
/*
Function courtesy of Chris McKee - https://gist.github.com/ChrisMcKee/1284052
Get sute URL with protocol (http or https)
*/
function siteURL()
{
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off'
|| $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";
@Stefany93
Stefany93 / skip_link.html
Created Dec 12, 2019
Skip link (Bypass blocks) code
View skip_link.html
View furbaby_css.css
a {
text-decoration: none;
}
.container {
max-width: 1400px;
margin: auto;
}
#primary-nav .container {
padding: 0 10px;
View furbaby-header.html
<header class="main">
<nav id="primary-nav" aria-label="Main Navigation">
<div class="container">
<a href="/" class="logo-holder">
<img class="logo" src="/assets/template/images/logo/logo.svg" alt="Homepage">
</a>
</div>
<button id="hamburger" aria-expanded="true">
<span>menu</span>
<span id="expanded">expanded</span>
View buttons.html
<button on="tap:myVideo.play">
Play
</button>
<amp-video id="myVideo"
/* amp-video attributes */
></amp-video>
View amp-carousel-final-code.html
@Stefany93
Stefany93 / carousel-slide.html
Last active Sep 6, 2019
amp-carousel-slide
View carousel-slide.html
View trucks.php
<?php
require 'scripts/functions.php';
$domain_name = domainName(); // Example.com
$siteURL = siteURL(); //https://example.com
// Message
/*
AMP boilerplate CORS code and setting the content type as JSON
Since all errors / sucess messages will be encoded in JSON
*/
@Stefany93
Stefany93 / amp_email.html
Created Jul 4, 2019
AMP Email with a slider
View amp_email.html
<!doctype html>
<html ⚡4email>
<head>
<meta charset="utf-8">
<script async src="https://cdn.ampproject.org/v0.js"></script>
<script async custom-element="amp-carousel" src="https://cdn.ampproject.org/v0/amp-carousel-0.1.js"></script>
<style amp4email-boilerplate>body{visibility:hidden}</style>
<style amp-custom>
h1 {
margin: 10px;
View amp-list.html
<amp-list
src="https://fabulousnewwebsite.com/trucks.php"
layout="fixed-height"
height="200"
width="auto"
>
<template type="amp-mustache">
<div>
<a href="{{url}}">{{title}}</a>