diff --git a/events.js b/events.js index 6e13874..3d5ebeb 100644 --- a/events.js +++ b/events.js @@ -1,39 +1,4 @@ function copy() { navigator.clipboard.writeText('xmlns:xsi="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="https://kiyotoko.github.io/eaw-xml-schema/schemas/%SCHEMA% https://kiyotoko.github.io/eaw-xml-schema/schemas/%SCHEMA%.xsd"') -} - -function styleAll() { - const elements = document.getElementsByClassName("code") - console.log("Found ", elements) - for (let element of elements) { - style(element) - } -} - -function style(element) { - let text = element.innerHTML - let build = "" - let i = 0 - while (i < text.length) { - let char = text.charAt(i) - if (char === "\"") { - console.log("Found string") - build += '' - build += char - while (i < text.length) { - char = text.charAt(++i) - if (char === "\"") { - build += '' - break - } - build += char - } - } else if (char !== ' ' || char !== '=') { - - } - build += char - i++ - } - - element.innerHTML = build -} + document.getElementById("copy").innerText = "Copied!" +} \ No newline at end of file diff --git a/index.html b/index.html index 2bc71a2..74acbe2 100644 --- a/index.html +++ b/index.html @@ -1,38 +1,82 @@ - - EaW XML Schemas - - - - -
-

EaW XML Schemas

+ + + EaW XML Schemas + + + + + + +
+

EaW XML Schemas

+ +

Idea

-

XML schemas are used to define and document elements. This project contains multiple schemas for different xml data structures in the game Star Wars: Empire at War. These should help new people to find their way around. As there is not much information easily available online outside of the wiki, these can be particularly helpful for elements that are not self-explanatory.

+

+ XML schemas are used to define and document elements. This project + contains multiple schemas for different xml data structures in the + game Star Wars: Empire at War. These should help new people to find + their way around. As there is not much information easily available + online outside of the wiki, these can be particularly helpful for + elements that are not self-explanatory. +

+
+ +

Usage

At the root of your element, add the following attributes:

-
- xmlns:xsi="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="https://kiyotoko.github.io/eaw-xml-schema/schemas/%SCHEMA% https://kiyotoko.github.io/eaw-xml-schema/schemas/%SCHEMA%.xsd" +
+ +
+

+ xmlns:xsi="http://www.w3.org/2001/XMLSchema" + xsi:schemaLocation="https://kiyotoko.github.io/eaw-xml-schema/schemas/%SCHEMA% + https://kiyotoko.github.io/eaw-xml-schema/schemas/%SCHEMA%.xsd" +

+
- - -

Note: Replace %SCHEMA% with the name of the schema you need (see below for a selection).

+

+ Note: Replace %SCHEMA% with the name of the schema you + need (see below for a selection). +

+
+ +

List of Schemas

-

This is a list of all xml schemas that currently exist. More schemas will be added in the future.

+

+ This is a list of all xml schemas that currently exist. More schemas + will be added in the future. +

-
- + +
+ + \ No newline at end of file diff --git a/style.css b/style.css index 49b2be0..0d572eb 100644 --- a/style.css +++ b/style.css @@ -1,36 +1,143 @@ +:root { + --background-color: #1d2a35; + --code-box-background-color: #38444d; + --code-box-background-color-hover: #3c3c3c; + --code-background-color: rgb(21, 32, 43); + --text-color: #ddd; + --text-color-hover: #7d7c7c; + --code-text-color: rgb(218, 186, 83); + --button-text-color: white; + + text-rendering: optimizeLegibility; +} + body { font-family: Helvetica, serif; + font-size: 1.2em; + color: var(--text-color); + background-color: var(--background-color); +} + +body::-webkit-scrollbar { + display: none; } main { - width: 800px; - margin: 30px calc(50% - 400px) 30px calc(50% - 400px); + display: flex; + flex-direction: column; + flex-flow: center; + align-items: center; } -.keyword { - color: blue +h1 { + border-bottom: 4px solid rgba(255, 255, 255, 0.87); + text-align: center; + width: 50vw; + transition: font-size 0.5s; } -.string { - color: green; +h2 { + border-bottom: 2px solid var(--text-color); + width: 20vw; + transition: font-size 0.5s; } -.wrapper { - color: white; - background-color: #666666; +h1:hover { + font-size: 2.2em; +} + +h2:hover { + font-size: 1.7em; +} + +a { + color: var(--text-color); + text-decoration: none; + transition: 0.5s; +} + +a:hover { + font-size: 1.2em; + color: var(--text-color-hover); + border-bottom: 2px solid var(--text-color-hover); +} + +button { + font-size: 0.9em; + border: none; + border-radius: 5px; + background-color: rgba(0, 0, 0, 0); + color: var(--button-text-color); + cursor: pointer; + transition: 0.5s; + margin-top: -1vh; + margin-bottom: -1vh; + margin-left: -0.5vh; + margin-right: -0.5vh; + padding-top: 1vh; + padding-bottom: 1vh; + padding-left: 0.5vh; + padding-right: 0.5vh; + border-radius: 5px; +} + +button:hover { + box-shadow: 10px 10px 30px rgba(27, 27, 27, 0.7); +} + +button:active { + box-shadow: none; + transition: 0s; +} + +.part { + width: 60vw; +} + +.code-box { + display: flex; + flex-direction: column; + justify-content: flex-start; + align-items: flex-start; + row-gap: 1vh; + padding-top: 1vh; + padding-left: 1vw; + padding-right: 1vw; + padding-bottom: 1vw; + + box-shadow: 10px 10px 30px rgba(27, 27, 27, 0.5); + border-radius: 5px; + border-radius: 5px; + + color: var(--text-color); + background-color: var(--code-box-background-color); + width: 50vw; + transition: background-color 0.5s; +} + +.code-box:hover { + background-color: var(--code-box-background-color-hover); +} + +.code-wrappper { + color: var(--code-text-color); + background-color: var(--code-background-color); padding: 8px; - border-radius: 10px; + z-index: 1; } -h1 { - text-align: center; - width: 80%; - margin-left: 10%; - margin-bottom: 3cm; - border-bottom: 4px solid black; +.code { + -webkit-user-select: all; + user-select: all; + margin: 0; + padding: 0; } -h2 { - border-bottom: 2px solid black; - width: 70%; +.code-paragraph { + -webkit-user-select: all; + user-select: all; + margin: 0; + padding: 0; + background-color: var(--code-background-color); + color: var(--code-text-color); } \ No newline at end of file