Skip to content

Instantly share code, notes, and snippets.

View nickberens360's full-sized avatar

Nick Berens nickberens360

View GitHub Profile
 _______  _______  ______    _______  _______  _______  _______  ___      _______  _______  _______ 
|       ||       ||    _ |  |       ||       ||       ||       ||   |    |       ||       ||       |
|    _  ||    ___||   | ||  |    ___||    ___||       ||_     _||   |    |    ___||  _____||  _____|
|   |_| ||   |___ |   |_||_ |   |___ |   |___ |       |  |   |  |   |    |   |___ | |_____ | |_____ 
|    ___||    ___||    __  ||    ___||    ___||      _|  |   |  |   |___ |    ___||_____  ||_____  |
|   |    |   |___ |   |  | ||   |    |   |___ |     |_   |   |  |       ||   |___  _____| | _____| |
|___|    |_______||___|  |_||___|    |_______||_______|  |___|  |_______||_______||_______||_______|

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

Global Parts

Global parts include

  • ✅ Hero section
  • ✅ Aside
  • ☑️ Navigation
  • ☑️ Footer
@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();
},
@nickberens360
nickberens360 / new_gist_file.php
Last active September 28, 2021 20:46
wordpress: Full dynamic bootstrap carousel code
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<?php
$args = array(
'post_type' => 'slides1',
'orderby' => 'menu_order title',
'order' => 'ASC',
);
$query = new WP_Query( $args );
@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 / gist:8213912
Last active August 17, 2017 18:03
jquery: Wrap each n elements in jQuery found here: http://forrst.com/posts/Wrap_each_n_elements_in_jQuery-7zl
(function($){
$.fn.wrapChildren = function(options) {
var options = $.extend({
childElem : undefined,
sets : 1,
wrapper : 'div class="random"'
}, options || {});
if (options.childElem === undefined) return this;
@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;