Build home page

This commit is contained in:
khatabwedaa 2020-05-05 11:40:33 +02:00
parent 93974cd92c
commit 8eb56941ae
7 changed files with 35 additions and 49 deletions

View file

@ -1,5 +1,5 @@
<template>
<div class="bg-gray-100 font-inter" id="app">
<div class="font-roboto" id="app">
<Header></Header>
<master-component></master-component>
</div>

View file

@ -1,4 +1,6 @@
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,900&display=swap');
@import url('https://fonts.googleapis.com/css?family=Tajawal:300,400,500,700&display=swap&subset=arabic');
@tailwind base;

View file

@ -1,6 +1,6 @@
<template>
<div class="relative rounded overflow-hidden">
<pre><code class="px-12 py-8 rounded-md overflow-x-scroll overflow-hidden">{{ code }}</code></pre>
<pre><code class="px-8 py-6 rounded-md overflow-x-scroll overflow-hidden">{{ code }}</code></pre>
<div class="absolute right-0 top-0">
<button class="px-3 py-2 text-gray-600 hover:text-gray-400 focus:outline-none" v-clipboard:copy="code">
<svg fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" class="w-6 h-6">

View file

@ -1,31 +1,25 @@
<template>
<div class="min-h-screen container mx-auto px-6">
<div class="container mx-auto px-6 py-16 text-center">
<h1 class="text-2xl md:text-3xl text-gray-800">Discover new components. Build amazing things 🔥</h1>
<input class="w-11/12 mt-6 px-6 py-4 bg-gray-200 border border-gray-300 text-gray-800 rounded-lg focus:outline-none focus:bg-white placeholder-gray-700"
type="text" placeholder="search.." v-model="searchText">
<div class="py-16 text-center">
<h1 class="text-xl md:text-2xl text-gray-800 font-medium">Discover new components. Build amazing things 🔥</h1>
<div class="max-w-2xl mx-auto">
<div>
<input class="w-full bg-white mt-6 px-6 py-4 border border-gray-300 text-gray-800 rounded-lg focus:outline-none focus:bg-gray-100 placeholder-gray-700" type="text" placeholder="Search.." v-model="searchText">
</div>
<div class="flex items-center mt-5 flex justify-start">
<span class="text-gray-700">Categories : </span>
<a @click="searchText = ''" class="ml-1 text-gray-700 hover:text-gray-600 cursor-pointer font-light hover:underline">All</a>
<span v-for="category in categories" :key="category.name">
<a @click="searchText = category.name" class="ml-2 text-gray-700 hover:text-gray-600 cursor-pointer font-light hover:underline">{{ category.name }}</a>
</span>
</div>
</div>
</div>
<div class="flex">
<div class="hidden md:w-64 md:block">
<h2 class="text-gray-800 text-2xl font-semibold">Categories</h2>
<ul class="flex flex-col mt-4">
<li class="text-gray-600 hover:text-gray-800 cursor-pointer text-lg">All Components</li>
<li class="text-gray-600 hover:text-gray-800 cursor-pointer text-lg">Alerts</li>
<li class="text-gray-600 hover:text-gray-800 cursor-pointer text-lg">Cards</li>
<li class="text-gray-600 hover:text-gray-800 cursor-pointer text-lg">Forms</li>
<li class="text-gray-600 hover:text-gray-800 cursor-pointer text-lg">Layouts</li>
</ul>
</div>
<div class="w-full md:flex-1">
<div class="container mx-auto px-6">
<div class="pb-8" v-for="category in list" :key="category.name">
<h1 class="text-2xl text-gray-800 font-semibold mb-6" v-text="category.name"></h1>
<component v-for="component in category.components" :key="component.name" :is="component.name"
class="mt-8"></component>
</div>
</div>
<div class="w-full max-w-5xl mx-auto">
<div class="mb-16" v-for="category in list" :key="category.name">
<h1 class="text-2xl text-gray-800 font-semibold mb-6" v-text="category.name"></h1>
<component v-for="component in category.components" :key="component.name" :is="component.name" class="mb-10"></component>
</div>
</div>
</div>

View file

