├── assets ├── move.gif ├── close.gif ├── resize.gif ├── computer.png └── screenshot.png ├── example-style.css ├── LICENSE ├── example.html ├── draggable.js ├── style.css ├── README.md └── index.html /assets/move.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qjack001/Web-Based-Windows/HEAD/assets/move.gif -------------------------------------------------------------------------------- /assets/close.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qjack001/Web-Based-Windows/HEAD/assets/close.gif -------------------------------------------------------------------------------- /assets/resize.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qjack001/Web-Based-Windows/HEAD/assets/resize.gif -------------------------------------------------------------------------------- /assets/computer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qjack001/Web-Based-Windows/HEAD/assets/computer.png -------------------------------------------------------------------------------- /assets/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qjack001/Web-Based-Windows/HEAD/assets/screenshot.png -------------------------------------------------------------------------------- /example-style.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Additional styling for the website (index.html). 3 | * 4 | * Jack Guinane 5 | * 2018-07-31 6 | */ 7 | 8 | html 9 | { 10 | background-color: cadetblue; 11 | } 12 | 13 | .install-page 14 | { 15 | background-color: #000; 16 | text-align: left; 17 | overflow-y: scroll; 18 | } 19 | 20 | .install-page p 21 | { 22 | font-size: 1rem; 23 | color: limegreen; 24 | } 25 | 26 | .install-page a 27 | { 28 | font-size: 1rem; 29 | color: aqua; 30 | } 31 | 32 | .baby-image 33 | { 34 | background-image: url(http://www.oldest.org/wp-content/uploads/2017/10/Dancing-Baby.jpg); 35 | background-repeat: no-repeat; 36 | background-size: 100% 100%; 37 | } 38 | 39 | .alert-page 40 | { 41 | background-color: #c0c0c0; 42 | padding-bottom: 20px; 43 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Jack Guinane 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /example.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 |
12 | 13 | 14 |Text
38 |
4 |
11 |
12 |
13 |
14 |
15 |
16 |
19 | Key Features • 20 | How to Use • 21 | Contributing • 22 | Credits • 23 | Authors • 24 | License 25 |
26 | 27 |  28 | 29 | ## Key Features 30 | 31 | For a live preview, visit [qjack001.github.io/Web-Based-Windows/](https://qjack001.github.io/Web-Based-Windows/). 32 | 33 | #### Resize windows: 34 | 35 |  36 | 37 | #### Move windows: 38 | 39 |  40 | 41 | #### Close and hide windows: 42 | 43 |  44 | 45 | 46 | ## How to Use 47 | 48 | To use these windows in your own project, either [fork this repository](https://github.com/qjack001/Web-Based-Windows/fork), or download the required files ([draggable.js](https://github.com/qjack001/Web-Based-Windows/blob/master/draggable.js) and [style.css](https://github.com/qjack001/Web-Based-Windows/blob/master/style.css)) individually. 49 | 50 | Add the required files to the `` element of the HTML file, and place any additional scripts or style sheets below: 51 | 52 | ```html 53 | 54 | ... 55 | 56 | 57 | 58 | 59 | ``` 60 | 61 | To create a window, set up a new div in the ``. Replace `ADD_CUSTOM_ID` with a new unique ID, and make sure that the div below it has the exact same ID, with `header` added to the end. 62 | 63 | ```html 64 |This is a draggable, resizable, and closable window, modeled after the early Windows operating systems.
35 |Developed by Jack Guinane
36 |(c) 2018
37 | 38 |>: How to use
49 |Start by downloading the CSS and Javascript files used in the source.
50 | Download from Github 51 |>: Add them to HTML
52 |Add the following lines to your <head>:
<link href="https://fonts.googleapis.com/css?family=VT323" rel="stylesheet">
<link href="style.css" rel="stylesheet" type="text/css">
<script src="draggable.js" type="text/javascript"></script>
>: Create a window
55 |Replace with new ID tags and content:
56 | <div class="window" id="ADD_CUSTOM_ID">
57 |
<div class="window-header" id="ADD_CUSTOM_IDheader">
58 |
TITLE_OF_WINDOW
59 |
<button onclick="this.parentNode.parentNode.style.display = 'none';">X</button>
60 |
<button onclick="this.parentNode.parentNode.style.display = 'none';">_</button>
61 |
</div>
62 |
CONTENTS_OF_WINDOW
63 |
</div>
64 |
<script>dragElement(document.getElementById("ADD_CUSTOM_ID"));</script>
Windows encountered an error.
86 | 87 | 88 |