This package contains samples of kvSwiftWebUI framework.
ExampleServer is a sample server application with HTML frontend on kvSwiftWebUI framework served with backend on kvServerKit framework.
ExampleServer is running at example.swiftwebui.keyvar.com.
Note: swift run ExampleServer
command builds and runs ExampleServer sample.
- RootView.swift — root of frontend view hierarchy;
- BasicsView.swift — a view containing small examples of working with views and view modifiers;
- ColorCatalogView.swift — color library view using grids to present color previews
and
\.horizontalSizeClass
environment value to adapt UI to width of viewport; - ScriptView.swift - a view containing simple examples of java scripts.
- Aux/ — collection of auxiliary views;
- ExampleServer.swift — HTTP server also providing the main function.
Localization is an important part of developing user-friendly interfaces. This example displays «Hello!» greeting in English, Chinese, Hindi and many other languages. By default, language is evaluated from Accept-Language HTTP header.
LocalizedHello is running at hello.swiftwebui.keyvar.com.
Note: swift run LocalizedHello
command builds and runs LocalizedHello sample.
- Svyatoslav Popov (@sdpopov-keyvariable, info@keyvar.com).