mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
Optimise images part 2
This commit is contained in:
@@ -11,7 +11,7 @@ If you run the binary, you should see the default application:
|
||||
|
||||
<div class="text--center">
|
||||
<img
|
||||
src={require("@site/static/img/defaultproject.png").default}
|
||||
src={require("@site/static/img/defaultproject.webp").default}
|
||||
width="50%"
|
||||
class="screenshot"
|
||||
/>
|
||||
|
||||
@@ -95,14 +95,14 @@ our custom assets handler:
|
||||
|
||||
<p className="text--center">
|
||||
<img
|
||||
src={require("@site/static/img/assetshandler-does-not-exist.png").default}
|
||||
src={require("@site/static/img/assetshandler-does-not-exist.webp").default}
|
||||
/>
|
||||
</p>
|
||||
|
||||
However, if we request `go.mod`, we will see the following output:
|
||||
|
||||
<p className="text--center">
|
||||
<img src={require("@site/static/img/assetshandler-go-mod.png").default} />
|
||||
<img src={require("@site/static/img/assetshandler-go-mod.webp").default} />
|
||||
</p>
|
||||
|
||||
This technique can be used to load images directly into the page. If we updated our default vanilla template and
|
||||
@@ -122,7 +122,7 @@ Then we would see the following:
|
||||
|
||||
<p className="text--center">
|
||||
<img
|
||||
src={require("@site/static/img/assetshandler-image.png").default}
|
||||
src={require("@site/static/img/assetshandler-image.webp").default}
|
||||
style={{ width: "75%" }}
|
||||
/>
|
||||
</p>
|
||||
|
||||
@@ -9,7 +9,7 @@ Currently, we support [Visual Studio Code](https://code.visualstudio.com/) but a
|
||||
|
||||
<p className="text--center">
|
||||
<img
|
||||
src={require("@site/static/img/vscode.png").default}
|
||||
src={require("@site/static/img/vscode.webp").default}
|
||||
style={{ width: "75%" }}
|
||||
/>
|
||||
</p>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<p style={{ "text-align": "center" }}>
|
||||
<img
|
||||
src={require("@site/static/img/nsis.png").default}
|
||||
src={require("@site/static/img/nsis.webp").default}
|
||||
style={{ "max-width": "50%" }}
|
||||
/>
|
||||
<br />
|
||||
|
||||
@@ -11,7 +11,7 @@ version of the runtime library. Finally, it is possible to bind Go methods to th
|
||||
Javascript methods that can be called, just as if they were local Javascript methods.
|
||||
|
||||
<div className="text--center">
|
||||
<img src={require("@site/static/img/architecture.png").default} width="75%" />
|
||||
<img src={require("@site/static/img/architecture.webp").default} width="75%" />
|
||||
</div>
|
||||
|
||||
## The Main Application
|
||||
|
||||
@@ -29,7 +29,7 @@ you'd expect from a modern native app.
|
||||
|
||||
<p class="text--center">
|
||||
<a href="https://varly.app/">
|
||||
<img src={require("@site/static/img/varly.png").default} width="75%" />
|
||||
<img src={require("@site/static/img/varly.webp").default} width="75%" />
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
@@ -548,9 +548,9 @@ Preconfigured titlebar settings are available:
|
||||
|
||||
| Setting | Example |
|
||||
| --------------------------- | --------------------------------------------- |
|
||||
| `mac.TitleBarDefault()` |  |
|
||||
| `mac.TitleBarHidden()` |  |
|
||||
| `mac.TitleBarHiddenInset()` |  |
|
||||
| `mac.TitleBarDefault()` |  |
|
||||
| `mac.TitleBarHidden()` |  |
|
||||
| `mac.TitleBarHiddenInset()` |  |
|
||||
|
||||
Example:
|
||||
|
||||
@@ -619,7 +619,7 @@ The "About" menu item will appear in the app menu:
|
||||
|
||||
<div class="text--center">
|
||||
<img
|
||||
src={require("@site/static/img/reference/about-menu.png").default}
|
||||
src={require("@site/static/img/reference/about-menu.webp").default}
|
||||
class="screenshot"
|
||||
/>
|
||||
</div>
|
||||
@@ -629,7 +629,7 @@ When clicked, that will open an about message box:
|
||||
|
||||
<div class="text--center">
|
||||
<img
|
||||
src={require("@site/static/img/reference/about-dialog.png").default}
|
||||
src={require("@site/static/img/reference/about-dialog.webp").default}
|
||||
width="40%"
|
||||
class="screenshot"
|
||||
/>
|
||||
|
||||
@@ -6,7 +6,7 @@ sidebar_position: 20
|
||||
|
||||
<div class="text--center">
|
||||
<img
|
||||
src={require("@site/static/img/tutorials/dogsapi/img.png").default}
|
||||
src={require("@site/static/img/tutorials/dogsapi/img.webp").default}
|
||||
width="50%"
|
||||
className="screenshot"
|
||||
/>
|
||||
|
||||
@@ -96,7 +96,7 @@ If we view the `build/bin` directory in Windows Explorer, we should see our proj
|
||||
|
||||
<div class="text--center">
|
||||
<img
|
||||
src={require("@site/static/img/helloworld-app-icon.png").default}
|
||||
src={require("@site/static/img/helloworld-app-icon.webp").default}
|
||||
width="134px"
|
||||
/>
|
||||
</div>
|
||||
@@ -112,7 +112,7 @@ You should see the application working as expected:
|
||||
|
||||
<div class="text--center">
|
||||
<img
|
||||
src={require("@site/static/img/windows-default-app.png").default}
|
||||
src={require("@site/static/img/windows-default-app.webp").default}
|
||||
width="50%"
|
||||
className="screenshot"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user