pandoc -f markdown -t html5 -o output.html input.md -c style.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function rchv_projects_link() { ?> | |
<a class="grid_item-link gallery_item-link" href="<?php the_permalink(); ?>" aria-hidden="true" tabindex="-1"> | |
<?php $imgPlaceholder = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk2A8AAMUAwUPJ2C4AAAAASUVORK5CYII="; ?> | |
<figure class="grid_item-figure gallery_item-figure"> | |
<?php if( !empty(get_the_post_thumbnail()) ) { | |
the_post_thumbnail( 'post-thumbnail', array( | |
'alt' => the_title_attribute( array( | |
'echo' => false, | |
) ), | |
'src' => $imgPlaceholder, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let buttons = document.querySelectorAll("button"); | |
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of | |
// http://kangax.github.io/compat-table/es6/#for..of_loops | |
for (const button of buttons) { | |
button.addEventListener('click', () => { | |
console.log("for of worked"); | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Вариант 1 | |
RewriteCond %{HTTP:X-HTTPS} !1 | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] | |
#Вариант 2 | |
RewriteEngine On | |
RewriteCond %{HTTPS} off | |
RewriteCond %{HTTP:X-Forwarded-Proto} !https | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( ! isset( $content_width ) ) $content_width = 1080; | |
function et_setup_theme() { | |
global $themename, $shortname, $et_store_options_in_one_row, $default_colorscheme; | |
$themename = 'Divi'; | |
$shortname = 'divi'; | |
$et_store_options_in_one_row = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Function for post duplication. Dups appear as drafts. User is redirected to the edit screen | |
*/ | |
function rd_duplicate_post_as_draft(){ | |
global $wpdb; | |
if (! ( isset( $_GET['post']) || isset( $_POST['post']) || ( isset($_REQUEST['action']) && 'rd_duplicate_post_as_draft' == $_REQUEST['action'] ) ) ) { | |
wp_die('No post to duplicate has been supplied!'); | |
} | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Включение кеша браузера | |
===== | |
Вариант 1 | |
=== | |
<ifModule mod_headers.c> | |
<FilesMatch "\.(js|css|txt)$"> | |
Header set Cache-Control "max-age=604800" | |
</FilesMatch> | |
<FilesMatch "\.(flv|swf|ico|gif|jpg|jpeg|png)$"> | |
Header set Cache-Control "max-age=2592000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
<script src="//www.youtube.com/iframe_api"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.0.0/jquery.magnific-popup.min.js"></script> | |
<script> | |
$(document).ready(function() { | |
// Initializes Magnific Popup | |
$('#lp-pom-image-202 a, #lp-pom-box-218 a, #lp-pom-box-217 a').magnificPopup({ | |
disableOn: 700, |
NewerOlder