Skip to content

Instantly share code, notes, and snippets.

View matt-bailey's full-sized avatar

Matt Bailey matt-bailey

  • GPMD
  • London, UK
View GitHub Profile
@matt-bailey
matt-bailey / meganav-markup.md
Created June 8, 2017 12:01
Instructions on the markup to use in our Magento 2 Meganav module

Meganav Markup

Our Meganav module requires some simple markup in order for it to function correctly.

Here is a basic example showing a single column of links:

<div>

    <!-- Heading with link and toggle -->
@matt-bailey
matt-bailey / aliases.js
Last active May 25, 2017 16:55
Example aliases file for load-grunt-config in our Magento 2 setup
/* global module */
/* File location: dev/tools/grunt/configs/aliases.js */
/* Usage: https://github.com/firstandthird/load-grunt-config#aliases */
'use strict';
module.exports = {
default: [],
@matt-bailey
matt-bailey / env.php
Created May 18, 2017 13:50
Example Magento 2 env.php file
<?php
return array (
'backend' =>
array (
'frontName' => 'admin',
),
'crypt' =>
array (
'key' => '9af38453afda96c7862c7d10eb493ba4',
),
@matt-bailey
matt-bailey / customer_account.xml
Last active July 3, 2023 23:10
Disable My Account sidebar links in Magento 2
<?xml version="1.0"?>
<!--
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<!-- Remove unwanted account navigation links -->
/**
* drawer.js
*/
define(['jquery', 'm2base'], function($, m2base) {
'use strict';
var Drawer = window.M2base.Drawer = {
elements: {
@matt-bailey
matt-bailey / m2-setup-install.sh
Last active October 7, 2018 23:15
Example Magento 2 setup:install command
php bin/magento setup:install --base-url=http://mysite.dev --db-host=localhost --db-name=mysite --db-user=root --admin-firstname=Magento --admin-lastname=User --admin-email=my@email.com --admin-user=admin --admin-password=password123 --language=en_GB --currency=GBP --timezone=Europe/London --use-rewrites=1 --backend-frontname=admin
@matt-bailey
matt-bailey / package.json
Created May 8, 2015 12:32
Bare bones package.json file
{
"name": "[project-name]",
"description": "[project-description]",
"version": "1.0.0"
}
@matt-bailey
matt-bailey / Gruntfile.js
Created May 8, 2015 12:26
SC5 Style Guide Generator Grunt usage instructions
module.exports = function(grunt) {
var gulp = require('gulp'),
styleguide = require('sc5-styleguide');
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
@matt-bailey
matt-bailey / magento-notifications.html
Last active September 14, 2017 07:43
Magento notification markup
<ul class="messages">
<li class="error-msg">
<ul>
<li><span>Error Message</span></li>
</ul>
</li>
<li class="success-msg">
<ul>
<li><span>Success Message</span></li>
</ul>
@matt-bailey
matt-bailey / style-guide.html
Last active August 29, 2015 14:18
Basic HTML markup for use in style guides - it contains some of the standard BEM style class naming conventions I use.
<h1>Style Guide</h1>
<hr>
<h2>Display Headings</h2>
<h1 class="font-family--tradegothic">Display Heading 1<br>
<span class="sub-heading">Display Heading 1 Sub-heading</span></h1>
<h2 class="font-family--tradegothic">Display Heading 2<br>
<span class="sub-heading">Display Heading 2 Sub-heading</span></h2>