mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 02:31:04 +01:00
minor: example improvement
This commit is contained in:
parent
0e0ca214cb
commit
fc4214e9ae
|
@ -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] {
|
||||
|
|
|
@ -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] {
|
||||
|
|
|
@ -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.
|
|
@ -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");
|
||||
|
|
|
@ -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"))
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
<i>Iris Web Framework © 2022</i>
|
||||
<i>Iris Web Framework © 2023</i>
|
|
@ -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");
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
4
iris.go
4
iris.go
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user