pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/GStaehler/Window-Engine

/> GitHub - GStaehler/Window-Engine: :tv: Window Engine is a lightweight and touchscreen friendly zero-dependency JavaScript library for draggable windows.
Skip to content

📺 Window Engine is a lightweight and touchscreen friendly zero-dependency JavaScript library for draggable windows.

License

Notifications You must be signed in to change notification settings

GStaehler/Window-Engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

125 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Window Engine

License: MIT Version Donate GitHub file size in bytes GitHub file size in bytes CodeFactor npm

Demo

Welcome to Window Engine. Window Engine is a lightweight javascript library, developed by Gauthier Staehler, for draggable windows. Demo here.

 

Installation

Download ZIP :

<link rel="stylesheet" href="dist/window-engine.min.css">
<script src="dist/window-engine.min.js"></script> // End of your file

OR Install with NPM :

npm i window-engine

OR Test it first :

<link rel="stylesheet" href="https://unpkg.com/window-engine@latest/dist/window-engine.min.css">
<script src="https://unpkg.com/window-engine@latest/dist/window-engine.min.js"></script> // End of your file

 

Structure of a window

<div id="window!" class="window">
	<div class="color">
		<p class="windowTitle">Title</p>
	</div>
	<div class="mainWindow">Content</div>
</div>

! is the number of the window

color is the color of the window : purple, orange, brown, cyan, crimson, green

default color is black

 

Add a new window

To add a new window, copy the structure above in your html and change ! (if this is your third window, ! = 3 for example)

Add another button to open you new window :

<button id="button!"></button>

 

windowGroup

All of the windows must be in the same windowGroup :

<div class="windowGroup"> Your windows ... </div>

 

Fade effect

Add a fade effect on the windows with the class "fade" :

<div id="window!" class="window fade">

 

Display

The following code makes the window visible without a button click :

<div id="window!" class="window" style="display: initial;">

Of course it is possible to combine it with the fade effect :

<div id="window!" class="window fade" style="display: initial;">

 

Size

Change the size of the window with "small" and "large" :

<div id="window!" class="window large">

normal : 800 x 400; small : 600 x 300; large : 1000 x 500

 

Basic Example

<div class="windowGroup">

	<!-- WINDOW 1 -->

	<div id="window1" class="window" style="display: initial;">
		<div class="purple">
			<p class="windowTitle">Window Engine</p>
		</div>
		<div class="mainWindow">
			<p>Welcome to Window Engine !</p>
		</div>
	</div>

	<!-- WINDOW 2 -->

	<div id="window2" class="window fade">
		<div class="cyan">
			<p class="windowTitle">Second Window</p>
		</div>
		<div class="mainWindow">
			<p>Cyan</p>
			<p>With fade effect !</p>
		</div>
	</div>

	<!-- WINDOW 3 -->

	<div id="window3" class="window fade small">
		<div class="brown">
			<p class="windowTitle">Third Window</p>
		</div>
		<div class="mainWindow">
			<p>Brown</p>
			<p>With fade effect !</p>
		</div>
	</div>
	
</div>

<button id="button1">1</button>
<button id="button2">2</button>
<button id="button3">3</button>

 

They talked about it

CSS Script

 

Copyright Gauthier Staehler

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy