Skip to content
This repository has been archived by the owner on Nov 2, 2024. It is now read-only.

Commit

Permalink
v20240604
Browse files Browse the repository at this point in the history
[+] 新增oreui配置文@XiaozhiSans
[+] 添加icons及images库@XiaozhiSans
[+] input库新增textarea及div[contenteditable]@XiaozhiSans
[=] js部分逻辑更改@XiaozhiSans
[=] 初始化方式改进@XiaozhiSans
[=] 字体改进@XiaozhiSans
  • Loading branch information
Xia0zhiSans committed Jun 4, 2024
1 parent 734e716 commit 7881cd6
Show file tree
Hide file tree
Showing 51 changed files with 316 additions and 101 deletions.
Binary file removed assets/images/externalLink-1fa23.png
Binary file not shown.
2 changes: 2 additions & 0 deletions dist/init.css → dist/all.init.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@import url(./libs/fonts.css);
@import url(./libs/icons.css);
@import url(./libs/images.css);
@import url(./libs/main.css);
@import url(./libs/buttons.css);
@import url(./libs/input.css);
35 changes: 35 additions & 0 deletions dist/all.init.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/**
* oreui-web all
* license: cc by-nc-sa 4.0
* code by XiaozhiSans
*/
import data from "./oreuicfg.json" with {type:"json"};
import {info} from "./libs/info.js";
import {sounds, playSound} from "./libs/sounds.js";
import {oreui} from "./libs/main.js";
const cfg = data;

globalThis.playSound = playSound, globalThis.sounds = sounds;

globalThis.oreui = {
main: oreui,
info: info
}

document.addEventListener("DOMContentLoaded", () => {
try {
let link = document.createElement("link");
link.rel = "stylesheet";
link.type= "text/css";
link.href= cfg.path + "all.init.css";

document.querySelector("head").appendChild(link);

if(cfg.button_click_sound)
for(let i of document.querySelectorAll("button:not(.--no-click-sound, .-nocs, header>button)")) i.addEventListener("click", () => {playSound(sounds.click);});

console.log(`[oreui] init oreui successful, version: ${info.version}(${info.date})`);
} catch(error) {
console.warn("[oreui] init oreui faild. ", error);
}
});
Binary file added dist/fonts/Minecraft-Five-48bb3.otf
Binary file not shown.
Binary file added dist/fonts/Minecraft-Five-Bold-4ded8.otf
Binary file not shown.
Binary file added dist/fonts/Minecraft-Seven-66398.otf
Binary file not shown.
Binary file added dist/fonts/Minecraft-Ten-ed29a.otf
Binary file not shown.
Binary file added dist/fonts/NotoSans-Bold-14d47.ttf
Binary file not shown.
Binary file added dist/fonts/NotoSans-BoldItalic-30174.ttf
Binary file not shown.
Binary file added dist/fonts/NotoSans-Italic-11442.ttf
Binary file not shown.
Binary file added dist/fonts/NotoSansArabic-Regular-9137a.ttf
Binary file not shown.
Binary file added dist/fonts/NotoSansJP-Regular-aaed5.otf
Binary file not shown.
Binary file added dist/fonts/NotoSansKR-Regular-8625b.otf
Binary file not shown.
Binary file added dist/fonts/NotoSansMerged-Regular-5df70.ttf
Binary file not shown.
Binary file added dist/fonts/NotoSansMongolian-Regular-f4200.ttf
Binary file not shown.
Binary file added dist/fonts/NotoSansSC-Regular-a4317.otf
Binary file not shown.
Binary file added dist/fonts/NotoSansSyriac-Regular-1bff6.ttf
Binary file not shown.
Binary file added dist/fonts/NotoSansTC-Regular-2eeaf.otf
Binary file not shown.
Binary file not shown.
16 changes: 0 additions & 16 deletions dist/init.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

@font-face {
font-family: "Minecraft Ten";
src: url(./fonts/minecraft-ten.ttf) format(truetype);
src: url(../fonts/minecraft-ten.ttf) format(truetype);
font-weight: bold;
}

