Skip to content

Instantly share code, notes, and snippets.

Avatar

Jens Martsch jmartsch

View GitHub Profile
View rethinkpagination installation
<script src="path/to/jquery.js"></script>
<script src="path/to/rethinkpagination/scripts/rethinkpagination.min.js"></script>
<script>
jQuery(function($) {
$('.pagination').rethinkpagination();
});
</script>
View add rethinkpagination stylesheet
<link rel="stylesheet" href="rethinkpagination/styles/rethinkpagination.css">
View rethinkpagination with options
jQuery(function($) {
$('.pagination').rethinkpagination({animation: 'fadeInDown', selector: 'h1'});
});
@jmartsch
jmartsch / dabblet.css
Created Mar 20, 2013
Pure CSS Tooltips with unicode arrow and shadow
View dabblet.css
/*
* Pure CSS Tooltips with unicode arrow and shadow
*/
.ui-tooltip, .ui-tooltip-top, .ui-tooltip-right, .ui-tooltip-bottom, .ui-tooltip-left {
color:#ffffff;
cursor:normal;
display:-moz-inline-stack;
display:inline-block;
font-size:12px;
font-family:arial;
@jmartsch
jmartsch / processwiresnippets.php
Created Jun 4, 2013
Common used code snippets for Processwire
View processwiresnippets.php
// First child redirect
<?php if($page->numChildren) $session->redirect($page->child()->url);
// Redirect to specific page
$session->redirect($pages->get('/')->url);
// Create a menu, needs MarkupSimpleNavigation Plugin
<?php
$treeMenu = $modules->get("MarkupSimpleNavigation"); // load the module
$rootPage = $pages->get("/ueber-uns/"); // if you want to overwrite start level for the menu, for example for breadcrumbs
@jmartsch
jmartsch / Gruntfile.coffee
Last active Jul 15, 2016
Gruntfile with browser-sync and assemble for static html files
View Gruntfile.coffee
# Generated on 2013-10-28 using generator-bootstrap-less 3.0.3
"use strict"
#lrSnippet = require("grunt-contrib-livereload/lib/utils").livereloadSnippet
#mountFolder = (connect, dir) ->
# connect.static require("path").resolve(dir)
# # Globbing
# for performance reasons we're only matching one level down:
# 'test/spec/{,*/}*.js'
View ProcessWire reset password
pasting this temporarily into any one of your templates, and then viewing a page that uses the template
<?php
$u = $users->get('admin'); // or whatever your username is
$u->of(false);
$u->pass = 'your-new-password';
$u->save();
@jmartsch
jmartsch / home.php
Last active Oct 11, 2018
ProcessWire: Output an admin template on the frontend
View home.php
<?php namespace ProcessWire;
$uikit = $this->modules->get('AdminThemeUikit');
$uikit->init();
?>
<html>
<link rel="stylesheet" href="<?php echo $uikit->getUikitCSS() ?>"/>
<head>
</head>
<body>
View email.html
<!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" lang="en" xml:lang="en" style="background: #f7f6f1;">
<head>
<link rel="stylesheet" type="text/css" href="css/app.css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width">
<title>Newsletter 04-2018</title>
<style type="text/css">@media only screen {html{min-height: 100%;
background: #f7f6f1;}}@media only screen and (max-width: 628px) {.small-text-center{text-align: center !important;}.small-text-left{text-align: left !important;}}a:hover,a:active{color: #a0080d;}a:visited{color: #d10a11;}@media only screen and (max-width: 628px) {table.body img{width: auto;