diff --git a/shaarli-pro/css/style.css b/shaarli-pro/css/style.css index 0201d89..93743fa 100644 --- a/shaarli-pro/css/style.css +++ b/shaarli-pro/css/style.css @@ -278,6 +278,58 @@ a:focus:not(:focus-visible) { color: white; } +/* Sidebar Segmented Add Button */ +.sidebar-add-segmented { + display: flex; + background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%); + border-radius: 0.75rem; + overflow: hidden; + box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3), 0 2px 4px -1px rgba(59, 130, 246, 0.2); +} + +.sidebar-add-segment { + display: flex; + align-items: center; + justify-content: center; + gap: 0.5rem; + flex: 1; + padding: 0.875rem 0.5rem; + background: transparent; + color: white; + font-weight: 600; + font-size: 0.9rem; + text-decoration: none; + transition: all 0.2s ease; + border-right: 1px solid rgba(255, 255, 255, 0.25); +} + +.sidebar-add-segment:last-child { + border-right: none; +} + +.sidebar-add-segment:hover { + background: rgba(255, 255, 255, 0.15); + color: white; +} + +.sidebar-add-segment i { + font-size: 1.4rem; +} + +.sidebar-add-segment span { + display: inline; +} + +/* Responsive: hide text on small screens */ +@media (max-width: 240px) { + .sidebar-add-segment span { + display: none; + } + .sidebar-add-segment { + padding: 0.75rem; + } +} + /* Theme toggle in sidebar */ .theme-toggle-wrapper { display: flex; diff --git a/shaarli-pro/editlink.html b/shaarli-pro/editlink.html index b75f791..68bc8fe 100644 --- a/shaarli-pro/editlink.html +++ b/shaarli-pro/editlink.html @@ -17,12 +17,20 @@ {/if} {$batchModeValue=empty($batch_mode) ? '0' : '1'} {function="($readLaterChecked = strpos(' ' . $link.tags . ' ', ' readitlater ') != false || strpos(' ' . $link.tags . ' ', ' readlater ') != false || strpos(' ' . $link.tags . ' ', ' toread ') != false) ? '' : ''"} -{function="($noteDefaultChecked = $link_is_new && empty($link.url)) ? '' : ''"} +{function="($isNoteOrTodo = strpos(' ' . $link.tags . ' ', ' note ') != false || strpos(' ' . $link.tags . ' ', ' shaarli-todo ') != false || strpos(' ' . $link.tags . ' ', ' shaarli-todo ') != false) ? '' : ''"} +{function="($noteDefaultChecked = $link_is_new && empty($link.url) && !$isNoteOrTodo) ? '' : ''"} {function="($noteChecked = strpos(' ' . $link.tags . ' ', ' note ') != false || $noteDefaultChecked) ? '' : ''"} +{function="($todoChecked = strpos(' ' . $link.tags . ' ', ' shaarli-todo ') != false) ? '' : ''"} {$effectiveTags=$link.tags} {if="$noteDefaultChecked && strpos(' ' . $effectiveTags . ' ', ' note ') == false"} {$effectiveTags=trim($effectiveTags . ' note')} {/if} +{if="$todoChecked && strpos(' ' . $effectiveTags . ' ', ' note ') != false"} + {$effectiveTags=trim(str_replace(' note ', ' ', ' ' . $effectiveTags . ' '))} +{/if} +{if="$todoChecked && strpos(' ' . $effectiveTags . ' ', ' shaarli-todo ') == false"} + {$effectiveTags=trim($effectiveTags . ' shaarli-todo')} +{/if} {function="($privateChecked = $link.private == true || $link_is_new) ? '' : ''"}
@@ -46,7 +54,7 @@
-
+
@@ -101,6 +109,10 @@ Note +