Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
shi-yan committed Dec 17, 2023
1 parent 3b3156a commit 0552bba
Show file tree
Hide file tree
Showing 4 changed files with 131 additions and 106 deletions.
43 changes: 29 additions & 14 deletions assets/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,19 @@ button:focus-visible {
margin-block-end: 4px;
}

.menutitle {
margin:0;
font-size: 16px;
}

ul {
margin-left: 2px;
}

li {
margin-left: 2px;
}

.clickable:hover {
background-color: #222045;
color: #ffffff;
Expand All @@ -107,7 +120,7 @@ button:focus-visible {
border-color: black;
width: 3px;
cursor: ew-resize;
}._Menu_c31qi_1 {
}._Menu_1abcw_1 {
width: 320px;
height: 100vh;
position: fixed;
Expand All @@ -121,21 +134,22 @@ button:focus-visible {
background-color: #0e0b33;
}

._MenuTitle_c31qi_15 {
._MenuTitle_1abcw_15 {
margin-top: 40px;
color: #ffffff;
text-align: center;
margin-bottom: 8px;
}

._MenuContent_c31qi_21 {
._MenuContent_1abcw_22 {
flex-grow: 1;
overflow-y: scroll;
overflow-x: hidden;
padding: 10px;
margin-left: 10px;
}

._ToolBar_c31qi_29 {
._ToolBar_1abcw_30 {
flex-grow: 0;
flex-shrink: 1;
display: flex;
Expand All @@ -144,7 +158,7 @@ button:focus-visible {
padding-right: 10px;
}

._TabButton_c31qi_38 {
._TabButton_1abcw_39 {
border: 0;
background: none;
box-shadow: none;
Expand All @@ -153,11 +167,11 @@ button:focus-visible {
cursor: pointer;
}

._TabButton_c31qi_38:hover {
._TabButton_1abcw_39:hover {
color: #ffffff;
}

._TabButtonText_c31qi_51 {
._TabButtonText_1abcw_52 {
margin-left: 8px;
font-family: "Source Code Pro", monospace;
}
Expand All @@ -179,19 +193,19 @@ button:focus-visible {
color: #ffffff;
}*/

._TabButton_c31qi_38:focus {
._TabButton_1abcw_39:focus {
outline: none;
}

._Main_c31qi_77 {
._Main_1abcw_78 {
display: flex;
width: 100%;
flex-direction: row;
flex-grow: 1;
overflow: hidden;
}

._Editor_c31qi_85 {
._Editor_1abcw_86 {
display: block;
width: 50%;
border-radius: 4px;
Expand All @@ -202,28 +216,29 @@ button:focus-visible {
position: relative;
}

._Output_c31qi_96 {
._Output_1abcw_97 {
overflow: hidden;
width: 50%;
}

._Sandbox_c31qi_101 {
._Sandbox_1abcw_102 {
position: absolute;
border-radius: 4px;
border-width: 1px;
border-style: solid;
border-color: #2b284b;
background-color: #1a183d;
}._MenuItem_2w08h_1 {
}._MenuItem_1ct5b_1 {
color: #9492b1;
border: 0;
background: none;
box-shadow: none;
border-radius: 0px;
cursor: pointer;
margin-left: 2px;
}

._ClickableItem_2w08h_10 {
._ClickableItem_1ct5b_11 {
padding: 2px;
}/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
Expand Down
26 changes: 13 additions & 13 deletions assets/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1230,16 +1230,16 @@ function cleanChildren(parent, current, marker, replacement) {
}
const isServer = false;
const index = "";
const Menu$1 = "_Menu_c31qi_1";
const MenuTitle = "_MenuTitle_c31qi_15";
const MenuContent = "_MenuContent_c31qi_21";
const ToolBar$1 = "_ToolBar_c31qi_29";
const TabButton = "_TabButton_c31qi_38";
const TabButtonText = "_TabButtonText_c31qi_51";
const Main = "_Main_c31qi_77";
const Editor = "_Editor_c31qi_85";
const Output = "_Output_c31qi_96";
const Sandbox = "_Sandbox_c31qi_101";
const Menu$1 = "_Menu_1abcw_1";
const MenuTitle = "_MenuTitle_1abcw_15";
const MenuContent = "_MenuContent_1abcw_22";
const ToolBar$1 = "_ToolBar_1abcw_30";
const TabButton = "_TabButton_1abcw_39";
const TabButtonText = "_TabButtonText_1abcw_52";
const Main = "_Main_1abcw_78";
const Editor = "_Editor_1abcw_86";
const Output = "_Output_1abcw_97";
const Sandbox = "_Sandbox_1abcw_102";
const styles$1 = {
Menu: Menu$1,
MenuTitle,
Expand All @@ -1252,13 +1252,13 @@ const styles$1 = {
Output,
Sandbox
};
const MenuItem$1 = "_MenuItem_2w08h_1";
const ClickableItem = "_ClickableItem_2w08h_10";
const MenuItem$1 = "_MenuItem_1ct5b_1";
const ClickableItem = "_ClickableItem_1ct5b_11";
const styles = {
MenuItem: MenuItem$1,
ClickableItem
};
const _tmpl$$2 = /* @__PURE__ */ template(`<ul>`), _tmpl$2$1 = /* @__PURE__ */ template(`<li><h3>`);
const _tmpl$$2 = /* @__PURE__ */ template(`<ul>`), _tmpl$2$1 = /* @__PURE__ */ template(`<li><h3 class=menutitle>`);
function MenuItem(props) {
function onSelect(e) {
props.load(props.item);
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/WebGPUTutorial/vite.svg" />
<link rel="icon" type="image/svg+xml" href="/WebGPUTutorial/logo.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Codestage</title>
<script type="module" crossorigin src="/WebGPUTutorial/assets/index.js"></script>
Expand Down
166 changes: 88 additions & 78 deletions readme/index.html
Original file line number Diff line number Diff line change
@@ -1,90 +1,100 @@
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>
<head>
<title>WebGPU Unleashed : A practical tutorial</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital@1&family=Pragati+Narrow&display=swap');

body {
background-color: #03386f;
margin: 0;
position:relative;
display: flex;
flex-direction: column;
justify-content: end;
}
<head>
<title>WebGPU Unleashed : A practical tutorial</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital@1&family=Pragati+Narrow&display=swap');

.header {
height: 20px;
background-color: #ffd790;
}
body {
background-color: #03386f;
margin: 0;
position: relative;
display: flex;
flex-direction: column;
justify-content: end;
}

.footer {
height: 40px;
background-color: #ffd790;
}
.header {
height: 20px;
background-color: #ffd790;
}

.title {
height: 220px;
background-image: url("./titlebg.png");
background-size: cover;
}
.footer {
height: 40px;
background-color: #ffd790;
}

.main-title {
color: #ffd790;
font-weight: 600;
font-family: 'Pragati Narrow', sans-serif;
font-size: 60px;
margin: 20px;
margin-bottom: 4px;
vertical-align: bottom;
}
.title {
height: 220px;
background-image: url(./readme/titlebg.png);
background-size: cover;
}

.subtitle {
font-family: 'Open Sans', sans-serif;
color: white;
font-weight: 400;
font-size: 20px;
margin-left: 20px;
margin-top: 4px;
}
.main-title {
color: #ffd790;
font-weight: 600;
font-family: 'Pragati Narrow', sans-serif;
font-size: 60px;
margin: 20px;
margin-bottom: 4px;
vertical-align: bottom;
}

.author {
font-family: 'Open Sans', sans-serif;
color: white;
font-weight: 400;
font-size: 18px;
margin-right: 20px;
margin-bottom: 4px;
text-align: right;
}
.subtitle {
font-family: 'Open Sans', sans-serif;
color: white;
font-weight: 400;
font-size: 20px;
margin-left: 20px;
margin-top: 4px;
}

.banner {
height: 320px;
background-size: cover;
background-image: url(./banner.jpg);
}
.author {
font-family: 'Open Sans', sans-serif;
color: white;
font-weight: 400;
font-size: 18px;
margin-right: 20px;
margin-bottom: 4px;
text-align: right;
}

.instruction {
flex-grow: 1;
background-color: #01376f;
color: white;
}
</style>
</head>
<body>
<div class="instruction">Welcome</div>
<div class="header"></div>
<div class="title">
<div class="main-title">WebGPU Unleashed</div>
<div class="subtitle">A Practical Tutorial</div>
<div class="author">Shi Yan</div>
</div>
<div class="banner"></div>
<div class="footer"></div>
</body>
</html>
.banner {
height: 320px;
background-size: cover;
background-image: url(./readme/banner.jpg);
}

.instruction {
flex-grow: 1;
background-color: #01376f;
color: white;
font-family: 'Open Sans', sans-serif;
margin: 10px;
}
</style>
</head>

<body>
<div class="instruction">
<p>Welcome to the code samples for the book 'WebGPU Unleashed: A Practical Tutorial', your ticket to the
dynamic world of graphics programming.</p>
<p>Dive in and discover the magic of creating stunning visuals from
scratch, mastering the art of real-time graphics, and unlocking
the power of WebGPU - all in one captivating tutorial.</p>
<p>Get started by browsing the chapters using the <span><svg stroke-width="0" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" color="currentColor" fill="currentColor" style="vertical-align: middle;"><path d="M64 384h384v-42.67H64Zm0-106.67h384v-42.66H64ZM64 128v42.67h384V128Z"></path></svg> MENU</span> button and running each sample with the <span><svg stroke-width="0" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512" color="currentColor" fill="currentColor" style="vertical-align: middle;"><path d="M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 62.6 0 80v352c0 17.4 9.4 33.4 24.5 41.9S58.2 482 73 473l288-176c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41L73 39z"></path></svg> RUN<span> button. The
code editor is live, so feel free to alter the sample code for your own experiments and exploration.</p>
</div>
<div class="header"></div>
<div class="title">
<div class="main-title">WebGPU Unleashed</div>
<div class="subtitle">A Practical Tutorial</div>
<div class="author">Shi Yan</div>
</div>
<div class="banner"></div>
<div class="footer"></div>
</body>

</html>

0 comments on commit 0552bba

Please sign in to comment.