Skip to content

Instantly share code, notes, and snippets.

@sitecustom
sitecustom / email-tpl.html
Created June 27, 2018 10:28
Modx form (spam)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>[[++site_name]]</title>
</head>
<body style="margin:0;padding:0;background:#f6f6f6;">
<div style="height:100%;padding-top:20px;background:#f6f6f6;">
@sitecustom
sitecustom / style.css
Last active June 9, 2018 17:26
checkbox
input[type=checkbox]
height: 0
width: 0
visibility: hidden
label
cursor: pointer
text-indent: -9999px
width: 35px
height: 20px
https://modx.pro/solutions/10040-add-your-fields-in-the-order-form/
https://dart.agency/blog/modx/kak-dobavit-dopolnitelnoe-pole-k-zakazu-v-minishop2.html
https://modx.pro/solutions/7037-expanding-any-table-modx/#comment-84315
Инструкция:
1)В системных настройках добавляем свои поля в ms2_order_address_fields
2)Создаём плагин на событие OnMODXInit для расширения модели БД
<?php
switch ($modx->event->name) {
@sitecustom
sitecustom / masonry_imageloaded.js
Created November 20, 2017 18:56 — forked from agragregra/masonry_imageloaded.js
Masonry imagesLoaded
var $container = $(".masonry-container");
$container.imagesLoaded(function () {
$container.masonry({
columnWidth: ".item",
itemSelector: ".item"
});
});
@sitecustom
sitecustom / README.md
Created November 5, 2017 22:29 — forked from em-piguet/README.md
Minimal Portfolio with MODX and Isotope.js
@sitecustom
sitecustom / pdoResources.tpl
Created November 1, 2017 17:49 — forked from jerrydeakins/pdoResources.tpl
Навигация по автометкам (ModX Revo)
А вот вызов pdoResources, для создания блога и фильтрации по автометке.
[[!pdoResources?
&parents=`[[*id]]`
&tvFilters=`[[!tagLinks? &get=`1`]]`
&tpl=`@INLINE <div class="row">
<div class="cols col-10 intro">
<h2><a href="{{+link}}">{{+pagetitle}}</a> ({{+publishedon}})</h2>
<div>{{!tagLinks? &tags=`{{+tv.autotag}}`}}</div>
{{+introtext}} <a href="{{+link}}">читать дальше..</a>
</div>
HTML:
<div class="wrapper">
<div class="tabs">
<span class="tab">Вкладка 1</span>
<span class="tab">Вкладка 2</span>
<span class="tab">Вкладка 3</span>
</div>
<div class="tab_content">
<div class="tab_item">Содержимое 1</div>
<div class="tab_item">Содержимое 2</div>
@sitecustom
sitecustom / media.css
Created August 14, 2017 17:01
Медиа-запрос для изменения точки сворачивания меню в bootstrap 3
@media (max-width: px) {
.navbar-header {
float: none;
}
.navbar-toggle {
display: block;
}
.navbar-collapse {
border-top: 1px solid transparent;
box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
@sitecustom
sitecustom / functions.php
Created July 18, 2017 21:28 — forked from artikus11/functions.php
Адаптивные таблицы в статьях и страницах
add_action( 'wp_footer', 'art_responsive_tables' );
function art_responsive_tables() {
if ( is_singular() ) {
?>
<script>
jQuery(document).ready(function ($) {
$('article table').wrap('<div class="table-cover"></div>');
});
</script>
<style>
@sitecustom
sitecustom / main.sass
Created April 8, 2017 14:03
center-menu
.main-menu
margin: 0 auto
text-align: center
li
display: block