Skip to content

Instantly share code, notes, and snippets.

View hrtovey's full-sized avatar
🎉

Heather Tovey hrtovey

🎉
View GitHub Profile
@hrtovey
hrtovey / section-classes.txt
Created April 11, 2020 18:46
Classes to go with each section type in 7.1
White Minimal --> .white
White Bold --> .white-bold
Light Minimal --> .light
Light Bold --> .light-bold
Dark Minimal --> .dark
@hrtovey
hrtovey / heading-paragraph-selectors.less
Last active April 11, 2020 18:50
Some code to help you style headings and paragraphs in 7.1. Check out the fundamentals for more help with specific styling needs: https://developer.mozilla.org/en-US/docs/Learn/CSS/Styling_text/Fundamentals
h1 {
line-height: 1;
letter-spacing: 0;
font-weight: bold;
}
h2 {
line-height: 1;
letter-spacing: 0;
font-weight: bold;
body {
background: linear-gradient(270deg, #4fcee3, #ce00ab);
}
.Index-page {
background-color: transparent;
}
{
"firstName": "Jane",
"lastName": "Smith",
"address": {
"streetAddress": "425 2nd Street",
"city": "San Francisco",
"state": "CA",
"postalCode": 94107
},
"phoneNumbers": [
@hrtovey
hrtovey / fade-in-button-on-scroll
Last active July 12, 2018 18:20
A button in the bottom-right corner that fades in as the user scrolls down the page. Place inside Squarespace page code injection. Technique found here: https://www.choosewonder.com/ - Converted from jQuery to Vanilla JS
<style>
/* CSS Code to style the button. Change background-color and color to match your brand colors. */
.sf-back-to-top {
background-color: #d52d8e;
color: #fff;
opacity: 0;
transition: opacity .6s ease-in-out;
-moz-transition: opacity .6s ease-in-out;
@hrtovey
hrtovey / blog-pagination-text-change
Created June 27, 2018 13:57
Change Older and Newer Text on Blog Pagination
<script>
Y.on('domready', function() {
Y.all('.BlogList-pagination-link-label').each(function() {
if(this.getHTML() == 'Older') {
this.setHTML('More');
}
if(this.getHTML() == 'Newer') {
this.setHTML('Back');
}
@hrtovey
hrtovey / squarespace-index-navigation
Last active June 14, 2018 19:15
Add this to the Index Page's Page Header Code Injection
<script>
function makeIndexNav() {
var indexSections = Array.from(document.getElementsByClassName('index-section')).map(section => section.id);
document.getElementById('content').appendChild(makeUL(indexSections));
window.onscroll = function changeNav(){
var indexSectionList = [];
/* CSS */
#about {
overflow:visible;
}
.cute-kitten-image {
margin-top: -330px !important; /* Otherwise margin-top is overwritten by Squarespace template */
}