Skip to content

Instantly share code, notes, and snippets.

View nickberens360's full-sized avatar

Nick Berens nickberens360

View GitHub Profile
@nickberens360
nickberens360 / loadContent.js
Created April 5, 2024 22:00
Loads the content of a GitHub Gist
const loadContent = {
gistId: '',
gistFile: '',
contentElementId: '',
content: '',
getServerSideProps: async function() {
const response = await fetch(`https://api.github.com/gists/${this.gistId}`);
console.log(response)
return await response.json();
},

Global Parts

Global parts include

  • ✅ Hero section
  • ✅ Aside
  • ☑️ Navigation
  • ☑️ Footer
 _______  _______  ______    _______  _______  _______  _______  ___      _______  _______  _______ 
|       ||       ||    _ |  |       ||       ||       ||       ||   |    |       ||       ||       |
|    _  ||    ___||   | ||  |    ___||    ___||       ||_     _||   |    |    ___||  _____||  _____|
|   |_| ||   |___ |   |_||_ |   |___ |   |___ |       |  |   |  |   |    |   |___ | |_____ | |_____ 
|    ___||    ___||    __  ||    ___||    ___||      _|  |   |  |   |___ |    ___||_____  ||_____  |
|   |    |   |___ |   |  | ||   |    |   |___ |     |_   |   |  |       ||   |___  _____| | _____| |
|___|    |_______||___|  |_||___|    |_______||_______|  |___|  |_______||_______||_______||_______|

 _______  _______  ______    _______  _______  _______  _______  ___      _______  _______  _______ 
|       ||       ||    _ |  |       ||       ||       ||       ||   |    |       ||       ||       |
|    _  ||    ___||   | ||  |    ___||    ___||       ||_     _||   |    |    ___||  _____||  _____|
|   |_| ||   |___ |   |_||_ |   |___ |   |___ |       |  |   |  |   |    |   |___ | |_____ | |_____ 
|    ___||    ___||    __  ||    ___||    ___||      _|  |   |  |   |___ |    ___||_____  ||_____  |
|   |    |   |___ |   |  | ||   |    |   |___ |     |_   |   |  |       ||   |___  _____| | _____| |
|___|    |_______||___|  |_||___|    |_______||_______|  |___|  |_______||_______||_______||_______|

@media screen and (max-width: 600px) { .has-media-on-the-right { display: flex; flex-direction: column; } }
var i = 0;
$('.progressBlock').each(function(){
if(i<6){
i++;
}
@nickberens360
nickberens360 / new_gist_file.php
Created July 10, 2017 18:54
ACF flexible content
<?php if( have_rows('home_sections') ): ?>
<?php while ( have_rows('home_sections') ) : the_row(); ?>
<?php if ( get_row_layout() == 'recent_posts' ) { ?>
<?php include 'components/blocks/cardRow-block.php' ?>
<?php } elseif (get_row_layout() == 'call_out_strip') { ?>
<?php include 'components/blocks/slogan-block.php' ?>
@nickberens360
nickberens360 / new_gist_file.scss
Created May 18, 2017 15:05
gravity forms css
.gform_wrapper{
max-width: 590px !important;
input[type=text], select{
height: 45px;
font-weight: 400 !important;
}
}
.gform_wrapper .top_label input.medium, .gform_wrapper .top_label select.medium {
width: 100% !important;
@nickberens360
nickberens360 / new_gist_file.html
Created March 23, 2017 16:28
Bootstrap Block Grid Layout
<div class="block-grid-example">
<div class="block-grid-example-item">
<img src="http://placehold.it/350x150">
</div>
<div class="block-grid-example-item">
<img src="http://placehold.it/350x150">
</div>
<div class="block-grid-example-item">
<img src="http://placehold.it/350x150">
</div>
@nickberens360
nickberens360 / new_gist_file.js
Created March 23, 2017 14:35
Loop through elements with incrementing class name
var i = 0;
$('.picBoxGrid').find('.picBox').each(function () {
if (i < 4) {
i++;
}