Compare commits
43 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
6a021ecc2a | ||
|
11b967ce01 | ||
|
9136b760e1 | ||
|
967676f680 | ||
|
4b55c4bf40 | ||
|
42410c8df6 | ||
|
63ec97008e | ||
|
8634bf7d06 | ||
|
47346e644f | ||
|
1a57113418 | ||
|
2cd1d447d6 | ||
|
6737521e9b | ||
|
bdd69a01cf | ||
|
07ade28249 | ||
|
a6e9681786 | ||
|
411e55d1d3 | ||
|
6a17830db6 | ||
|
2e3bead772 | ||
|
d14d9e008e | ||
|
ba06c7aeaf | ||
|
4625c61827 | ||
|
8963a09efe | ||
|
6df61105ee | ||
|
37a6c722c1 | ||
|
9f8fca52c7 | ||
|
dcf2049a30 | ||
|
82bba2c921 | ||
|
88c877db2c | ||
|
52c6470142 | ||
|
c9662dd9b1 | ||
|
cce4321cb7 | ||
|
12fede6337 | ||
|
6d5d6d4eae | ||
|
8bba5df891 | ||
|
01738c4d14 | ||
|
9906cb9e4e | ||
|
87b08691a7 | ||
|
1a917e286d | ||
|
16217e8f7f | ||
|
20e3203587 | ||
|
70fa065f3f | ||
|
aae4aa10e8 | ||
|
ad00f3b0a4 |
39
.github/ISSUE_TEMPLATE/showcase-proposal.md
vendored
Normal file
39
.github/ISSUE_TEMPLATE/showcase-proposal.md
vendored
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
---
|
||||||
|
name: Showcase Proposal
|
||||||
|
about: Proposal to publish a new content into wiki's Showcase page.
|
||||||
|
title: Proposal of showcase project - PROJECT_NAME
|
||||||
|
labels: showcase
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> Showcase proposal template
|
||||||
|
> Note: "*" fields are mandatory.
|
||||||
|
|
||||||
|
> Project Name: The name of the project that will be used as title of the section of the showcase.
|
||||||
|
|
||||||
|
Project Name *:
|
||||||
|
|
||||||
|
> Project Description: The description of the project that will be used as a paragraph after the title of the showcase.
|
||||||
|
|
||||||
|
Project Description *:
|
||||||
|
|
||||||
|
> Project Author: The author of the project that will be informed after the project description. (Keep if blank to don't show the author)
|
||||||
|
|
||||||
|
Project Author:
|
||||||
|
|
||||||
|
> Project Links: Links to access the project showcase. These links will be shown after project description.
|
||||||
|
|
||||||
|
Project Links:
|
||||||
|
|
||||||
|
> Project Images: Images of the project (can be the images with legends, or the links to it).
|
||||||
|
|
||||||
|
Project Images *:
|
||||||
|
|
||||||
|
> Additional Information: Other relevant information.
|
||||||
|
|
||||||
|
Additional Information:
|
||||||
|
|
||||||
|
> Feedback: If you want to give a feedback to the project, or a suggestion, please, enjoy this field!
|
||||||
|
|
||||||
|
Feedback:
|
19
.github/ISSUE_TEMPLATE/showcase-removal.md
vendored
Normal file
19
.github/ISSUE_TEMPLATE/showcase-removal.md
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
name: Showcase Removal
|
||||||
|
about: Remove a published content from wiki's Showcase page.
|
||||||
|
title: Removal of showcase project - PROJECT_NAME
|
||||||
|
labels: showcase
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> Remove showcase project template
|
||||||
|
> "*" fields are mandatory.
|
||||||
|
|
||||||
|
> Project Name: The name of the project to be removed from showcase page.
|
||||||
|
|
||||||
|
Project Name *:
|
||||||
|
|
||||||
|
> Reason: The reason for removal
|
||||||
|
|
||||||
|
Reason *:
|
@ -1,6 +1,15 @@
|
|||||||
# TuiCss ChangeLog
|
# TuiCss ChangeLog
|
||||||
### This is the change log of TuiCss. Here you can find the documentations of the feature of each released version
|
### This is the change log of TuiCss. Here you can find the documentations of the feature of each released version
|
||||||
|
|
||||||
|
#### 2.1.1
|
||||||
|
|
||||||
|
Bugs
|
||||||
|
- Fixed memory leak due to setinterval for clocks: https://github.com/vinibiavatti1/TuiCss/pull/29
|
||||||
|
- Imported media queries classes to tuicss.scss: https://github.com/vinibiavatti1/TuiCss/issues/30
|
||||||
|
|
||||||
|
Examples
|
||||||
|
- Created the mobile example
|
||||||
|
|
||||||
#### 2.1.0
|
#### 2.1.0
|
||||||
- .disabled classes
|
- .disabled classes
|
||||||
- Fixed the default radius border of inputs
|
- Fixed the default radius border of inputs
|
||||||
|
10
README.md
10
README.md
@ -10,6 +10,8 @@
|
|||||||
Text-based user interface CSS library
|
Text-based user interface CSS library
|
||||||
<br>
|
<br>
|
||||||
<a href="https://github.com/vinibiavatti1/TuiCss/wiki"><strong>-- Documentation --</strong></a>
|
<a href="https://github.com/vinibiavatti1/TuiCss/wiki"><strong>-- Documentation --</strong></a>
|
||||||
|
<br>
|
||||||
|
<a href="https://github.com/vinibiavatti1/TuiCss/wiki/Showcase"><strong>-- Showcase --</strong></a>
|
||||||
<br><br>
|
<br><br>
|
||||||
<a href="https://badge.fury.io/js/tuicss">
|
<a href="https://badge.fury.io/js/tuicss">
|
||||||
<img src="https://badge.fury.io/js/tuicss.svg" alt="npm version badge">
|
<img src="https://badge.fury.io/js/tuicss.svg" alt="npm version badge">
|
||||||
@ -18,18 +20,18 @@
|
|||||||
|
|
||||||
### About
|
### About
|
||||||
|
|
||||||
TuiCss is a library focused to create web applications using an interface based on ASCII table, like the old MS-DOS applications. This kind of interface is very eligible because the ultra-contrast colors used and because the reduced effects used on the components in the view. The base of this project is <a href="https://en.wikipedia.org/wiki/Turbo_Vision">Turbo Vision Framework</a>, but some other frameworks were checked also to introduce some features to TuiCss, like [curses](https://en.wikipedia.org/wiki/Curses_(programming_library)), [ncurses](https://en.wikipedia.org/wiki/Ncurses), [Newt](https://en.wikipedia.org/wiki/Newt_(programming_library)), etc. Check the examples page in the wiki to stay on top of some creations, or check the getting started page to start use this library!
|
TuiCss is a library focused to create web applications using an interface based on ASCII table, like the old MS-DOS applications. This kind of interface is very legible because the ultra-contrast colors used and because the reduced effects used on the components in the view. The base of this project is <a href="https://en.wikipedia.org/wiki/Turbo_Vision">Turbo Vision Framework</a>, but some other frameworks were also checked to introduce some features to TuiCss, like [curses](https://en.wikipedia.org/wiki/Curses_(programming_library)), [ncurses](https://en.wikipedia.org/wiki/Ncurses), [Newt](https://en.wikipedia.org/wiki/Newt_(programming_library)), etc. Check the examples page in the wiki to stay on top of some creations, or check the getting started page to start using this library!
|
||||||
|
|
||||||
<img src="https://raw.githubusercontent.com/vinibiavatti1/TuiCss/develop/resources/TUICSS%20Demo.png" width="676">
|
<img src="https://raw.githubusercontent.com/vinibiavatti1/TuiCss/develop/resources/TUICSS%20Demo.png" width="676">
|
||||||
|
|
||||||
### Getting Started
|
### Getting Started
|
||||||
To start to use the TuiCss in your project, you can just download the repository content and import the files that are in the dist folder with the html directives. On the other hand, you can install the package with NPM using the following command:
|
To start to use TuiCss in your project, you can just download the repository content and import the files that are in the dist folder with the html directives. Alternatively, you can install the package with NPM using the following command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ npm install tuicss
|
$ npm install tuicss
|
||||||
```
|
```
|
||||||
|
|
||||||
For more details, visit the [Getting Started Page](https://github.com/vinibiavatti1/TuiCss/wiki/Getting-Started) in the respoitory wiki.
|
For more details, visit the [Getting Started Page](https://github.com/vinibiavatti1/TuiCss/wiki/Getting-Started) in the repository wiki.
|
||||||
|
|
||||||
### Documentation
|
### Documentation
|
||||||
Check the [repository wiki](https://github.com/vinibiavatti1/TuiCss/wiki) to access the documentation, components index, examples, styles, or to know how to contribute for this project.
|
Check the [repository wiki](https://github.com/vinibiavatti1/TuiCss/wiki) to access the documentation, components index, examples, styles, or to know how to contribute to this project.
|
||||||
|
2727
dist/tuicss.css
vendored
2727
dist/tuicss.css
vendored
File diff suppressed because it is too large
Load Diff
65
dist/tuicss.js
vendored
65
dist/tuicss.js
vendored
@ -99,45 +99,46 @@ function datetimeController() {
|
|||||||
|
|
||||||
// Kick off our clock interval stuff.
|
// Kick off our clock interval stuff.
|
||||||
datetimeInterval();
|
datetimeInterval();
|
||||||
setInterval(datetimeInterval, 1000);
|
|
||||||
|
// Synchronize time and set interval to control the clocks
|
||||||
|
setTimeout(() => {
|
||||||
|
setInterval(datetimeInterval, 1000);
|
||||||
|
}, 1000 - new Date().getMilliseconds());
|
||||||
|
|
||||||
function datetimeInterval() {
|
function datetimeInterval() {
|
||||||
for (const clock of clocks) {
|
for (const clock of clocks) {
|
||||||
// Set the interval.
|
if (clock === null) {
|
||||||
const interval = setInterval(() => {
|
continue;
|
||||||
// Technically we should have already returned earlier in the code, but to be on the safe side.
|
}
|
||||||
if (clock === null) {
|
|
||||||
clearInterval(interval);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the format we want to display in the element.
|
// Get the format we want to display in the element.
|
||||||
let format = clock.getAttribute('data-format');
|
let format = clock.getAttribute('data-format');
|
||||||
|
|
||||||
// parse out the date and time into constants.
|
// parse out the date and time into constants.
|
||||||
const today = new Date();
|
const today = new Date();
|
||||||
const month = (today.getMonth() + '').length === 2 ? today.getMonth() + 1 : '0' + (today.getMonth() + 1);
|
const month = (today.getMonth() + 1).toString().padStart(2, '0');
|
||||||
const day = (today.getDay() + '').length === 2 ? today.getDay() + 1 : '0' + (today.getDay() + 1);
|
const day = today.getDate().toString().padStart(2, '0');
|
||||||
const year = today.getFullYear() + '';
|
const dayOfWeek = (today.getDay() + 1).toString().padStart(2, '0');
|
||||||
const hour = (today.getHours() + '').length === 2 ? today.getHours() : '0' + today.getHours();
|
const year = today.getFullYear().toString();
|
||||||
const hour12 = (parseInt(hour) + 24) % '12' || '12';
|
const hour = today.getHours().toString().padStart(2, '0');
|
||||||
const minute = (today.getMinutes() + '').length === 2 ? today.getMinutes() : '0' + today.getMinutes();
|
const hour12 = (parseInt(hour) + 24) % '12' || '12';
|
||||||
const second = (today.getSeconds() + '').length === 2 ? today.getSeconds() : '0' + today.getSeconds();
|
const minute = today.getMinutes().toString().padStart(2, '0');
|
||||||
const ampm = parseInt(hour) >= 12 ? 'PM' : 'AM';
|
const second = today.getSeconds().toString().padStart(2, '0');
|
||||||
|
const ampm = parseInt(hour) >= 12 ? 'PM' : 'AM';
|
||||||
|
|
||||||
// Replace based on the format.
|
// Replace based on the format.
|
||||||
format = format.replace('M', month);
|
format = format.replace('M', month);
|
||||||
format = format.replace('d', day);
|
format = format.replace('d', day);
|
||||||
format = format.replace('y', year);
|
format = format.replace('e', dayOfWeek);
|
||||||
format = format.replace('H', hour);
|
format = format.replace('y', year);
|
||||||
format = format.replace('h', hour12);
|
format = format.replace('H', hour);
|
||||||
format = format.replace('m', minute);
|
format = format.replace('h', hour12);
|
||||||
format = format.replace('s', second);
|
format = format.replace('m', minute);
|
||||||
format = format.replace('a', ampm);
|
format = format.replace('s', second);
|
||||||
|
format = format.replace('a', ampm);
|
||||||
|
|
||||||
// Show it in the element.
|
// Show it in the element.
|
||||||
clock.innerHTML = format;
|
clock.innerHTML = format;
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
dist/tuicss.min.css
vendored
2
dist/tuicss.min.css
vendored
File diff suppressed because one or more lines are too long
2
dist/tuicss.min.js
vendored
2
dist/tuicss.min.js
vendored
@ -1 +1 @@
|
|||||||
function domReady(t){document.addEventListener("DOMContentLoaded",t),"interactive"!==document.readyState&&"complete"!==document.readyState||t()}function tabsController(){const t=document.getElementsByClassName("tui-tab");if(!t.length)return;for(const e of t)e.addEventListener("click",function(e){if(e.target.classList.contains("disabled"))return;for(const e of t)e.classList.remove("active");const o=document.getElementsByClassName("tui-tab-content");if(!o)throw"No tab content elements found.";for(const t of o)t.style.display="none";const n=e.target.getAttribute("data-tab-content");if(n){const t=document.getElementById(n);if(!t)throw'No tab content element with id "'+n+'" found.';t.style.display="block"}e.target.classList.add("active")});const e=document.querySelector(".tui-tab.active");e?e.click():t[0].click()}function datetimeController(){const t=document.getElementsByClassName("tui-datetime");function e(){for(const e of t){const t=setInterval(()=>{if(null===e)return void clearInterval(t);let o=e.getAttribute("data-format");const n=new Date,a=2===(n.getMonth()+"").length?n.getMonth()+1:"0"+(n.getMonth()+1),s=2===(n.getDay()+"").length?n.getDay()+1:"0"+(n.getDay()+1),c=n.getFullYear()+"",l=2===(n.getHours()+"").length?n.getHours():"0"+n.getHours(),i=(parseInt(l)+24)%"12"||"12",r=2===(n.getMinutes()+"").length?n.getMinutes():"0"+n.getMinutes(),d=2===(n.getSeconds()+"").length?n.getSeconds():"0"+n.getSeconds(),u=parseInt(l)>=12?"PM":"AM";o=(o=(o=(o=(o=(o=(o=(o=o.replace("M",a)).replace("d",s)).replace("y",c)).replace("H",l)).replace("h",i)).replace("m",r)).replace("s",d)).replace("a",u),e.innerHTML=o})}}t.length&&(e(),setInterval(e,1e3))}function sidenavController(){const t=document.querySelector(".tui-sidenav-button");t&&t.addEventListener("click",()=>{const t=document.querySelector(".tui-sidenav");if(!t)throw"No sidenav element found.";t.classList.contains("active")?t.classList.remove("active"):t.classList.add("active")})}function modalController(){const t=document.querySelector(".tui-overlap");if(!t)return;const e=document.getElementsByClassName("tui-modal-button");for(const o of e)o.addEventListener("click",e=>{t.classList.add("active");const o=e.target.getAttribute("data-modal");if(!o)throw"Modal close button data-modal attribute is empty or not set.";{const t=document.getElementById(o);if(!t)throw'No modal element with id of "'+o+'" found.';t.classList.add("active")}});const o=document.getElementsByClassName("tui-modal-close-button");if(e.length>0&&!o.length)throw"No modal close buttons found.";for(const e of o)e.addEventListener("click",e=>{t.classList.remove("active");const o=e.target.getAttribute("data-modal");if(!o)throw"Modal close button data-modal attribute is empty or not set.";{const t=document.getElementById(o);if(!t)throw'No modal element with id of "'+o+'" found.';t.classList.remove("active")}})}domReady(function(){tabsController(),datetimeController(),sidenavController(),modalController()});
|
function domReady(t){document.addEventListener("DOMContentLoaded",t),"interactive"!==document.readyState&&"complete"!==document.readyState||t()}function tabsController(){const t=document.getElementsByClassName("tui-tab");if(!t.length)return;for(const e of t)e.addEventListener("click",function(e){if(e.target.classList.contains("disabled"))return;for(const e of t)e.classList.remove("active");const o=document.getElementsByClassName("tui-tab-content");if(!o)throw"No tab content elements found.";for(const t of o)t.style.display="none";const n=e.target.getAttribute("data-tab-content");if(n){const t=document.getElementById(n);if(!t)throw'No tab content element with id "'+n+'" found.';t.style.display="block"}e.target.classList.add("active")});const e=document.querySelector(".tui-tab.active");e?e.click():t[0].click()}function datetimeController(){const t=document.getElementsByClassName("tui-datetime");function e(){for(const e of t){if(null===e)continue;let t=e.getAttribute("data-format");const o=new Date,n=(o.getMonth()+1).toString().padStart(2,"0"),a=o.getDate().toString().padStart(2,"0"),c=(o.getDay()+1).toString().padStart(2,"0"),s=o.getFullYear().toString(),i=o.getHours().toString().padStart(2,"0"),l=(parseInt(i)+24)%"12"||"12",r=o.getMinutes().toString().padStart(2,"0"),d=o.getSeconds().toString().padStart(2,"0"),u=parseInt(i)>=12?"PM":"AM";t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("M",n)).replace("d",a)).replace("e",c)).replace("y",s)).replace("H",i)).replace("h",l)).replace("m",r)).replace("s",d)).replace("a",u),e.innerHTML=t}}t.length&&(e(),setTimeout(()=>{setInterval(e,1e3)},1e3-(new Date).getMilliseconds()))}function sidenavController(){const t=document.querySelector(".tui-sidenav-button");t&&t.addEventListener("click",()=>{const t=document.querySelector(".tui-sidenav");if(!t)throw"No sidenav element found.";t.classList.contains("active")?t.classList.remove("active"):t.classList.add("active")})}function modalController(){const t=document.querySelector(".tui-overlap");if(!t)return;const e=document.getElementsByClassName("tui-modal-button");for(const o of e)o.addEventListener("click",e=>{t.classList.add("active");const o=e.target.getAttribute("data-modal");if(!o)throw"Modal close button data-modal attribute is empty or not set.";{const t=document.getElementById(o);if(!t)throw'No modal element with id of "'+o+'" found.';t.classList.add("active")}});const o=document.getElementsByClassName("tui-modal-close-button");if(e.length>0&&!o.length)throw"No modal close buttons found.";for(const e of o)e.addEventListener("click",e=>{t.classList.remove("active");const o=e.target.getAttribute("data-modal");if(!o)throw"Modal close button data-modal attribute is empty or not set.";{const t=document.getElementById(o);if(!t)throw'No modal element with id of "'+o+'" found.';t.classList.remove("active")}})}domReady(function(){tabsController(),datetimeController(),sidenavController(),modalController()});
|
@ -23,8 +23,9 @@
|
|||||||
<button class="tui-button">Button</button><br>
|
<button class="tui-button">Button</button><br>
|
||||||
<input type="button" class="tui-button" value="Input" /><br>
|
<input type="button" class="tui-button" value="Input" /><br>
|
||||||
<a href="#!" class="tui-button">Anchor</a><br>
|
<a href="#!" class="tui-button">Anchor</a><br>
|
||||||
<button class="tui-button red-168">Custom</button><br>
|
<button class="tui-button orange-168 white-text">Custom</button><br>
|
||||||
<button class="tui-button red-168 disabled" disabled style="margin-bottom: 5px;">Disabled</button><br>
|
<button class="tui-button red-168 disabled" disabled>Disabled</button><br>
|
||||||
|
<button class="tui-button" style="margin-bottom: 5px;">Focused</button><br>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
171
examples/mobile.html
Normal file
171
examples/mobile.html
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" class="no-tui-scroll">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Mobile Example</title>
|
||||||
|
<script src="../dist/tuicss.min.js"></script>
|
||||||
|
<link rel="stylesheet" href="../dist/tuicss.min.css">
|
||||||
|
<style>
|
||||||
|
.content {
|
||||||
|
padding: 40px 0px;
|
||||||
|
}
|
||||||
|
.post-img {
|
||||||
|
width: 100%;
|
||||||
|
border: 4px solid black;
|
||||||
|
}
|
||||||
|
.add-btn {
|
||||||
|
bottom: 0px;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
z-index: 999;
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
}
|
||||||
|
.post {
|
||||||
|
margin-bottom: 5px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="tui-bg-blue-black relative">
|
||||||
|
<!-- Sidenav -->
|
||||||
|
<nav class="tui-sidenav absolute">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="#!">
|
||||||
|
<span class="red-168-text">P</span>rofile
|
||||||
|
<span class="tui-shortcut">ctrl+p</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#!">
|
||||||
|
<span class="red-168-text">S</span>earch
|
||||||
|
<span class="tui-shortcut">ctrl+s</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#!">
|
||||||
|
S<span class="red-168-text">t</span>ory
|
||||||
|
<span class="tui-shortcut">ctrl+t</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<!-- Navbar -->
|
||||||
|
<nav class="tui-nav">
|
||||||
|
<span class="tui-datetime" data-format="h:m:s a"></span>
|
||||||
|
<ul>
|
||||||
|
<li class="tui-sidenav-button red-168-text">≡</li>
|
||||||
|
<li class="tui-dropdown hide-on-med-and-down">
|
||||||
|
<span class="red-168-text">P</span>rofile
|
||||||
|
<div class="tui-dropdown-content">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="#!">
|
||||||
|
<span class="red-168-text">A</span>vatar
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#!">
|
||||||
|
P<span class="red-168-text">r</span>eferences
|
||||||
|
<span class="tui-shortcut">F3</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="tui-dropdown block">
|
||||||
|
<span class="right">►</span>
|
||||||
|
<span class="red-168-text">M</span>ore
|
||||||
|
<div class="tui-dropdown-content">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="#!">
|
||||||
|
<span class="red-168-text">I</span>diom
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="#!">
|
||||||
|
<span class="red-168-text">B</span>locked Users
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<div class="tui-black-divider"></div>
|
||||||
|
<li>
|
||||||
|
<a href="#!">
|
||||||
|
<span class="red-168-text">S</span>tories
|
||||||
|
<span class="tui-shortcut">F10</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="tui-dropdown hide-on-med-and-down">
|
||||||
|
<span class="red-168-text">H</span>elp
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<!-- Edit panel -->
|
||||||
|
<div class="content container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col s12 m12 l12 white-text center">
|
||||||
|
<h3>InstaTui</h3>
|
||||||
|
<hr>
|
||||||
|
The best old-school social network<br>
|
||||||
|
<span class="orange-255 black-text hide-on-small-only">(Try this in a mobile view)</span>
|
||||||
|
<span class="green-255 black-text hide-on-med-and-up">(√ Mobile view)</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col s12 m4 l4">
|
||||||
|
<div class="post tui-window">
|
||||||
|
<fieldset class="tui-fieldset">
|
||||||
|
John Due says:
|
||||||
|
<hr>
|
||||||
|
<img class="post-img" src="resources/winxp.png" />
|
||||||
|
The winxp bg is amazing!
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col s12 m4 l4">
|
||||||
|
<div class="post tui-window">
|
||||||
|
<fieldset class="tui-fieldset">
|
||||||
|
Jane Due says:
|
||||||
|
<hr>
|
||||||
|
<img class="post-img" src="resources/disks.png" />
|
||||||
|
Bought my first 2 PC games!
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col s12 m4 l4">
|
||||||
|
<div class="post tui-window">
|
||||||
|
<fieldset class="tui-fieldset">
|
||||||
|
Astronaut says:
|
||||||
|
<hr>
|
||||||
|
<img class="post-img" src="resources/step.png" />
|
||||||
|
One small step for man one giant leap for mankind
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Status bar -->
|
||||||
|
<div class="tui-statusbar fixed" style="bottom: 0px;">
|
||||||
|
<ul>
|
||||||
|
<li class="right" style="margin-right: 10px;"><a href="#!">Search</a></li>
|
||||||
|
<li><a href="#!">Profile</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button class="tui-button red-168 white-255-text fixed add-btn">+</button>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
BIN
examples/resources/disks.png
Normal file
BIN
examples/resources/disks.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 93 KiB |
BIN
examples/resources/step.png
Normal file
BIN
examples/resources/step.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 103 KiB |
BIN
examples/resources/winxp.png
Normal file
BIN
examples/resources/winxp.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 56 KiB |
@ -1,5 +1,6 @@
|
|||||||
const { series, src, dest } = require('gulp');
|
const { series, src, dest } = require('gulp');
|
||||||
const sass = require('gulp-sass');
|
// const sass = require('gulp-sass');
|
||||||
|
const sass = require('gulp-sass')(require('sass'));
|
||||||
const gulpClean = require('gulp-clean');
|
const gulpClean = require('gulp-clean');
|
||||||
const gulpMinify = require('gulp-minify');
|
const gulpMinify = require('gulp-minify');
|
||||||
const cleanCss = require('gulp-clean-css');
|
const cleanCss = require('gulp-clean-css');
|
||||||
|
5658
package-lock.json
generated
5658
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tuicss",
|
"name": "tuicss",
|
||||||
"version": "2.0.1",
|
"version": "2.1.2",
|
||||||
"description": "TuiCss is a library for developing Web applications that uses text-based user interface applications (TUI) as a style",
|
"description": "TuiCss is a library for developing Web applications that uses text-based user interface applications (TUI) as a style",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"tui",
|
"tui",
|
||||||
@ -35,6 +35,7 @@
|
|||||||
"gulp-copy": "^4.0.1",
|
"gulp-copy": "^4.0.1",
|
||||||
"gulp-minify": "^3.1.0",
|
"gulp-minify": "^3.1.0",
|
||||||
"gulp-rename": "^2.0.0",
|
"gulp-rename": "^2.0.0",
|
||||||
"gulp-sass": "^4.1.0"
|
"gulp-sass": "^5.1.0",
|
||||||
|
"sass": "^1.62.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
BIN
resources/tuicss mobile.png
Normal file
BIN
resources/tuicss mobile.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 91 KiB |
@ -99,45 +99,46 @@ function datetimeController() {
|
|||||||
|
|
||||||
// Kick off our clock interval stuff.
|
// Kick off our clock interval stuff.
|
||||||
datetimeInterval();
|
datetimeInterval();
|
||||||
setInterval(datetimeInterval, 1000);
|
|
||||||
|
// Synchronize time and set interval to control the clocks
|
||||||
|
setTimeout(() => {
|
||||||
|
setInterval(datetimeInterval, 1000);
|
||||||
|
}, 1000 - new Date().getMilliseconds());
|
||||||
|
|
||||||
function datetimeInterval() {
|
function datetimeInterval() {
|
||||||
for (const clock of clocks) {
|
for (const clock of clocks) {
|
||||||
// Set the interval.
|
if (clock === null) {
|
||||||
const interval = setInterval(() => {
|
continue;
|
||||||
// Technically we should have already returned earlier in the code, but to be on the safe side.
|
}
|
||||||
if (clock === null) {
|
|
||||||
clearInterval(interval);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the format we want to display in the element.
|
// Get the format we want to display in the element.
|
||||||
let format = clock.getAttribute('data-format');
|
let format = clock.getAttribute('data-format');
|
||||||
|
|
||||||
// parse out the date and time into constants.
|
// parse out the date and time into constants.
|
||||||
const today = new Date();
|
const today = new Date();
|
||||||
const month = (today.getMonth() + '').length === 2 ? today.getMonth() + 1 : '0' + (today.getMonth() + 1);
|
const month = (today.getMonth() + 1).toString().padStart(2, '0');
|
||||||
const day = (today.getDay() + '').length === 2 ? today.getDay() + 1 : '0' + (today.getDay() + 1);
|
const day = today.getDate().toString().padStart(2, '0');
|
||||||
const year = today.getFullYear() + '';
|
const dayOfWeek = (today.getDay() + 1).toString().padStart(2, '0');
|
||||||
const hour = (today.getHours() + '').length === 2 ? today.getHours() : '0' + today.getHours();
|
const year = today.getFullYear().toString();
|
||||||
const hour12 = (parseInt(hour) + 24) % '12' || '12';
|
const hour = today.getHours().toString().padStart(2, '0');
|
||||||
const minute = (today.getMinutes() + '').length === 2 ? today.getMinutes() : '0' + today.getMinutes();
|
const hour12 = (parseInt(hour) + 24) % '12' || '12';
|
||||||
const second = (today.getSeconds() + '').length === 2 ? today.getSeconds() : '0' + today.getSeconds();
|
const minute = today.getMinutes().toString().padStart(2, '0');
|
||||||
const ampm = parseInt(hour) >= 12 ? 'PM' : 'AM';
|
const second = today.getSeconds().toString().padStart(2, '0');
|
||||||
|
const ampm = parseInt(hour) >= 12 ? 'PM' : 'AM';
|
||||||
|
|
||||||
// Replace based on the format.
|
// Replace based on the format.
|
||||||
format = format.replace('M', month);
|
format = format.replace('M', month);
|
||||||
format = format.replace('d', day);
|
format = format.replace('d', day);
|
||||||
format = format.replace('y', year);
|
format = format.replace('e', dayOfWeek);
|
||||||
format = format.replace('H', hour);
|
format = format.replace('y', year);
|
||||||
format = format.replace('h', hour12);
|
format = format.replace('H', hour);
|
||||||
format = format.replace('m', minute);
|
format = format.replace('h', hour12);
|
||||||
format = format.replace('s', second);
|
format = format.replace('m', minute);
|
||||||
format = format.replace('a', ampm);
|
format = format.replace('s', second);
|
||||||
|
format = format.replace('a', ampm);
|
||||||
|
|
||||||
// Show it in the element.
|
// Show it in the element.
|
||||||
clock.innerHTML = format;
|
clock.innerHTML = format;
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
/* Styles */
|
/* Styles */
|
||||||
@import './styles/global.scss';
|
@import './styles/global.scss';
|
||||||
|
@import './styles/media.scss';
|
||||||
@import './styles/color.scss';
|
@import './styles/color.scss';
|
||||||
@import './styles/util.scss';
|
@import './styles/util.scss';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user