Skip to content

Commit 644e590

Browse files
authored
fix: Use font awesome instead of svg (#161)
1 parent 574cc03 commit 644e590

25 files changed

+334
-390
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<img align="right" width="128" height="128" src="assets/logo.png">
1+
<img align="right" width="128" height="128" src="spis-gui/assets/favicon.png">
22

33
<h1>SPIS</h1>
44

dev/nginx.conf

+10-4
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,17 @@ http {
1515
gzip_proxied any;
1616
gzip_types
1717
text/html
18-
application/wasm
18+
text/css
19+
text/javascript
1920
application/javascript
2021
application/json
21-
text/plain
22-
image/jpeg;
22+
application/wasm
23+
font/ttf
24+
font/woff2
25+
image/jpeg
26+
image/webp
27+
image/png
28+
;
2329

2430
access_log off;
2531
access_log /dev/stdout;
@@ -30,7 +36,7 @@ http {
3036
add_header Cache-Control "public";
3137
alias ${PWD}/dev/api/media;
3238
}
33-
39+
3440
location /assets/thumbnails {
3541
gzip_static on;
3642
expires 1y;

docker/nginx.conf

+9-3
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,17 @@ server {
88
gzip_proxied any;
99
gzip_types
1010
text/html
11-
application/wasm
11+
text/css
12+
text/javascript
1213
application/javascript
1314
application/json
14-
text/plain
15-
image/jpeg;
15+
application/wasm
16+
font/ttf
17+
font/woff2
18+
image/jpeg
19+
image/webp
20+
image/png
21+
;
1622

1723
location ${SPIS_API_MEDIA_PATH} {
1824
gzip_static on;

make/Makefile-release.mk

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ RELEASE_AARCH64_GNU:=release/spis-server-aarch64-unknown-linux-gnu
88
${RELEASE_GUI}:
99
$(info $(M) Build GUI release)
1010
$(Q) cd spis-gui && trunk build --release
11-
$(Q) cp -f spis-gui/manifest.json spis-gui/dist/manifest.json
12-
$(Q) cp -f assets/logo.png spis-gui/dist/logo.png
1311
$(Q) rm -r target/release
1412

1513
${RELEASE_X86_60_GNU}: ${RELEASE_GUI} ${DEV_DB_FILE}

spis-gui/assets/css/brands.min.css

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spis-gui/assets/css/fontawesome.min.css

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spis-gui/assets/css/regular.min.css

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/*!
2+
* Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com
3+
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4+
* Copyright 2023 Fonticons, Inc.
5+
*/
6+
:host,:root{--fa-style-family-classic:"Font Awesome 6 Free";--fa-font-regular:normal 400 1em/1 "Font Awesome 6 Free"}@font-face{font-family:"Font Awesome 6 Free";font-style:normal;font-weight:400;font-display:block;src:url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.ttf) format("truetype")}.fa-regular,.far{font-weight:400}

spis-gui/assets/css/solid.min.css

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/*!
2+
* Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com
3+
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4+
* Copyright 2023 Fonticons, Inc.
5+
*/
6+
:host,:root{--fa-style-family-classic:"Font Awesome 6 Free";--fa-font-solid:normal 900 1em/1 "Font Awesome 6 Free"}@font-face{font-family:"Font Awesome 6 Free";font-style:normal;font-weight:900;font-display:block;src:url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.ttf) format("truetype")}.fa-solid,.fas{font-weight:900}

spis-gui/assets/favicon.png

21.7 KB
Loading

spis-gui/manifest.json renamed to spis-gui/assets/manifest.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,36 @@
77
"theme_color": "#db9b38",
88
"icons": [
99
{
10-
"src": "/favicon.png",
10+
"src": "/assets/favicon.png",
1111
"type": "image/png", "sizes": "72x72"
1212
},
1313
{
14-
"src": "/favicon.png",
14+
"src": "/assets/favicon.png",
1515
"type": "image/png", "sizes": "96x96"
1616
},
1717
{
18-
"src": "/favicon.png",
18+
"src": "/assets/favicon.png",
1919
"type": "image/png","sizes": "128x128"
2020
},
2121
{
22-
"src": "/favicon.png",
22+
"src": "/assets/favicon.png",
2323
"type": "image/png", "sizes": "144x144"
2424
},
2525
{
26-
"src": "/favicon.png",
26+
"src": "/assets/favicon.png",
2727
"type": "image/png", "sizes": "152x152"
2828
},
2929
{
30-
"src": "/favicon.png",
30+
"src": "/assets/favicon.png",
3131
"type": "image/png", "sizes": "192x192"
3232
},
3333
{
34-
"src": "/favicon.png",
34+
"src": "/assets/favicon.png",
3535
"type": "image/png", "sizes": "384x384"
3636
},
3737
{
38-
"src": "/favicon.png",
38+
"src": "/assets/favicon.png",
3939
"type": "image/png","sizes": "512x512"
4040
}
4141
]
42-
}
42+
}
203 KB
Binary file not shown.
115 KB
Binary file not shown.
66.4 KB
Binary file not shown.
24.9 KB
Binary file not shown.
410 KB
Binary file not shown.
153 KB
Binary file not shown.
10.6 KB
Binary file not shown.
Binary file not shown.

spis-gui/index.html

+10-204
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
43
<head>
54
<meta charset="utf-8">
65
<meta name="viewport" content="width=device-width, initial-scale=1">
@@ -9,211 +8,18 @@
98
<meta name="description" content="Simple Private Image Server">
109
<meta name="theme-color" content="#2b2b2b">
1110

12-
<link rel="manifest" href="manifest.json" />
13-
<link rel="icon" type="image/png" href="favicon.png" />
14-
15-
<title>SPIS</title>
16-
17-
<style>
18-
body {
19-
background-color: #2b2b2b;
20-
}
21-
22-
* {
23-
margin: 0;
24-
padding: 0;
25-
box-sizing: border-box;
26-
}
27-
28-
ul {
29-
list-style: none;
30-
}
31-
32-
.media-list {
33-
display: flex;
34-
flex-wrap: wrap;
35-
align-items: center;
36-
justify-content: center;
37-
padding: 5px;
38-
}
39-
40-
.media-preview {
41-
z-index: 10;
42-
43-
position: fixed;
44-
padding: 0;
45-
margin: 0;
46-
47-
top: 0;
48-
left: 0;
49-
50-
width: 100%;
51-
height: 100%;
52-
background: rgba(0, 0, 0, 0.9);
53-
54-
display: flex;
55-
align-items: center;
56-
justify-content: center;
57-
58-
flex-direction: column;
59-
justify-content: space-around;
60-
}
61-
62-
li {
63-
position: relative;
64-
width: 25%;
65-
}
66-
67-
@media screen and (orientation:landscape) {
68-
li {
69-
width: 16%;
70-
}
71-
}
72-
73-
@media screen and (min-width: 1000px) {
74-
li {
75-
width: 10%;
76-
}
77-
}
78-
79-
.media-thumbnail {
80-
padding-left: 2px;
81-
padding-right: 2px;
82-
padding-top: 1px;
83-
padding-bottom: 0px;
84-
border-radius: 10px;
85-
width: 100%;
86-
}
87-
88-
.media-thumbnail-fav {
89-
position: absolute;
90-
top: 95%;
91-
left: 95%;
92-
transform: translate(-95%, -95%);
93-
}
94-
95-
.media-thumbnail-vid {
96-
position: absolute;
97-
top: 50%;
98-
left: 50%;
99-
transform: translate(-50%, -50%);
100-
}
101-
102-
.media-preview-content {
103-
height: 90%;
104-
width: 100%;
105-
display: flex;
106-
align-items: center;
107-
justify-content: center;
108-
}
11+
<link data-trunk rel="copy-dir" href="assets"/>
12+
<link data-trunk rel="css" href="style.css" />
10913

110-
.media-action {
111-
width: 100%;
112-
display: flex;
113-
text-align: center;
114-
justify-content: space-around;
115-
}
14+
<link rel="manifest" href="assets/manifest.json" />
15+
<link rel="icon" type="image/png" href="assets/favicon.png" />
11616

117-
.img-preview {
118-
max-width: 100%;
119-
max-height: 100%;
120-
}
17+
<link rel="stylesheet" href="/assets/css/brands.min.css">
18+
<link rel="stylesheet" href="/assets/css/fontawesome.min.css">
19+
<link rel="stylesheet" href="/assets/css/regular.min.css">
20+
<link rel="stylesheet" href="/assets/css/solid.min.css">
12121

122-
/* Setup bar on top */
123-
124-
.main {
125-
margin-top: 60px;
126-
}
127-
128-
.bar {
129-
position: fixed;
130-
top: 0;
131-
width: 100%;
132-
z-index: 5;
133-
134-
display: flex;
135-
align-items: center;
136-
justify-content: center;
137-
}
138-
139-
.bar-inner {
140-
background-color: #2b2b2b;
141-
border-radius: 10px;
142-
height: 65px;
143-
width: 100%;
144-
}
145-
146-
.bar-filter-list-main {
147-
width: 100%;
148-
height: 100%;
149-
display: flex;
150-
}
151-
152-
.bar-filter-item {
153-
width: 100%;
154-
height: 100%;
155-
flex-basis: 100%;
156-
min-width: 50px;
157-
margin-left: 5px;
158-
margin-right: 5px;
159-
padding-bottom: 5px;
160-
padding-top: 5px;
161-
}
162-
163-
.bar-filter-link {
164-
background-color: #2b2b2b;
165-
}
166-
167-
.bar-filter-link-selected {
168-
background-color: #111111;
169-
}
170-
171-
.bar-filter-item > a {
172-
border-radius: 10px;
173-
174-
display: block;
175-
color: rgb(255, 255, 255);
176-
text-decoration: none;
177-
font-family: monospace;
178-
font-size: larger;
179-
180-
width: 100%;
181-
height: 100%;
182-
183-
display: flex;
184-
align-items: center;
185-
justify-content: center;
186-
}
187-
188-
.bar-filter-item > a:hover {
189-
background-color: #111111;
190-
border-radius: 10px;
191-
}
192-
193-
/* On the phone */
194-
@media screen and (max-width: 1000px) {
195-
.main {
196-
margin-top: 30px;
197-
}
198-
.bar-inner {
199-
height: 35px;
200-
overflow-x: scroll;
201-
}
202-
203-
.bar-filter-item {
204-
padding-bottom: 2px;
205-
padding-top: 2px;
206-
margin-left: 2px;
207-
margin-right: 2px;
208-
209-
min-width: 32px;
210-
font-size: small;
211-
}
212-
}
213-
214-
</style>
22+
<title>SPIS</title>
21523
</head>
216-
21724
<body></body>
218-
219-
</html>
25+
</html>

0 commit comments

Comments
 (0)