Panels, Modal, and NavBar done.

master
Zed A. Shaw 4 years ago
parent 70d6bc2e54
commit 70c0d85015
  1. 2
      public/build/bundle.css
  2. 2230
      public/build/bundle.js
  3. 2
      public/build/bundle.js.map
  4. 6
      public/code/Cards.html
  5. 14
      public/code/Google.html
  6. 30
      public/code/Instagram.html
  7. 35
      public/code/Modal.css
  8. 11
      public/code/Modal.html
  9. 34
      public/code/NavBar.css
  10. 30
      public/code/NavBar.html
  11. 53
      public/code/Panels.css
  12. 20
      public/code/Panels.html
  13. 10
      public/code/Pinterest.html
  14. 6
      public/code/Tiles.html
  15. 20
      public/code/Twitter.html
  16. 26
      public/code/XorAcademy.html
  17. 10
      public/code/XorAcademyWatch.html
  18. 10
      public/code/Youtube.html
  19. 32
      src/demos/Modal.svelte
  20. 76
      src/demos/NavBar.svelte
  21. 83
      src/demos/Panels.svelte
  22. 12
      src/demos/index.svelte
  23. 6
      src/routes.js
  24. 73
      src/thumbs/NavBar.svelte
  25. 81
      src/thumbs/Panels.svelte

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -1,5 +1,4 @@
<content> <card>
<card>
<top> <top>
<img src={ holder(16 * 30, 9 * 30) }/> <img src={ holder(16 * 30, 9 * 30) }/>
</top> </top>
@ -22,5 +21,4 @@
<Icon name="x-circle" color="var(--color-bg)" size="24"/> <Icon name="x-circle" color="var(--color-bg)" size="24"/>
</button> </button>
</bottom> </bottom>
</card> </card>
</content>

@ -1,5 +1,4 @@
<content> <header>
<header>
<nav> <nav>
<nav-left> <nav-left>
<a>About</a> <a>About</a>
@ -12,19 +11,18 @@
<li><button>Sign In</button></li> <li><button>Sign In</button></li>
</ul> </ul>
</nav> </nav>
</header> </header>
<figure> <figure>
<a href="/demos/google" use:link> <a href="/demos/google" use:link>
<img src="https://via.placeholder.com/500x200?text=Google+Doodle"> <img src="https://via.placeholder.com/500x200?text=Google+Doodle">
</a> </a>
</figure> </figure>
<search> <search>
<input type="text"> <input type="text">
<buttons> <buttons>
<button>Google Search</button> <button>Google Search</button>
<button>I'm Feeling Lucky</button> <button>I'm Feeling Lucky</button>
</buttons> </buttons>
</search> </search>
</content>

