Update uuid generation

This commit is contained in:
L3D 2021-09-05 01:47:13 +02:00
parent 1a2c7e0a49
commit bf6905fdcb
Signed by: l3d
GPG key ID: CD08445BFF4313D1
5 changed files with 3 additions and 18 deletions

View file

@ -4,8 +4,6 @@ _template: zutaten.yaml
---
recipe_name: klassische Waffeln
---
recipe_uuid: 65ef100f-1e6d-44d5-94ba-b862da3c5988
---
x_ignore_1: yes
---
servings:

View file

@ -28,11 +28,6 @@ width = 1/2
label = recipe name
type = string
[fields.recipe_uuid]
label = recipe uuid
description = uuidgen
type = string
[fields.servings]
label = servings
description = Hier wird definiert, für welche Portionsgröße die Zutaten angegeben werden

View file

@ -18,7 +18,7 @@ X-usda_lookup: "https://fdc.nal.usda.gov/fdc-app.html" -#}
{{- '\nrecipe_name: ' -}} "{{- this.title -}}"
{%- endif -%}
{{- '\nrecipe_uuid: ' -}} "{{- this._gid -}}"
{{- '\nrecipe_uuid: ' -}} "{{- this.parent.parent._gid[:8] -}}-{{- this.parent.parent._gid[-6:-2] -}}-{{- this.parent._gid[-8:-4] }}-{{- this.parent._gid[-4:] -}}-{{- this.parent._gid[:12] -}}"
{%- include "zutaten/yields.yaml" -%}

View file

@ -13,11 +13,7 @@
{{- '\n ' -}} <div class="content__box">
{{- '\n ' -}} <div class="content__inner_box">
{{- '\n ' -}}
{%- if child.recipe_uuid is defined and child.recipe_uuid != "" -%}
<h1 id="{{ child.recipe_uuid }}">
{%- else -%}
<h1>
{%- endif -%}
<h1 id="{{- this.parent._gid[:8] -}}-{{- this.parent._gid[-6:-2] -}}-{{- this._gid[-8:-4] }}-{{- this._gid[-4:] -}}-{{- this._gid[:12] -}}">
{%- if child.recipe_name and child.recipe_name != "" -%}
{{ child.recipe_name }}</h1>
{%- else -%}

View file

@ -13,11 +13,7 @@
{{- '\n ' -}} <div class="content__box">
{{- '\n ' -}} <div class="content__inner_box">
{{- '\n ' -}}
{%- if child.recipe_uuid is defined and child.recipe_uuid != "" -%}
<h1 id="{{ child.recipe_uuid }}">
{%- else -%}
<h1>
{%- endif -%}
<h1 id="{{- this.parent._gid[:8] -}}-{{- this.parent._gid[-6:-2] -}}-{{- this._gid[-8:-4] }}-{{- this._gid[-4:] -}}-{{- this._gid[:12] -}}">
{%- if child.recipe_name and child.recipe_name != "" -%}
{{ child.recipe_name }}</h1>
{%- else -%}