Git Product home page Git Product logo

sage_customisations's Introduction

sage_customisations

Roots/Sage Customisations

Add Hamburgers menu:

yarn add hamburgers

Add following to common.js:

  init() {
    // JavaScript to be fired on all pages
    $('.hamburger').click(function() {
      $(this).toggleClass('is-active');
    });
  },
  finalize() {
     // JavaScript to be fired on all pages, after page specific JS is fired
  },
};

Then follow class names and styling info here - https://jonsuh.com/hamburgers/

Add rfs responsive text resizing:

yarn add rfs

Add animate.css (jquery might be better option if complex animations required but this is more lightweight:

yarn add animate.css

Add fontawesome the right way: Load the core files:

yarn add fortawesome/fontawesome-svg-core

Load whichever library of icons you want/all of them:

yarn add @fortawesome/free-solid-svg-icons
yarn add @fortawesome/free-regular-svg-icons
yarn add @fortawesome/free-brands-svg-icons

In main.js: // import then needed Font Awesome functionality

import { library, dom } from '@fortawesome/fontawesome-svg-core';

// import the Facebook and Twitter icons

import { faFacebook, faTwitter } from '@fortawesome/free-brands-svg-icons';

// add the imported icons to the library

library.add(faFacebook, faTwitter);

// tell FontAwesome to watch the DOM and add the SVGs when it detects icon markup

dom.watch();

Lightweight facebook and liknedin share button on any post:

<a href="https://www.facebook.com/sharer.php?u={{ get_permalink() }}" target="_blank" style="color: #636363;"><i class="fab fa-facebook"></i></a>

<a href="https://www.linkedin.com/shareArticle?mini=true&url={{ get_permalink() }}&title={{ get_the_title() }}" target="_blank" style="color: #636363;"><i class="fab fa-linkedin"></i></a>

Add Google fonts: In setup.php right under namespace App > use ...... :

function google_fonts_url()
{
    return 'https://fonts.googleapis.com/css?family=' . urlencode('Montserrat:400,600|Roboto:300,400&display=swap');
}

in setup.php right above the wp_enqueue_style('sage/main.css', line under add_action('wp_enqueue_scripts', function:

wp_enqueue_style('google/fonts', \App\google_fonts_url(), false, null);

sage_customisations's People

Contributors

mattrey avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.