Skip to content

Commit ac83529

Browse files
committed
Add quiet border to code block and use pygment css for app file name
1 parent 51801b7 commit ac83529

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

app/javascript/css/components/code.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
.code-wrapper {
44
border-radius: var(--space-3xs-2xs);
5+
border: 1px solid var(--joy-border-quiet);
56
}
67

78
@media screen and (min-width: $screen-md) {
@@ -50,10 +51,9 @@
5051
align-items: center;
5152
display: flex;
5253
font-weight: bold;
53-
color: var(--joy-light);
5454
text-decoration: none;
5555
& svg {
56-
fill: var(--joy-light);
56+
// fill: var(--joy-light);
5757
}
5858
}
5959
}

app/javascript/css/config/theme.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242

4343
--joy-background-inline-code: ghostwhite;
4444

45+
--joy-border-quiet: var(--joy-color-100);
4546
--joy-border-subtle: var(--joy-color-200);
4647
--joy-border: var(--joy-color-600);
4748
--joy-color-quote: var(--joy-color-600);
@@ -87,7 +88,8 @@
8788

8889
--joy-background-inline-code: var(--dracula-black);
8990

90-
--joy-border-subtle: var(--joy-color-900);
91+
--joy-border-quiet: var(--joy-color-900);
92+
--joy-border-subtle: var(--joy-color-800);
9193
--joy-border: var(--joy-color-600);
9294

9395
--joy-text: var(--joy-color-50);

app/views/components/code_block/app_file.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ def initialize(filename, lines: nil, revision: nil, **attributes)
1212
def view_template
1313
render ::CodeBlock::Article.new(**attributes) do |code_block|
1414
code_block.title do
15-
a(href: app_file.repo_url, target: "_blank", class: "flex items-center gap-1") {
16-
plain app_file.filename
15+
a(href: app_file.repo_url, target: "_blank", class: "nc flex items-center gap-1") {
16+
plain app_file.app_path.to_s
1717
plain inline_svg_tag("external-link.svg", class: "icon icon-sm", height: 12, width: 12)
1818
}
1919
end

0 commit comments

Comments
 (0)