]> _ Git - songbook.git/commitdiff
.
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 6 Jan 2023 15:03:46 +0000 (16:03 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 6 Jan 2023 15:03:46 +0000 (16:03 +0100)
app/Http/Controllers/FrontController.php
resources/css/app.sass

index 5df42fd81bc108f140df24b02b719f74866f8a8d..31522838240fc78390896688cb91e24d7cdbb654 100644 (file)
@@ -190,16 +190,16 @@ class FrontController extends Controller {
             $titleProperty = $song->getProprety('Titre');
             /** @var Number $orderProperty */
             $orderProperty = $song->getProprety('Ordre');
-            /** @var RichTextProperty $lyricsProperty */
-            $lyricsProperty = $song->getProprety('Paroles');
+            /** @var RichTextProperty $notesProperty */
+            $notesProperty = $song->getProprety('Notes générales');
             /** @var \Notion\Pages\Properties\Files $filesProperty */
             $filesProperty = $song->getProprety('Files & media');
 
             $s['id'] = $song->id;
             $s['order'] = (int)$orderProperty->number;
             $s['title'] = $titleProperty->toString();
-            $s['lyrics'] = self::_blockToHtml($lyricsProperty);
-            $s['notes'] = $pageContents;
+            $s['lyrics'] = $pageContents;
+            $s['notes'] = self::_blockToHtml($notesProperty);
             $s['notion_url'] = $song->url;
 
 
@@ -237,7 +237,9 @@ class FrontController extends Controller {
             $res .= self::_richTextToHtml($rt);
         }
         $res = $start . $res . $end;
-        return str_replace('</h3><br />', '</h3>', $res);
+        $res = str_replace('</h3><br />', '</h3>', $res);
+        $res = str_replace('<blockquote><br />', '<blockquote>', $res);
+        return $res;
     }
 
     /**
@@ -273,6 +275,7 @@ class FrontController extends Controller {
         $e = explode('.', $f);
         array_pop($e);
         $f = implode('.', $e);
+        $f = rawurldecode($f);
         return str_replace('_', ' ', $f);
     }
 
index 346d82acd37cdd35c9f095ea06ab6b7913f725e0..3e22927ef8210dbac862b942b11b8da894e38127 100644 (file)
@@ -79,7 +79,7 @@ body
     font-family: 'Roboto', sans-serif
     font-weight: 400
     font-size: 16px
-    opacity: 0
+
     transition: opacity 250ms
     touch-action: pan-y !important
 
@@ -152,6 +152,9 @@ article.song
             border-bottom: 1px solid currentColor
             padding-bottom: 20px
 
+            p
+                margin: 5px 0
+
             &.notes
                 font-family: "Dancing Script", cursive !important
                 padding-top: 20px
@@ -246,8 +249,9 @@ article.song
 
     blockquote
         border-left: 5px solid var(--theme-color)
-        padding-left: 20px
+        padding: 5px 0 5px 20px
         opacity: 0.6
+        margin: 0 0
 
 
     .lyrics