Update Model Viewer
This commit is contained in:
parent
4e3da8feb8
commit
4f500d431a
|
|
@ -4,4 +4,6 @@ date = "2019-01-10T04:14:10+01:00"
|
||||||
draft = false
|
draft = false
|
||||||
keywords = []
|
keywords = []
|
||||||
type = "gallery"
|
type = "gallery"
|
||||||
|
outputs = ["HTML", "JSON"]
|
||||||
|
show_breadcrumbs = true
|
||||||
+++
|
+++
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,7 @@ date = "2019-01-10T04:14:10+01:00"
|
||||||
draft = false
|
draft = false
|
||||||
type = "gallery"
|
type = "gallery"
|
||||||
keywords = []
|
keywords = []
|
||||||
|
outputs = ["HTML", "JSON"]
|
||||||
|
show_breadcrumbs = true
|
||||||
+++
|
+++
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 36 KiB |
|
|
@ -7,20 +7,30 @@ alt = "Urnengrababdeckung mit Umrandung"
|
||||||
material = "PP4, poliert"
|
material = "PP4, poliert"
|
||||||
article_id = "0001"
|
article_id = "0001"
|
||||||
ornament = "Kreuz"
|
ornament = "Kreuz"
|
||||||
description = "Hallo Welt"
|
description = "Urnengrab Abdeckplatte mit verklebter Einfassung"
|
||||||
offer = "/aktionen/preisbeispiel-urnengrab-2019/"
|
offer = "/aktionen/preisbeispiel-urnengrab-2019/"
|
||||||
used_for = ["Urnengrab"]
|
used_for = ["Urnengrab"]
|
||||||
keywords = []
|
keywords = []
|
||||||
|
outputs = ["HTML", "JSON"]
|
||||||
|
show_breadcrumbs = true
|
||||||
|
|
||||||
[[resources]]
|
[[resources]]
|
||||||
title = "Test #:counter"
|
title = "Test #:counter"
|
||||||
src = "bilder/urnengrababdeckung.png"
|
src = "bilder/abdeckung.png"
|
||||||
[resources.params]
|
[resources.params]
|
||||||
alt = "Bild von einem Test"
|
alt = "Bild von einem Test"
|
||||||
|
featured = true
|
||||||
|
|
||||||
[[resources]]
|
[[resources]]
|
||||||
title = "Model"
|
title = "Model"
|
||||||
src = "model/abdeckung.glb"
|
src = "model/abdeckung.gltf"
|
||||||
[resources.params]
|
[resources.params]
|
||||||
alt = "Bild von einem Test"
|
alt = "Bild von einem Test"
|
||||||
|
[[resources.params.textures]]
|
||||||
|
name = "Granit 1"
|
||||||
|
filename = "granit.jpg"
|
||||||
|
|
||||||
|
[[resources.params.textures]]
|
||||||
|
name = "Granit 2"
|
||||||
|
filename = "1280px-Rosa-Beta-Granit.jpg"
|
||||||
+++
|
+++
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 416 KiB |
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
|
After Width: | Height: | Size: 577 KiB |
|
|
@ -0,0 +1,37 @@
|
||||||
|
+++
|
||||||
|
title = "Urnengrab Abdeckung"
|
||||||
|
date = "2019-05-02T06:30:55+02:00"
|
||||||
|
draft = false
|
||||||
|
alt = "Urnengrababdeckung mit Umrandung"
|
||||||
|
material = "PP4, poliert"
|
||||||
|
article_id = "0001"
|
||||||
|
ornament = "Kreuz"
|
||||||
|
description = "Urnengrab Abdeckplatte mit verklebter Einfassung"
|
||||||
|
offer = "/aktionen/preisbeispiel-urnengrab-2019/"
|
||||||
|
type = "model"
|
||||||
|
used_for = ["Urnengrab"]
|
||||||
|
keywords = []
|
||||||
|
outputs = ["HTML", "JSON"]
|
||||||
|
|
||||||
|
[[resources]]
|
||||||
|
title = "Test #:counter"
|
||||||
|
src = "bilder/abdeckung.png"
|
||||||
|
[resources.params]
|
||||||
|
alt = "Bild von einem Test"
|
||||||
|
featured = true
|
||||||
|
|
||||||
|
[[resources]]
|
||||||
|
title = "Model"
|
||||||
|
src = "model/abdeckung.gltf"
|
||||||
|
[resources.params]
|
||||||
|
alt = "Bild von einem Test"
|
||||||
|
[[resources.params.textures]]
|
||||||
|
name = "Granit 1"
|
||||||
|
filename = "granit.jpg"
|
||||||
|
|
||||||
|
[[resources.params.textures]]
|
||||||
|
name = "Granit 2"
|
||||||
|
filename = "1280px-Rosa-Beta-Granit.jpg"
|
||||||
|
+++
|
||||||
|
|
||||||
|
Hallo
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
+++
|
+++
|
||||||
title = "Zulieferer Und Partnerbetriebe"
|
title = "Lieferanten und Partner"
|
||||||
date = "2019-01-12T08:59:01+01:00"
|
date = "2019-01-12T08:59:01+01:00"
|
||||||
draft = false
|
draft = false
|
||||||
type = "page"
|
type = "page"
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,11 @@
|
||||||
{{- if eq .Kind "home" -}}
|
{{- if eq .Kind "home" -}}
|
||||||
{{- partial "banner.html" . -}}
|
{{- partial "banner.html" . -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
{{- if .Params.show_breadcrumbs -}}
|
||||||
|
<div class="container">
|
||||||
|
{{- partial "breadcrumbs.html" . }}
|
||||||
|
</div>
|
||||||
|
{{- end -}}
|
||||||
<div id="page-wrapper">
|
<div id="page-wrapper">
|
||||||
<div id="content">
|
<div id="content">
|
||||||
{{- block "content" . -}}
|
{{- block "content" . -}}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
"name": {{ .Title | jsonify }}
|
||||||
|
{{ with .Pages }}
|
||||||
|
,"pages": [
|
||||||
|
{{ range $index, $value := .}}
|
||||||
|
{{ if $index }},{{ end }}
|
||||||
|
{
|
||||||
|
"title": {{ .Title | jsonify }}
|
||||||
|
,"id": {{ .File.UniqueID | jsonify }}
|
||||||
|
,"url": {{ .RelPermalink | jsonify }}
|
||||||
|
,"date": {{ .PublishDate | jsonify }}
|
||||||
|
,"modified": {{ .Lastmod | jsonify }}
|
||||||
|
,"summary": {{ .Summary | jsonify }}
|
||||||
|
,"type": {{ .Type | jsonify }}
|
||||||
|
{{ with .Params.description }},"description": {{ . | jsonify }}{{ end }}
|
||||||
|
{{ with .Params.alt }},"alt": {{ . | jsonify }}{{ end }}
|
||||||
|
{{ with .Keywords }}
|
||||||
|
,"keywords": {{ . | jsonify }}
|
||||||
|
{{ end }}
|
||||||
|
{{ range $value.Resources.ByType "image" }}
|
||||||
|
{{ if .Params.featured }}
|
||||||
|
{{ $orig := . }}
|
||||||
|
,"image":
|
||||||
|
{
|
||||||
|
"url": {{ .RelPermalink | jsonify }},
|
||||||
|
"alt": {{ .Params.alt | jsonify }}
|
||||||
|
{{ with .Params.description }},"description": {{ . | jsonify }}{{ end }}
|
||||||
|
}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
}
|
||||||
|
{{ end }}
|
||||||
|
]
|
||||||
|
{{ end }}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"title": {{ .Title | jsonify }}
|
||||||
|
,"id": {{ .File.UniqueID | jsonify }}
|
||||||
|
,"url": {{ .RelPermalink | jsonify }}
|
||||||
|
,"date": {{ .PublishDate | jsonify }}
|
||||||
|
,"modified": {{ .Lastmod | jsonify }}
|
||||||
|
,"summary": {{ .Summary | jsonify }}
|
||||||
|
,"type": {{ .Type | jsonify }}
|
||||||
|
{{ with .Params.description }},"description": {{ . | jsonify }}{{ end }}
|
||||||
|
{{ with .Params.alt }},"alt": {{ . | jsonify }}{{ end }}
|
||||||
|
{{ range .Resources.ByType "image" }}
|
||||||
|
,"image": {
|
||||||
|
"url": {{ .RelPermalink | jsonify }},
|
||||||
|
"alt": {{ .Params.alt | jsonify }}
|
||||||
|
{{ with .Params.description }},"description": {{ . | jsonify }}{{ end }}
|
||||||
|
}
|
||||||
|
{{ end }}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"title": {{ .Title | jsonify }}
|
||||||
|
{{ range $index, $value := .Pages }}
|
||||||
|
{{ if $index }},{{ end }}
|
||||||
|
[
|
||||||
|
"title": {{ .Title | jsonify }}
|
||||||
|
,"id": {{ .File.UniqueID | jsonify }}
|
||||||
|
,"type": {{ .Type | jsonify }}
|
||||||
|
,"article_type": [{{ range $index, $value := .Params.used_for }}{{ if $index }}, {{ end }}{{ $value | jsonify }}{{ end }}]
|
||||||
|
{{ with .Params.offer }}
|
||||||
|
,"offer": {{ . | jsonify }}
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Params.ornament }}
|
||||||
|
,"ornament": {{ . | jsonify }}
|
||||||
|
{{ end }}
|
||||||
|
,"description": {{ .Params.description | jsonify }}
|
||||||
|
,"material": {{ .Params.material | jsonify }}
|
||||||
|
,"article_id": {{ .Params.article_id | jsonify }}
|
||||||
|
]
|
||||||
|
{{ end }}
|
||||||
|
}
|
||||||
|
|
@ -4,18 +4,16 @@
|
||||||
|
|
||||||
{{- define "main" -}}
|
{{- define "main" -}}
|
||||||
<main class="catalog" id="single">
|
<main class="catalog" id="single">
|
||||||
<article>
|
<article id="catalog-article">
|
||||||
{{- partial "catalog-article.html" . -}}
|
{{- partial "catalog-article.html" . -}}
|
||||||
</article>
|
</article>
|
||||||
</main>
|
</main>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- define "scripts" -}}
|
{{- define "head" -}}
|
||||||
{{- $js := resources.Get "js/modelViewer.js" -}}
|
{{ partial "part/style.html" (dict "ctx" . "path" "css/catalog.css")}}
|
||||||
{{ if .Site.IsServer }}
|
{{- end -}}
|
||||||
<script src="{{ $js.RelPermalink }}"></script>
|
|
||||||
{{ else }}
|
{{- define "scripts" -}}
|
||||||
{{- $js = $js | resources.Fingerprint -}}
|
{{ partial "part/script.html" (dict "ctx" . "path" "js/catalog.bundle.js")}}
|
||||||
<script src="{{ $js.RelPermalink }}" integrity="{{ $js.Data.Integrity }}"></script>
|
|
||||||
{{ end }}
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
{
|
||||||
|
"title": {{ .Title | jsonify }}
|
||||||
|
,"id": {{ .File.UniqueID | jsonify }}
|
||||||
|
,"url": {{ .RelPermalink | jsonify }}
|
||||||
|
,"date": {{ .PublishDate | jsonify }}
|
||||||
|
,"modified": {{ .Lastmod | jsonify }}
|
||||||
|
,"content": {{ .RawContent | jsonify }}
|
||||||
|
{{ with .Params.description }},"description": {{ . | jsonify }}{{ end }}
|
||||||
|
{{ with .Params.alt }},"alt": {{ . | jsonify }}{{ end }}
|
||||||
|
{{ range .Resources.ByType "image" }}
|
||||||
|
,"images": {
|
||||||
|
"url": {{ .RelPermalink | jsonify }},
|
||||||
|
"alt": {{ .Params.alt | jsonify }}
|
||||||
|
{{ with .Params.description }},"description": {{ . | jsonify }}{{ end }}
|
||||||
|
}
|
||||||
|
{{ end }}
|
||||||
|
,"article_type": [{{ range $index, $value := .Params.used_for }}{{ if $index }}, {{ end }}{{ $value | jsonify }}{{ end }}]
|
||||||
|
{{ with .Params.offer }}
|
||||||
|
,"offer": {{ . | jsonify }}
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Params.ornament }}
|
||||||
|
,"ornament": {{ . | jsonify }}
|
||||||
|
{{ end }}
|
||||||
|
,"description": {{ .Params.description | jsonify }}
|
||||||
|
,"material": {{ .Params.material | jsonify }}
|
||||||
|
,"article_id": {{ .Params.article_id | jsonify }}
|
||||||
|
,"model":
|
||||||
|
{{ $res := .Resources }}
|
||||||
|
{{ with .Resources.GetMatch "model/*.gl*" }}
|
||||||
|
{"url": {{ .RelPermalink | jsonify }}, "title": {{ .Title | jsonify }}, "textures": [{{ range $index, $value := .Params.textures }}
|
||||||
|
{{ $texture := printf "%s%s" "model/" $value.filename }}
|
||||||
|
{{ if $index }}, {{end}}{"name": {{ $value.name | jsonify }}, "url": {{ with $res.GetMatch $texture }}{{ .RelPermalink | jsonify }}{{ end }}}
|
||||||
|
{{ end }}]
|
||||||
|
}
|
||||||
|
{{ end }}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
{{- define "title" -}}
|
||||||
|
{{ .Title }} • {{ .Site.Title }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "main" -}}
|
||||||
|
<main class="model" id="single">
|
||||||
|
<article id="model">
|
||||||
|
<div id="model-viewer-root"></div>
|
||||||
|
</article>
|
||||||
|
</main>
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "head" -}}
|
||||||
|
{{ partial "part/style.html" (dict "ctx" . "path" "css/catalog.css")}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "scripts" -}}
|
||||||
|
{{ partial "part/script.html" (dict "ctx" . "path" "js/catalog.bundle.js")}}
|
||||||
|
{{- end -}}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
<nav class="breadcrumbs">
|
||||||
|
<ol class="nav navbar-nav">
|
||||||
|
{{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
|
||||||
|
</ol>
|
||||||
|
{{ define "breadcrumbnav" }}
|
||||||
|
{{ if .p1.Parent }}
|
||||||
|
{{ template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2 ) }}
|
||||||
|
{{ else if not .p1.IsHome }}
|
||||||
|
{{ template "breadcrumbnav" (dict "p1" .p1.Site.Home "p2" .p2 ) }}
|
||||||
|
{{ end }}
|
||||||
|
<li class="{{ if eq .p1 .p2 }} active{{ end }}">
|
||||||
|
<a href="{{ .p1.Permalink }}">{{ if .p1.IsHome }}Startseite{{ else }}{{ .p1.Title }}{{ end }}</a>{{ if ne .p1 .p2 }} <i class="fa fa-chevron-right"></i>{{ end }}
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</nav>
|
||||||
|
|
@ -3,19 +3,13 @@
|
||||||
</header>
|
</header>
|
||||||
<div class="content flex column">
|
<div class="content flex column">
|
||||||
<div class="padding">
|
<div class="padding">
|
||||||
{{ with .Resources.GetMatch "model/*.glb" }}
|
|
||||||
<div class="left" id="model-viewer">
|
|
||||||
<model-viewer model-url="{{ .RelPermalink }}"></model-viewer>
|
|
||||||
</div>
|
|
||||||
{{ else }}
|
|
||||||
{{- with .Resources.GetMatch "bilder/*" -}}
|
{{- with .Resources.GetMatch "bilder/*" -}}
|
||||||
{{- $orig := . -}}
|
{{- $orig := . -}}
|
||||||
{{ partial "figure.html" (dict "ctx" . "image" . "lightbox" true "class" "featured left" "showTitle" false "showDescription" false)}}
|
{{ partial "figure.html" (dict "ctx" . "image" . "lightbox" true "class" "featured left wide" "showTitle" false "showDescription" false)}}
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
{{ with .Params.offer }}<p class="offer"><a class="btn btn-secondary" href="{{ . }}">Angebot</a></p>{{ end }}
|
||||||
<p class="type">Typ: {{ range $index, $value := .Params.used_for }}{{ if $index }}, {{end}}{{ . }}{{end}}</p>
|
<p class="type">Typ: {{ range $index, $value := .Params.used_for }}{{ if $index }}, {{end}}{{ . }}{{end}}</p>
|
||||||
{{ with .Params.material }}<p class="material">Material: {{ . }}</p>{{ end }}
|
{{ with .Params.material }}<p class="material">Material: {{ . }}</p>{{ end }}
|
||||||
{{ with .Params.offer }}<p class="offer"><a href="{{ . }}">Angebot</a></p>{{ end }}
|
|
||||||
{{ with .Params.ornament }}<p class="ornament">Ornament: {{ . }}</p>{{ end }}
|
{{ with .Params.ornament }}<p class="ornament">Ornament: {{ . }}</p>{{ end }}
|
||||||
{{ with .Params.description }}<p class="description">{{ . }}</p>{{ end }}
|
{{ with .Params.description }}<p class="description">{{ . }}</p>{{ end }}
|
||||||
<p class="article-id">Art. Nr.: {{ .Params.article_id }}</p>
|
<p class="article-id">Art. Nr.: {{ .Params.article_id }}</p>
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,13 @@
|
||||||
src="{{ $imageMd.RelPermalink }}" />
|
src="{{ $imageMd.RelPermalink }}" />
|
||||||
{{- partial "schema/img.html" (dict "image" . "ctx" $ctx) -}}
|
{{- partial "schema/img.html" (dict "image" . "ctx" $ctx) -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ with .ctx.Params.offer }}
|
||||||
|
<div class="ribbon">
|
||||||
|
<span>
|
||||||
|
Angebot
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
<figcaption class="overlay caption hidden">
|
<figcaption class="overlay caption hidden">
|
||||||
<a href="{{ .image.Permalink }}" data-lightbox><h3>{{ $title }}</h3></a>
|
<a href="{{ .image.Permalink }}" data-lightbox><h3>{{ $title }}</h3></a>
|
||||||
{{- with $description -}}
|
{{- with $description -}}
|
||||||
|
|
@ -27,10 +34,12 @@
|
||||||
<p class="ornament">Ornament: {{ . }}</p>
|
<p class="ornament">Ornament: {{ . }}</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<p class="type">Typ: {{ range $index, $value := .ctx.Params.used_for }}{{ if $index }}, {{end}}{{ . }}{{end}}</p>
|
<p class="type">Typ: {{ range $index, $value := .ctx.Params.used_for }}{{ if $index }}, {{end}}{{ . }}{{end}}</p>
|
||||||
<p class="article_id">Art. Nr.: {{ .ctx.Params.article_id }}</p>
|
<p class="details">
|
||||||
{{ with .ctx.Resources.GetMatch "model/*.glb" }}
|
{{ with .ctx.Params.offer }}
|
||||||
<p class="details"><a href="{{$ctx.Permalink }}">Details</a></p>
|
<a class="btn btn-small btn-secondary" href="{{ . }}">Angebot</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
<a class="btn btn-small btn-primary" href="{{$ctx.RelPermalink }}">Details</a>
|
||||||
|
</p>
|
||||||
</figcaption>
|
</figcaption>
|
||||||
<noscript>
|
<noscript>
|
||||||
<figcaption class="description">
|
<figcaption class="description">
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
{{- $href := .ctx.Params.href }}
|
{{- $href := .ctx.Params.href }}
|
||||||
|
|
||||||
<figure {{- with .class }} class="{{ . }}"{{- end -}}>
|
<figure {{- with .class }} class="{{ . }}"{{- end -}}>
|
||||||
<a href="{{- with $href -}}{{ . }}{{ else }}{{ .ctx.Permalink }}{{ end }}"{{- with .lightbox }} data-lightbox{{- end -}}>
|
<a href="{{- with $href -}}{{ . }}{{ else }}{{ .ctx.RelPermalink }}{{ end }}"{{- with .lightbox }} data-lightbox{{- end -}}>
|
||||||
{{- partial "img.html" (dict "image" .image "ctx" .ctx "keepOriginal" $keep "class" $class) -}}
|
{{- partial "img.html" (dict "image" .image "ctx" .ctx "keepOriginal" $keep "class" $class) -}}
|
||||||
</a>
|
</a>
|
||||||
<figcaption class="description">
|
<figcaption class="description">
|
||||||
|
|
|
||||||
|
|
@ -8,13 +8,7 @@
|
||||||
{{- if (eq .Kind "section") -}}
|
{{- if (eq .Kind "section") -}}
|
||||||
{{- partial "schema/collectionpage.html" . -}}
|
{{- partial "schema/collectionpage.html" . -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $css := resources.Get "css/style.css" -}}
|
{{ partial "part/style.html" (dict "ctx" . "path" "css/style.css" )}}
|
||||||
{{ if .Site.IsServer }}
|
|
||||||
<link rel="stylesheet" href="{{ $css.RelPermalink }}">
|
|
||||||
{{ else }}
|
|
||||||
{{- $css = $css | resources.Fingerprint -}}
|
|
||||||
<link rel="stylesheet" href="{{ $css.Permalink }}" integrity="{{ $css.Data.Integrity }}">
|
|
||||||
{{ end }}
|
|
||||||
<link rel="shortcut icon" href="/img/favicon.ico">
|
<link rel="shortcut icon" href="/img/favicon.ico">
|
||||||
<link rel="icon" type="image/svg+xml" href="/img/favicon.svg">
|
<link rel="icon" type="image/svg+xml" href="/img/favicon.svg">
|
||||||
<link rel="icon" type="image/png" href="/img/favicon.png" sizes="32x32">
|
<link rel="icon" type="image/png" href="/img/favicon.png" sizes="32x32">
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
{{- $js := resources.Get .path -}}
|
||||||
|
{{ if .ctx.Site.IsServer }}
|
||||||
|
<script src="{{ $js.RelPermalink }}"></script>
|
||||||
|
{{ else }}
|
||||||
|
{{- $js = $js | resources.Fingerprint -}}
|
||||||
|
<script src="{{ $js.RelPermalink }}" integrity="{{ $js.Data.Integrity }}"></script>
|
||||||
|
{{ end }}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
{{- $css := resources.Get .path -}}
|
||||||
|
{{ if .ctx.Site.IsServer }}
|
||||||
|
<link rel="stylesheet" href="{{ $css.RelPermalink }}">
|
||||||
|
{{ else }}
|
||||||
|
{{- $css = $css | resources.Fingerprint -}}
|
||||||
|
<link rel="stylesheet" href="{{ $css.Permalink }}" integrity="{{ $css.Data.Integrity }}">
|
||||||
|
{{ end }}
|
||||||
|
|
@ -1,10 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
var $googleAnalytics = '{{ .Site.GoogleAnalytics }}';
|
var $googleAnalytics = '{{ .Site.GoogleAnalytics }}';
|
||||||
</script>
|
</script>
|
||||||
{{- $js := resources.Get "js/bundle.js" -}}
|
|
||||||
{{ if .Site.IsServer }}
|
{{ partial "part/script.html" (dict "ctx" . "path" "js/common.bundle.js")}}
|
||||||
<script src="{{ $js.RelPermalink }}"></script>
|
|
||||||
{{ else }}
|
|
||||||
{{- $js = $js | resources.Fingerprint -}}
|
|
||||||
<script src="{{ $js.RelPermalink }}" integrity="{{ $js.Data.Integrity }}"></script>
|
|
||||||
{{ end }}
|
|
||||||
|
|
@ -1476,6 +1476,176 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"axios": {
|
||||||
|
"version": "0.18.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz",
|
||||||
|
"integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=",
|
||||||
|
"requires": {
|
||||||
|
"follow-redirects": "^1.3.0",
|
||||||
|
"is-buffer": "^1.1.5"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"babel-code-frame": {
|
||||||
|
"version": "6.26.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
|
||||||
|
"integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"chalk": "^1.1.3",
|
||||||
|
"esutils": "^2.0.2",
|
||||||
|
"js-tokens": "^3.0.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"ansi-styles": {
|
||||||
|
"version": "2.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
||||||
|
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"chalk": {
|
||||||
|
"version": "1.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
||||||
|
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ansi-styles": "^2.2.1",
|
||||||
|
"escape-string-regexp": "^1.0.2",
|
||||||
|
"has-ansi": "^2.0.0",
|
||||||
|
"strip-ansi": "^3.0.0",
|
||||||
|
"supports-color": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"js-tokens": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
|
||||||
|
"integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"supports-color": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"babel-core": {
|
||||||
|
"version": "6.26.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz",
|
||||||
|
"integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"babel-code-frame": "^6.26.0",
|
||||||
|
"babel-generator": "^6.26.0",
|
||||||
|
"babel-helpers": "^6.24.1",
|
||||||
|
"babel-messages": "^6.23.0",
|
||||||
|
"babel-register": "^6.26.0",
|
||||||
|
"babel-runtime": "^6.26.0",
|
||||||
|
"babel-template": "^6.26.0",
|
||||||
|
"babel-traverse": "^6.26.0",
|
||||||
|
"babel-types": "^6.26.0",
|
||||||
|
"babylon": "^6.18.0",
|
||||||
|
"convert-source-map": "^1.5.1",
|
||||||
|
"debug": "^2.6.9",
|
||||||
|
"json5": "^0.5.1",
|
||||||
|
"lodash": "^4.17.4",
|
||||||
|
"minimatch": "^3.0.4",
|
||||||
|
"path-is-absolute": "^1.0.1",
|
||||||
|
"private": "^0.1.8",
|
||||||
|
"slash": "^1.0.0",
|
||||||
|
"source-map": "^0.5.7"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"json5": {
|
||||||
|
"version": "0.5.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz",
|
||||||
|
"integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"slash": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"babel-generator": {
|
||||||
|
"version": "6.26.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz",
|
||||||
|
"integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"babel-messages": "^6.23.0",
|
||||||
|
"babel-runtime": "^6.26.0",
|
||||||
|
"babel-types": "^6.26.0",
|
||||||
|
"detect-indent": "^4.0.0",
|
||||||
|
"jsesc": "^1.3.0",
|
||||||
|
"lodash": "^4.17.4",
|
||||||
|
"source-map": "^0.5.7",
|
||||||
|
"trim-right": "^1.0.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"jsesc": {
|
||||||
|
"version": "1.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz",
|
||||||
|
"integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"babel-helper-evaluate-path": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-helper-evaluate-path/-/babel-helper-evaluate-path-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-dRFlMTqUJRGzx5a2smKxmptDdNCXKSkPcXWzKLwAV72hvIZumrd/0z9RcewHkr7PmAEq+ETtpD1GK6wZ6ZUXzw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"babel-helper-flip-expressions": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-helper-flip-expressions/-/babel-helper-flip-expressions-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-kNGohWmtAG3b7tN1xocRQ5rsKkH/hpvZsMiGOJ1VwGJKhnwzR5KlB3rvKBaBPl5/IGHcopB2JN+r1SUEX1iMAw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"babel-helper-is-nodes-equiv": {
|
||||||
|
"version": "0.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-helper-is-nodes-equiv/-/babel-helper-is-nodes-equiv-0.0.1.tgz",
|
||||||
|
"integrity": "sha1-NOmzALFHnd2Y7HfqC76TQt/jloQ=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"babel-helper-is-void-0": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-helper-is-void-0/-/babel-helper-is-void-0-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-JVqdX8y7Rf/x4NwbqtUI7mdQjL9HWoDnoAEQ8Gv8oxzjvbJv+n75f7l36m9Y8C7sCUltX3V5edndrp7Hp1oSXQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"babel-helper-mark-eval-scopes": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-helper-mark-eval-scopes/-/babel-helper-mark-eval-scopes-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-nrho5Dg4vl0VUgURVpGpEGiwbst5JX7efIyDHFxmkCx/ocQFnrPt8ze9Kxl6TKjR29bJ7D/XKY1NMlSxOQJRbQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"babel-helper-remove-or-void": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-helper-remove-or-void/-/babel-helper-remove-or-void-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-D68W1M3ibCcbg0ysh3ww4/O0g10X1CXK720oOuR8kpfY7w0yP4tVcpK7zDmI1JecynycTQYAZ1rhLJo9aVtIKQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"babel-helper-to-multiple-sequence-expressions": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-helper-to-multiple-sequence-expressions/-/babel-helper-to-multiple-sequence-expressions-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-1uCrBD+EAaMnAYh7hc944n8Ga19y3daEnoXWPYDvFVsxMCc1l8aDjksApaCEaNSSuewq8BEcff47Cy1PbLg2Gw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"babel-helpers": {
|
||||||
|
"version": "6.24.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz",
|
||||||
|
"integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"babel-runtime": "^6.22.0",
|
||||||
|
"babel-template": "^6.24.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"babel-loader": {
|
"babel-loader": {
|
||||||
"version": "8.0.5",
|
"version": "8.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.0.5.tgz",
|
||||||
|
|
@ -1488,6 +1658,344 @@
|
||||||
"util.promisify": "^1.0.0"
|
"util.promisify": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"babel-messages": {
|
||||||
|
"version": "6.23.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz",
|
||||||
|
"integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"babel-runtime": "^6.22.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"babel-minify-webpack-plugin": {
|
||||||
|
"version": "0.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-minify-webpack-plugin/-/babel-minify-webpack-plugin-0.3.1.tgz",
|
||||||
|
"integrity": "sha512-Johg6Ju0Gxevk2R55eutMqnyXwlyUzCtwunBpiyNzoxGnKum+x5nfNuYZYHGd5Bmc1gmhjwzb7GkxHWOtYWmtQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"babel-core": "^6.26.0",
|
||||||
|
"babel-preset-minify": "^0.3.0",
|
||||||
|
"webpack-sources": "^1.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"babel-plugin-minify-builtins": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-plugin-minify-builtins/-/babel-plugin-minify-builtins-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-MqhSHlxkmgURqj3144qPksbZ/qof1JWdumcbucc4tysFcf3P3V3z3munTevQgKEFNMd8F5/ECGnwb63xogLjAg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"babel-helper-evaluate-path": "^0.3.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"babel-plugin-minify-constant-folding": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-plugin-minify-constant-folding/-/babel-plugin-minify-constant-folding-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-1XeRpx+aY1BuNY6QU/cm6P+FtEi3ar3XceYbmC+4q4W+2Ewq5pL7V68oHg1hKXkBIE0Z4/FjSoHz6vosZLOe/A==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"babel-helper-evaluate-path": "^0.3.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"babel-plugin-minify-dead-code-elimination": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-plugin-minify-dead-code-elimination/-/babel-plugin-minify-dead-code-elimination-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-SjM2Fzg85YZz+q/PNJ/HU4O3W98FKFOiP9K5z3sfonlamGOzvZw3Eup2OTiEBsbbqTeY8yzNCAv3qpJRYCgGmw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"babel-helper-evaluate-path": "^0.3.0",
|
||||||
|
"babel-helper-mark-eval-scopes": "^0.3.0",
|
||||||
|
"babel-helper-remove-or-void": "^0.3.0",
|
||||||
|
"lodash.some": "^4.6.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"babel-plugin-minify-flip-comparisons": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-plugin-minify-flip-comparisons/-/babel-plugin-minify-flip-comparisons-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-B8lK+ekcpSNVH7PZpWDe5nC5zxjRiiT4nTsa6h3QkF3Kk6y9qooIFLemdGlqBq6j0zALEnebvCpw8v7gAdpgnw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"babel-helper-is-void-0": "^0.3.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"babel-plugin-minify-guarded-expressions": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-plugin-minify-guarded-expressions/-/babel-plugin-minify-guarded-expressions-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-O+6CvF5/Ttsth3LMg4/BhyvVZ82GImeKMXGdVRQGK/8jFiP15EjRpdgFlxv3cnqRjqdYxLCS6r28VfLpb9C/kA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"babel-helper-flip-expressions": "^0.3.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"babel-plugin-minify-infinity": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-plugin-minify-infinity/-/babel-plugin-minify-infinity-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-Sj8ia3/w9158DWieUxU6/VvnYVy59geeFEkVgLZYBE8EBP+sN48tHtBM/jSgz0ejEdBlcfqJ6TnvPmVXTzR2BQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"babel-plugin-minify-mangle-names": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-plugin-minify-mangle-names/-/babel-plugin-minify-mangle-names-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-PYTonhFWURsfAN8achDwvR5Xgy6EeTClLz+fSgGRqjAIXb0OyFm3/xfccbQviVi1qDXmlSnt6oJhBg8KE4Fn7Q==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"babel-helper-mark-eval-scopes": "^0.3.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"babel-plugin-minify-numeric-literals": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-plugin-minify-numeric-literals/-/babel-plugin-minify-numeric-literals-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-TgZj6ay8zDw74AS3yiIfoQ8vRSNJisYO/Du60S8nPV7EW7JM6fDMx5Sar6yVHlVuuwNgvDUBh191K33bVrAhpg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"babel-plugin-minify-replace": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-plugin-minify-replace/-/babel-plugin-minify-replace-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-VR6tTg2Lt0TicHIOw04fsUtpPw7RaRP8PC8YzSFwEixnzvguZjZJoL7TgG7ZyEWQD1cJ96UezswECmFNa815bg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"babel-plugin-minify-simplify": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-plugin-minify-simplify/-/babel-plugin-minify-simplify-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-2M16ytQOCqBi7bYMu4DCWn8e6KyFCA108F6+tVrBJxOmm5u2sOmTFEa8s94tR9RHRRNYmcUf+rgidfnzL3ik9Q==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"babel-helper-flip-expressions": "^0.3.0",
|
||||||
|
"babel-helper-is-nodes-equiv": "^0.0.1",
|
||||||
|
"babel-helper-to-multiple-sequence-expressions": "^0.3.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"babel-plugin-minify-type-constructors": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-plugin-minify-type-constructors/-/babel-plugin-minify-type-constructors-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-XRXpvsUCPeVw9YEUw+9vSiugcSZfow81oIJT0yR9s8H4W7yJ6FHbImi5DJHoL8KcDUjYnL9wYASXk/fOkbyR6Q==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"babel-helper-is-void-0": "^0.3.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"babel-plugin-transform-inline-consecutive-adds": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-plugin-transform-inline-consecutive-adds/-/babel-plugin-transform-inline-consecutive-adds-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-iZsYAIjYLLfLK0yN5WVT7Xf7Y3wQ9Z75j9A8q/0IglQSpUt2ppTdHlwl/GeaXnxdaSmsxBu861klbTBbv2n+RA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"babel-plugin-transform-member-expression-literals": {
|
||||||
|
"version": "6.9.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-plugin-transform-member-expression-literals/-/babel-plugin-transform-member-expression-literals-6.9.4.tgz",
|
||||||
|
"integrity": "sha1-NwOcmgwzE6OUlfqsL/OmtbnQOL8=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"babel-plugin-transform-merge-sibling-variables": {
|
||||||
|
"version": "6.9.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-plugin-transform-merge-sibling-variables/-/babel-plugin-transform-merge-sibling-variables-6.9.4.tgz",
|
||||||
|
"integrity": "sha1-hbQi/DN3tEnJ0c3kQIcgNTJAHa4=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"babel-plugin-transform-minify-booleans": {
|
||||||
|
"version": "6.9.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-plugin-transform-minify-booleans/-/babel-plugin-transform-minify-booleans-6.9.4.tgz",
|
||||||
|
"integrity": "sha1-rLs+VqNVXdI5KOS1gtKFFi3SsZg=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"babel-plugin-transform-property-literals": {
|
||||||
|
"version": "6.9.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-plugin-transform-property-literals/-/babel-plugin-transform-property-literals-6.9.4.tgz",
|
||||||
|
"integrity": "sha1-mMHSHiVXNlc/k+zlRFn2ziSYXTk=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"esutils": "^2.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"babel-plugin-transform-regexp-constructors": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-plugin-transform-regexp-constructors/-/babel-plugin-transform-regexp-constructors-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-h92YHzyl042rb0naKO8frTHntpRFwRgKkfWD8602kFHoQingjJNtbvZzvxqHncJ6XmKVyYvfrBpDOSkCTDIIxw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"babel-plugin-transform-remove-console": {
|
||||||
|
"version": "6.9.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-console/-/babel-plugin-transform-remove-console-6.9.4.tgz",
|
||||||
|
"integrity": "sha1-uYA2DAZzhOJLNXpYjYB9PINSd4A=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"babel-plugin-transform-remove-debugger": {
|
||||||
|
"version": "6.9.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-debugger/-/babel-plugin-transform-remove-debugger-6.9.4.tgz",
|
||||||
|
"integrity": "sha1-QrcnYxyXl44estGZp67IShgznvI=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"babel-plugin-transform-remove-undefined": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-undefined/-/babel-plugin-transform-remove-undefined-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-TYGQucc8iP3LJwN3kDZLEz5aa/2KuFrqpT+s8f8NnHsBU1sAgR3y8Opns0xhC+smyDYWscqFCKM1gbkWQOhhnw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"babel-helper-evaluate-path": "^0.3.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"babel-plugin-transform-simplify-comparison-operators": {
|
||||||
|
"version": "6.9.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-plugin-transform-simplify-comparison-operators/-/babel-plugin-transform-simplify-comparison-operators-6.9.4.tgz",
|
||||||
|
"integrity": "sha1-9ir+CWyrDh9ootdT/fKDiIRxzrk=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"babel-plugin-transform-undefined-to-void": {
|
||||||
|
"version": "6.9.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-plugin-transform-undefined-to-void/-/babel-plugin-transform-undefined-to-void-6.9.4.tgz",
|
||||||
|
"integrity": "sha1-viQcqBQEAwZ4t0hxcyK4nQyP4oA=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"babel-preset-minify": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-preset-minify/-/babel-preset-minify-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-+VV2GWEyak3eDOmzT1DDMuqHrw3VbE9nBNkx2LLVs4pH/Me32ND8DRpVDd8IRvk1xX5p75nygyRPtkMh6GIAbQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"babel-plugin-minify-builtins": "^0.3.0",
|
||||||
|
"babel-plugin-minify-constant-folding": "^0.3.0",
|
||||||
|
"babel-plugin-minify-dead-code-elimination": "^0.3.0",
|
||||||
|
"babel-plugin-minify-flip-comparisons": "^0.3.0",
|
||||||
|
"babel-plugin-minify-guarded-expressions": "^0.3.0",
|
||||||
|
"babel-plugin-minify-infinity": "^0.3.0",
|
||||||
|
"babel-plugin-minify-mangle-names": "^0.3.0",
|
||||||
|
"babel-plugin-minify-numeric-literals": "^0.3.0",
|
||||||
|
"babel-plugin-minify-replace": "^0.3.0",
|
||||||
|
"babel-plugin-minify-simplify": "^0.3.0",
|
||||||
|
"babel-plugin-minify-type-constructors": "^0.3.0",
|
||||||
|
"babel-plugin-transform-inline-consecutive-adds": "^0.3.0",
|
||||||
|
"babel-plugin-transform-member-expression-literals": "^6.9.0",
|
||||||
|
"babel-plugin-transform-merge-sibling-variables": "^6.9.0",
|
||||||
|
"babel-plugin-transform-minify-booleans": "^6.9.0",
|
||||||
|
"babel-plugin-transform-property-literals": "^6.9.0",
|
||||||
|
"babel-plugin-transform-regexp-constructors": "^0.3.0",
|
||||||
|
"babel-plugin-transform-remove-console": "^6.9.0",
|
||||||
|
"babel-plugin-transform-remove-debugger": "^6.9.0",
|
||||||
|
"babel-plugin-transform-remove-undefined": "^0.3.0",
|
||||||
|
"babel-plugin-transform-simplify-comparison-operators": "^6.9.0",
|
||||||
|
"babel-plugin-transform-undefined-to-void": "^6.9.0",
|
||||||
|
"lodash.isplainobject": "^4.0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"babel-register": {
|
||||||
|
"version": "6.26.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz",
|
||||||
|
"integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"babel-core": "^6.26.0",
|
||||||
|
"babel-runtime": "^6.26.0",
|
||||||
|
"core-js": "^2.5.0",
|
||||||
|
"home-or-tmp": "^2.0.0",
|
||||||
|
"lodash": "^4.17.4",
|
||||||
|
"mkdirp": "^0.5.1",
|
||||||
|
"source-map-support": "^0.4.15"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"core-js": {
|
||||||
|
"version": "2.6.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz",
|
||||||
|
"integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"source-map-support": {
|
||||||
|
"version": "0.4.18",
|
||||||
|
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz",
|
||||||
|
"integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"source-map": "^0.5.6"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"babel-runtime": {
|
||||||
|
"version": "6.26.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
|
||||||
|
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"core-js": "^2.4.0",
|
||||||
|
"regenerator-runtime": "^0.11.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"core-js": {
|
||||||
|
"version": "2.6.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.5.tgz",
|
||||||
|
"integrity": "sha512-klh/kDpwX8hryYL14M9w/xei6vrv6sE8gTHDG7/T/+SEovB/G4ejwcfE/CBzO6Edsu+OETZMZ3wcX/EjUkrl5A==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"regenerator-runtime": {
|
||||||
|
"version": "0.11.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
|
||||||
|
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"babel-template": {
|
||||||
|
"version": "6.26.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz",
|
||||||
|
"integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"babel-runtime": "^6.26.0",
|
||||||
|
"babel-traverse": "^6.26.0",
|
||||||
|
"babel-types": "^6.26.0",
|
||||||
|
"babylon": "^6.18.0",
|
||||||
|
"lodash": "^4.17.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"babel-traverse": {
|
||||||
|
"version": "6.26.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz",
|
||||||
|
"integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"babel-code-frame": "^6.26.0",
|
||||||
|
"babel-messages": "^6.23.0",
|
||||||
|
"babel-runtime": "^6.26.0",
|
||||||
|
"babel-types": "^6.26.0",
|
||||||
|
"babylon": "^6.18.0",
|
||||||
|
"debug": "^2.6.8",
|
||||||
|
"globals": "^9.18.0",
|
||||||
|
"invariant": "^2.2.2",
|
||||||
|
"lodash": "^4.17.4"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"globals": {
|
||||||
|
"version": "9.18.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz",
|
||||||
|
"integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"babel-types": {
|
||||||
|
"version": "6.26.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz",
|
||||||
|
"integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"babel-runtime": "^6.26.0",
|
||||||
|
"esutils": "^2.0.2",
|
||||||
|
"lodash": "^4.17.4",
|
||||||
|
"to-fast-properties": "^1.0.3"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"to-fast-properties": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz",
|
||||||
|
"integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"babylon": {
|
||||||
|
"version": "6.18.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
|
||||||
|
"integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"balanced-match": {
|
"balanced-match": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||||
|
|
@ -3327,6 +3835,15 @@
|
||||||
"integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=",
|
"integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"detect-indent": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz",
|
||||||
|
"integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"repeating": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"diffie-hellman": {
|
"diffie-hellman": {
|
||||||
"version": "5.0.3",
|
"version": "5.0.3",
|
||||||
"resolved": "http://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
|
"resolved": "http://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
|
||||||
|
|
@ -4019,6 +4536,29 @@
|
||||||
"readable-stream": "^2.3.6"
|
"readable-stream": "^2.3.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"follow-redirects": {
|
||||||
|
"version": "1.7.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.7.0.tgz",
|
||||||
|
"integrity": "sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==",
|
||||||
|
"requires": {
|
||||||
|
"debug": "^3.2.6"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"debug": {
|
||||||
|
"version": "3.2.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
|
||||||
|
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
|
||||||
|
"requires": {
|
||||||
|
"ms": "^2.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ms": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
|
||||||
|
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"for-in": {
|
"for-in": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
|
||||||
|
|
@ -4954,6 +5494,16 @@
|
||||||
"minimalistic-crypto-utils": "^1.0.1"
|
"minimalistic-crypto-utils": "^1.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"home-or-tmp": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"os-homedir": "^1.0.0",
|
||||||
|
"os-tmpdir": "^1.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"homedir-polyfill": {
|
"homedir-polyfill": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz",
|
||||||
|
|
@ -5375,8 +5925,7 @@
|
||||||
"is-buffer": {
|
"is-buffer": {
|
||||||
"version": "1.1.6",
|
"version": "1.1.6",
|
||||||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
|
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
|
||||||
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
|
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"is-builtin-module": {
|
"is-builtin-module": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
|
@ -5855,12 +6404,24 @@
|
||||||
"integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=",
|
"integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"lodash.isplainobject": {
|
||||||
|
"version": "4.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
|
||||||
|
"integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"lodash.memoize": {
|
"lodash.memoize": {
|
||||||
"version": "4.1.2",
|
"version": "4.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
|
||||||
"integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=",
|
"integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"lodash.some": {
|
||||||
|
"version": "4.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz",
|
||||||
|
"integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"lodash.tail": {
|
"lodash.tail": {
|
||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/lodash.tail/-/lodash.tail-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/lodash.tail/-/lodash.tail-4.1.1.tgz",
|
||||||
|
|
@ -6560,6 +7121,18 @@
|
||||||
"arch": "^2.1.0"
|
"arch": "^2.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"os-homedir": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
|
||||||
|
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"os-tmpdir": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
|
||||||
|
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"output-file-sync": {
|
"output-file-sync": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-2.0.1.tgz",
|
||||||
|
|
@ -9694,6 +10267,11 @@
|
||||||
"integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
|
"integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"vuex": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/vuex/-/vuex-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-mdHeHT/7u4BncpUZMlxNaIdcN/HIt1GsGG5LKByArvYG/v6DvHcOxvDCts+7SRdCoIRGllK8IMZvQtQXLppDYg=="
|
||||||
|
},
|
||||||
"watchpack": {
|
"watchpack": {
|
||||||
"version": "1.6.0",
|
"version": "1.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz",
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,15 @@
|
||||||
"author": "",
|
"author": "",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
"sideEffects": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/polyfill": "^7.4.4",
|
"@babel/polyfill": "^7.4.4",
|
||||||
"@fortawesome/fontawesome-free": "^5.8.1",
|
"@fortawesome/fontawesome-free": "^5.8.1",
|
||||||
|
"axios": "^0.18.0",
|
||||||
"core-js": "^3.0.1",
|
"core-js": "^3.0.1",
|
||||||
"three": "^0.104.0",
|
"three": "^0.104.0",
|
||||||
"vue": "^2.6.10"
|
"vue": "^2.6.10",
|
||||||
|
"vuex": "^3.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.4.4",
|
"@babel/cli": "^7.4.4",
|
||||||
|
|
@ -23,6 +26,7 @@
|
||||||
"@vue/web-component-wrapper": "^1.2.0",
|
"@vue/web-component-wrapper": "^1.2.0",
|
||||||
"autoprefixer": "^9.5.1",
|
"autoprefixer": "^9.5.1",
|
||||||
"babel-loader": "^8.0.5",
|
"babel-loader": "^8.0.5",
|
||||||
|
"babel-minify-webpack-plugin": "^0.3.1",
|
||||||
"clean-webpack-plugin": "^1.0.1",
|
"clean-webpack-plugin": "^1.0.1",
|
||||||
"cookieconsent": "^3.1.0",
|
"cookieconsent": "^3.1.0",
|
||||||
"css-loader": "^2.1.1",
|
"css-loader": "^2.1.1",
|
||||||
|
|
|
||||||
|
|
@ -1,45 +1,33 @@
|
||||||
function showOverlay(el) {
|
import Vue from "vue"
|
||||||
let classes = el.className;
|
|
||||||
if (classes.indexOf('hidden') !== -1) {
|
import CatalogArticle from "../vue/CatalogArticle.vue"
|
||||||
el.className = classes.replace(/ ?hidden ?/, '')
|
import ModelViewer from "../vue/ModelViewer.vue"
|
||||||
|
|
||||||
|
import store from "../vue/catalogArticle.store.js"
|
||||||
|
|
||||||
|
let modelViewerRoot = document.getElementById('model-viewer-root')
|
||||||
|
if (modelViewerRoot) {
|
||||||
|
new Vue({
|
||||||
|
store,
|
||||||
|
render: function(h) {
|
||||||
|
return h(ModelViewer)
|
||||||
|
},
|
||||||
|
beforeMount() {
|
||||||
|
this.modelUrl = this.$el.dataset.url
|
||||||
}
|
}
|
||||||
|
}).$mount(modelViewerRoot)
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideOverlay(el) {
|
|
||||||
let classes = el.className;
|
|
||||||
if (classes.indexOf('hidden') === -1) {
|
|
||||||
el.className = classes + ' hidden'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function toggleOverlay(el) {
|
let catalogArticle = document.getElementById('catalog-article')
|
||||||
if (el.className.indexOf('hidden') === -1) {
|
if (catalogArticle) {
|
||||||
hideOverlay(el)
|
new Vue({
|
||||||
} else {
|
store,
|
||||||
showOverlay(el)
|
render: function(h) {
|
||||||
|
return h(CatalogArticle)
|
||||||
|
},
|
||||||
|
beforeMount() {
|
||||||
|
this.modelUrl = this.$el.dataset.url
|
||||||
}
|
}
|
||||||
|
}).$mount(catalogArticle)
|
||||||
}
|
}
|
||||||
|
|
||||||
function addListeners(el, overlay) {
|
|
||||||
var isTouchSupported = "ontouchend" in document;
|
|
||||||
if (isTouchSupported) {
|
|
||||||
el.addEventListener('touchstart', ev => {
|
|
||||||
ev.preventDefault()
|
|
||||||
toggleOverlay(overlay)
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
el.addEventListener('mouseover', ev => {
|
|
||||||
ev.preventDefault()
|
|
||||||
showOverlay(overlay)
|
|
||||||
})
|
|
||||||
el.addEventListener('mouseleave', ev => {
|
|
||||||
ev.preventDefault()
|
|
||||||
hideOverlay(overlay)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
document.querySelectorAll('figure').forEach(figure => {
|
|
||||||
let overlay = figure.querySelector('.overlay')
|
|
||||||
addListeners(figure, overlay)
|
|
||||||
})
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
function showOverlay(el) {
|
||||||
|
if (el) {
|
||||||
|
let classes = el.className;
|
||||||
|
if (classes.indexOf('hidden') !== -1) {
|
||||||
|
el.className = classes.replace(/ ?hidden ?/, '')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function hideOverlay(el) {
|
||||||
|
if (el) {
|
||||||
|
let classes = el.className;
|
||||||
|
if (classes.indexOf('hidden') === -1) {
|
||||||
|
el.className = classes + ' hidden'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleOverlay(el) {
|
||||||
|
if (el) {
|
||||||
|
if (el.className.indexOf('hidden') === -1) {
|
||||||
|
hideOverlay(el)
|
||||||
|
} else {
|
||||||
|
showOverlay(el)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function addListeners(el, overlay) {
|
||||||
|
var isTouchSupported = "ontouchend" in document;
|
||||||
|
if (isTouchSupported) {
|
||||||
|
el.addEventListener('touchstart', ev => {
|
||||||
|
ev.preventDefault()
|
||||||
|
toggleOverlay(overlay)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
el.addEventListener('mouseover', ev => {
|
||||||
|
ev.preventDefault()
|
||||||
|
showOverlay(overlay)
|
||||||
|
})
|
||||||
|
el.addEventListener('mouseleave', ev => {
|
||||||
|
ev.preventDefault()
|
||||||
|
hideOverlay(overlay)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
document.querySelectorAll('figure').forEach(figure => {
|
||||||
|
let overlay = figure.querySelector('.overlay')
|
||||||
|
addListeners(figure, overlay)
|
||||||
|
})
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
import "./cookies"
|
import "./cookies"
|
||||||
import "./lightbox"
|
import "./lightbox"
|
||||||
import "./scrollspy"
|
import "./scrollspy"
|
||||||
import "./catalog"
|
import "./gallery"
|
||||||
//import "./catalogSimilar"
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
import Vue from "vue"
|
|
||||||
|
|
||||||
import ModelViewer from "../vue/ModelViewer.vue"
|
|
||||||
|
|
||||||
import wrap from '@vue/web-component-wrapper'
|
|
||||||
|
|
||||||
const myModelViewer = wrap(Vue, ModelViewer)
|
|
||||||
|
|
||||||
window.customElements.define('model-viewer', myModelViewer)
|
|
||||||
|
|
@ -310,6 +310,15 @@ figure {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.details {
|
||||||
|
line-height: 3rem;
|
||||||
|
|
||||||
|
a.btn {
|
||||||
|
text-shadow: none;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background-color: rgba(230,230,230,0.85);
|
background-color: rgba(230,230,230,0.85);
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|
@ -329,6 +338,27 @@ figure {
|
||||||
|
|
||||||
color: $font-color;
|
color: $font-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ribbon {
|
||||||
|
position: absolute;
|
||||||
|
right: 0px; top: 0px;
|
||||||
|
overflow: hidden;
|
||||||
|
width: 75px; height: 75px;
|
||||||
|
text-align: right;
|
||||||
|
|
||||||
|
span {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #d7c9aa;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold; line-height: 20px;
|
||||||
|
transform: rotate(45deg);
|
||||||
|
width: 100px; display: block;
|
||||||
|
background: $secondary-color;
|
||||||
|
box-shadow: 0 3px 10px -5px rgba(0, 0, 0, .5);
|
||||||
|
position: absolute;
|
||||||
|
top: 19px; right: -21px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.neg-margin {
|
.neg-margin {
|
||||||
|
|
@ -340,9 +370,16 @@ figure {
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
border-radius: $border-radius;
|
border-radius: $border-radius;
|
||||||
color: black
|
color: black
|
||||||
|
margin 0 1rem;
|
||||||
|
|
||||||
|
&.btn-small {
|
||||||
|
padding: .3rem 1rem;
|
||||||
|
margin: 1rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
a.btn-primary {
|
|
||||||
|
.btn-primary {
|
||||||
background-color: $primary-color;
|
background-color: $primary-color;
|
||||||
border: 1px solid $primary-color;
|
border: 1px solid $primary-color;
|
||||||
|
|
||||||
|
|
@ -353,6 +390,27 @@ a.btn-primary {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
a.btn-secondary,
|
||||||
|
a.btn-primary {
|
||||||
|
color: white;
|
||||||
|
|
||||||
|
&:active,
|
||||||
|
&:visited {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-secondary {
|
||||||
|
background-color: $secondary-color;
|
||||||
|
border: 1px solid $secondary-color;
|
||||||
|
|
||||||
|
color: white;
|
||||||
|
|
||||||
|
&:active,
|
||||||
|
&:visited {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.call-to-action {
|
.call-to-action {
|
||||||
min-height: 2rem;
|
min-height: 2rem;
|
||||||
|
|
@ -421,18 +479,32 @@ a.btn-primary {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
canvas {
|
.model-viewer {
|
||||||
background: white;
|
width: $min-column-width * 2 ;
|
||||||
}
|
height: $min-column-width * 2 / 1.333;
|
||||||
|
|
||||||
#model-viewer{
|
|
||||||
width: $min-column-width;
|
|
||||||
height: $min-column-width;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 500px) {
|
@media screen and (min-width: 500px) {
|
||||||
#model-viewer{
|
.model-viewer {
|
||||||
width: $min-column-width-desktop;
|
width: $min-column-width-desktop * 2;
|
||||||
height: $min-column-width-desktop;
|
height: $min-column-width-desktop * 2 / 1.333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
nav.breadcrumbs {
|
||||||
|
ol {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
|
||||||
|
li {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -41,6 +41,10 @@
|
||||||
#single {
|
#single {
|
||||||
.featured {
|
.featured {
|
||||||
max-width: $min-column-width-desktop;
|
max-width: $min-column-width-desktop;
|
||||||
|
|
||||||
|
&.wide {
|
||||||
|
max-width: $min-column-width-desktop * 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -67,5 +71,11 @@
|
||||||
&.article-id {
|
&.article-id {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
}
|
}
|
||||||
|
&.offer {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
margin: 1rem 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -11,6 +11,7 @@ $heading-font-family: "Roboto Slab", sans-serif;
|
||||||
$font-color: black;
|
$font-color: black;
|
||||||
$background-color: white;
|
$background-color: white;
|
||||||
$primary-color: #2d763a;
|
$primary-color: #2d763a;
|
||||||
|
$secondary-color: #720026;
|
||||||
|
|
||||||
$border-radius: 5px;
|
$border-radius: 5px;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,73 @@
|
||||||
|
<template>
|
||||||
|
<article v-if="articleData">
|
||||||
|
<header class="flex column padding">
|
||||||
|
<h1>{{ articleData.title }}</h1>
|
||||||
|
</header>
|
||||||
|
<div class="content flex column">
|
||||||
|
<div class="padding">
|
||||||
|
<div v-if="hasWebGl && articleData.model" class="featured left wide">
|
||||||
|
<model-viewer :modelData="articleData.model"/>
|
||||||
|
</div>
|
||||||
|
<figure v-else class="featured left wide">
|
||||||
|
<img alt="" title="" class="" srcset="" sizes="" src="">
|
||||||
|
</figure>
|
||||||
|
<p v-if="hasWebGl && articleData.model && articleData.model.textures.length > 1">
|
||||||
|
<strong>Material ändern</strong>
|
||||||
|
<material-switcher :modelData="articleData.model"/>
|
||||||
|
</p>
|
||||||
|
<p class="offer">
|
||||||
|
<a class="btn btn-secondary" v-if="articleData.offer" :href="articleData.offer">Angebot</a>
|
||||||
|
</p>
|
||||||
|
<p class="type">Typ: {{ types }}</p>
|
||||||
|
<p class="material">Material: {{ material }}</p>
|
||||||
|
<p class="ornament" v-if="articleData.ornament">Ornament: {{ articleData.ornament }}</p>
|
||||||
|
<p class="description" v-if="articleData.description">{{ articleData.description }}</p>
|
||||||
|
<p class="article-id">Art. Nr.: {{ articleData.article_id }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import ModelViewer from './components/ModelViewer.vue'
|
||||||
|
import MaterialSwitcher from './components/MaterialSwitcher.vue'
|
||||||
|
import * as WebGL from 'three/examples/js/WebGL.js'
|
||||||
|
import { mapState } from 'vuex';
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
hasWebGl: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$store.dispatch('fetchArticleData')
|
||||||
|
console.log(WebGL)
|
||||||
|
var canvas = document.createElement( 'canvas' );
|
||||||
|
if ( window.WebGLRenderingContext && ( canvas.getContext( 'webgl' ) || canvas.getContext( 'experimental-webgl' ) ) ) {
|
||||||
|
this.hasWebGl = true
|
||||||
|
} else {
|
||||||
|
this.hasWebGl = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(['articleData', 'activeTexture']),
|
||||||
|
types() {
|
||||||
|
if(this.articleData.article_type) {
|
||||||
|
return this.articleData.article_type.join(', ')
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
},
|
||||||
|
material() {
|
||||||
|
if(this.activeTexture) {
|
||||||
|
return this.activeTexture.name
|
||||||
|
}
|
||||||
|
return this.articleData.material
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
ModelViewer,
|
||||||
|
MaterialSwitcher
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
@ -1,148 +1,54 @@
|
||||||
<template>
|
<template>
|
||||||
<canvas ref="renderer"></canvas>
|
<article v-if="articleData">
|
||||||
|
<header class="flex column padding">
|
||||||
|
<h1>{{ articleData.title }}</h1>
|
||||||
|
</header>
|
||||||
|
<div class="content flex column">
|
||||||
|
<div class="padding">
|
||||||
|
<div v-if="articleData.model" class="featured left wide">
|
||||||
|
<model-viewer class="model-viewer" :modelData="articleData.model"/>
|
||||||
|
</div>
|
||||||
|
<p>
|
||||||
|
<strong>Material ändern</strong>
|
||||||
|
<material-switcher :modelData="articleData.model"/>
|
||||||
|
</p>
|
||||||
|
<p class="type">Typ: {{ types }}</p>
|
||||||
|
<p class="material">Material: {{ material }}</p>
|
||||||
|
<p class="offer" v-if="articleData.offer"><a :href="articleData.offer">Angebot</a></p>
|
||||||
|
<p class="ornament" v-if="articleData.ornament">Ornament: {{ articleData.ornament }}</p>
|
||||||
|
<p class="description" v-if="articleData.description">{{ articleData.description }}</p>
|
||||||
|
<p class="article-id">Art. Nr.: {{ articleData.article_id }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { WebGLRenderer, PerspectiveCamera, Scene, AmbientLight, DirectionalLight, PCFShadowMap, LinearToneMapping } from 'three'
|
import ModelViewer from './components/ModelViewer.vue'
|
||||||
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'
|
import MaterialSwitcher from './components/MaterialSwitcher.vue'
|
||||||
import { OBJLoader } from 'three/examples/jsm/loaders/OBJLoader'
|
import { mapState } from 'vuex';
|
||||||
import { MTLLoader } from 'three/examples/jsm/loaders/MTLLoader'
|
|
||||||
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'model-viewer',
|
mounted() {
|
||||||
props: {
|
this.$store.dispatch('fetchArticleData')
|
||||||
modelUrl: {
|
|
||||||
type: String,
|
|
||||||
required: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
renderer: null,
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
size() {
|
...mapState(['articleData', 'activeTexture']),
|
||||||
return {
|
types() {
|
||||||
w: document.getElementById('model-viewer').offsetWidth,
|
if(this.articleData.article_type) {
|
||||||
h: document.getElementById('model-viewer').offsetHeight,
|
return this.articleData.article_type.join(', ')
|
||||||
}
|
}
|
||||||
|
return ""
|
||||||
|
},
|
||||||
|
material() {
|
||||||
|
if(this.activeTexture) {
|
||||||
|
return this.activeTexture.name
|
||||||
|
}
|
||||||
|
return this.articleData.material
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
components: {
|
||||||
this.setup()
|
ModelViewer,
|
||||||
this.loadGltf(this.modelUrl)
|
MaterialSwitcher
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
setup() {
|
|
||||||
this.setupCamera()
|
|
||||||
this.setupScene()
|
|
||||||
this.setupRenderer()
|
|
||||||
this.setupLight()
|
|
||||||
this.setupControls()
|
|
||||||
},
|
|
||||||
setupControls() {
|
|
||||||
var controls = new OrbitControls( this.camera, this.renderer.domElement );
|
|
||||||
controls.addEventListener( 'change', this.render ); // call this only in static scenes (i.e., if there is no animation loop)
|
|
||||||
controls.enableDamping = true; // an animation loop is required when either damping or auto-rotation are enabled
|
|
||||||
controls.dampingFactor = 0.25;
|
|
||||||
controls.screenSpacePanning = false;
|
|
||||||
controls.minDistance = 1.1;
|
|
||||||
controls.maxDistance = 1.1;
|
|
||||||
controls.minPolarAngle = Math.PI / 4;
|
|
||||||
controls.maxPolarAngle = Math.PI - Math.PI / 4;
|
|
||||||
controls.minAzimuthAngle = -(Math.PI / 4);
|
|
||||||
controls.maxAzimuthAngle = Math.PI / 4;
|
|
||||||
},
|
|
||||||
setupScene() {
|
|
||||||
this.scene = new Scene()
|
|
||||||
},
|
|
||||||
getWidth() {
|
|
||||||
return document.getElementById('model-viewer').offsetWidth
|
|
||||||
},
|
|
||||||
getHeight() {
|
|
||||||
return document.getElementById('model-viewer').offsetHeight
|
|
||||||
},
|
|
||||||
getAspectRatio() {
|
|
||||||
return this.getWidth() / this.getHeight()
|
|
||||||
},
|
|
||||||
setupCamera() {
|
|
||||||
this.camera = new PerspectiveCamera(60, this.getAspectRatio(), 0.1, 300)
|
|
||||||
this.camera.position.z = 1.1;
|
|
||||||
this.camera.position.y = .3
|
|
||||||
},
|
|
||||||
setupLight() {
|
|
||||||
var directionalLight = new DirectionalLight(0xffffff, 1)
|
|
||||||
directionalLight.position.set(-3, 20 ,-1000)
|
|
||||||
this.scene.add(directionalLight)
|
|
||||||
var directionalLight2 = new DirectionalLight(0xffffff, 1)
|
|
||||||
directionalLight2.position.set(-3, 20 ,100)
|
|
||||||
this.scene.add(directionalLight2)
|
|
||||||
},
|
|
||||||
setupRenderer() {
|
|
||||||
this.renderer = new WebGLRenderer({canvas: this.$refs.renderer, antialias: true, alpha: true})
|
|
||||||
this.renderer.setClearColor(0xffffff)
|
|
||||||
this.renderer.setClearAlpha(0)
|
|
||||||
this.renderer.setSize(this.getWidth(), this.getHeight())
|
|
||||||
this.renderer.gammaOutput = true;
|
|
||||||
this.renderer.gammaFactor = 2.2
|
|
||||||
this.renderer.toneMapping = LinearToneMapping;
|
|
||||||
this.renderer.toneMappingExposure = Math.pow( 0.94, 5.0 );
|
|
||||||
this.renderer.shadowMap.enabled = true;
|
|
||||||
this.renderer.shadowMap.type = PCFShadowMap;
|
|
||||||
window.addEventListener('resize', this.setCanvasSize)
|
|
||||||
},
|
|
||||||
loadObjMtl(objPath, mtlPath) {
|
|
||||||
var objLoader = new OBJLoader()
|
|
||||||
objLoader.setPath('/')
|
|
||||||
var mtlLoader = new MTLLoader()
|
|
||||||
mtlLoader.setPath('/')
|
|
||||||
|
|
||||||
|
|
||||||
new Promise((resolve, reject) => {
|
|
||||||
mtlLoader.load(mtlPath, materials => resolve(materials), undefined, error => reject(error))
|
|
||||||
}).then((materials) => {
|
|
||||||
materials.preload()
|
|
||||||
objLoader.setMaterials(materials)
|
|
||||||
objLoader.load(objPath, this.addObject)
|
|
||||||
this.render()
|
|
||||||
}).catch(error => console.log(error))
|
|
||||||
},
|
|
||||||
loadGltf(gltfPath) {
|
|
||||||
var gltfLoader = new GLTFLoader()
|
|
||||||
new Promise((resolve, reject) => {
|
|
||||||
gltfLoader.load(gltfPath, gltf => resolve(gltf), undefined, error => reject(error))
|
|
||||||
})
|
|
||||||
.then(gltf => {
|
|
||||||
this.readGLTF(gltf)
|
|
||||||
})
|
|
||||||
.catch(error => console.log(error))
|
|
||||||
},
|
|
||||||
readGLTF(gltf) {
|
|
||||||
gltf.scene.position.x = -0.5
|
|
||||||
gltf.scene.rotation.set(0, 0, 0)
|
|
||||||
this.scene.add(gltf.scene)
|
|
||||||
this.render()
|
|
||||||
},
|
|
||||||
readGLB(gltf) {
|
|
||||||
this.addObject(gltf.scene)
|
|
||||||
this.render()
|
|
||||||
},
|
|
||||||
setCanvasSize() {
|
|
||||||
this.renderer.setSize(this.getWidth(), this.getHeight())
|
|
||||||
this.camera.aspepct = this.getAspectRatio()
|
|
||||||
},
|
|
||||||
render() {
|
|
||||||
requestAnimationFrame(this.render)
|
|
||||||
this.renderer.render(this.scene, this.camera)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
#model-viewer {
|
|
||||||
background: red;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
import Vue from 'vue'
|
||||||
|
import Vuex from 'vuex'
|
||||||
|
import axios from "axios";
|
||||||
|
|
||||||
|
Vue.use(Vuex)
|
||||||
|
|
||||||
|
export default new Vuex.Store({
|
||||||
|
state: {
|
||||||
|
articleData: {},
|
||||||
|
activeTexture: undefined
|
||||||
|
},
|
||||||
|
mutations: {
|
||||||
|
setArticleData(store, data) {
|
||||||
|
store.articleData = data
|
||||||
|
},
|
||||||
|
setActiveTexture(store, data) {
|
||||||
|
store.activeTexture = data
|
||||||
|
}
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
fetchArticleData({ commit }) {
|
||||||
|
let path = window.location.pathname
|
||||||
|
axios.get(path.replace(/modell\//, '') + 'index.json').then(response => {
|
||||||
|
commit('setArticleData', response.data)
|
||||||
|
}).catch(error => console.log(error))
|
||||||
|
},
|
||||||
|
updateActiveTexture({commit}, data) {
|
||||||
|
commit('setActiveTexture', data)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
<template>
|
||||||
|
<ul class="list-unstyled material-switcher" v-if="modelData">
|
||||||
|
<material-switcher-item v-for="texture of modelData.textures" :key="texture.url" :texture="texture"/>
|
||||||
|
</ul>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import MaterialSwitcherItem from './MaterialSwitcherItem.vue'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
materialSwitcherItem: MaterialSwitcherItem
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
modelData: {
|
||||||
|
type: Object,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
<template>
|
||||||
|
<li><img class="texture-preview" :src="texture.url" :alt="texture.name" @click="applyTexture"></li>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
texture: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
applyTexture() {
|
||||||
|
this.$store.dispatch('updateActiveTexture', this.texture)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
#single {
|
||||||
|
.material-switcher {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
|
||||||
|
li:first-child {
|
||||||
|
padding: 0 2px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
li:last-child {
|
||||||
|
padding: 0 0 0 2px
|
||||||
|
}
|
||||||
|
|
||||||
|
li {
|
||||||
|
height: auto;
|
||||||
|
padding: 0 2px;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 80px;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,191 @@
|
||||||
|
<template>
|
||||||
|
<div class="model-wrapper">
|
||||||
|
<span class="mouseover"><i class="fa fa-cube"></i></span>
|
||||||
|
<canvas id="model-viewer" class="model-viewer" ref="renderer"></canvas>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { WebGLRenderer, PerspectiveCamera, Scene, AmbientLight, DirectionalLight, PCFShadowMap, LinearToneMapping, TextureLoader } from 'three'
|
||||||
|
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'
|
||||||
|
import { OBJLoader } from 'three/examples/jsm/loaders/OBJLoader'
|
||||||
|
import { MTLLoader } from 'three/examples/jsm/loaders/MTLLoader'
|
||||||
|
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader'
|
||||||
|
import { mapState } from 'vuex'
|
||||||
|
export default {
|
||||||
|
name: 'model-viewer',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
renderer: null,
|
||||||
|
scene: null,
|
||||||
|
camera: null,
|
||||||
|
model: null,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
modelData: Object
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.setup()
|
||||||
|
this.loadGltf(this.modelData.url)
|
||||||
|
this.render()
|
||||||
|
this.update()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
setup() {
|
||||||
|
this.setupCamera()
|
||||||
|
this.setupScene()
|
||||||
|
this.setupRenderer()
|
||||||
|
this.setupLight()
|
||||||
|
this.setupControls()
|
||||||
|
},
|
||||||
|
setupControls() {
|
||||||
|
this.controls = new OrbitControls( this.camera, this.renderer.domElement );
|
||||||
|
this.controls.addEventListener( 'change', this.render );
|
||||||
|
this.controls.addEventListener( 'touchstart', this.render );
|
||||||
|
this.controls.enableDamping = false;
|
||||||
|
this.controls.dampingFactor = 1.5;
|
||||||
|
this.controls.screenSpacePanning = false;
|
||||||
|
this.controls.enableZoom = false;
|
||||||
|
this.controls.enablePan = false;
|
||||||
|
this.controls.minPolarAngle = Math.PI / 8;
|
||||||
|
this.controls.maxPolarAngle = Math.PI - Math.PI / 4;
|
||||||
|
this.controls.minAzimuthAngle = -(Math.PI / 4);
|
||||||
|
this.controls.maxAzimuthAngle = Math.PI / 4;
|
||||||
|
this.controls.update()
|
||||||
|
},
|
||||||
|
setupScene() {
|
||||||
|
this.scene = new Scene()
|
||||||
|
},
|
||||||
|
getWidth() {
|
||||||
|
let el = document.getElementById('model-viewer') || 0
|
||||||
|
if (el) {
|
||||||
|
return el.offsetWidth
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
},
|
||||||
|
getHeight() {
|
||||||
|
let el = document.getElementById('model-viewer') || 0
|
||||||
|
if (el) {
|
||||||
|
return el.offsetHeight
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
},
|
||||||
|
getAspectRatio() {
|
||||||
|
return this.getWidth() / this.getHeight()
|
||||||
|
},
|
||||||
|
setupCamera() {
|
||||||
|
this.camera = new PerspectiveCamera(60, this.getAspectRatio(), 0.1, 300)
|
||||||
|
this.camera.position.z = 0.9;
|
||||||
|
this.camera.position.y = 0.3
|
||||||
|
},
|
||||||
|
setupLight() {
|
||||||
|
var directionalLight = new DirectionalLight(0xffffff, 0.5)
|
||||||
|
directionalLight.position.set(-30, -30 ,-30)
|
||||||
|
this.scene.add(directionalLight)
|
||||||
|
var directionalLight2 = new DirectionalLight(0xffffff, 1.6)
|
||||||
|
directionalLight2.position.set(3, 10 ,10)
|
||||||
|
this.scene.add(directionalLight2)
|
||||||
|
},
|
||||||
|
setupRenderer() {
|
||||||
|
this.renderer = new WebGLRenderer({canvas: this.$refs.renderer, antialias: true, alpha: true})
|
||||||
|
this.renderer.setClearColor(0xffffff)
|
||||||
|
this.renderer.setClearAlpha(0)
|
||||||
|
this.renderer.setSize(this.getWidth(), this.getHeight())
|
||||||
|
this.renderer.gammaOutput = true;
|
||||||
|
this.renderer.gammaFactor = 2.2
|
||||||
|
this.renderer.toneMapping = LinearToneMapping;
|
||||||
|
this.renderer.toneMappingExposure = Math.pow( 0.94, 5.0 );
|
||||||
|
this.renderer.shadowMap.enabled = true;
|
||||||
|
this.renderer.shadowMap.type = PCFShadowMap;
|
||||||
|
window.addEventListener('resize', this.setCanvasSize)
|
||||||
|
},
|
||||||
|
loadObjMtl(objPath, mtlPath) {
|
||||||
|
var objLoader = new OBJLoader()
|
||||||
|
objLoader.setPath('/')
|
||||||
|
var mtlLoader = new MTLLoader()
|
||||||
|
mtlLoader.setPath('/')
|
||||||
|
|
||||||
|
|
||||||
|
new Promise((resolve, reject) => {
|
||||||
|
mtlLoader.load(mtlPath, materials => resolve(materials), undefined, error => reject(error))
|
||||||
|
}).then((materials) => {
|
||||||
|
materials.preload()
|
||||||
|
objLoader.setMaterials(materials)
|
||||||
|
objLoader.load(objPath, this.addObject)
|
||||||
|
this.render()
|
||||||
|
}).catch(error => console.log(error))
|
||||||
|
},
|
||||||
|
loadGltf(gltfPath) {
|
||||||
|
var gltfLoader = new GLTFLoader()
|
||||||
|
new Promise((resolve, reject) => {
|
||||||
|
gltfLoader.load(gltfPath, gltf => resolve(gltf), undefined, error => reject(error))
|
||||||
|
})
|
||||||
|
.then(gltf => {
|
||||||
|
this.readGLTF(gltf)
|
||||||
|
})
|
||||||
|
.catch(error => console.log(error))
|
||||||
|
},
|
||||||
|
changeTexture(texture) {
|
||||||
|
new Promise(resolve => {
|
||||||
|
new TextureLoader().load(texture.url, (data) => resolve(data));
|
||||||
|
}).then(data => {
|
||||||
|
this.$store.dispatch('updateActiveTexture', texture)
|
||||||
|
this.model.material.map = data
|
||||||
|
this.update()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
readGLTF(gltf) {
|
||||||
|
gltf.scene.position.x = -0.5
|
||||||
|
gltf.scene.position.y = -0.3
|
||||||
|
gltf.scene.rotation.set(0, 0, 0)
|
||||||
|
this.scene.add(gltf.scene)
|
||||||
|
this.model = gltf.scene.children[0]
|
||||||
|
//this.changeTexture('/katalog/urnengrabanlage/abdeckung/model/granit.jpg')
|
||||||
|
this.render()
|
||||||
|
},
|
||||||
|
setCanvasSize() {
|
||||||
|
this.renderer.setSize(this.getWidth(), this.getHeight())
|
||||||
|
this.camera.aspepct = this.getAspectRatio()
|
||||||
|
},
|
||||||
|
render() {
|
||||||
|
this.renderer.render(this.scene, this.camera)
|
||||||
|
},
|
||||||
|
update() {
|
||||||
|
this.controls.update()
|
||||||
|
this.render()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(['activeTexture'])
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
activeTexture(value) {
|
||||||
|
console.log('hello', value)
|
||||||
|
this.changeTexture(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.model-wrapper {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
canvas {
|
||||||
|
background: rgba(0,0,0,0)
|
||||||
|
}
|
||||||
|
|
||||||
|
.mouseover {
|
||||||
|
position: absolute;
|
||||||
|
top:0;
|
||||||
|
right: 0;
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
|
i {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
@ -1,20 +1,26 @@
|
||||||
const VueLoaderPlugin = require("vue-loader/lib/plugin")
|
const VueLoaderPlugin = require("vue-loader/lib/plugin")
|
||||||
const CleanWebpackPlugin = require("clean-webpack-plugin")
|
const CleanWebpackPlugin = require("clean-webpack-plugin")
|
||||||
const MiniCssExtractPlugin = require("mini-css-extract-plugin")
|
const MiniCssExtractPlugin = require("mini-css-extract-plugin")
|
||||||
|
const webpack = require('webpack')
|
||||||
const path = require("path")
|
const path = require("path")
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
entry: {
|
entry: {
|
||||||
bundle: ["./src/js/main.js"],
|
common: ["./src/js/main.js"],
|
||||||
images: ["./src/js/images.js"],
|
images: ["./src/js/images.js"],
|
||||||
modelViewer: ["./src/js/modelViewer.js"],
|
catalog: ["./src/js/catalog.js"],
|
||||||
style: ["./src/scss/main.scss"]
|
style: ["./src/scss/main.scss"],
|
||||||
},
|
},
|
||||||
context: __dirname,
|
context: __dirname,
|
||||||
output: {
|
output: {
|
||||||
filename: "js/[name].js",
|
filename: "js/[name].bundle.js",
|
||||||
|
chunkFilename: 'js/[name].bundle.js',
|
||||||
|
sourceMapFilename: '[file].map',
|
||||||
path: __dirname + "/assets"
|
path: __dirname + "/assets"
|
||||||
},
|
},
|
||||||
|
optimization: {
|
||||||
|
//usedExports: true,
|
||||||
|
},
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
|
|
@ -29,6 +35,9 @@ module.exports = {
|
||||||
{
|
{
|
||||||
test: /\.(sa|sc|c)ss$/,
|
test: /\.(sa|sc|c)ss$/,
|
||||||
use: [
|
use: [
|
||||||
|
{
|
||||||
|
loader: 'vue-style-loader',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
loader: MiniCssExtractPlugin.loader,
|
loader: MiniCssExtractPlugin.loader,
|
||||||
options: {
|
options: {
|
||||||
|
|
@ -39,7 +48,7 @@ module.exports = {
|
||||||
{
|
{
|
||||||
loader: "css-loader",
|
loader: "css-loader",
|
||||||
options: {
|
options: {
|
||||||
sourceMap: true
|
sourceMap: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -150,7 +159,7 @@ module.exports = {
|
||||||
// Options similar to the same options in webpackOptions.output
|
// Options similar to the same options in webpackOptions.output
|
||||||
// both options are optional
|
// both options are optional
|
||||||
filename: "css/[name].css",
|
filename: "css/[name].css",
|
||||||
chunkFilename: "css/[id].css"
|
chunkFilename: "css/[id].css",
|
||||||
})
|
}),
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
const merge = require('webpack-merge')
|
const merge = require('webpack-merge')
|
||||||
const common = require('./webpack.common.js')
|
const common = require('./webpack.common.js')
|
||||||
|
const webpack = require('webpack')
|
||||||
|
|
||||||
module.exports = merge(common, {
|
module.exports = merge(common, {
|
||||||
mode: 'development',
|
mode: 'development',
|
||||||
devtool: 'source-maps'
|
devtool: 'source-map',
|
||||||
|
plugins: []
|
||||||
})
|
})
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
const merge = require("webpack-merge")
|
const merge = require("webpack-merge")
|
||||||
const common = require("./webpack.common.js")
|
const common = require("./webpack.common.js")
|
||||||
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin")
|
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin")
|
||||||
|
const MinifyPlugin = require("babel-minify-webpack-plugin");
|
||||||
|
|
||||||
module.exports = merge(common, {
|
module.exports = merge(common, {
|
||||||
mode: "production",
|
mode: "production",
|
||||||
|
|
@ -9,16 +10,8 @@ module.exports = merge(common, {
|
||||||
plugins: [
|
plugins: [
|
||||||
],
|
],
|
||||||
optimization: {
|
optimization: {
|
||||||
usedExports: true,
|
|
||||||
minimizer: [
|
minimizer: [
|
||||||
new OptimizeCSSAssetsPlugin({
|
new OptimizeCSSAssetsPlugin()
|
||||||
cssProcessorOptions: {
|
|
||||||
map: {
|
|
||||||
inline: false,
|
|
||||||
annotation: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue