Skip to content

Instantly share code, notes, and snippets.

View Stefany93's full-sized avatar
💭
Web Accessibility Specialist, Advocate, and Trainer

Stefany Newman Stefany93

💭
Web Accessibility Specialist, Advocate, and Trainer
View GitHub Profile
@Stefany93
Stefany93 / functions.php
Created January 5, 2020 21:43
functions.php for trucks.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 December 12, 2019 19:05
Skip link (Bypass blocks) code
a {
text-decoration: none;
}
.container {
max-width: 1400px;
margin: auto;
}
#primary-nav .container {
padding: 0 10px;
@Stefany93
Stefany93 / furbaby-header.html
Created December 2, 2019 22:39
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>
@Stefany93
Stefany93 / buttons.html
Created October 29, 2019 21:39
AMP buttons
<button on="tap:myVideo.play">
Play
</button>
<amp-video id="myVideo"
/* amp-video attributes */
></amp-video>
@Stefany93
Stefany93 / amp-carousel-final-code.html
Created September 6, 2019 21:08
amp-carousel-final-code
@Stefany93
Stefany93 / carousel-slide.html
Last active September 6, 2019 21:07
amp-carousel-slide
@Stefany93
Stefany93 / trucks.php
Created July 4, 2019 22:21
Trucks code
<?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 July 4, 2019 22:19
AMP Email with a slider
<!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;
<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>