Code Monkey home page Code Monkey logo

quasar-greensock-portfolio's Introduction

titulo

Quasar GreenSock Portfolio

Building a dynamic portfolio with Quasar and GreenSock.

Objective

This projects is a sample of a dynamic portfolio website whose images are animated by GreenSock plugin. You can add as much images as you want and change the portfolio structure to display them. The demo can be tested at quasar-greensock-portfolio.surge.sh.

How to run this project

Install the dependencies

npm install

Run the app

quasar dev

The main screen shows the portfolio grid. The black borders are merely for visualization of each portfolio block which must have an image, the company's name and the service provided by it. Gifs are accepted as images as well.

quasar01

To add a new portfolio, you must open the Dashboard screen by clicking on the dashboard button at the top right corner. The Dashboard screen contains a gallery with all the portfolios listed horizontally and a form that allows you to insert, update or remove a portfolio.

quasar02

Creating a portfolio.

quasar03

Portfolio listed in the gallery.

quasar04

The main screen updates automatically when the portfolio list changes by putting each image in a block accordingly to its order.

quasar05

When the mouse is over an image, the animation effect occurs.

quasar06

After adding lots of images, this is the result. The structure was designed to fit 7 portfolios.

quasar07

Everything is saved in the Vuex store, so it will be lost once you reload the page.

How it works

The "/src/boot/gsap.js" file injects the GreenSock plugin into the Vue prototype.

code01

Inside the "/src/components/MyPortfolio.vue" file, jQuery is used to listen to each portfolio's hover event.

code02

The GreenSock plugin is responsible for the animation

code02

The structure of each portfolio block is described at the "/src/pages/Index.vue".

code03

To modify it, it's only necessary to change the "col" and "height" props of each MyPortfolio component identified by the "index" props. For example, considering that the "imgHeight" variable has the value 50, to make 3 blocks with the same height in the first row, the structure would be like this:

code04_1

The result would be this:

code04_2

Now, if the middle block should be twice the size of the other blocks, the structure would be like this:

code05_1

If the "imgHeight" had the value 30, The result would be like this:

code05_2

It's possible to insert a "MyPortfolio" component inside another one. The inner component should have the "col" props equals to 12 and use the "subPortfolio" class to fix some margin issues. For example:

code06_1

And the result:

code06_2

Conclusion

The GreenSock plugin has LOTS of features but it was used only a few in this project.

The coolest thing we have done was to easily change the portfolio grid structure.

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.