@ -1,5 +1,4 @@
<content> <header>
<header>
<nav> <nav>
<b><Icon name="instagram" color="var(--color-text)" /> Instagram</b> <b><Icon name="instagram" color="var(--color-text)" /> Instagram</b>
<input placeholder="Search"> <input placeholder="Search">
@ -8,14 +7,14 @@
<li><a>Sign Up</a></li> <li><a>Sign Up</a></li>
</ul> </ul>
</nav> </nav>
</header> </header>
<profile> <profile>
<figure> <figure>
<img alt="Zed's Face" src="https://via.placeholder.com/256x256?text=Zed's Face"> <img alt="Zed's Face" src="https://via.placeholder.com/256x256?text=Zed's Face">
</figure> </figure>
<info> <info>
<p> <p>
<b>zedshaw</b> <button>follow</button> <b>zedshaw</b> <button>follow</button>
</p> </p>
@ -28,18 +27,18 @@
<p>Painter in oil, watercolor, and pastel. I’m doing live streams of little paintings on Twitch:<br> <p>Painter in oil, watercolor, and pastel. I’m doing live streams of little paintings on Twitch:<br>
<a href="www.twitch.tv/zedashaw">www.twitch.tv/zedashaw</a> <a href="www.twitch.tv/zedashaw">www.twitch.tv/zedashaw</a>
</p> </p>
</info> </info>
</profile> </profile>
<pins> <pins>
{#each pins as pin} {#each pins as pin}
<figure> <figure>
<img alt="Stock photo" src="https://via.placeholder.com/82x82?text=Story"> <img alt="Stock photo" src="https://via.placeholder.com/82x82?text=Story">
</figure> </figure>
{/each} {/each}
</pins> </pins>
<tabs> <tabs>
<nav> <nav>
<ul> <ul>
<li><Icon name="grid" color="var(--color-text)" /> POSTS</li> <li><Icon name="grid" color="var(--color-text)" /> POSTS</li>
@ -48,14 +47,13 @@
<li><Icon name="user" color="var(--color-text)" /> TAGGED</li> <li><Icon name="user" color="var(--color-text)" /> TAGGED</li>
</ul> </ul>
</nav> </nav>
</tabs> </tabs>
<posts> <posts>
{#each posts as post} {#each posts as post}
<figure> <figure>
<img alt="Stock photo" src="https://via.placeholder.com/300x300?text=Post Image"> <img alt="Stock photo" src="https://via.placeholder.com/300x300?text=Post Image">
</figure> </figure>
{/each} {/each}
</posts> </posts>
</content>

@ -0,0 +1,35 @@
content {
display: flex;
justify-content: center;
}
button {
padding: 5em;
}
modal {
display: flex;
position: fixed;
align-items: center;
justify-content: center;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 10;
background: rgba(244,244,244,0.75);
padding: 0px;
}
modal-content {
flex-direction: column;
background: white;
border: 1px solid var(--color-accent);
border-radius: 5px;
max-height: 300px;
min-height: 300px;
max-width: 300px;
width: 100%;
z-index: 20;
padding: 0.5em;
}

@ -0,0 +1,11 @@
<button on:click={ () => visible = true }>Click Me!</button>
{#if visible}
<modal on:click={ () => visible = false }>
<modal-content>
<h1>This Is A Modal</h1>
<p>Designers love modals. Click anywhere to close this.</p>
</modal-content>
</modal>
{/if}

@ -0,0 +1,34 @@
content {
display: flex;
flex-direction: column;
}
/* mvp.css aleady has a nav so using this
name to demonstrate how to make your own. */
nav-bar {
display: flex;
flex-direction: row;
width: 100%;
justify-content: space-evenly;
/* this is just for displaying here */
padding: 1em;
border: 1px solid var(--color-accent);
margin-bottom: 1em;
}
nav-bar middle {
display: flex;
flex: 2;
justify-content: center;
padding-left: 1em;
padding-right: 1em;
}
nav-bar middle input {
width: 100%;
}
.alternate {
background-color: #ddd;
}

@ -0,0 +1,30 @@
<nav-bar>
<left>
<b><Icon name="trash" color="var(--color-text)" /> fsck CSS</b>
</left>
<middle>
<input placeholder="Search">
</middle>
<right>
<button>Log In</button>
<a>Sign Up</a>
</right>
</nav-bar>
<nav-bar class="alternate">
<left>
<b><Icon name="trash" color="var(--color-text)" /> fsck CSS</b>
</left>
<middle>
<!-- you just leave this empty and flexbox
will expand it for you. -->
</middle>
<right>
<button>Log In</button>
<button id="signup">Sign Up</button>
</right>
</nav-bar>

@ -0,0 +1,53 @@
content {
display: flex;
flex: flex-shrink;
flex-grow: 1;
justify-content: center;
}
panel {
display: flex;
flex-direction: column;
border: 1px solid #eee;
width: min-content;
}
panel top {
width: 480px; /* sets a header for display */
padding: 0.5rem;
}
panel middle {
padding-left: 0.5rem;
padding-right: 0.5rem;
display: flex;
flex-direction: column;
justify-content: flex-start;
}
panel middle h4 {
}
panel bottom {
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-evenly;
}
panel bottom button {
display: flex;
margin: 0;
border-radius: unset;
width: 100%;
justify-content: space-evenly;
}
button:hover {
filter: invert(20%);
}
button#cancel {
background: unset;
color: var(--color-text);
}

@ -0,0 +1,20 @@
<panel>
<top>
<h1>Panel is a Card</h1>
</top>
<middle>
<h4>
Panel Example
</h4>
<p>Not sure what the big deal is with the difference between panels and cards
but I'm doing all the things so here's a panel. Let's say, buttons on a panel
are different to demonstrate how to make a button strip. </p>
</middle>
<bottom>
<button id="cancel"><Icon name="x-circle" color="var(--color-text)" size="24"/> CANCEL</button>
<button><Icon name="check-circle" color="var(--color-bg)" size="24" /> OK</button>
</bottom>
</panel>

@ -1,5 +1,4 @@
<content> <header>
<header>
<nav> <nav>
<left> <left>
<logo><Icon name="pinterest" color="var(--color)" /> Pinterest</logo> <logo><Icon name="pinterest" color="var(--color)" /> Pinterest</logo>
@ -14,9 +13,9 @@
<li><button id="signup">Sign Up</button></li> <li><button id="signup">Sign Up</button></li>
</ul> </ul>
</nav> </nav>
</header> </header>
{#if !thumbnail} {#if !thumbnail}
<profile> <profile>
<info> <info>
<h1>Vincent van Gogh</h1> <h1>Vincent van Gogh</h1>
@ -42,5 +41,4 @@
</lane> </lane>
{/each} {/each}
</pins> </pins>
{/if} {/if}
</content>

@ -1,5 +1,4 @@
<content> <tile>
<tile>
<left> <left>
<img src={ holder(48, 48) }/> <img src={ holder(48, 48) }/>
</left> </left>
@ -20,6 +19,5 @@
<Icon name="x-circle" color="var(--color-bg)" size="24"/> <Icon name="x-circle" color="var(--color-bg)" size="24"/>
</button> </button>
</right> </right>
</tile> </tile>
</content>

@ -1,11 +1,10 @@
<content> <left>
<left> <Icon name="twitter" color="var(--color)" />
<Icon name="twitter" color="var(--color)" /> <h4># Explore</h4>
<h4># Explore</h4> <h4><Icon name="settings" color="var(--color-text)" /> Settings</h4>
<h4><Icon name="settings" color="var(--color-text)" /> Settings</h4> </left>
</left>
<middle> <middle>
<header> <header>
<nav> <nav>
<back><Icon name="arrow-left" /></back> <back><Icon name="arrow-left" /></back>
@ -73,9 +72,9 @@
</tweet> </tweet>
{/each} {/each}
</tweets> </tweets>
</middle> </middle>
<right> <right>
<input placeholder="Search Twitter" /> <input placeholder="Search Twitter" />
<section> <section>
@ -129,5 +128,4 @@
</ul> </ul>
</aside> </aside>
</section> </section>
</right> </right>
</content>

@ -1,5 +1,4 @@
<content> <header>
<header>
<nav> <nav>
<b><a id="logo-link" href="/demos/xoracademy" use:link><Icon name="edit-3" color="var(--color-text)" /> Xor.Academy</a></b> <b><a id="logo-link" href="/demos/xoracademy" use:link><Icon name="edit-3" color="var(--color-text)" /> Xor.Academy</a></b>
<input placeholder="Search"> <input placeholder="Search">
@ -8,9 +7,9 @@
<li><a>Sign Up</a></li> <li><a>Sign Up</a></li>
</ul> </ul>
</nav> </nav>
</header> </header>
<profile> <profile>
<figure> <figure>
<img alt="Module Thumb" src="https://via.placeholder.com/256x256?text=Module+Thumb"> <img alt="Module Thumb" src="https://via.placeholder.com/256x256?text=Module+Thumb">
</figure> </figure>
@ -29,23 +28,22 @@
making drawing a habit. making drawing a habit.
</p> </p>
</info> </info>
</profile> </profile>
<related> <related>
{#each related as pin} {#each related as pin}
<figure> <figure>
<img alt="Stock photo" src="https://via.placeholder.com/82x82?text=Related"> <img alt="Stock photo" src="https://via.placeholder.com/82x82?text=Related">
</figure> </figure>
{/each} {/each}
</related> </related>
<posts> <posts>
{#each posts as post} {#each posts as post}
<figure> <figure>
<a href="/demos/xoracademy/watch" use:link> <a href="/demos/xoracademy/watch" use:link>
<img alt="Placeholder" src="https://via.placeholder.com/300x300?text=Video Thumb"> <img alt="Placeholder" src="https://via.placeholder.com/300x300?text=Video Thumb">
</a> </a>
</figure> </figure>
{/each} {/each}
</posts> </posts>
</content>

@ -1,5 +1,4 @@
<content> <header>
<header>
<nav> <nav>
<b><a href="/demos/xoracademy" use:link><Icon name="edit-3" color="var(--color-text)" /> Xor.Academy</a></b> <b><a href="/demos/xoracademy" use:link><Icon name="edit-3" color="var(--color-text)" /> Xor.Academy</a></b>
<input placeholder="Search"> <input placeholder="Search">
@ -8,8 +7,8 @@
<li><a>Sign Up</a></li> <li><a>Sign Up</a></li>
</ul> </ul>
</nav> </nav>
</header> </header>
<main> <main>
<figure> <figure>
<img src="https://via.placeholder.com/1280x720?text=Video"> <img src="https://via.placeholder.com/1280x720?text=Video">
<figcaption> <figcaption>
@ -76,5 +75,4 @@
{/each} {/each}
</comments> </comments>
</lower> </lower>
</main> </main>
</content>

@ -1,5 +1,4 @@
<content> <header>
<header>
<nav> <nav>
<nav-left> <nav-left>
<a><Icon name="menu" /> <Icon name="youtube" /> <logo>Youtube</logo></a> <a><Icon name="menu" /> <Icon name="youtube" /> <logo>Youtube</logo></a>
@ -12,8 +11,8 @@
<li><button><Icon name="user" /> Sign In</button></li> <li><button><Icon name="user" /> Sign In</button></li>
</ul> </ul>
</nav> </nav>
</header> </header>
<main> <main>
<left> <left>
<figure> <figure>
<a href="/demos/google" use:link> <a href="/demos/google" use:link>
@ -117,5 +116,4 @@
</card> </card>
{/each} {/each}
</right> </right>
</main> </main>
</content>

@ -1,12 +1,20 @@
<script> <script>
import Icon from '../components/Icon.svelte'; import Icon from '../components/Icon.svelte';
import CodeView from '../components/CodeView.svelte';
import { fade } from 'svelte/transition'; import { fade } from 'svelte/transition';
export let visible = false; export let visible = false;
import { createEventDispatcher } from 'svelte';
const dispatch = createEventDispatcher();
</script> </script>
<style> <style>
content {
display: flex;
justify-content: center;
}
button {
padding: 5em;
}
modal { modal {
display: flex; display: flex;
position: fixed; position: fixed;
@ -26,19 +34,27 @@
background: white; background: white;
border: 1px solid var(--color-accent); border: 1px solid var(--color-accent);
border-radius: 5px; border-radius: 5px;
max-height: 75vh; max-height: 300px;
min-height: 75vh; min-height: 300px;
max-width: 75vh; max-width: 300px;
width: 100%; width: 100%;
z-index: 20; z-index: 20;
padding: 0px; padding: 0.5em;
} }
</style> </style>
<content>
<button on:click={ () => visible = true }>Click Me!</button>
</content>
{#if visible} {#if visible}
<modal on:click={ () => dispatch('click') }> <modal on:click={ () => visible = false }>
<modal-content> <modal-content>
<slot></slot> <h1>This Is A Modal</h1>
<p>Designers love modals. Click anywhere to close this.</p>
</modal-content> </modal-content>
</modal> </modal>
{/if} {/if}
<CodeView source="/code/Modal" />

@ -0,0 +1,76 @@
<script>
import CodeView from '../components/CodeView.svelte';
import Icon from '../components/Icon.svelte';
</script>
<style>
content {
display: flex;
flex-direction: column;
}
/* mvp.css aleady has a nav so using this
name to demonstrate how to make your own. */
nav-bar {
display: flex;
flex-direction: row;
width: 100%;
justify-content: space-evenly;
/* this is just for displaying here */
padding: 1em;
border: 1px solid var(--color-accent);
margin-bottom: 1em;
}
nav-bar middle {
display: flex;
flex: 2;
justify-content: center;
padding-left: 1em;
padding-right: 1em;
}
nav-bar middle input {
width: 100%;
}
.alternate {
background-color: #ddd;
}
</style>
<content>
<nav-bar>
<left>
<b><Icon name="trash" color="var(--color-text)" /> fsck CSS</b>
</left>
<middle>
<input placeholder="Search">
</middle>
<right>
<button>Log In</button>
<a>Sign Up</a>
</right>
</nav-bar>
<nav-bar class="alternate">
<left>
<b><Icon name="trash" color="var(--color-text)" /> fsck CSS</b>
</left>
<middle>
<!-- you just leave this empty and flexbox
will expand it for you. -->
</middle>
<right>
<button>Log In</button>
<button id="signup">Sign Up</button>
</right>
</nav-bar>
</content>
<CodeView source="/code/NavBar" />

@ -0,0 +1,83 @@
<script>
import CodeView from '../components/CodeView.svelte';
import Icon from '../components/Icon.svelte';
</script>
<style>
content {
display: flex;
flex: flex-shrink;
flex-grow: 1;
justify-content: center;
}
panel {
display: flex;
flex-direction: column;
border: 1px solid #eee;
width: min-content;
}
panel top {
width: 480px; /* sets a header for display */
padding: 0.5rem;
}
panel middle {
padding-left: 0.5rem;
padding-right: 0.5rem;
display: flex;
flex-direction: column;
justify-content: flex-start;
}
panel middle h4 {
}
panel bottom {
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-evenly;
}
panel bottom button {
display: flex;
margin: 0;
border-radius: unset;
width: 100%;
justify-content: space-evenly;
}
button:hover {
filter: invert(20%);
}
button#cancel {
background: unset;
color: var(--color-text);
}
</style>
<content>
<panel>
<top>
<h1>Panel is a Card</h1>
</top>
<middle>
<h4>
Panel Example
</h4>
<p>Not sure what the big deal is with the difference between panels and cards
but I'm doing all the things so here's a panel. Let's say, buttons on a panel
are different to demonstrate how to make a button strip. </p>
</middle>
<bottom>
<button id="cancel"><Icon name="x-circle" color="var(--color-text)" size="24"/> CANCEL</button>
<button><Icon name="check-circle" color="var(--color-bg)" size="24" /> OK</button>
</bottom>
</panel>
</content>
<CodeView source="/code/Panels" />

@ -7,6 +7,8 @@
import Login from '../thumbs/Login.svelte'; import Login from '../thumbs/Login.svelte';
import Tiles from '../thumbs/Tiles.svelte'; import Tiles from '../thumbs/Tiles.svelte';
import Cards from '../thumbs/Cards.svelte'; import Cards from '../thumbs/Cards.svelte';
import Panels from '../thumbs/Panels.svelte';
import NavBar from '../thumbs/NavBar.svelte';
import {push} from 'svelte-spa-router'; import {push} from 'svelte-spa-router';
import { holder } from '../../lib/imgholder.js'; import { holder } from '../../lib/imgholder.js';
@ -99,6 +101,16 @@
<figcaption>Cards</figcaption> <figcaption>Cards</figcaption>
</figure> </figure>
<figure on:click={ () => push('/demos/panels') }>
<Panels />
<figcaption>Panels</figcaption>
</figure>
<figure on:click={ () => push('/demos/navbar') }>
<NavBar />
<figcaption>Nav Bar</figcaption>
</figure>
</images> </images>

@ -12,6 +12,9 @@ import XorAcademyWatch from "./demos/XorAcademyWatch.svelte";
import Login from "./demos/Login.svelte"; import Login from "./demos/Login.svelte";
import Tiles from "./demos/Tiles.svelte"; import Tiles from "./demos/Tiles.svelte";
import Cards from "./demos/Cards.svelte"; import Cards from "./demos/Cards.svelte";
import Panels from "./demos/Panels.svelte";
import Modal from "./demos/Modal.svelte";
import NavBar from "./demos/NavBar.svelte";
export default { export default {
"/": Home, "/": Home,
@ -19,12 +22,15 @@ export default {
"/demos": Demos, "/demos": Demos,
"/demos/login": Login, "/demos/login": Login,
"/demos/tiles": Tiles, "/demos/tiles": Tiles,
"/demos/modal": Modal,
"/demos/cards": Cards, "/demos/cards": Cards,
"/demos/panels": Panels,
"/demos/google": Google, "/demos/google": Google,
"/demos/twitter": Twitter, "/demos/twitter": Twitter,
"/demos/youtube": Youtube, "/demos/youtube": Youtube,
"/demos/instagram": Instagram, "/demos/instagram": Instagram,
"/demos/pinterest": Pinterest, "/demos/pinterest": Pinterest,
"/demos/navbar": NavBar,
"/demos/xoracademy": XorAcademy, "/demos/xoracademy": XorAcademy,
"/demos/xoracademy/watch": XorAcademyWatch, "/demos/xoracademy/watch": XorAcademyWatch,
"*": NotFound, "*": NotFound,

@ -0,0 +1,73 @@
<script>
import CodeView from '../components/CodeView.svelte';
import Icon from '../components/Icon.svelte';
</script>
<style>
content {
display: flex;
flex-direction: column;
}
/* mvp.css aleady has a nav so using this
name to demonstrate how to make your own. */
nav-bar {
display: flex;
flex-direction: row;
width: 100%;
justify-content: space-evenly;
padding: 1em; /* this is only for here */
border: 1px solid var(--color-accent);
margin-bottom: 1em;
}
nav-bar middle {
display: flex;
flex: 2;
justify-content: center;
padding-left: 1em;
padding-right: 1em;
}
nav-bar middle input {
width: 100%;
}
.alternate {
background-color: #ddd;
}
</style>
<content>
<nav-bar>
<left>
<b><Icon name="trash" color="var(--color-text)" /> fsck CSS</b>
</left>
<middle>
<input placeholder="Search">
</middle>
<right>
<button>Log In</button>
<a>Sign Up</a>
</right>
</nav-bar>
<nav-bar class="alternate">
<left>
<b><Icon name="trash" color="var(--color-text)" /> fsck CSS</b>
</left>
<middle>
<!-- you just leave this empty and flexbox
will expand it for you. -->
</middle>
<right>
<button>Log In</button>
<button id="signup">Sign Up</button>
</right>
</nav-bar>
</content>

@ -0,0 +1,81 @@
<script>
import Icon from '../components/Icon.svelte';
</script>
<style>
content {
display: flex;
flex: flex-shrink;
flex-grow: 1;
justify-content: center;
}
panel {
display: flex;
flex-direction: column;
border: 1px solid #eee;
width: min-content;
}
panel top {
width: 480px; /* sets a header for display */
padding: 0.5rem;
}
panel middle {
padding-left: 0.5rem;
padding-right: 0.5rem;
display: flex;
flex-direction: column;
justify-content: flex-start;
}
panel middle h4 {
}
panel bottom {
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-evenly;
}
panel bottom button {
display: flex;
margin: 0;
border-radius: unset;
width: 100%;
justify-content: space-evenly;
}
button:hover {
filter: invert(20%);
}
button#cancel {
background: unset;
color: var(--color-text);
}
</style>
<content>
<panel>
<top>
<h1>Panel is a Card</h1>
</top>
<middle>
<h4>
Panel Example
</h4>
<p>Not sure what the big deal is with the difference between panels and cards
but I'm doing all the things so here's a panel. Let's say, buttons on a panel
are different to demonstrate how to make a button strip. </p>
</middle>
<bottom>
<button id="cancel"><Icon name="x-circle" color="var(--color-text)" size="24"/> CANCEL</button>
<button><Icon name="check-circle" color="var(--color-bg)" size="24" /> OK</button>
</bottom>
</panel>
</content>
Loading…
Cancel
Save