mirror of
https://github.com/ekmas/cs16.css
synced 2026-04-10 21:53:24 +00:00
updated docs page
This commit is contained in:
parent
7c518ea3fb
commit
558bc6950e
1 changed files with 347 additions and 32 deletions
379
index.html
379
index.html
|
|
@ -3,46 +3,132 @@
|
|||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Vite App</title>
|
||||
<link rel="stylesheet" href="/src/cs16.css" />
|
||||
<link rel="stylesheet" href="/src/index.css" />
|
||||
<title>cs16.css</title>
|
||||
</head>
|
||||
<body>
|
||||
<div style="padding: 50px">
|
||||
<header>
|
||||
<div class="top">
|
||||
<h1>cs16.css</h1>
|
||||
|
||||
<div class="links">
|
||||
<a
|
||||
href="https://github.com/ekmas/cs16.css"
|
||||
target="_blank"
|
||||
class="cs-btn gh"
|
||||
></a>
|
||||
<a
|
||||
href="https://x.com/samuelbreznjak"
|
||||
target="_blank"
|
||||
class="cs-btn x"
|
||||
></a>
|
||||
</div>
|
||||
</div>
|
||||
<p>CSS library based on Counter Strike 1.6 UI.</p>
|
||||
</header>
|
||||
|
||||
<div style="margin-bottom: 10px" class="installation">
|
||||
<h2>Installation</h2>
|
||||
|
||||
<p>
|
||||
You can install cs16.css simply by pasting this to your html `head` tag:
|
||||
</p>
|
||||
|
||||
<div class="code-block">
|
||||
<div class="inner">
|
||||
<button class="cs-btn">Copy</button>
|
||||
|
||||
<pre><code id="code-block"><link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/ekmas/cs16.css@main/css/cs16.min.css"></code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<main>
|
||||
<div>
|
||||
<h3>Button</h3>
|
||||
<h2>Button</h2>
|
||||
|
||||
<button class="cs-btn">Button</button>
|
||||
<button disabled class="cs-btn">Disabled</button>
|
||||
<button class="cs-btn close"></button>
|
||||
</div>
|
||||
<div>
|
||||
<h3>Hr</h3>
|
||||
|
||||
<hr class="cs-hr" />
|
||||
</div>
|
||||
<div>
|
||||
<h3>Checkbox</h3>
|
||||
<div class="code-block">
|
||||
<button class="cs-btn toggle-vision">Show code</button>
|
||||
|
||||
<div class="cs-checkbox">
|
||||
<input id="checkbox" type="checkbox" />
|
||||
<label class="cs-checkbox__label" for="checkbox"
|
||||
>Custom Checkbox</label
|
||||
>
|
||||
<div class="inner hidden">
|
||||
<button class="cs-btn">Copy</button>
|
||||
|
||||
<pre><code id="code-block"><button class="cs-btn">Button</button>
|
||||
<button disabled class="cs-btn">Disabled</button></code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h3>Input</h3>
|
||||
<h2>Hr</h2>
|
||||
|
||||
<hr class="cs-hr" />
|
||||
|
||||
<div class="code-block">
|
||||
<button class="cs-btn toggle-vision">Show code</button>
|
||||
|
||||
<div class="inner hidden">
|
||||
<button class="cs-btn">Copy</button>
|
||||
|
||||
<pre><code id="code-block"><hr class="cs-hr" /></code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h2>Checkbox</h2>
|
||||
|
||||
<div class="cs-checkbox">
|
||||
<input id="checkbox" type="checkbox" />
|
||||
<label class="cs-checkbox__label" for="checkbox">Checkbox</label>
|
||||
</div>
|
||||
|
||||
<div class="code-block">
|
||||
<button class="cs-btn toggle-vision">Show code</button>
|
||||
|
||||
<div class="inner hidden">
|
||||
<button class="cs-btn">Copy</button>
|
||||
|
||||
<pre><code id="code-block"><div class="cs-checkbox">
|
||||
<input id="checkbox" type="checkbox" />
|
||||
<label class="cs-checkbox__label" for="checkbox">Checkbox</label>
|
||||
</div></code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h2>Input</h2>
|
||||
|
||||
<input class="cs-input" id="input" type="input" />
|
||||
<label class="cs-input__label" for="input">Custom Checkbox</label>
|
||||
<label class="cs-input__label" for="input">First name</label>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<input type="text" value="John Doe" class="cs-input" />
|
||||
<input type="text" disabled value="disabled" class="cs-input" />
|
||||
|
||||
<div class="code-block">
|
||||
<button class="cs-btn toggle-vision">Show code</button>
|
||||
|
||||
<div class="inner hidden">
|
||||
<button class="cs-btn">Copy</button>
|
||||
|
||||
<pre><code id="code-block"><input class="cs-input" id="input" type="input" />
|
||||
<label class="cs-input__label" for="input">First name</label>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<input type="text" value="John Doe" class="cs-input" />
|
||||
<input type="text" disabled value="disabled" class="cs-input" /></code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h3>Select</h3>
|
||||
<h2>Select</h2>
|
||||
|
||||
<label class="cs-select__label" for="cars">Choose a car:</label>
|
||||
<select class="cs-select" name="cars" id="cars">
|
||||
|
|
@ -51,9 +137,25 @@
|
|||
<option value="opel">Opel</option>
|
||||
<option value="audi">Audi</option>
|
||||
</select>
|
||||
|
||||
<div class="code-block">
|
||||
<button class="cs-btn toggle-vision">Show code</button>
|
||||
|
||||
<div class="inner hidden">
|
||||
<button class="cs-btn">Copy</button>
|
||||
|
||||
<pre><code id="code-block"><label class="cs-select__label" for="cars">Choose a car:</label>
|
||||
<select class="cs-select" name="cars" id="cars">
|
||||
<option value="volvo">Volvo</option>
|
||||
<option value="saab">Saab</option>
|
||||
<option value="opel">Opel</option>
|
||||
<option value="audi">Audi</option>
|
||||
</select></code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h3>Radio Group</h3>
|
||||
<h2>Radio Group</h2>
|
||||
|
||||
<fieldset class="cs-fieldset">
|
||||
<legend>What is your favorite wild animal?</legend>
|
||||
|
|
@ -74,9 +176,37 @@
|
|||
<label for="giraffe">Giraffe</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<div class="code-block">
|
||||
<button class="cs-btn toggle-vision">Show code</button>
|
||||
|
||||
<div class="inner hidden">
|
||||
<button class="cs-btn">Copy</button>
|
||||
|
||||
<pre><code id="code-block"><fieldset class="cs-fieldset">
|
||||
<legend>What is your favorite wild animal?</legend>
|
||||
<div class="radio-wrapper">
|
||||
<input type="radio" name="animal" id="elephant" />
|
||||
<label for="elephant">Elephant</label>
|
||||
</div>
|
||||
<div class="radio-wrapper">
|
||||
<input type="radio" name="animal" id="monkey" />
|
||||
<label for="monkey">Monkey</label>
|
||||
</div>
|
||||
<div class="radio-wrapper">
|
||||
<input type="radio" name="animal" id="cheetah" />
|
||||
<label for="cheetah">Cheetah</label>
|
||||
</div>
|
||||
<div class="radio-wrapper">
|
||||
<input type="radio" name="animal" id="giraffe" />
|
||||
<label for="giraffe">Giraffe</label>
|
||||
</div>
|
||||
</fieldset></code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h3>Slider</h3>
|
||||
<h2>Slider</h2>
|
||||
|
||||
<div class="cs-slider">
|
||||
<div class="value">
|
||||
|
|
@ -85,11 +215,29 @@
|
|||
</div>
|
||||
<div class="ruler"></div>
|
||||
<input id="range" type="range" min="1" max="100" value="50" />
|
||||
<label for="range">Elephant</label>
|
||||
<label for="range">Brightness</label>
|
||||
</div>
|
||||
|
||||
<div class="code-block">
|
||||
<button class="cs-btn toggle-vision">Show code</button>
|
||||
|
||||
<div class="inner hidden">
|
||||
<button class="cs-btn">Copy</button>
|
||||
|
||||
<pre><code id="code-block"><div class="cs-slider">
|
||||
<div class="value">
|
||||
<p>Dark</p>
|
||||
<p>Light</p>
|
||||
</div>
|
||||
<div class="ruler"></div>
|
||||
<input id="range" type="range" min="1" max="100" value="50" />
|
||||
<label for="range">Brightness</label>
|
||||
</div></code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h3>Dialog</h3>
|
||||
<h2>Dialog</h2>
|
||||
|
||||
<section>
|
||||
<button
|
||||
|
|
@ -125,24 +273,142 @@
|
|||
</form>
|
||||
</dialog>
|
||||
</section>
|
||||
</div>
|
||||
<div>
|
||||
<h3>Tooltip</h3>
|
||||
|
||||
<div class="cs-tooltip">
|
||||
Hover over me
|
||||
<span class="text">Tooltip text</span>
|
||||
<div class="code-block">
|
||||
<button class="cs-btn toggle-vision">Show code</button>
|
||||
|
||||
<div class="inner hidden">
|
||||
<button class="cs-btn">Copy</button>
|
||||
|
||||
<pre><code id="code-block"><section>
|
||||
<button
|
||||
type="button"
|
||||
class="cs-btn"
|
||||
onclick="document.querySelector('.cs-dialog').showModal();"
|
||||
>
|
||||
Open dialog
|
||||
</button>
|
||||
<dialog class="cs-dialog">
|
||||
<form method="dialog">
|
||||
<div class="heading">
|
||||
<div class="wrapper">
|
||||
<div class="icon"></div>
|
||||
<p class="text">Options</p>
|
||||
</div>
|
||||
<button class="cs-btn close"></button>
|
||||
</div>
|
||||
<div class="content">
|
||||
Lorem ipsum dolor sit amet consectetur adipisicing elit.
|
||||
Distinctio ad suscipit aut asperiores laudantium error amet
|
||||
sapiente et tempora numquam voluptates, velit sint quos
|
||||
exercitationem unde obcaecati deleniti maiores officia natus
|
||||
ipsa rem fuga commodi esse. Sunt repellendus ipsa illo a
|
||||
accusantium consequuntur nihil dicta necessitatibus porro,
|
||||
saepe, sed repudiandae!
|
||||
</div>
|
||||
<menu class="footer-btns">
|
||||
<button class="cs-btn">OK</button>
|
||||
<button class="cs-btn">Cancel</button>
|
||||
<button class="cs-btn">Apply</button>
|
||||
</menu>
|
||||
</form>
|
||||
</dialog>
|
||||
</section></code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h3>Progress Bar</h3>
|
||||
<h2>Tooltip</h2>
|
||||
|
||||
<div class="cs-tooltip">
|
||||
Right
|
||||
<span style="left: 125%" class="text">Tooltip text</span>
|
||||
</div>
|
||||
<br />
|
||||
<div class="cs-tooltip">
|
||||
Left
|
||||
<span style="right: 125%" class="text">Tooltip text</span>
|
||||
</div>
|
||||
<br />
|
||||
<div class="cs-tooltip">
|
||||
Top
|
||||
<span
|
||||
style="bottom: 100%; width: 100px; left: 50%; margin-left: -50px"
|
||||
class="text"
|
||||
>Tooltip text</span
|
||||
>
|
||||
<!-- set some width, and then set margin-left to be half of the width -->
|
||||
</div>
|
||||
<br />
|
||||
<div class="cs-tooltip">
|
||||
Bottom
|
||||
<span
|
||||
style="top: 100%; width: 100px; left: 50%; margin-left: -50px"
|
||||
class="text"
|
||||
>Tooltip text</span
|
||||
>
|
||||
<!-- set some width, and then set margin-left to be half of the width -->
|
||||
</div>
|
||||
|
||||
<div class="code-block">
|
||||
<button class="cs-btn toggle-vision">Show code</button>
|
||||
|
||||
<div class="inner hidden">
|
||||
<button class="cs-btn">Copy</button>
|
||||
|
||||
<pre><code id="code-block"><div class="cs-tooltip">
|
||||
Right
|
||||
<span style="left: 125%" class="text">Tooltip text</span>
|
||||
</div>
|
||||
<br />
|
||||
<div class="cs-tooltip">
|
||||
Left
|
||||
<span style="right: 125%" class="text">Tooltip text</span>
|
||||
</div>
|
||||
<br />
|
||||
<div class="cs-tooltip">
|
||||
Top
|
||||
<span
|
||||
style="bottom: 100%; width: 100px; left: 50%; margin-left: -50px"
|
||||
class="text"
|
||||
>Tooltip text</span
|
||||
>
|
||||
<!-- set some width, and then set margin-left to be half of the width -->
|
||||
</div>
|
||||
<br />
|
||||
<div class="cs-tooltip">
|
||||
Bottom
|
||||
<span
|
||||
style="top: 100%; width: 100px; left: 50%; margin-left: -50px"
|
||||
class="text"
|
||||
>Tooltip text</span
|
||||
>
|
||||
<!-- set some width, and then set margin-left to be half of the width -->
|
||||
</div></code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h2>Progress Bar</h2>
|
||||
|
||||
<div class="cs-progress-bar">
|
||||
<div style="width: 50%" class="bars"></div>
|
||||
</div>
|
||||
|
||||
<div class="code-block">
|
||||
<button class="cs-btn toggle-vision">Show code</button>
|
||||
|
||||
<div class="inner hidden">
|
||||
<button class="cs-btn">Copy</button>
|
||||
|
||||
<pre><code id="code-block"><div class="cs-progress-bar">
|
||||
<div style="width: 50%" class="bars"></div>
|
||||
</div></code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h3>Tabs</h3>
|
||||
<h2>Tabs</h2>
|
||||
|
||||
<div class="cs-tabs">
|
||||
<input
|
||||
|
|
@ -183,8 +449,57 @@
|
|||
<p>Tab content...</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="code-block">
|
||||
<button class="cs-btn toggle-vision">Show code</button>
|
||||
|
||||
<div class="inner hidden">
|
||||
<button class="cs-btn">Copy</button>
|
||||
|
||||
<pre><code id="code-block"><div class="cs-tabs">
|
||||
<input
|
||||
class="radiotab"
|
||||
name="tabs"
|
||||
tabindex="1"
|
||||
type="radio"
|
||||
id="tabone"
|
||||
checked="checked"
|
||||
/>
|
||||
<label class="label" for="tabone">Tab One</label>
|
||||
<div class="panel" tabindex="1">
|
||||
<h2>Tab One Content</h2>
|
||||
<p>Tab content...</p>
|
||||
</div>
|
||||
<input
|
||||
class="radiotab"
|
||||
tabindex="1"
|
||||
name="tabs"
|
||||
type="radio"
|
||||
id="tabtwo"
|
||||
/>
|
||||
<label class="label" for="tabtwo">Tab Two</label>
|
||||
<div class="panel" tabindex="1">
|
||||
<h2>Tab Two Content</h2>
|
||||
<p>Tab content...</p>
|
||||
</div>
|
||||
<input
|
||||
class="radiotab"
|
||||
tabindex="1"
|
||||
name="tabs"
|
||||
type="radio"
|
||||
id="tabthree"
|
||||
/>
|
||||
<label class="label" for="tabthree">Tab Three</label>
|
||||
<div class="panel" tabindex="1">
|
||||
<h2>Tab Three Content</h2>
|
||||
<p>Tab content...</p>
|
||||
</div>
|
||||
</div></code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<script type="module" src="./src/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Reference in a new issue