Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@lchski
lchski / GoogleSheetsHelpers.gs
Created May 31, 2018 18:20
A set of helpers I use for Google Sheets.
/**
* Retrieves the value associated with the variable from the “Base Variables” sheet.
*
* @param {string} variableName The variable to retrieve. The string must be the same as in the “Variable” column of the “Base Variables” sheet.
* @return The input multiplied by 2.
* @customfunction
*/
function getBaseVar(variableName) {
// Get variables.
var variableSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Base Variables");
@lchski
lchski / gist:5827117
Created June 20, 2013 22:03
Display list in more list-y format.
li {
display: inline-block;
list-style: none;
&:after {
content: ',';
}
&:last-child:after {
content: '.';
@lchski
lchski / gist:4711456
Last active December 12, 2015 04:08
@media screen and (min-width: 700px) {
nav {
target: after "header";
}
}
@media screen and (min-width: 1200px) {
nav {
target: after "header small";
}
nav {
/* Style nav links to be full width bars with healthy padding. */
}
@media screen and (min-width: 700px) {
/* Tablet styling. Width is just a rough guess. */
nav {
/* Style nav links to appear "buttony", in a full-width horizontal row. */
<header>
<h1>The-T</h1>
<small>Awesome T-Shirts for all.</small>
<placeholder id="ph-nav-desktop">
</header>
<placeholder id="ph-nav-tablet">
<div role="main">
<header>
<h1>The-T</h1>
<small>Awesome T-Shirts for all.</small>
</header>
<div role="main">
<p>Insert content here.</p>
</div>
<nav>
<a href="/">Home</a>
<a href="/about/">About Us</a>