• Stars
    star
    226
  • Rank 176,514 (Top 4 %)
  • Language
    JavaScript
  • Created almost 9 years ago
  • Updated about 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A library to generate simple, stylish, responsive, and easily customizable grid-based portfolios.

Gridfolio

gridfolio on NPM

A library to generate simple, stylish, responsive, and easily customizable grid-based portfolios.

DEMO: http://christinecha.github.io/gridfolio/

Gridfolio Demo Gif

  1. Get Started
  2. Usage
  3. Special Features
  4. License

Get Started

The easiest way to start is to just clone the repo. Then, of course, you can pick and choose which files you want to use.

$ git clone https://github.com/christinecha/gridfolio.git

Next, include the script and the base CSS in your HTML.

  <link href="/your_path/dist/gridfolio.css" rel="stylesheet" type="text/css">
  <script src="/your_path/dist/gridfolio.js"></script>

Alternatively, you can install via npm.

$ npm i --save gridfolio

Quick Start: start from the boilerplate files here: https://github.com/christinecha/gridfolio/tree/master/boilerplate

Usage

var gridfolio = new Gridfolio({

  // This is the selector string of the DOM element you want to dump
  // Gridfolio into. You can also just use 'body'.
  container: '#gridfolio--container',

  // Here are all your configurable options
  options: {

    // Fancy! Adds an 'is-animated' class to blocks as they come into view.
    // I've given you a basic fade/slide-in effect, but this is set up so
    // you can add whatever CSS craziness you want.
    animateIntoView: true,

    // Breakpoints are mobile first.
    breakpoints: [

      // That means the grid is 1 block wide when the broswer's width
      // ranges from 0px wide to 500px wide
      { minWidth: 0, gridWidth: 1 },
      // 3 blocks wide from 500px to 900px browser width
      { minWidth: 500, gridWidth: 2 },
      // and so on
      { minWidth: 900, gridWidth: 3 },
      // and so forth.
      { minWidth: 1300, gridWidth: 4 }
    ],

    // Want the font sizes to scale with the browser? Yeah, we fabulous.
    scaleFonts: true,

    // Pop in a theme! All this does is add [data-themee='warhol'] to
    // your .gridfolio element, so it WON'T HAVE AN EFFECT unless you also
    // include the corresponding CSS file. See the 'Special Features' section.
    theme: 'warhol'
  },

  // Okay, this is where your actual data lives. All fields are optional.
  blocks: [
    {
      title: 'Project Title',
      description: 'My project is awesome.',
      url: 'http://christinecha.github.io/gridfolio/',
      tags: ['html', 'css', 'javascript'],

      // Whatever you enter here gets tacked on to the 'gridfolio--block' classname.
      classname: 'any-additional-classes-this-block-should-have'
    },
    {
      title: 'Second Project'
      // etc., etc.
    }
  ]
})

Special Features

Textures

There's a small collection of images and colors in the file themes/gridfolio-textures.css. You must include this file if you're using certain themes (like warhol and classic). It's just setting background imagery.

Themes

Import whatever CSS theme file you want (after the base one, of course), and then just tack on the theme in your Gridfolio config.

<head>
  <link href="/your_path/dist/gridfolio.css" rel="stylesheet" type="text/css">

  /* ---------------------- Import the relevant theme CSS here --------------------- */
  <link href="/your_path/themes/gridfolio-warhol.css" rel="stylesheet" type="text/css">
  /* ------------------------------------------------------------------------------- */

</head>

<body>
  // Your HTML stuff
  <script src="/your_path/dist/gridfolio.js"></script>

  <script>
    var gridfolio = new Gridfolio({
      container: 'body',
      options: {
        animateIntoView: true,
        breakpoints: [ /* your breakpoints */ ],
        scaleFonts: true,

        /* ---- Declare your theme here --- */
        // This string gets passed to .gridfolio as an attribute, called 'data-theme'.

        theme: 'warhol'
        /* -------------------------------- */
      },
      blocks: [ /* your data */ ]
    })
  </script>
</body>

If you look in gridfolio-warhol.css, you'll see we're using that tag to set styles. This means that you can actually set 'theme' to whatever name you want, and then implement your own theme with custom CSS suuuuuper easily.

<3 - CHA


License

The MIT License (MIT) Copyright (c) 2016 Christine Cha

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

choreographer-js

A simple library to take care of complicated animations.
JavaScript
1,982
star
2

clickbaiter

Clickbait Generator built in NodeJS / Javascript (ReactJS) using the FB SDK + Flickr API
JavaScript
50
star
3

web-sparkle

A toolbox of frontend web development modules to add some ✨ to your website.
JavaScript
48
star
4

3d-css-cubes

A rotating grid of 3d (via CSS) cubes.
JavaScript
35
star
5

circlematch

Slider puzzle built with React.js + Redux.
JavaScript
6
star
6

league-bot-rl

A Discord bot to help manage Rocket League leaderboards within your server.
JavaScript
6
star
7

poopy-city

A realtime map of who's pooping... and how it's going for them.
JavaScript
5
star
8

can-i-go-there

Check the visa requirements for your passport to any destination country.
JavaScript
5
star
9

tastebud

JavaScript
4
star
10

birch

Collect your thoughts with a simple, beautiful notepad in each new tab. (Chrome Extension)
JavaScript
4
star
11

portfolio

My personal portfolio website.
Less
3
star
12

collaborativewebsite

A realtime, publicly editable, collaborative website.
JavaScript
2
star
13

artfolio

Painting portfolio. Using Gridfolio.
JavaScript
2
star
14

design-fundamentals

A little kit I'm using to demonstrate design fundamentals. Specifically geared towards programmers, but feel free to use it as you wish!
HTML
2
star
15

nunjucks-less-webpack-gulp-boilerplate

A thorough but minimal boilerplate front-end setup.
CSS
2
star
16

office-party

TypeScript
1
star
17

nycjazzapp

Find jazz shows in NYC.
JavaScript
1
star
18

firebase-node-boilerplate

JavaScript
1
star
19

ex-lyrics

Game!
JavaScript
1
star
20

nycjazz-react-native

JavaScript
1
star
21

rc-presentations

Presentations agenda app for Recurse Center!
JavaScript
1
star
22

minimeeny

Speech recognition meets custom cartoons.
JavaScript
1
star
23

talks

1
star
24

seasalt

Minimal seasoning (read: styles) for your next application.
CSS
1
star
25

connect-the-dots

Simple JS / JQuery app for connecting dots.
JavaScript
1
star
26

react-blog

A simple blog built in ReactJS.
JavaScript
1
star
27

ttfortwo

SCSS
1
star
28

april-showers

Rain.
JavaScript
1
star
29

slinkydraw

Draw slinkies. Kind of.
HTML
1
star
30

dibbl

On-demand micro mentoring platform.
JavaScript
1
star