@ -2,25 +2,16 @@
<div class="border-b-4 border-blue-500">
<nav class="bg-gray-900">
<div class="container mx-auto px-6 py-4">
<div class="md:flex items-center justify-between">
<div class="flex justify-between items-center">
<a href="/" class="text-white text-xl font-bold md:text-2xl">
Meraki <span class="text-blue-400">UI</span>
</a>
<div class="flex justify-between items-center">
<a href="/" class="text-white text-xl font-bold md:text-2xl">
Meraki <span class="text-blue-400">UI</span>
</a>
<button type="button" class="block text-white hover:text-gray-500 focus:text-gray-500 focus:outline-none md:hidden">
<svg class="h-6 w-6 fill-current" viewBox="0 0 24 24">
<path d="M4 5h16a1 1 0 0 1 0 2H4a1 1 0 1 1 0-2zm0 6h16a1 1 0 0 1 0 2H4a1 1 0 0 1 0-2zm0 6h16a1 1 0 0 1 0 2H4a1 1 0 0 1 0-2z"/>
</svg>
</button>
</div>
<div class="flex flex-col hidden md:block md:items-center md:-mx-3">
<a class="my-1 text-white text-sm font-normal hover:text-blue-400 md:mx-3 md:my-0" href="#">
<svg class="h-6 w-6 inline fill-current" viewBox="0 0 30 30">
<path d="M15 1.875C7.75195 1.875 1.875 7.9043 1.875 15.334C1.875 21.2812 5.63672 26.3203 10.8516 28.1016C10.9247 28.1175 10.9994 28.1253 11.0742 28.125C11.5605 28.125 11.748 27.7676 11.748 27.457C11.748 27.1348 11.7363 26.291 11.7305 25.166C11.2963 25.2678 10.8522 25.3209 10.4062 25.3242C7.88086 25.3242 7.30664 23.3613 7.30664 23.3613C6.70898 21.8086 5.84766 21.3926 5.84766 21.3926C4.70508 20.5898 5.8418 20.5664 5.92969 20.5664H5.93555C7.25391 20.6836 7.94531 21.9609 7.94531 21.9609C8.60156 23.1094 9.48047 23.4316 10.2656 23.4316C10.7848 23.4213 11.2959 23.3015 11.7656 23.0801C11.8828 22.2129 12.2227 21.6211 12.5977 21.2812C9.68555 20.9414 6.62109 19.7871 6.62109 14.6309C6.62109 13.1602 7.13086 11.959 7.96875 11.0215C7.83398 10.6816 7.38281 9.31055 8.09766 7.45898C8.19354 7.43604 8.29209 7.42619 8.39062 7.42969C8.86523 7.42969 9.9375 7.61133 11.707 8.8418C13.8572 8.24022 16.1311 8.24022 18.2812 8.8418C20.0508 7.61133 21.123 7.42969 21.5977 7.42969C21.6962 7.42619 21.7947 7.43604 21.8906 7.45898C22.6055 9.31055 22.1543 10.6816 22.0195 11.0215C22.8574 11.9648 23.3672 13.166 23.3672 14.6309C23.3672 19.7988 20.2969 20.9355 17.373 21.2695C17.8418 21.6855 18.2637 22.5059 18.2637 23.7598C18.2637 25.5586 18.2461 27.0117 18.2461 27.4512C18.2461 27.7676 18.4277 28.125 18.9141 28.125C18.9928 28.1253 19.0713 28.1175 19.1484 28.1016C24.3691 26.3203 28.125 21.2754 28.125 15.334C28.125 7.9043 22.248 1.875 15 1.875Z"/>
</svg>
</a>
</div>
<a class="my-1 text-white text-sm font-normal hover:text-blue-400 md:mx-3 md:my-0" href="https://github.com/merakiui" target="_blank">
<svg class="h-6 w-6 inline fill-current" viewBox="0 0 30 30">
<path d="M15 1.875C7.75195 1.875 1.875 7.9043 1.875 15.334C1.875 21.2812 5.63672 26.3203 10.8516 28.1016C10.9247 28.1175 10.9994 28.1253 11.0742 28.125C11.5605 28.125 11.748 27.7676 11.748 27.457C11.748 27.1348 11.7363 26.291 11.7305 25.166C11.2963 25.2678 10.8522 25.3209 10.4062 25.3242C7.88086 25.3242 7.30664 23.3613 7.30664 23.3613C6.70898 21.8086 5.84766 21.3926 5.84766 21.3926C4.70508 20.5898 5.8418 20.5664 5.92969 20.5664H5.93555C7.25391 20.6836 7.94531 21.9609 7.94531 21.9609C8.60156 23.1094 9.48047 23.4316 10.2656 23.4316C10.7848 23.4213 11.2959 23.3015 11.7656 23.0801C11.8828 22.2129 12.2227 21.6211 12.5977 21.2812C9.68555 20.9414 6.62109 19.7871 6.62109 14.6309C6.62109 13.1602 7.13086 11.959 7.96875 11.0215C7.83398 10.6816 7.38281 9.31055 8.09766 7.45898C8.19354 7.43604 8.29209 7.42619 8.39062 7.42969C8.86523 7.42969 9.9375 7.61133 11.707 8.8418C13.8572 8.24022 16.1311 8.24022 18.2812 8.8418C20.0508 7.61133 21.123 7.42969 21.5977 7.42969C21.6962 7.42619 21.7947 7.43604 21.8906 7.45898C22.6055 9.31055 22.1543 10.6816 22.0195 11.0215C22.8574 11.9648 23.3672 13.166 23.3672 14.6309C23.3672 19.7988 20.2969 20.9355 17.373 21.2695C17.8418 21.6855 18.2637 22.5059 18.2637 23.7598C18.2637 25.5586 18.2461 27.0117 18.2461 27.4512C18.2461 27.7676 18.4277 28.125 18.9141 28.125C18.9928 28.1253 19.0713 28.1175 19.1484 28.1016C24.3691 26.3203 28.125 21.2754 28.125 15.334C28.125 7.9043 22.248 1.875 15 1.875Z"/>
</svg>
</a>
</div>
</div>
</nav>

View file

@ -1,5 +1,5 @@
<template>
<div class="bg-gray-300 border rounded-md overflow-hidden max-w-4xl">
<div class="bg-gray-300 border rounded-md overflow-hidden">
<div class="bg-white p-4 border-b">
<div class="flex justify-between items-center">
<div class="text-gray-700 font-medium text-sm md:text-lg">{{ name }}</div>
@ -20,7 +20,7 @@
</div>
</div>
<div class="flex justify-center items-center p-6">
<div class="flex justify-center items-center p-3 sm:p-6">
<div class="w-full">
<slot name="component"></slot>
</div>

View file

@ -5,9 +5,8 @@ module.exports = {
theme: {
extend: {
fontFamily: {
inter: [
'Inter'
],
inter: ['Inter'],
roboto: ['Roboto'],
},
spacing: {
'7': '1.75rem',