mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-18 14:54:24 +01:00
Apply a gentle highlight on nostr links
This commit is contained in:
@@ -335,6 +335,15 @@ h1, h2 {
|
|||||||
color: #fafafa;
|
color: #fafafa;
|
||||||
border-bottom: 1px solid rgba(250, 250, 250, 0.24);
|
border-bottom: 1px solid rgba(250, 250, 250, 0.24);
|
||||||
}
|
}
|
||||||
|
.container .column_content .field a.nostr {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
.theme--default .container .column_content .field a.nostr {
|
||||||
|
background-color: #fdf0f5;
|
||||||
|
}
|
||||||
|
.theme--dark .container .column_content .field a.nostr {
|
||||||
|
background-color: #42091e;
|
||||||
|
}
|
||||||
.container .column_content .field .label {
|
.container .column_content .field .label {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ $themes: (
|
|||||||
boxed-bg: $color-base3,
|
boxed-bg: $color-base3,
|
||||||
over-bg: $color-base3,
|
over-bg: $color-base3,
|
||||||
theme-toggle: $color-base3,
|
theme-toggle: $color-base3,
|
||||||
|
hrefbg: lighten($color-accent1, 44%),
|
||||||
),
|
),
|
||||||
dark: (
|
dark: (
|
||||||
base1: $color-base7,
|
base1: $color-base7,
|
||||||
@@ -44,6 +45,7 @@ $themes: (
|
|||||||
boxed-bg: darken($color-base7, 14%),
|
boxed-bg: darken($color-base7, 14%),
|
||||||
over-bg: darken($color-base7, 4%),
|
over-bg: darken($color-base7, 4%),
|
||||||
theme-toggle: $color-base6,
|
theme-toggle: $color-base6,
|
||||||
|
hrefbg: darken($color-accent1, 38%),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -63,6 +65,7 @@ $boxed-bg-title: 'boxed-bg-title';
|
|||||||
$boxed-bg: 'boxed-bg';
|
$boxed-bg: 'boxed-bg';
|
||||||
$over-bg: 'over-bg';
|
$over-bg: 'over-bg';
|
||||||
$theme-toggle: 'theme-toggle';
|
$theme-toggle: 'theme-toggle';
|
||||||
|
$hrefbg: 'hrefbg';
|
||||||
|
|
||||||
$theme-map: null;
|
$theme-map: null;
|
||||||
@mixin themed() {
|
@mixin themed() {
|
||||||
@@ -351,6 +354,12 @@ a {
|
|||||||
border-bottom: 1px solid rgba( t($base7), .24 );
|
border-bottom: 1px solid rgba( t($base7), .24 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
a.nostr {
|
||||||
|
@include themed() {
|
||||||
|
background-color: t($hrefbg);
|
||||||
|
}
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
.label {
|
.label {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
@include themed() {
|
@include themed() {
|
||||||
|
|||||||
@@ -63,5 +63,5 @@
|
|||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<link rel="stylesheet" href="/njump/static/styles.css?v=20230602d" />
|
<link rel="stylesheet" href="/njump/static/styles.css?v=20230604" />
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
2
utils.go
2
utils.go
@@ -233,7 +233,7 @@ func replaceURLsWithTags(line string) string {
|
|||||||
capturedGroup := submatch[2]
|
capturedGroup := submatch[2]
|
||||||
first6 := capturedGroup[:6]
|
first6 := capturedGroup[:6]
|
||||||
last6 := capturedGroup[len(capturedGroup)-6:]
|
last6 := capturedGroup[len(capturedGroup)-6:]
|
||||||
replacement := fmt.Sprintf(`<a href="/%s">%s</a>`, capturedGroup, first6+"…"+last6)
|
replacement := fmt.Sprintf(`<a href="/%s" class="nostr">%s</a>`, capturedGroup, first6+"…"+last6)
|
||||||
return replacement
|
return replacement
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user