Skip to content

Commit 9db906b

Browse files
Implement custom fonts and custom border radius (#38)
* Implement custom border radius * Implement custom font.
1 parent ca75c6b commit 9db906b

14 files changed

Lines changed: 234 additions & 131 deletions

File tree

src/AwesomeGithubStats.Api/AwesomeGithubStats.Api.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<RootNamespace>AwesomeGithubStats.Api</RootNamespace>
66
<UserSecretsId>372edb10-8465-4af6-a84d-28d86be75fe3</UserSecretsId>
77
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>

src/AwesomeGithubStats.Api/svgs/user-stats/github-card.svg

Lines changed: 6 additions & 3 deletions
Loading

src/AwesomeGithubStats.Api/svgs/user-stats/level-alt-card.svg

Lines changed: 7 additions & 4 deletions
Loading

src/AwesomeGithubStats.Api/svgs/user-stats/level-card.svg

Lines changed: 7 additions & 4 deletions
Loading

src/AwesomeGithubStats.Api/svgs/user-stats/octocat-card.svg

Lines changed: 6 additions & 4 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

src/AwesomeGithubStats.Api/wwwroot/css/style.css

Lines changed: 87 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,17 @@ body {
4747
font-family: "Open Sans", Roboto, Arial, sans-serif;
4848
padding-top: 10px;
4949
color: var(--text);
50+
transition: background 0.3s ease-in-out, color 0.3s ease-in-out;
5051
}
5152

5253
.github {
5354
text-align: center;
5455
margin-bottom: 12px;
5556
}
5657

57-
.github a {
58-
color: var(--text);
59-
}
58+
.github a {
59+
color: var(--text);
60+
}
6061

6162
@media only screen and (max-width: 340px) {
6263
.github a {
@@ -119,19 +120,19 @@ h2 {
119120
transition: 0.2s ease-in-out;
120121
}
121122

122-
.btn:focus {
123-
outline: var(--button-outline) auto 2px;
124-
}
123+
.btn:focus {
124+
outline: var(--button-outline) auto 2px;
125+
}
125126

126-
.btn:hover {
127-
background-color: var(--blue-dark);
128-
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
129-
}
127+
.btn:hover {
128+
background-color: var(--blue-dark);
129+
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
130+
}
130131

131-
.btn:disabled {
132-
background: var(--blue-transparent);
133-
box-shadow: none;
134-
}
132+
.btn:disabled {
133+
background: var(--blue-transparent);
134+
box-shadow: none;
135+
}
135136

136137
.parameters {
137138
margin: auto;
@@ -143,46 +144,39 @@ h2 {
143144
grid-gap: 8px;
144145
}
145146

146-
.parameters .btn {
147-
margin-top: 8px;
148-
}
149-
150-
.parameters input[type="text"],
151-
.parameters input.jscolor,
152-
.parameters select {
153-
padding: 10px 14px;
154-
display: inline-block;
155-
border: 1px solid var(--border);
156-
border-radius: 6px;
157-
box-sizing: border-box;
158-
font-family: inherit;
159-
background: var(--card-background);
160-
width: 100%;
161-
color: inherit;
162-
}
147+
.parameters .btn {
148+
margin-top: 8px;
149+
}
163150

164-
.parameters input.jscolor {
165-
font-size: 12px;
166-
max-width: 130px;
167-
}
151+
.parameters input[type="text"],
152+
.parameters input.jscolor,
153+
.parameters select {
154+
padding: 10px 14px;
155+
display: inline-block;
156+
border: 1px solid var(--border);
157+
border-radius: 6px;
158+
box-sizing: border-box;
159+
font-family: inherit;
160+
background: var(--card-background);
161+
width: 100%;
162+
color: inherit;
163+
}
168164

169-
@media only screen and (max-width: 1024px) {
170-
.parameters input.jscolor {
171-
max-width: none;
172-
}
165+
.parameters input.jscolor {
166+
font-size: 12px;
173167
}
174168

175169
.parameters select {
176170
-webkit-appearance: none;
177171
-moz-appearance: none;
178-
background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
172+
background-image: url("../assets/chevron-down.svg");
179173
background-repeat: no-repeat;
180174
background-position-x: 100%;
181175
background-position-y: 5px;
182176
}
183177

184178
[data-theme="dark"] .parameters select {
185-
background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
179+
background-image: url("../assets/chevron-down-white.svg");
186180
}
187181

188182
.parameters select option[disabled] {
@@ -206,18 +200,18 @@ input:focus:invalid {
206200
grid-column-end: -1;
207201
}
208202

209-
.advanced summary {
210-
padding: 6px;
211-
}
203+
.advanced summary {
204+
padding: 6px;
205+
}
212206

213-
.advanced .parameters {
214-
margin-top: 8px;
215-
grid-template-columns: auto 1fr auto;
216-
}
207+
.advanced .parameters {
208+
margin-top: 8px;
209+
grid-template-columns: auto 1fr auto;
210+
}
217211

218-
.advanced .parameters label:first-of-type {
219-
font-weight: bold;
220-
}
212+
.advanced .parameters label:first-of-type {
213+
font-weight: bold;
214+
}
221215

222216
.plus.btn,
223217
.minus.btn {
@@ -230,12 +224,12 @@ input:focus:invalid {
230224
width: 40px;
231225
}
232226

233-
.plus.btn:hover,
234-
.minus.btn:hover {
235-
background: var(--background);
236-
}
227+
.plus.btn:hover,
228+
.minus.btn:hover {
229+
background: var(--background);
230+
}
237231

238-
.output img {
232+
.output div {
239233
max-width: 100%;
240234
margin-left: 15px;
241235
}
@@ -272,46 +266,46 @@ input:focus:invalid {
272266
align-items: center;
273267
}
274268

275-
/* tooltip bubble */
276-
.btn.tooltip:before {
277-
content: attr(title);
278-
position: absolute;
279-
transform: translateY(-45px);
280-
height: auto;
281-
width: auto;
282-
background: #4a4a4afa;
283-
border-radius: 4px;
284-
color: white;
285-
line-height: 30px;
286-
font-size: 1em;
287-
padding: 0 12px;
288-
pointer-events: none;
289-
opacity: 0;
290-
}
269+
/* tooltip bubble */
270+
.btn.tooltip:before {
271+
content: attr(title);
272+
position: absolute;
273+
transform: translateY(-45px);
274+
height: auto;
275+
width: auto;
276+
background: #4a4a4afa;
277+
border-radius: 4px;
278+
color: white;
279+
line-height: 30px;
280+
font-size: 1em;
281+
padding: 0 12px;
282+
pointer-events: none;
283+
opacity: 0;
284+
}
291285

292-
/* tooltip bottom triangle */
293-
.btn.tooltip:after {
294-
content: "";
295-
position: absolute;
296-
transform: translateY(-27px);
297-
border-style: solid;
298-
border-color: #4a4a4afa transparent transparent transparent;
299-
pointer-events: none;
300-
opacity: 0;
301-
}
286+
/* tooltip bottom triangle */
287+
.btn.tooltip:after {
288+
content: "";
289+
position: absolute;
290+
transform: translateY(-27px);
291+
border-style: solid;
292+
border-color: #4a4a4afa transparent transparent transparent;
293+
pointer-events: none;
294+
opacity: 0;
295+
}
302296

303-
/* show tooltip on hover */
304-
.btn.tooltip[title]:hover:before,
305-
.btn.tooltip[title]:hover:after,
306-
.btn.tooltip:disabled:hover:before,
307-
.btn.tooltip:disabled:hover:after {
308-
transition: 0.2s ease-in opacity;
309-
opacity: 1;
310-
}
297+
/* show tooltip on hover */
298+
.btn.tooltip[title]:hover:before,
299+
.btn.tooltip[title]:hover:after,
300+
.btn.tooltip:disabled:hover:before,
301+
.btn.tooltip:disabled:hover:after {
302+
transition: 0.2s ease-in opacity;
303+
opacity: 1;
304+
}
311305

312-
.btn.tooltip:disabled:before {
313-
content: "You must first input a valid username.";
314-
}
306+
.btn.tooltip:disabled:before {
307+
content: "You must first input a valid username.";
308+
}
315309

316310
pre {
317311
white-space: pre-wrap;

0 commit comments

Comments
 (0)