]> _ Git - songbook.git/commitdiff
.
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 4 Oct 2022 09:58:31 +0000 (11:58 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 4 Oct 2022 09:58:31 +0000 (11:58 +0200)
app/Http/Controllers/FrontController.php
resources/css/app.sass
resources/views/song.blade.php

index 9d7bb6c0b9c78726a2fee417ddadf8f34508e1b4..3ee070a9688f38becd1a8273cc098dce04dc02d5 100644 (file)
@@ -71,16 +71,14 @@ class FrontController extends Controller
         if ($partition) {
             $partition = $partition->getUrl();
         }
-        $lyrics_html = '';
+        $lyrics_html = ';)';
         $lyrics_doc = $song->getFirstMediaInField('lyrics_doc');
-        dd($lyrics_doc);
 
         if ($lyrics_doc) {
             $path = $lyrics_doc->getPath();
             $html_path = $path . '.html';
-            dd(`libreoffice --convert-to HTML:HTML --outdir $html_path $path`);
             if (!file_exists($html_path)) {
-
+                `libreoffice --convert-to HTML:HTML --outdir $html_path $path`;
             }
             $lyrics_html = file_get_contents($html_path);
         }
index d950c13fd9c21244129460d409fdaf3c5009ab79..282b93900dc28d053d33569c52190ad211974f56 100644 (file)
 
 $slab: 'Roboto Slab', sans-serif
 
+a:focus,
+button:focus,
+input:focus,
+:focus
+    outline: none
+
 *
     margin: 0
     padding: 0
@@ -481,7 +487,7 @@ form
     input[type=password]
         text-align: left
         outline-width: 1px
-        outline-color:  var(--theme-color)
+        outline-color: var(--theme-color)
 
     input[type=submit]
         background-color: var(--theme-color)
index 0dc28529b5f5d0aa668b72961880268732eeb855..dff659cfa3cb05390d7686a4fce03824bb365ae5 100644 (file)
@@ -8,6 +8,9 @@
 @section('content')
     @include('header',['title'=>$song->title,'subtitle'=>$song->artist])
     <article class="song" data-tone="{{$song->key}}" data-mode="{{$song->mode}}">
+        @if($lyrics_html!=='')
+            <section class="fromdoc">{{$lyrics_html}}</section>
+        @endif
         @foreach($song->lyrics as $part)
             @php
                 $c=$song->getChordsData($part['part_chords']);
                 <audio id="player_{{$audio['i']}}_0" controls loop>
                     <source src="{{$audio['url']}}" type="audio/mp3"/>
                 </audio>
-                @for($i=1;$i<=11;$i++)
-                    <audio id="player_{{$audio['i']}}_{{$i}}" controls loop>
-                        <source src="{{str_replace('.mp3','.'.$i.'.mp3',$audio['url'])}}" type="audio/mp3"
-                                preload="none"/>
-                    </audio>
-                @endfor
+                @if($collection->transpose)
+                    @for($i=1;$i<=11;$i++)
+                        <audio id="player_{{$audio['i']}}_{{$i}}" controls loop>
+                            <source src="{{str_replace('.mp3','.'.$i.'.mp3',$audio['url'])}}" type="audio/mp3"
+                                    preload="none"/>
+                        </audio>
+                    @endfor
+                @endif
             @endforeach
         </div>
     @endif