Skip to content

Instantly share code, notes, and snippets.

@mjau-mjau
mjau-mjau / custom fonts with veinjs
Created October 5, 2014 15:56
Custom font styles in X3 with veinjs
;(function ($, window, document, undefined) {
"use strict";
var cssEl = {
'body' : 'body, .button, h1, h2, h3, h4, .h5, h6',
'logo' : '.nav .logo',
'menu' : '.menu',
'topbar' : 'body[class*="topbar"] .menu > li > a',
'sidebar' : 'body[class*="sidebar"] .menu > li > a',
'header' : '.main h1,.main h2,.main h3,.main h4,.main h5,.main h6',
@mjau-mjau
mjau-mjau / x3.banner-rotate.css
Last active August 29, 2015 14:10
X3 Banner Rotate
.page-banner {
text-align: center;
}
.page-banner img {
opacity: 1;
width: auto;
}
@mjau-mjau
mjau-mjau / page.yml
Created February 26, 2015 04:10
mjau-mjau.com/about
title: About mjau-mjau
label: About
description: Information about website mjau-mjau.com and author Karl Ward.
layout: narrower text-center
context: items:title,content
gallery: hide
content: |
---
<div class='row text-left'>
<div class='medium-6 columns'>
@mjau-mjau
mjau-mjau / .htaccess
Last active May 30, 2017 08:27
Apache deny access to directory
# Deny access to all files in folder
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>
@mjau-mjau
mjau-mjau / hiawatha.conf
Created June 28, 2017 12:46
Hiawatha Server configuration for X3
UrlToolkit {
ToolkitID = imagevuex3test
# Deny access to config and _cache folder
Match ^/test/(config|_cache) DenyAccess
# No rewrite for existing files
RequestURI isfile Return
# Rewrite any calls to html|json|xml|atom|rss if a folder matching * exists
@mjau-mjau
mjau-mjau / get_domain.php
Last active March 17, 2018 15:02
PHP get primary domain
<?php
function get_domain($host){
$myhost = strtolower(trim($host));
$count = substr_count($myhost, '.');
// www.(domain.com) || (domain.co.uk) || sub.(domain.com)
if($count === 2){
if(strlen(explode('.', $myhost)[1]) > 3) $myhost = explode('.', $myhost, 2)[1];
<!-- INTRO -->
<div class="index-intro">
<div class='index-intro-text'>
<h1>The Ultimate Photo Gallery Website</h1>
<h2>X3 is a complete photo gallery website for photographers and artists. Designed to look amazing on all devices, X3 comes loaded with features!</h2>
</div>
<div class="index-intro-image">
<picture>
<source srcset="{{files}}/images/x3-photo-gallery.webp 1x, {{files}}/images/x3-photo-gallery-2x.webp 2x" media="(max-width: 535px)" type="image/webp">
@mjau-mjau
mjau-mjau / lighttpd.conf
Created April 2, 2017 11:28
X3 Lighttp config
# Rewrite any calls to html|json|xml|atom|rss if a folder matching * exists
url.rewrite-if-not-file = (
"(.+)\.(html|json|xml|atom|rss)$" => "$1/"
)
# Rewrite any calls to /render to the X3 image resizer
url.rewrite-once = (
"^render/." => "app/parsers/slir/"
)
@mjau-mjau
mjau-mjau / .htaccess
Last active May 24, 2020 12:07
X3 .htaccess file for Apache with only required rules
# ---------------------------------------------------------------------------
# X3 REQUIRED
# Below rewrite rules are strictly required by X3 for pages to work properly.
# ---------------------------------------------------------------------------
<IfModule mod_rewrite.c>
# RewriteEngine enabled
RewriteEngine on
@mjau-mjau
mjau-mjau / .htaccess
Last active May 24, 2020 12:09
X3 Default .htaccess file for Apache server
# ---------------------------------------------------------------------------
# X3 REQUIRED
# Below rewrite rules are strictly required by X3 for pages to work properly.
# Add custom rules inside "# custom rules start" and "# custom rules end" tags.
# ---------------------------------------------------------------------------
<IfModule mod_rewrite.c>
# RewriteEngine enabled