npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

user-profile-layout

v1.0.1

Published

<p align="center"> <img src="https://travis-ci.org/JoseJuan81/UserProfileLayout.svg?branch=dev"> <img alt="GitHub" src="https://img.shields.io/github/license/josejuan81/UserProfileLayout"> <img alt="npm" src="https://img.shields.io/npm/dm/user-profile-

Downloads

47

Readme

user-profile-layout

Demo

https://codepen.io/JOSEJUAN/pen/eYpzmKX https://codesandbox.io/s/interesting-gagarin-lcu8k

screen greater to 700px

screen lower to 700px

Install

npm i user-profile-layout

Vue Use

Global use

import { install } from 'user-profile-layout';

Vue.use(install);

Local Use

my-file.vue

import UserProfileLayout from 'user-profile-layout';

export default {
	name: 'My-component',
	components: {
		UserProfileLayout,
	}
}

Example

<template>
	<div class="container">
		<div class="activator">
			<button data-cy="activator" type="button" @click="show = true">Menu</button>
		</div>
		<UserProfileLayout
			class="profile"
			:show="show"
			:break-point="700"
			data-cy="user-profile-layout"
		>
			<template v-slot:aside>
				<ul class="menu-web" data-cy="menu-web">
					<li
						v-for="opt in menu"
						:key="opt.title"
					>
						<button type="button" @click="currentOption = opt">{{opt.title}}</button>
					</li>
				</ul>
			</template>
			<template v-slot:main-content>
				<div data-cy="main-content-container">
					<h1>{{currentOption.text}}</h1>
				</div>
			</template>
			<template v-slot:menu-movil>
				<div class="wrapper-menu-movil" data-cy="menu-movil">
					<button
						class="go-back"
						type="button"
						@click="show = false"
					>regresar</button>
					<ul class="movil">
						<li
						v-for="opt in menu"
						:key="opt.title"
						>
							<button type="button" @click="currentOption = opt">{{opt.title}}</button>
						</li>
					</ul>
				</div>
			</template>
		</UserProfileLayout>
	</div>
</template>

<script>
import UserProfileLayout from './UserProfileLayout.vue';

function data() {
	return {
		currentOption: {},
		menu: [
			{ title: 'Mis Datos Personales', text: 'Estos son mis datos personales' },
			{ title: 'Mis Pedidos', text: 'Tengo 1022 pedidos realizados' },
			{ title: 'Mis Direcciones', text: 'Estas son mis direcciones de envio' },
			{ title: 'Mis Gastos', text: 'Hasta la fecha he gastado 4577' },
			{ title: 'Mis Favoritos', text: 'Estos son mis productos favoritos' },
			{ title: 'Configuracion de cuenta', text: 'Aqui configuro mi cuenta' },
		],
		show: false,
	};
}

export default {
	name: 'HelloWorld',
	components: {
		UserProfileLayout,
	},
	data,
	props: {
		msg: String,
	},
};
</script>
<style scoped lang="scss">
	.container {
		margin: auto;
		max-width: 102.4rem;
		padding-top: 10rem;
	}

	.activator {
		background-color: gray;
		border-radius: 50%;
		height: 50px;
		left: 25px;
		position: absolute;
		top: 37px;
		width: 50px;

		button {
			border: none;
			border-radius: 50%;
			height: 100%;
			width: 100%;
		}

		@media (min-width: 701px) {
			display: none;
		}
	}

	.profile {
		height: 100%;
		width: 100%;
	}

	.menu-web, .movil {
		padding: 0.5rem 0;
		margin: 0;
		text-align: left;

		li {
			list-style: none;

			button {
				background-color: white;
				border: 0.2rem solid grey;
				border-bottom: 0;
				height: 4rem;
				padding: 1rem 0.5rem;
				width: 100%;
				white-space: nowrap;
			}
		}

		li:last-child {

			button {
				border-bottom: 0.2rem solid grey;
			}
		}
	}

	.wrapper-menu-movil {
		background-color: #f0efef;
		box-sizing: border-box;
		height: calc(100vh - 2rem);
		padding: 1rem 1.5rem;
		width: 31rem;

		.go-back {
			background-color: #8cba51;
			border: none;
			color: white;
			padding: 1rem;
			width: 100%;
		}

		.movil {
			height: 100%;
		}
	}

</style>

Props

name | description ---|--- show | prop used to hide and show movil menu. This prop only shows the movil menu if the screen's width is lower to break-point. break-point | prop used to define width screen. In this point the design change from movil to web or web to movil. By default is 768px.

Slot

name | use :-- | :-- aside | This is the container used for web menu main-container | This is the container used for the principal information menu-movil | This is the container used for the movil menu.