mirror of
https://github.com/dergigi/boris.git
synced 2025-12-18 23:24:22 +01:00
chore: change default paragraph alignment to justify
This commit is contained in:
@@ -35,7 +35,7 @@ const DEFAULT_SETTINGS: UserSettings = {
|
||||
zapSplitAuthorWeight: 50,
|
||||
useLocalRelayAsCache: true,
|
||||
rebroadcastToAllRelays: false,
|
||||
paragraphAlignment: 'left',
|
||||
paragraphAlignment: 'justify',
|
||||
}
|
||||
|
||||
interface SettingsProps {
|
||||
|
||||
@@ -56,14 +56,14 @@ const ReadingDisplaySettings: React.FC<ReadingDisplaySettingsProps> = ({ setting
|
||||
onClick={() => onUpdate({ paragraphAlignment: 'left' })}
|
||||
title="Left aligned"
|
||||
ariaLabel="Left aligned"
|
||||
variant={(settings.paragraphAlignment || 'left') === 'left' ? 'primary' : 'ghost'}
|
||||
variant={settings.paragraphAlignment === 'left' ? 'primary' : 'ghost'}
|
||||
/>
|
||||
<IconButton
|
||||
icon={faAlignJustify}
|
||||
onClick={() => onUpdate({ paragraphAlignment: 'justify' })}
|
||||
title="Justified"
|
||||
ariaLabel="Justified"
|
||||
variant={settings.paragraphAlignment === 'justify' ? 'primary' : 'ghost'}
|
||||
variant={(settings.paragraphAlignment || 'justify') === 'justify' ? 'primary' : 'ghost'}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -178,7 +178,7 @@ const ReadingDisplaySettings: React.FC<ReadingDisplaySettingsProps> = ({ setting
|
||||
fontFamily: previewFontFamily,
|
||||
fontSize: `${settings.fontSize || 21}px`,
|
||||
'--highlight-rgb': hexToRgb(settings.highlightColor || '#ffff00'),
|
||||
'--paragraph-alignment': settings.paragraphAlignment || 'left'
|
||||
'--paragraph-alignment': settings.paragraphAlignment || 'justify'
|
||||
} as React.CSSProperties}
|
||||
>
|
||||
<h3>The Quick Brown Fox</h3>
|
||||
|
||||
@@ -74,7 +74,7 @@ export function useSettings({ relayPool, eventStore, pubkey, accountManager }: U
|
||||
root.setProperty('--highlight-color-nostrverse', settings.highlightColorNostrverse || '#9333ea')
|
||||
|
||||
// Set paragraph alignment
|
||||
root.setProperty('--paragraph-alignment', settings.paragraphAlignment || 'left')
|
||||
root.setProperty('--paragraph-alignment', settings.paragraphAlignment || 'justify')
|
||||
|
||||
console.log('✅ All styles applied')
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ export interface UserSettings {
|
||||
darkColorTheme?: 'black' | 'midnight' | 'charcoal' // default: midnight
|
||||
lightColorTheme?: 'paper-white' | 'sepia' | 'ivory' // default: sepia
|
||||
// Reading settings
|
||||
paragraphAlignment?: 'left' | 'justify' // default: left
|
||||
paragraphAlignment?: 'left' | 'justify' // default: justify
|
||||
}
|
||||
|
||||
export async function loadSettings(
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
.preview-content p {
|
||||
margin: 0.75rem 0;
|
||||
word-wrap: break-word;
|
||||
text-align: var(--paragraph-alignment, left);
|
||||
text-align: var(--paragraph-alignment, justify);
|
||||
}
|
||||
.setting-select { width: 100%; padding: 0.5rem; background: var(--color-bg-elevated); border: 1px solid var(--color-border-subtle); border-radius: 4px; color: var(--color-text); font-size: 1rem; }
|
||||
.setting-inline .setting-select { width: auto; min-width: 200px; flex: 1; }
|
||||
|
||||
@@ -47,9 +47,9 @@
|
||||
.reader .reader-html li,
|
||||
.reader .reader-markdown li,
|
||||
.reader .reader-html blockquote,
|
||||
.reader .reader-markdown blockquote { text-align: var(--paragraph-alignment, left); }
|
||||
.reader .reader-markdown blockquote { text-align: var(--paragraph-alignment, justify); }
|
||||
/* Override centered content with user preference */
|
||||
.reader center, .reader [align="center"] { text-align: var(--paragraph-alignment, left) !important; }
|
||||
.reader center, .reader [align="center"] { text-align: var(--paragraph-alignment, justify) !important; }
|
||||
/* Keep headings left-aligned */
|
||||
.reader .reader-html h1, .reader .reader-html h2, .reader .reader-html h3, .reader .reader-html h4, .reader .reader-html h5, .reader .reader-html h6,
|
||||
.reader .reader-markdown h1, .reader .reader-markdown h2, .reader .reader-markdown h3, .reader .reader-markdown h4, .reader .reader-markdown h5, .reader .reader-markdown h6 { text-align: left !important; }
|
||||
|
||||
Reference in New Issue
Block a user