svelma-pro/bulma/tiles/index.html

90 lines
13 KiB
HTML

<!DOCTYPE html> <head> <meta charset=utf-8> <meta content="width=device-width,initial-scale=1" name=viewport> <meta content=#333333 name=theme-color> <base href=/svelma-pro/ > <link href=global.css rel=stylesheet> <link href=manifest.json rel=manifest> <link href=favicon.ico rel=icon type=image/png> <link href=./all.css rel=stylesheet> <link href=client/main.1916252291.css rel=stylesheet><link href=client/tiles.32985126.css rel=stylesheet><link href=client/chunk.f5a3f321.css rel=stylesheet><link href=client/chunk.b01e898f.css rel=stylesheet><link href=client/chunk.fb378401.css rel=stylesheet> <noscript id=sapper-head-start></noscript><title>svelma-pro</title><meta content=Svelma property=og:site_name><meta content=https://c0bra.github.io/svelma-pro/svelma-pro-logo.png property=og:image><meta content=200 property=og:image:width><meta content=200 property=og:image:height><meta property=og:url><meta content=article property=og:type><meta content="Tiles | Svelma" property=og:title><meta content="2D grids with flexbox" property=og:description><noscript id=sapper-head-end></noscript> </head> <body> <div id=sapper> <nav class="has-shadow is-spaced navbar" id=navbar><div class=container style=height:50px;min-height:50px><div class=navbar-brand><a href=/ class="brand navbar-item svelte-19nr2rz"> svelma-pro </a></div></div></nav> <main><section class="svelte-1ib6y6h docs"><div class="svelte-h7woek sidebar-bg"></div> <aside class="svelte-h7woek sidebar"><p class="svelte-h7woek sidebar-label">Installation</p> <ul class=svelte-h7woek><li class=svelte-h7woek><a href=install>Start</a></ul> <p class="svelte-h7woek sidebar-label">Bulma Elements</p> <ul class=svelte-h7woek><li class=svelte-h7woek><a href=bulma/intro>Intro</a></li> <li class=svelte-h7woek><a href=bulma/hero>Hero</a> <li class=svelte-h7woek><a href=bulma/media>Media</a> <li class=svelte-h7woek><a href=bulma/table>Table</a> <li class=svelte-h7woek><a href=bulma/tiles>Tiles</a> </ul> <p class="svelte-h7woek sidebar-label">Svelma Components</p> <ul class=svelte-h7woek><li class=svelte-h7woek><a href=components/button>Button </a> <li class=svelte-h7woek><a href=components/carousel>Carousel </a> <li class=svelte-h7woek><a href=components/collapse>Collapse </a> <li class=svelte-h7woek><a href=components/colorpicker>ColorPicker <span class="svelte-h7woek new">New</span> </a> <li class=svelte-h7woek><a href=components/datepicker>Datepicker <span class="svelte-h7woek new">New</span> </a> <li class=svelte-h7woek><a href=components/dialog>Dialog </a> <li class=svelte-h7woek><a href=components/district>District <span class="svelte-h7woek new">New</span> </a> <li class=svelte-h7woek><p>Form</p> <ul class=svelte-h7woek><li class=svelte-h7woek><a href=components/field>Field </a> <li class=svelte-h7woek><a href=components/input>Input </a> <li class=svelte-h7woek><a href=components/switch>Switch </a> </li> </ul> <li class=svelte-h7woek><a href=components/icon>Icon </a> <li class=svelte-h7woek><a href=components/layout>Layout <span class="svelte-h7woek new">New</span> </a> <li class=svelte-h7woek><a href=components/message>Message </a> <li class=svelte-h7woek><a href=components/modal>Modal </a> <li class=svelte-h7woek><a href=components/nav>Nav <span class="svelte-h7woek new">New</span> </a> <li class=svelte-h7woek><a href=components/notification>Notification </a> <li class=svelte-h7woek><a href=components/pagination>Pagination </a> <li class=svelte-h7woek><a href=components/progress>Progress </a> <li class=svelte-h7woek><a href=components/select>Select <span class="svelte-h7woek new">New</span> </a> <li class=svelte-h7woek><a href=components/slider>Slider <span class="svelte-h7woek new">New</span> </a> <li class=svelte-h7woek><a href=components/snackbar>Snackbar </a> <li class=svelte-h7woek><a href=components/stable>Stable <span class="svelte-h7woek new">New</span> </a> <li class=svelte-h7woek><a href=components/table>Table </a> <li class=svelte-h7woek><a href=components/tabs>Tabs </a> <li class=svelte-h7woek><a href=components/timepicker>Timepicker <span class="svelte-h7woek new">New</span> </a> <li class=svelte-h7woek><a href=components/tip>Tip <span class="svelte-h7woek new">New</span> </a> <li class=svelte-h7woek><a href=components/toast>Toast </a> </li> </ul></aside> <div class="svelte-1ib6y6h docs-main"> <header class=header><h1 class=title>Tiles</h1> <h2 class=subtitle>2D grids with flexbox</h2></header> <div class="svelte-150a96u snippet"><form action=https://codesandbox.io/api/v1/sandboxes/define method=POST target=_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FEaIVjhE1FkTPzNU9yCoxn3QWfU8il6r8hA8OhiuSEPzyXhXiCk4zBZTv5ru8S8F33wryJSfk-7yz9UbxdWIHJ7aDoQ-Ohd7kAvxUyOIAwXMB47A2tA8-h-jP3QQeSUH-1oVhGR3hTSGkEAA> <div class="slot-wrap svelte-7fflr3"><div class="svelte-150a96u codepen-button">Codesandbox <i class="is-small fa-external-link-alt fas icon"></i></div></div></form> <div class="svelte-150a96u preview"><div slot=preview><script src=https://unpkg.com/draggabilly@2/dist/draggabilly.pkgd.min.js></script> <h5 class=title>Click to drag tiles</h5> <div class="svelte-1q6iq0m tile is-ancestor"><div class="svelte-1q6iq0m tile is-vertical is-8"><div class="svelte-1q6iq0m tile"><div class="svelte-1q6iq0m tile is-parent is-vertical"><article class="svelte-1q6iq0m tile is-child notification is-primary"><p class=title>Vertical...</p> <p class=subtitle>Top tile</article> <article class="svelte-1q6iq0m tile is-child notification is-warning"><p class=title>...tiles</p> <p class=subtitle>Bottom tile</article></div> <div class="svelte-1q6iq0m tile is-parent"><article class="svelte-1q6iq0m tile is-child notification is-info"><p class=title>Middle tile</p> <p class=subtitle>With an image</p> <figure class="image is-4by3"><img alt=profile src=https://bulma.io/images/placeholders/640x480.png></figure></article></div></div> <div class="svelte-1q6iq0m tile is-parent"><article class="svelte-1q6iq0m tile is-child notification is-danger"><p class=title>Wide tile</p> <p class=subtitle>Aligned with the right tile</p> <div class=content></div></article></div></div> <div class="svelte-1q6iq0m tile is-parent"><article class="svelte-1q6iq0m tile is-child notification is-success"><div class=content><p class=title>Tall tile</p> <p class=subtitle>With even more content</p> <div class=content></div></div></article></div></div></div></div> <div class="svelte-150a96u code"> <div class="svelte-1ccczge codeview"><figure class="svelte-1ccczge highlight is-expanded"><div class="svelte-1ccczge button-container"><button class="is-small button copy-code is-text">Copy</button></div> <pre class="svelte-1ccczge hidden"><code class="svelte-1ccczge xml"></code></pre> <pre class="svelte-1ccczge hidden"><code>&lt;script>
import { onMount } from 'svelte'
waitForDraggabilly() {
return new Promise((resolve, reject) => {
const interval = setInterval({
if (Draggabilly) {
clearInterval(interval);
resolve();
}
}, 100);
});
}
onMount(async () => {
const draggables = document.querySelectorAll('.tile.is-child');
await waitForDraggabilly();
for (const elm of draggables) {
let drag = new Draggabilly(elm, {
containment: '.tile.is-ancestor',
});
}
})
&lt;/script>
&lt;style>
.tile:not(.is-ancestor) {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
:global(.is-dragging) {
-webkit-transform: rotate(25deg);
transform: rotate(25deg);
cursor: move;
}
/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9yb3V0ZXMvYnVsbWEvdGlsZXMuc3ZlbHRlIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFDQTtFQUNFLHlCQUFpQjtLQUFqQixzQkFBaUI7TUFBakIscUJBQWlCO1VBQWpCLGlCQUFpQjtBQUNuQjs7QUFFQTtFQUNFLGdDQUF3QjtVQUF4Qix3QkFBd0I7RUFDeEIsWUFBWTtBQUNkIiwiZmlsZSI6InNyYy9yb3V0ZXMvYnVsbWEvdGlsZXMuc3ZlbHRlIiwic291cmNlc0NvbnRlbnQiOlsiXG4udGlsZTpub3QoLmlzLWFuY2VzdG9yKSB7XG4gIHVzZXItc2VsZWN0OiBub25lO1xufVxuXG46Z2xvYmFsKC5pcy1kcmFnZ2luZykge1xuICB0cmFuc2Zvcm06IHJvdGF0ZSgyNWRlZyk7XG4gIGN1cnNvcjogbW92ZTtcbn1cbiJdfQ== */&lt;/style>
&lt;script src="https://unpkg.com/draggabilly@2/dist/draggabilly.pkgd.min.js">&lt;/script>
&lt;div class="tile is-ancestor">
&lt;div class="tile is-vertical is-8">
&lt;div class="tile">
&lt;div class="tile is-parent is-vertical">
&lt;article class="tile is-child notification is-primary">
&lt;p class="title">Vertical...&lt;/p>
&lt;p class="subtitle">Top tile&lt;/p>
&lt;/article>
&lt;article class="tile is-child notification is-warning">
&lt;p class="title">...tiles&lt;/p>
&lt;p class="subtitle">Bottom tile&lt;/p>
&lt;/article>
&lt;/div>
&lt;div class="tile is-parent">
&lt;article class="tile is-child notification is-info">
&lt;p class="title">Middle tile&lt;/p>
&lt;p class="subtitle">With an image&lt;/p>
&lt;figure class="image is-4by3">
&lt;img src="https://bulma.io/images/placeholders/640x480.png" />
&lt;/figure>
&lt;/article>
&lt;/div>
&lt;/div>
&lt;div class="tile is-parent">
&lt;article class="tile is-child notification is-danger">
&lt;p class="title">Wide tile&lt;/p>
&lt;p class="subtitle">Aligned with the right tile&lt;/p>
&lt;div class="content">
&lt;!-- Content -->
&lt;/div>
&lt;/article>
&lt;/div>
&lt;/div>
&lt;div class="tile is-parent">
&lt;article class="tile is-child notification is-success">
&lt;div class="content">
&lt;p class="title">Tall tile&lt;/p>
&lt;p class="subtitle">With even more content&lt;/p>
&lt;div class="content">
&lt;!-- Content -->
&lt;/div>
&lt;/div>
&lt;/article>
&lt;/div>
&lt;/div></code></pre></figure></div> </div></div></div></section></main></div> <script>__SAPPER__={baseUrl:"/svelma-pro",preloaded:[void 0,null,{}]};if('serviceWorker' in navigator)navigator.serviceWorker.register('/svelma-pro/service-worker.js');var s=document.createElement("script");try{new Function("if(0)import('')")();s.src="/svelma-pro/client/client.3704696d.js";s.type="module";s.crossOrigin="use-credentials";}catch(e){s.src="/svelma-pro/client/shimport@1.0.1.js";s.setAttribute("data-main","/svelma-pro/client/client.3704696d.js")}document.head.appendChild(s)</script>