Skip to content

Commit

Permalink
new logo style
Browse files Browse the repository at this point in the history
and update beta
and prettier
  • Loading branch information
penguinify committed Dec 18, 2023
1 parent ba6668a commit c70cf05
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 91 deletions.
115 changes: 63 additions & 52 deletions docs/testing/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/UIManager.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Section } from './components/section'
import { create_element } from './UILib'
import { moduleDefinition, none } from './modules/moduleapi'
import { VERSION, CLIENTNAME, ITERATION } from './static/constant'
import { VERSION, CLIENTNAME, ITERATION, LOGO } from './static/constant'
import NotificationBar from './components/notificationbar'
import './static/style.less'

Expand Down Expand Up @@ -53,7 +53,7 @@ export class UIManager {
create_element('div', this.sidebar, {
id: 'cac__LOGO',
innerHTML: `${CLIENTNAME} v${VERSION}` + (ITERATION !== '0' ? `.${ITERATION}` : ''),
})
}).style.backgroundImage = `url(${LOGO})`

// opacity animation
this.container.animate(
Expand Down
8 changes: 2 additions & 6 deletions src/modules/modules/webtools/console.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ import { CLIENTNAME, HOST, ITERATION, VERSION } from '../../../static/constant'
import { moduleDefinition } from '../../moduleapi'
import './console.ts.less'


function render(UI: UIManager) {
let section = UI.getSectionFromID('js')
let section_content = section?.section_content
if (!section_content) return

let console_container = create_element('div', section_content, {
class_name: 'cac__console__container',
})
Expand All @@ -18,19 +17,16 @@ function render(UI: UIManager) {
})
let console_menu_bar_title = create_element('div', console_menu_bar, {
class_name: 'cac__console__menubar__item',
innerHTML: `${CLIENTNAME} ${VERSION}.${ITERATION} ${HOST}`
innerHTML: `${CLIENTNAME} ${VERSION}.${ITERATION} ${HOST}`,
})



let output = create_element('div', console_container, {
class_name: 'cac__console__output',
})
let console_input = create_element('input', console_container, {
class_name: 'cac__console__input',
}) as HTMLInputElement


console_input.placeholder = '> evaluate expression'

//@ts-ignore
Expand Down
2 changes: 0 additions & 2 deletions src/modules/modules/webtools/console.ts.less
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@
flex-direction: row;
}


.cac__console__menubar__item {
height: 100%;
background-color: @theme;
Expand All @@ -123,4 +122,3 @@
font-size: 1vw;
padding: 0 1%;
}

24 changes: 12 additions & 12 deletions src/modules/modules/webtools/zclear_cookies.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import { moduleDefinition } from "../../moduleapi";
import { moduleDefinition } from '../../moduleapi'

function remove_all_cookies() {
var cookies = document.cookie.split(";");
var cookies = document.cookie.split(';')
for (var i = 0; i < cookies.length; i++) {
var cookie = cookies[i];
var eqPos = cookie.indexOf("=");
var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/";
var cookie = cookies[i]
var eqPos = cookie.indexOf('=')
var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie
document.cookie = name + '=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/'
}
}

const plugin : moduleDefinition = {
id: "clear_cookies",
const plugin: moduleDefinition = {
id: 'clear_cookies',
custom_render: false,
display_name: "Clear All Cookies",
description: "Clears all cookies from this website",
display_name: 'Clear All Cookies',
description: 'Clears all cookies from this website',
onactive: remove_all_cookies,
reset: true,
section: "js"
section: 'js',
}

export default plugin;
export default plugin
18 changes: 9 additions & 9 deletions src/modules/modules/webtools/zclear_local_storage.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { moduleDefinition } from "../../moduleapi";
import { moduleDefinition } from '../../moduleapi'

function clear_local_storage() {
localStorage.clear();
}
localStorage.clear()
}

const plugin : moduleDefinition = {
id: "clear_storage",
const plugin: moduleDefinition = {
id: 'clear_storage',
custom_render: false,
display_name: "Clear All Local Storage Entries",
description: "All data saved by car axle client will be removed as well!",
display_name: 'Clear All Local Storage Entries',
description: 'All data saved by car axle client will be removed as well!',
onactive: clear_local_storage,
reset: true,
section: "js"
section: 'js',
}

export default plugin;
export default plugin
10 changes: 5 additions & 5 deletions src/static/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ export const SOCIAL = {
discord: 'https://discord.gg/akDMdW7Zgd',
}

export var HOST = "PROD"
export var HOST = 'PROD'

switch (window.location.href) {
case "http://localhost:6969/":
HOST = "DEV"
case 'http://localhost:6969/':
HOST = 'DEV'
break
case "https://car-axle-client.github.io/car-axle-client/" || "https://car-axle-client.github.io/car-axle-client/index.html":
HOST = "BETA"
case 'https://car-axle-client.github.io/car-axle-client/' || 'https://car-axle-client.github.io/car-axle-client/index.html':
HOST = 'BETA'
break
}
8 changes: 5 additions & 3 deletions src/static/style.less
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ svg {
}

#cac__LOGO {
width: 95%;
height: 7%;
width: 90%;
height: 12%;
margin-top: 0.8vh;
background-color: @theme;
text-align: center;
Expand All @@ -81,9 +81,11 @@ svg {
font-weight: 800;
display: flex;
border-radius: 20px;
justify-content: center;
align-items: center;
padding-left: 5%;
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.5);
background-image: url(https://raw.githubusercontent.com/car-axle-client/car-axle-client/main/docs/logov8.png);
background-size: cover;
}

#cac__section__BACKGROUND {
Expand Down

0 comments on commit c70cf05

Please sign in to comment.