Skip to content

Instantly share code, notes, and snippets.

View dmtrmrv's full-sized avatar

Dmitry Mayorov dmtrmrv

  • 10up
View GitHub Profile
@dmtrmrv
dmtrmrv / four-column-variation.svg
Last active April 7, 2020 23:08
Four Column Block Variation Icon
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dmtrmrv
dmtrmrv / content.php
Last active December 21, 2019 00:49
Conditional Excerpt for Integer Theme
<?php
/**
* The default template used for displaying post content in index.php.
*
* @package Integer
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'blogroll-item' ); ?>>
const artist = 'M1248 761h-48v72h-48v-72h-48v83h-48v113h-48V784h-48v82h-48v24h-48v-18h-48V767h-48v77h-48v-48h-48v85h-48v-65h-48v17h-48v-72h-48v83h-48v113h-48V784h-48v82h-48v24h-48v-18h-48v-56h-48v28H96v-48H48v85H0V85h48V0h48v48h48v84h48v-22h48V87h48V62h48v21h48v35h48V48h48v110h48v-32h48v20h48V85h48V0h48v48h48v84h48v-22h48V87h48V62h48v21h48v35h48V48h48v110h48v-32h48v32h48V87h48v71h48v603h-48v129h-48V761z';
const product = 'M48 796V0h48v796H48zm96 20V132h48v684h-48zm96 74V87h48v803h-48zm96-106V83h48v701h-48zm96 60V48h48v796h-48zm96-11V126h48v707h-48zm96 48V85h48v796h-48zm96-37V48h48v796h-48zm96 28V110h48v762h-48zm96-6V62h48v804h-48zm96 91V118h48v839h-48zm96-196V158h48v603h-48zm96 23V83h48v701h-48zm96 60V48h48v796h-48z';
const productMobile = 'M0 425V41.56h28.52V425H0zm57.04-50.61V39.64h28.52v334.75H57.04zm57.03 28.65V22.92h28.52v380.12h-28.52zm57.04-5.25V60.17h28.52v337.62h-28.52zm57.04 22.92V40.59h28.52v380.12h-28.52zm57.04-17.67V22.92h28.51v380.12H285.2zm57.03 13.37V52.53h28.52V416.4h-28.52zm57.04-2.87V29.61
@dmtrmrv
dmtrmrv / get_folders.js
Created June 29, 2018 01:04
Recursively return folders in Node.js
const getFolders = (dir) => {
const paths = [dir];
const scan = (dir) => {
fs.readdirSync(dir).forEach((item) => {
if (fs.statSync(path.join(dir, item)).isDirectory()) {
const subdir = `${dir + item}/`;
paths.push(subdir);
scan(subdir);
}
});
@dmtrmrv
dmtrmrv / counter-archivo.css
Created December 6, 2017 22:10
Replace Lato with Archivo in Counter
@import url('https://fonts.googleapis.com/css?family=Archivo+Narrow');
html {
font-family: 'Archivo Narrow', sans-serif;
}
h1,h2,h3,h4,h5,h6,
.main-navigation a,
.site-title {
font-family: 'Archivo Narrow', sans-serif;
@dmtrmrv
dmtrmrv / counter-contact-form-markup.txt
Last active September 29, 2017 11:20
Counter Contact Form Markup for Contact Form 7
<label for="name" class="screen-reader-text">Name (required)</label>[text* name id:name placeholder "Name"]
<label for="email" class="screen-reader-text">Email (required)</label>[email* email id:email placeholder "Email *"]
<label for="subject" class="screen-reader-text">Subject</label>[text subject id:subject placeholder "Subject"]
<label for="message" class="screen-reader-text">Message</label>[textarea message id:message placeholder "Message"]
<p style="text-align: center">[submit class:btn class:btn-default "Send Message"]</p>
@dmtrmrv
dmtrmrv / counter-reduce-logo-spacing.css
Created September 29, 2017 10:45
Counter Reduce Logo Spacing
@media screen and (min-width: 768px) {
.site-branding {
margin: 10% 0;
}
}
@dmtrmrv
dmtrmrv / regular-expression-test.php
Created July 20, 2017 11:20
Regular Expression Test
/**
* The current version of the theme.
*/
define( 'INTEGER_VERSION', '1.0.0' );
/* Pro Start -----------------------------------------------------------------*/
/**
* Load theme updater functions.
*/
@dmtrmrv
dmtrmrv / integer-subscription-form.html
Created June 14, 2017 16:20
Integer Subscription Form
<div class="integer-subscribe-form">
<div class="integer-subscribe-form-intro">
<h2>Subscribe for new posts every week!</h2>
<p>I regularly write about my journey in creating something awesome.</p>
</div>
<div class="integer-subscribe-form-input">
<label class="screen-reader-text" for="name">Email address:</label>
<input type="email" id="name" name="EMAIL" placeholder="Your email address" required />
</div>
<div class="integer-subscribe-form-button">
@dmtrmrv
dmtrmrv / counter-custom-font-quick-fix.css
Created May 24, 2017 19:12
Counter Custom Font Quick Fix
@import url('https://fonts.googleapis.com/css?family=Montserrat');
html,
h1,
h2,
h3,
h4,
h5,
h6,
.site-title,