Z verze
změnil(a) David Brazda
k 01.02.2021 08:13
Na verzi < 59.1 >
změnil(a) David Brazda
k 15.02.2021 17:05
< >
Popis verze: Návrat k verzi 42.13

Přehled

Rozpis

Na stránce změněno:
Nadpis
... ... @@ -1,1 +1,1 @@
1 -Macro - xcvid
1 +XCVID
Obsah
... ... @@ -1,4 +1,11 @@
1 -Macro pro xcvid
1 +**Macro pro xcvid**
2 2  
3 +příklad:
3 3  
4 -
5 +~{~{xcvid url="https:~/~/www.xcontest.org/cesko/prelety/detail:davidbrazda/29.1.2021/16:27"/}}
6 +
7 +{{xcvid url="https://www.xcontest.org/cesko/prelety/detail:davidbrazda/29.1.2021/16:27" time="40" shadow="0"/}}
8 +
9 +**Dodělat:**
10 +
11 +- kameru - alespoň možnost odzoomovat si (standard, wide, superwide)
XWiki.WikiMacroClass[0]
Macro code
... ... @@ -1,14 +1,30 @@
1 1  {{velocity}}
2 2  #set($url = $xcontext.macro.params.get('url'))
3 -#set($width = $xcontext.macro.params.get('width'))
4 -#set($height = $xcontext.macro.params.get('height'))
5 5  #set($flight = $xcontext.macro.params.get('flight'))
6 -#if ($flight == 'nic')
7 - $xcontext.macro.params.set('flight') = 'neco';
8 - $xcontext.macro.params.flight = 'neco';
4 +#set($time = $xcontext.macro.params.get('time'))
5 +#set($shadow = $xcontext.macro.params.get('shadow'))
6 +#set($zoom = $xcontext.macro.params.get('zoom'))
7 +#if ($zoom == "1")
8 +#set($zoomSuffix = "&viewFrom=1200,-200,100")
9 9  #end
10 -
10 +#if ($shadow == 0)
11 + #set($shadow = "")
12 +#end
13 +##find just the right part from the xcontest
14 +#set ($regexResult = $regextool.find($url, '^https:\/\/www.xcontest.org\/[\w\/]+:([-\w.]+\/\d\d?\.\d\d?\.\d{4}\/\d\d:\d\d)($|\?|#)'))
11 11  {{html}}
12 -vysledek je $xcontext.macro.params.flight
16 +#if ($regexResult.isEmpty())
17 + ##$regexResult
18 + ##$regexResult.get(1).end
19 + ##$regexResult.get(1).start
20 + ##$url.substring($regexResult.get(1).start,$regexResult.get(1).end)
21 + Neplatný odkaz na tracklog. Např. https://www.xcontest.org/cesko/prelety/detail:davidbrazda/29.1.2021/16:27
22 +#else
23 + #set ($suffix = "?ident=" + $url.substring($regexResult.get(1).start,$regexResult.get(1).end) + "&shadow=" + $shadow + $zoomSuffix + "#" + $time)
24 + #set ($src = "https://xcvid.com/embed.php" + $suffix)
25 + <div class="xdocLastModification">Interaktivní 3D pohled.</div>
26 + <iframe src="$src" id="xcvid" class="responsive-embed" allowfullscreen><a href="$src$suffix">XCVID let</a></iframe>
27 + <!-- <div class="xdocLastModification"><a href="$url" title="Let na xcontestu">XContest</a></div> -->
28 +#end
13 13  {{/html}}
14 14  {{/velocity}}
XWiki.WikiMacroParameterClass[0]
Parameter description
... ... @@ -1,1 +1,1 @@
1 -XContest link of the flight ([[https:~~/~~/www.xcontest.org/cesko/prelety/detail:davidbrazda/29.1.2021/16:27>>https://www.xcontest.org/cesko/prelety/detail:davidbrazda/29.1.2021/16:27]])
1 +Adresa trackogu v xcontestu na. "https:~/~/www.xcontest.org/cesko/prelety/detail:davidbrazda/29.1.2021/16:27"
XWiki.WikiMacroParameterClass[1]
Parameter default value
... ... @@ -1,1 +1,1 @@
1 -560px
1 +0
Parameter description
... ... @@ -1,1 +1,9 @@
1 -Šířka
1 +Časové značka, Počet sekund od startu, kde bude padáček a focus. Defaultně 0.
2 +
3 +(% id="gtx-trans" style="position: absolute; left: -29px; top: -8px;" %)
4 +(((
5 +(% class="gtx-trans-icon" %)
6 +(((
7 +
8 +)))
9 +)))
Parameter name
... ... @@ -1,1 +1,1 @@
1 -width
1 +time
XWiki.WikiMacroParameterClass[2]
Parameter default value
... ... @@ -1,1 +1,1 @@
1 -315px
1 +1
Parameter description
... ... @@ -1,1 +1,1 @@
1 -Výška
1 +Má být zobrazen na zemi stín tracklogu (hodnoty: 1 nebo 0) Použití: 1 - při přeletech, 0 při svahovačkách
Parameter name
... ... @@ -1,1 +1,1 @@
1 -height
1 +shadow
XWiki.WikiMacroParameterClass[3]
Parameter default value
... ... @@ -1,1 +1,0 @@
1 -nic
Parameter description
... ... @@ -1,1 +1,1 @@
1 -ID of the flight
1 +Širší zoom kamery (hodnoty: 1 ) - jinak nechat prázdné
Parameter name
... ... @@ -1,1 +1,1 @@
1 -flight
1 +zoom