@font-face {
font-family: Mojangles;
src: url(./fonts/Mojangles.ttf) format(truetype);
src: url(../fonts/Mojangles.ttf) format(truetype);
font-weight: normal;
}
Empty file added dist/legacy/notosans.css
Empty file.
30 changes: 18 additions & 12 deletions dist/libs/buttons.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,17 @@ button.icon {
width: 45px;
height: 100%;
}
button.icon:not(header>button) {
width: 32px;
height: 32px;
}
button.icon:is(:hover, :focus) {
background-color: #f6f6f6;
cursor: pointer;
}
button.icon>img, header img {
width: 32px;
height: 32px;
}
button.disabled {
color: #484848 !important;
background-color: #d0d1d4 !important;
border: 2px solid #8c8d90 !important;
box-shadow: inset 0 -4px #b2b2b2 !important;
pointer-events: none !important;
button.icon:not(header>button):is(:hover, :focus) {
background-color: unset;
opacity: 0.6;
}
button.normal {
width: 240px;
Expand All @@ -48,10 +45,19 @@ button.normal {
background-color: #d0d1d4;
border: 2px solid #1e1e1f;
box-shadow: inset 0 -4px #58585a, inset 3px 3px #fff3, inset -3px -7px #ffffff1a;
margin-bottom: 6px;
margin-left: 6px;
}
button.normal.disabled {
color: #484848;
background-color: #d0d1d4;
border: 2px solid #8c8d90;
box-shadow: inset 0 -4px #b2b2b2;
pointer-events: none;
}
button.normal.link::before {
margin-left: 2px;
content: url(../../assets/images/externalLink-1fa23.png);
content: url(../res/external-link-b22bb.png);
width: 10px;
height: 10px;
}
Expand Down Expand Up @@ -81,7 +87,7 @@ button.normal.dark {
}
button.normal.dark.link::before {
margin-left: 2px;
content: url(../../assets/images/externalLink-0e493.png);
content: url(../res/externalLink-0e493.png);
width: 10px;
height: 10px;
}
Expand Down
95 changes: 93 additions & 2 deletions dist/libs/fonts.css
Original file line number Diff line number Diff line change
@@ -1,2 +1,93 @@
@import url(../../assets/plugins/minecraft-fonts/main.css);
@import url(https://cdn.jsdelivr.net/npm/[email protected]/all.min.css);
@font-face {
font-family: Minecraft Ten v2;
src: url(../fonts/Minecraft-Ten-ed29a.otf);
}

@font-face {
font-family: Minecraft Seven v2;
src: url(../fonts/Minecraft-Seven-66398.otf);
}

@font-face {
font-family: Minecraft Five v2;
src: url(../fonts/Minecraft-Five-48bb3.otf);
}

@font-face {
font-family: Minecraft Five v2;
font-weight: 700;
src: url(../fonts/Minecraft-Five-Bold-4ded8.otf);
}

@font-face {
font-family: Noto Sans;
font-weight: 700;
src: url(../fonts/NotoSans-Bold-14d47.ttf);
}

@font-face {
font-family: Noto Sans;
font-style: italic;
font-weight: 700;
src: url(../fonts/NotoSans-BoldItalic-30174.ttf);
}

@font-face {
font-family: Noto Sans;
font-style: italic;
src: url(../fonts/NotoSans-Italic-11442.ttf);
}

@font-face {
font-family: Noto Sans JP;
src: url(../fonts/NotoSansJP-Regular-aaed5.otf);
}

@font-face {
font-family: Noto Sans JP Regular;
src: url(../fonts/NotoSansJP-Regular-aaed5.otf);
}

@font-face {
font-family: Noto Sans KR;
src: url(../fonts/NotoSansKR-Regular-8625b.otf);
}

@font-face {
font-family: Noto Sans SC;
src: url(../fonts/NotoSansSC-Regular-a4317.otf);
}

@font-face {
font-family: Noto Sans TC;
src: url(../fonts/NotoSansTC-Regular-2eeaf.otf);
}

@font-face {
font-family: Noto Sans AR;
src: url(../fonts/NotoSansArabic-Regular-9137a.ttf);
}

@font-face {
font-family: Noto Sans Mongolian;
src: url(../fonts/NotoSansMongolian-Regular-f4200.ttf);
}

@font-face {
font-family: Noto Sans Syriac;
src: url(../fonts/NotoSansSyriac-Regular-1bff6.ttf);
}

@font-face {
font-family: Noto Sans TamilSupplement;
src: url(../fonts/NotoSansTamilSupplement-Regular-a407d.ttf);
}

@font-face {
font-family: Noto Sans;
src: url(../fonts/NotoSansMerged-Regular-5df70.ttf);
}

html {
--oreui: Minecraft Seven v2, Noto Sans, Noto Sans SC, Noto Sans TC, Noto Sans JP, Noto Sans KR, Noto Sans Mongolian, Noto Sans Syriac, Noto Sans TamilSupplement;
}
36 changes: 36 additions & 0 deletions dist/libs/icons.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.-icon {
display: block;
width: 32px;
height: 32px;
background-image: url();
background-size: cover;
}

.-icon.-loading {
background-image: url(../res/animation-074ed.gif);
position: relative;
top: 50%;
left: 50%;
}

.-icon.-copy {
background-image: url(../res/Copy-9b6af.png);
}
.-icon.-clip {
background-image: url(../res/Clipboard-bbbc0.png);
}
.-icon.-extlink {
background-image: url(../res/externalLink-0e493.png);
}
.-icon.-extlink.-dark {
background-image: url(../res/external-link-b22bb.png);
}
.-icon.-help {
background-image: url(../res/help.png);
}
.-icon.-menu {
background-image: url(../res/menu.png);
}
.-icon.-save {
background-image: url(../res/Save-72f24.png);
}
16 changes: 16 additions & 0 deletions dist/libs/images.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.-img {
display: block;
background-image: url();
background-size: cover;
}

.-img.-error {
width: 260px;
height: 90px;
background-image: url(../res/error-1ee9c.png);
}
.-img.-indev {
width: 260px;
height: 128px;
background-image: url(../res/empty-state-art-461d2.png);
}
8 changes: 2 additions & 6 deletions dist/libs/info.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
export const info = {
version: "20240529",
update: "2024/05/29 22:15",
init: () => {
document.querySelector("[version]").innerText = info.version;
document.querySelector("[update]").innerText = info.update;
}
version: "20240604",
date: "2024/06/04"
}
25 changes: 24 additions & 1 deletion dist/libs/input.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
input {
div[contenteditable], input, textarea {
padding-top: 14px;
padding-left: 10px;
width: auto;
Expand All @@ -11,3 +11,26 @@ input {
box-shadow: inset 0 5px 0 0 #242425;
outline: none;
}

div[contenteditable] {
padding-right: 10px;
height: auto;
}

div[contenteditable], textarea {
padding-bottom: 6px;
}

textarea {
width: 100%;
height: auto;
min-height: 120px;
resize: none;
}
textarea::-webkit-scrollbar-track {
border-color: #313233;
}

input[type="radio"] {
/* 下次再更( */
}
Loading

0 comments on commit 7881cd6

Please sign in to comment.