GithubHelp home page GithubHelp logo

inknsharps / react_portfolio Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 658 KB

A responsive, overly pastel web portfolio built with React and Tailwind CSS, and bundled with Snowpack.

License: MIT License

CSS 3.15% HTML 3.13% JavaScript 93.72%
javascript react tailwindcss snowpack nodejs

react_portfolio's Introduction

top-language license deployment-state

React Portfolio

banner

Description

A web portfolio built using React, Tailwind CSS, client side routing using React Router and bundled with Snowpack. Features include:

  • Home, About, Projects and Contact pages
  • Full responsiveness using CSS grid
  • A randomly generated, animation background built using React components, Tailwind CSS utility classes and CSS animations.

A deployed version is linked here.

Installation

To install and test this portfolio locally:

  1. Make sure you have Node.js installed on your local machine.
  2. Clone or download this repository, then navigate to the local folder in your CLI, run the following to install all dependencies:
    npm install
  1. Once the dependencies are installed, you can run the following to start a development server:
    npm start

Additional Configuration

Projects Configuration

Each project in the projects page of this web portfolio is an object, and are in a projects array, mapped over and added through a function in src/Project/ProjectContainer/ProjectContainer.jsx. You can substitute or add entries to the array with your own. Each property of the object must be a string.

// src/Project/ProjectContainer/ProjectContainer.jsx

import React from "react";
import ProjectCard from "../ProjectCard/ProjectCard";
import "./ProjectContainer.css";

const ProjectContainer = () => {
    const projects = [
        {
            projectName: "",        // Name
            projectDesc: "",        // Description
            alignImage: "",         // "left" or "right" to move the image of the project to be left or right aligned
            imageSrc: "",           // Image link
            githubLink: "",         // Github link
            deployLink: ""          // Deployed link
        },
        ...
    ]
    ...
};
...

PurgeCSS Safelist Configuration

Tailwind CSS includes a PurgeCSS version that works specifically with it. Since PurgeCSS only works when the utility classes are explictly stated, any dynamically created classes with concatenation or template literals will not be read (read more about this here). A workaround is to make a safelist and pass it into the PurgeCSS configuration. There is some class concatenation in this project, so we have to explicitly tell PurgeCSS to include certain classes. The safelist.js file contains some arrays of utility class names that get passed into the tailwind.config.js file.

// tailwind.config.js

const { colors, coordinates: { top, bottom, left, right }, dimensions: { height, width }, animations } = require("./safelist");

module.exports = {
    purge: {
        content: [
            "./src/**/*.{js,jsx,ts,tsx}",
            "./public/index.html"
        ],
        options: {
            safelist: [ ...colors, ...top, ...bottom, ...left, ...right, ...height, ...width, ...animations ]
        }
    },
...
}

Production Build

Run npm build if you want to build a production/optimized version of the application that is ready for deployment. Note that the application will not load without some live server or dev server running if you're trying to view it, so stick to the development version unless you want to deploy the application.

Images

home

projects

Issues and Suggestions

Feel free to open up a discussion on this repo's issues if you have any questions or concerns.

react_portfolio's People

Contributors

inknsharps avatar

Watchers

 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.