Skip to content

Instantly share code, notes, and snippets.

View muchirijane's full-sized avatar
👩‍💻
Learning front-end development

Jane Tracy Muthoni muchirijane

👩‍💻
Learning front-end development
View GitHub Profile
@muchirijane
muchirijane / stop-video.js
Created June 14, 2022 11:00 — forked from cferdinandi/stop-video.js
A simple method to stop YouTube, Vimeo, and HTML5 videos from playing.
/**
* Stop an iframe or HTML5 <video> from playing
* @param {Element} element The element that contains the video
*/
var stopVideo = function ( element ) {
var iframe = element.querySelector( 'iframe');
var video = element.querySelector( 'video' );
if ( iframe ) {
var iframeSrc = iframe.src;
iframe.src = iframeSrc;
@muchirijane
muchirijane / Balsamiq Mockups 3.5.17
Created May 21, 2022 09:13 — forked from kdamsmt/Balsamiq Mockups 3.5.17
Balsamiq Mockups 3.5.17 for Desktop full license key (Tested) or Balsamiq Wireframes for Desktop
Balsamiq Wireframes for Desktop full license key free
This old name is Balsamiq Mockups now the company changing the name to Balsamiq Wireframes for Desktop insteed
HOW TO:
First download softwere here: https://balsamiq.com/wireframes/desktop/
Install and follow screen direction
Use below serial:
=====================================================================================
@muchirijane
muchirijane / gulpfile.js file
Created December 12, 2021 21:47
Adding sass-gulp for your project.
install gulp to your project.
npm install sass gulp-sass --save-dev
//create a gulpfile.js
const { src, dest, watch, series } = require("gulp");
const sass = require("gulp-sass")(require("sass"));
@muchirijane
muchirijane / sass
Last active December 14, 2021 18:34
Sass file boilerplate for the index.scss
index.scss
// configuration and helpers (abstracts) variables, mixins and functions
@import "abstracts/variables";
//base styles (reset, font, typography, utilities etc)
@import "base/base";
//colours
@muchirijane
muchirijane / Responsive Drawer from MUI
Created November 27, 2021 11:33
A quick code template for a responsive drawer in material UI
import {useState} from 'react';
import { makeStyles, useTheme } from '@material-ui/core/styles';
import Drawer from "@material-ui/core/Drawer";
import Typography from "@material-ui/core/Typography";
import { useHistory, useLocation } from "react-router-dom";
import List from "@material-ui/core/List";
import ListItem from "@material-ui/core/ListItem";
import ListItemIcon from "@material-ui/core/ListItemIcon";
import ListItemText from "@material-ui/core/ListItemText";
@muchirijane
muchirijane / Prettier config
Created October 29, 2021 09:47
How to config your file with prettier
1) install prettier
npm install --save-dev --save-exact prettier
2) Add prettier formart in your package.json file under scripts
"scripts": {
"prettier-format": "npx prettier --write .",
"prettier-check": "npx prettier --check ."
},
import styled from 'styled-components';
import {BiCheck} from 'react-icons/bi';
import {Link} from 'react-router-dom';
export const MealsContainer = styled.section`
display: flex;
align-items: center;
`;
export const MealsWrapper = styled.div`
import styled from 'styled-components';
import {HiUsers} from 'react-icons/hi';
import {Link} from 'react-router-dom';
import {Container} from '../../Globalstyles';
export const RecipeWrapper = styled.section`
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
import styled from 'styled-components';
import PizzaBg from '../../images/hero-bg.png';
export const WelcomeContainer = styled.section`
display: flex;
justify-content: center;
align-items: center;
width: 100%;
margin-top: 7rem;
`;