Changeset 20 in code for trunk/web/views


Ignore:
Timestamp:
Aug 31, 2023, 8:28:02 AM (22 months ago)
Author:
manerakai
Message:

Improved code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/views/index.html

    r19 r20  
    5858                <textarea autofocus class="item" id="input" name="text" dir="auto"
    5959                    placeholder="Enter Text Here">{{ .OriginalText }}</textarea>
    60                 <div class="center">
    61                     <audio controls>
    62                         <source type="audio/mpeg" src="{{ .TtsFrom }}">
    63                     </audio>
    64                 </div>
     60                {{if .TtsFrom}}
     61                <audio controls>
     62                    <source type="audio/mpeg" src="{{ .TtsFrom }}">
     63                </audio>
     64                {{end}}
    6565            </div>
    6666
     
    6868                <textarea id="output" class="translation item" dir="auto" placeholder="Translation"
    6969                    readonly>{{.TranslatedText}}</textarea>
     70                {{if .TtsTo}}
    7071                <audio controls>
    7172                    <source type="audio/mpeg" src="{{ .TtsTo }}">
    7273                </audio>
     74                {{end}}
    7375            </div>
    7476        </div>
Note: See TracChangeset for help on using the changeset viewer.