GithubHelp home page GithubHelp logo

hellofromtonya / catfish Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 13 KB

Catfish - Sticky Footer Plugin

Home Page: http://hellofromtonya.com

License: Other

JavaScript 14.39% PHP 68.31% CSS 17.30%

catfish's Introduction

Fulcrum Catfish Plugin

There are several tools that each website needs such as social share buttons and quick links. This plugin creates a catfish, i.e. a sticky footer toolbar. When a viewer visits a single page and scrolls down (meaning s/he is reading your article), the catfish will slide up providing the features s/he needs to quickly navigate and share the article.

This is a WordPress plugin and Fulcrum addon.

Features

  1. Adds a sticky footer to the bottom right corner of the website
  2. Facebook and Twitter social share links (configurable in the config file)
  3. Quick link to the comments form
  4. Quick link to read the comments
  5. Quick link to scroll to the top of the page

Styling

Oh silly, styling never goes in a plugin. Nope, you want to style this baby up in your theme. However, a suggested starting point is provided in the assets/sass folder. Simply copy the catfish folder into your theme and then import the index file into your style.scss file like so: @import "catfish/index";. You can see an example of how I did it in my Hello theme.

Dependencies

Yup there are dependencies that you will need to have on your local development machine and in your project. Let's walk through them.

  1. Genesis is my theming framework of choice. This plugin is using Genesis specific event hooks and will not work without Genesis. However, you can modify the event hooks to fit your theme (see below for details).
  2. Fulcrum is my custom core plugin, as it powers all of my sites. It is the central library to keep my sites clean, DRY, and modular.

Installation

  1. Install the Fulcrum, the central custom repository plugin for WordPress.
  2. Then you can install this plugin.

Installation from GitHub is as simple as cloning the repo onto your local machine. To clone the repo, do the following:

  1. Using PhpStorm, open your project and navigate to wp-content/plugins/. (Or open terminal and navigate there).
  2. Then type: git clone https://github.com/hellofromtonya/catfish.
  3. Copy the Sass files into your theme's Sass folder and add it to your main style via @import "catfish/index";. Change whatever you want for the styling to blend with your theme.

Configuration

Everything is configurable using the configuration files found in the config folder.

Using Without Genesis

If you are not using the Genesis framework, then you will need to modify the event hooks in order for the catfish to work. Follow these instructions:

  1. Initializing: The first step is to initialize the plugin which determines if this is a single article (post or custom post type) and then sets the properties and main hook. You will need to modify the event name here to one that is within the Loop. Why? Because the plugin needs to grab the title and permalink.
  2. Rendering: The catfish HTML markup is rendered into the footer. You will need to assign a new footer enabled event here. You could use wp_footer instead.

Contributions

All feedback, bug reports, and pull requests are welcome.

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.