Fixed main page
This commit is contained in:
parent
4c136507fe
commit
a195ccd27b
@ -97,7 +97,7 @@
|
|||||||
id="version--0231"
|
id="version--0231"
|
||||||
style="color: inherit; text-decoration: none"
|
style="color: inherit; text-decoration: none"
|
||||||
>
|
>
|
||||||
<h2>version ~ 0.2.6</h2>
|
<h2>version ~ 0.3.0</h2>
|
||||||
</a>
|
</a>
|
||||||
<p>
|
<p>
|
||||||
This component allows you to create a custom select. It offers more
|
This component allows you to create a custom select. It offers more
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
<li><a href="src/constructor/constructor.html">Constructor</a></li>
|
<li><a href="src/constructor/constructor.html">Constructor</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<p class="version">v. 0.2.7</p>
|
<p class="version">v. 0.3.0</p>
|
||||||
</header>
|
</header>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
3
index.js
3
index.js
@ -1,7 +1,8 @@
|
|||||||
import CGSelect from "cg-select";
|
import CGSelect from "cg-select";
|
||||||
import "./style.scss";
|
|
||||||
import "./src/buttonControlCode";
|
import "./src/buttonControlCode";
|
||||||
|
|
||||||
|
import "./style.scss";
|
||||||
|
|
||||||
// ------------------------------Обычный селект--------------------
|
// ------------------------------Обычный селект--------------------
|
||||||
const dropdown = new CGSelect({
|
const dropdown = new CGSelect({
|
||||||
selector: ".cg-dropdown_one",
|
selector: ".cg-dropdown_one",
|
||||||
|
5228
package-lock.json
generated
5228
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "example-cg-select-page",
|
"name": "example-cg-select-page",
|
||||||
"version": "0.2.6",
|
"version": "0.3.0",
|
||||||
"description": "This is a test page to demonstrate the capabilities of the select",
|
"description": "This is a test page to demonstrate the capabilities of the select",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "parcel ./index.html -p 4660 --open",
|
"start": "parcel ./index.html -p 4660 --open",
|
||||||
@ -30,7 +30,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://cg-select.itguild.info",
|
"homepage": "https://cg-select.itguild.info",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cg-select": "^0.2.7",
|
"cg-select": "^0.3.0",
|
||||||
"gh-pages": "^5.0.0",
|
"gh-pages": "^5.0.0",
|
||||||
"parcel": "^2.8.3"
|
"parcel": "^2.8.3"
|
||||||
},
|
},
|
||||||
|
@ -8,64 +8,53 @@ const copy7 = document.getElementById("cp7");
|
|||||||
const copy8 = document.getElementById("cp8");
|
const copy8 = document.getElementById("cp8");
|
||||||
|
|
||||||
const firstBtn = document.getElementById("first");
|
const firstBtn = document.getElementById("first");
|
||||||
const codeFirst = document.getElementById("codeFirst");
|
const codeFirst = document.getElementById("codeFirst"); // cp1
|
||||||
|
|
||||||
copyCode(copy1, codeFirst);
|
copyCode(copy1, codeFirst);
|
||||||
|
|
||||||
const secondBtn = document.getElementById("second");
|
const secondBtn = document.getElementById("second");
|
||||||
const codeSecond = document.getElementById("codeSecond");
|
const codeSecond = document.getElementById("codeSecond"); // cp4
|
||||||
|
|
||||||
copyCode(copy2, codeSecond);
|
copyCode(copy4, codeSecond);
|
||||||
|
|
||||||
const thirdBtn = document.getElementById("third");
|
const thirdBtn = document.getElementById("third");
|
||||||
const codeThird = document.getElementById("codeThird");
|
const codeThird = document.getElementById("codeThird"); // cp5
|
||||||
|
|
||||||
|
copyCode(copy5, codeThird);
|
||||||
|
|
||||||
const fourthBtn = document.getElementById("fourth");
|
const fourthBtn = document.getElementById("fourth");
|
||||||
const codeFourth = document.getElementById("codeFourth");
|
const codeFourth = document.getElementById("codeFourth"); // cp7
|
||||||
|
|
||||||
|
copyCode(copy7, codeFourth);
|
||||||
|
|
||||||
const fifthBtn = document.getElementById("fifth");
|
const fifthBtn = document.getElementById("fifth");
|
||||||
const codeFifth = document.getElementById("codeFifth");
|
const codeFifth = document.getElementById("codeFifth"); // cp8
|
||||||
|
|
||||||
|
copyCode(copy8, codeFifth);
|
||||||
|
|
||||||
const six = document.getElementById("six");
|
const six = document.getElementById("six");
|
||||||
const codeSix = document.getElementById("codeSix");
|
const codeSix = document.getElementById("codeSix"); // cp3
|
||||||
|
|
||||||
|
copyCode(copy3, codeSix);
|
||||||
|
|
||||||
const Native = document.getElementById("Native");
|
const Native = document.getElementById("Native");
|
||||||
const codeNative = document.getElementById("codeNative");
|
const codeNative = document.getElementById("codeNative"); // cp2
|
||||||
|
|
||||||
|
copyCode(copy2, codeNative);
|
||||||
|
|
||||||
const callback = document.getElementById("callback");
|
const callback = document.getElementById("callback");
|
||||||
const codeCallback = document.getElementById("codeCallback");
|
const codeCallback = document.getElementById("codeCallback"); // cp6
|
||||||
|
|
||||||
firstBtn.addEventListener("click", () => {
|
copyCode(copy6, codeCallback);
|
||||||
codeFirst.classList.toggle("active");
|
|
||||||
});
|
|
||||||
|
|
||||||
secondBtn.addEventListener("click", () => {
|
toggleCode(firstBtn, codeFirst);
|
||||||
codeSecond.classList.toggle("active");
|
toggleCode(secondBtn, codeSecond);
|
||||||
});
|
toggleCode(thirdBtn, codeThird);
|
||||||
|
toggleCode(fourthBtn, codeFourth);
|
||||||
thirdBtn.addEventListener("click", () => {
|
toggleCode(fifthBtn, codeFifth);
|
||||||
codeThird.classList.toggle("active");
|
toggleCode(six, codeSix);
|
||||||
});
|
toggleCode(Native, codeNative);
|
||||||
|
toggleCode(callback, codeCallback);
|
||||||
fourthBtn.addEventListener("click", () => {
|
|
||||||
codeFourth.classList.toggle("active");
|
|
||||||
});
|
|
||||||
|
|
||||||
fifthBtn.addEventListener("click", () => {
|
|
||||||
codeFifth.classList.toggle("active");
|
|
||||||
});
|
|
||||||
|
|
||||||
six.addEventListener("click", () => {
|
|
||||||
codeSix.classList.toggle("active");
|
|
||||||
});
|
|
||||||
|
|
||||||
Native.addEventListener("click", () => {
|
|
||||||
codeNative.classList.toggle("active");
|
|
||||||
});
|
|
||||||
|
|
||||||
callback.addEventListener("click", () => {
|
|
||||||
codeCallback.classList.toggle("active");
|
|
||||||
});
|
|
||||||
|
|
||||||
function copyCode(button, elementCopy) {
|
function copyCode(button, elementCopy) {
|
||||||
button.addEventListener("click", (e) => {
|
button.addEventListener("click", (e) => {
|
||||||
@ -73,3 +62,9 @@ function copyCode(button, elementCopy) {
|
|||||||
navigator.clipboard.writeText(elementCopy.textContent);
|
navigator.clipboard.writeText(elementCopy.textContent);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function toggleCode(button, elementCopy) {
|
||||||
|
button.addEventListener("click", () => {
|
||||||
|
elementCopy.classList.toggle("active");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
<li><a href="./constructor.html">Constructor</a></li>
|
<li><a href="./constructor.html">Constructor</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<p class="version">v. 0.2.7</p>
|
<p class="version">v. 0.3.0</p>
|
||||||
</header>
|
</header>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
// import { CustomTheme } from 'components/theme/theme.interface';
|
|
||||||
|
|
||||||
// export const newCustomTheme: CustomTheme = {
|
|
||||||
// name: 'test',
|
|
||||||
// styles: {
|
|
||||||
// head: 'testClass',
|
|
||||||
// list: 'listTest',
|
|
||||||
// },
|
|
||||||
// };
|
|
Loading…
Reference in New Issue
Block a user