minor: example improvement

This commit is contained in:
Gerasimos (Makis) Maropoulos 2023-01-25 05:50:42 +02:00
parent 0e0ca214cb
commit fc4214e9ae
No known key found for this signature in database
GPG Key ID: B9839E9CD30B7B6B
12 changed files with 13 additions and 15 deletions

View File

@ -283,12 +283,12 @@ Let's add our view, the static html.
<title>Iris + Vue.js • TodoMVC</title>
<link rel="stylesheet" href="https://unpkg.com/todomvc-app-css@2.0.4/index.css">
<!-- this needs to be loaded before guide's inline scripts -->
<script src="https://vuejs.org/js/vue.js"></script>
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<!-- $http -->
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<!-- -->
<script src="https://unpkg.com/director@1.2.8/build/director.js"></script>
<script src="https://cdn.jsdelivr.net/npm/neffos.js@latest/dist/neffos.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/neffos.js@0.1.27/dist/neffos.min.js"></script>
<style>
[v-cloak] {

View File

@ -6,12 +6,12 @@
<title>Iris + Vue.js • TodoMVC</title>
<link rel="stylesheet" href="https://unpkg.com/todomvc-app-css@2.0.4/index.css">
<!-- this needs to be loaded before guide's inline scripts -->
<script src="https://vuejs.org/js/vue.js"></script>
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<!-- $http -->
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<!-- -->
<script src="https://unpkg.com/director@1.2.8/build/director.js"></script>
<script src="https://cdn.jsdelivr.net/npm/neffos.js@latest/dist/neffos.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/neffos.js@0.1.27/dist/neffos.min.js"></script>
<style>
[v-cloak] {

View File

@ -1,2 +0,0 @@
vue.js is not here to reduce the disk space for the examples.
Instead https://vuejs.org/js/vue.js is used instead.

View File

@ -41,7 +41,7 @@
However, `neffos.(min.)js` is a NPM package too so alternatively,
you can use it as dependency on your package.json and all nodejs-npm tooling become available:
see the "browserify" example for more-->
<script src="https://cdn.jsdelivr.net/npm/neffos.js@latest/dist/neffos.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/neffos.js@0.1.27/dist/neffos.min.js"></script>
<script type="text/javascript">
const wsURL = "ws://localhost:8080/protected/ws"
var outputTxt = document.getElementById("output");

View File

@ -26,7 +26,7 @@ func newApp() *iris.Application {
app := iris.New()
// Auth part.
app.RegisterView(iris.Blocks(iris.Dir("./views"), ".html").
app.RegisterView(iris.Blocks("./views", ".html").
LayoutDir("layouts").
Layout("main"))

View File

@ -1 +1 @@
<i>Iris Web Framework &copy; 2022</i>
<i>Iris Web Framework &copy; 2023</i>

View File

@ -41,7 +41,7 @@
However, `neffos.(min.)js` is a NPM package too so alternatively,
you can use it as dependency on your package.json and all nodejs-npm tooling become available:
see the "browserify" example for more-->
<script src="https://cdn.jsdelivr.net/npm/neffos.js@latest/dist/neffos.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/neffos.js@0.1.27/dist/neffos.min.js"></script>
<script type="text/javascript">
const wsURL = "ws://localhost:8080/websocket"
var outputTxt = document.getElementById("output");

View File

@ -10,7 +10,7 @@
However, `neffos.(min.)js` is a NPM package too so alternatively,
you can use it as dependency on your package.json and all nodejs-npm tooling become available:
see the "browserify" example for more-->
<script src="https://cdn.jsdelivr.net/npm/neffos.js@latest/dist/neffos.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/neffos.js@0.1.27/dist/neffos.min.js"></script>
<script>
// `neffos` global variable is available now.
var scheme = document.location.protocol == "https:" ? "wss" : "ws";

View File

@ -34,7 +34,7 @@
var PAGE_SOURCE = {{ .PageID }}
</script>
<script src="https://cdn.jsdelivr.net/npm/neffos.js@latest/dist/neffos.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/neffos.js@0.1.27/dist/neffos.min.js"></script>
<script src="/js/visitors.js"></script>

View File

@ -20,7 +20,7 @@
var PAGE_SOURCE = {{ .PageID }}
</script>
<script src="https://cdn.jsdelivr.net/npm/neffos.js@latest/dist/neffos.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/neffos.js@0.1.27/dist/neffos.min.js"></script>
<script src="/js/visitors.js"></script>

View File

@ -137,8 +137,8 @@ func New() *Application {
// Default with "debug" Logger Level.
// Localization enabled on "./locales" directory
// and HTML templates on "./views" or "./templates" directory.
// It runs with the AccessLog on "./access.log",
// CORS (allow all), Recovery and Request ID middleware already attached.
// CORS (allow all), Recovery and
// Request ID middleware already registered.
func Default() *Application {
app := New()
// Set default log level.