style: refactor links page
This commit is contained in:
+84
-21
@@ -1,5 +1,42 @@
|
|||||||
.link-section {
|
.link-section {
|
||||||
margin-bottom: calc(var(--size-theme-font) * 2);
|
margin-bottom: calc(var(--size-theme-font) * 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.link-section-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: calc(var(--size-theme-font) * 1.25);
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: calc(var(--size-theme-font) * 0.9);
|
||||||
|
font-weight: normal;
|
||||||
|
letter-spacing: 0.15em;
|
||||||
|
text-transform: uppercase;
|
||||||
|
line-height: 1;
|
||||||
|
white-space: nowrap;
|
||||||
|
margin: 0;
|
||||||
|
|
||||||
|
&::before { content: "┌─["; color: var(--color-theme-accent); opacity: 0.4; }
|
||||||
|
&::after { content: "]"; color: var(--color-theme-accent); opacity: 0.4; }
|
||||||
|
|
||||||
|
> span {
|
||||||
|
color: var(--color-theme-accent);
|
||||||
|
padding: 0.1em 0.45em;
|
||||||
|
border-top: var(--width-theme-border) var(--style-theme-border) var(--color-theme-accent);
|
||||||
|
border-bottom: var(--width-theme-border) var(--style-theme-border) var(--color-theme-accent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
content: "";
|
||||||
|
flex: 1;
|
||||||
|
height: var(--width-theme-border);
|
||||||
|
background-color: var(--color-theme-framed);
|
||||||
|
margin-left: 0.6em;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.link-table {
|
.link-table {
|
||||||
@@ -9,48 +46,74 @@
|
|||||||
|
|
||||||
.link-item {
|
.link-item {
|
||||||
display: block;
|
display: block;
|
||||||
margin-bottom: calc(var(--size-theme-font) * 0.5);
|
padding: calc(var(--size-theme-font) * 0.55) calc(var(--size-theme-font) * 0.55);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
.link-item:hover {
|
|
||||||
background-color: var(--color-theme-background);
|
|
||||||
}
|
|
||||||
|
|
||||||
.link-container {
|
.link-container {
|
||||||
display: flex;
|
display: grid;
|
||||||
padding: calc(var(--size-theme-font) * 0.25);
|
grid-template-columns: calc(var(--size-theme-font) * 3.5) 1fr;
|
||||||
|
gap: calc(var(--size-theme-font) * 0.75);
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.link-logo-wrap {
|
||||||
|
width: calc(var(--size-theme-font) * 3.5);
|
||||||
|
height: calc(var(--size-theme-font) * 3.5);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.link-logo {
|
.link-logo {
|
||||||
width: calc(var(--size-theme-font) * 4);
|
width: 100%;
|
||||||
height: auto;
|
height: 100%;
|
||||||
flex-shrink: 0;
|
object-fit: cover;
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.link-content {
|
.link-content {
|
||||||
margin-left: 1rem;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-around;
|
gap: calc(var(--size-theme-font) * 0.15);
|
||||||
min-height: calc(var(--size-theme-font) * 4);
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.link-title {
|
.link-title {
|
||||||
margin: 0;
|
display: flex;
|
||||||
font-weight: 500;
|
align-items: baseline;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: calc(var(--size-theme-font) * 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.link-name {
|
||||||
|
color: var(--color-theme-foreground);
|
||||||
|
&::before { content: "> "; color: var(--color-theme-accent); opacity: 0.55; }
|
||||||
}
|
}
|
||||||
|
|
||||||
.link-url {
|
.link-url {
|
||||||
color: var(--color-theme-accent);
|
color: var(--color-theme-meta);
|
||||||
font-size: calc(var(--size-theme-font) * 0.9);
|
font-size: calc(var(--size-theme-font) * 0.8);
|
||||||
|
opacity: 0.7;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.link-description {
|
.link-description {
|
||||||
margin: 0;
|
|
||||||
color: var(--color-theme-foreground);
|
color: var(--color-theme-foreground);
|
||||||
font-size: calc(var(--size-theme-font) * 0.9);
|
font-size: calc(var(--size-theme-font) * 0.82);
|
||||||
line-height: 1.4;
|
line-height: var(--height-theme-line);
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 600px) {
|
||||||
|
.link-url { display: none; }
|
||||||
|
.link-description { white-space: normal; }
|
||||||
|
.link-container { grid-template-columns: calc(var(--size-theme-font) * 3) 1fr; }
|
||||||
}
|
}
|
||||||
@@ -11,22 +11,24 @@
|
|||||||
</h1>
|
</h1>
|
||||||
</header>
|
</header>
|
||||||
<section class="post-content link-section" th:each="group : ${groups}">
|
<section class="post-content link-section" th:each="group : ${groups}">
|
||||||
|
<div class="link-section-header">
|
||||||
<h2 th:text="${!#strings.isEmpty(group.spec.displayName) ? group.spec.displayName:'links'}">
|
<h2 th:text="${!#strings.isEmpty(group.spec.displayName) ? group.spec.displayName:'links'}">
|
||||||
Links
|
Links
|
||||||
</h2>
|
</h2>
|
||||||
|
</div>
|
||||||
<table class="link-table">
|
<table class="link-table">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr th:each="link : ${group.links}">
|
<tr th:each="link : ${group.links}">
|
||||||
<td>
|
<td>
|
||||||
<a th:href="${link.spec.url}" target="_blank" class="link-item">
|
<a th:href="${link.spec.url}" target="_blank" class="link-item">
|
||||||
<div class="link-container">
|
<div class="link-container">
|
||||||
<div>
|
<div class="link-logo-wrap">
|
||||||
<img class="link-logo" src="" th:src="${link.spec.logo}"
|
<img class="link-logo" src="" th:src="${link.spec.logo}"
|
||||||
th:alt="${link.spec.displayName}" loading="lazy">
|
th:alt="${link.spec.displayName}" loading="lazy">
|
||||||
</div>
|
</div>
|
||||||
<div class="link-content">
|
<div class="link-content">
|
||||||
<div class="link-title">
|
<div class="link-title">
|
||||||
<span th:text="${link.spec.displayName}"></span>
|
<span class="link-name" th:text="${link.spec.displayName}"></span>
|
||||||
<span class="link-url" th:text="|(${link.spec.url})|"></span>
|
<span class="link-url" th:text="|(${link.spec.url})|"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="link-description" th:text="${link.spec.description}"></div>
|
<div class="link-description" th:text="${link.spec.description}"></div>
|
||||||
|
|||||||
Reference in New Issue
Block a user