Skip to content

Commit

Permalink
Update styling, remove log
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Beaulieu committed May 2, 2023
1 parent db952fc commit f4cb3f6
Show file tree
Hide file tree
Showing 5 changed files with 147 additions and 148 deletions.
113 changes: 113 additions & 0 deletions public/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
body {
box-sizing: border-box;
padding: 20px;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
background: #000000;
color: #e7e5e3;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
height: 100vh;
}

#wrap {
display: flex;
align-items: center;
height: 100%;
}

main {
width: 500px;
margin: 0 auto;
}

header {
display: flex;
align-items: center;
font-size: 24px;
margin-bottom: 40px;
}

#release {
flex-grow: 1;
}

#repo {
font-weight: 800;
}

#date {
color: gray;
font-size: 18px;
}

.item {
display: flex;
align-items: center;
}

.item:not(:last-of-type) {
margin-bottom: 14px;
}

.item a {
color: #e19f1f;
text-decoration: none;
}

.item a:hover {
text-decoration: underline;
}

.fileType {
font-weight: 600;
flex-grow: 1;
}

.url {
font-weight: 400;
}

.size {
color: #545353;
white-space: nowrap;
}

footer {
display: flex;
align-items: center;
flex-wrap: wrap;
}

footer > * {
margin-top: 40px;
}

footer a {
color: gray;
text-decoration: none;
}

footer a:hover {
text-decoration: underline;
}

#version {
margin-right: 8px;
padding: 2px 6px;
border-radius: 4px;
color: #000000;
background: #e19f1f;
}

#release-notes {
font-weight: 600;
color: white;
}

#all-releases {
text-align: center;
flex-grow: 1;
}
1 change: 1 addition & 0 deletions public/stashpad.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const app = express()
app.use(helmet())

app.use('/', overviewRouter)
app.use(express.static('public'))
app.use('/download', downloadRouter)
app.use('/update', updateRouter)
app.use('/files', filesRouter)
Expand Down
3 changes: 0 additions & 3 deletions src/utils/releaseCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ export class ReleaseCache {

response = await retry(
async () => {
if (this.getToken())
logger.warn('Calling github API using token. Affects rate limit.')

const res = await fetch(url, { headers })
if (res.status !== 200) {
logger.error(
Expand Down
177 changes: 32 additions & 145 deletions views/index.hbs
Original file line number Diff line number Diff line change
@@ -1,153 +1,40 @@
<!DOCTYPE html>
<html lang="en">
<html lang='en'>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<meta charset='utf-8' />
<meta name='viewport' content='width=device-width, initial-scale=1' />
<title>{{account}}/{{repository}}</title>

<style>
body {
box-sizing: border-box;
padding: 20px;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont,
"Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
"Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
background: hsla(210, 17%, 10%, 1);
color: hsla(207, 21%, 88%, 1);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
height: 100vh;
}
#wrap {
display: flex;
align-items: center;
height: 100%;
}
main {
width: 500px;
margin: 0 auto;
}
header {
display: flex;
align-items: center;
font-size: 24px;
margin-bottom: 40px;
}
#release {
flex-grow: 1;
}
#repo {
font-weight: 800;
}
#date {
color: gray;
font-size: 18px;
}
.item {
display: flex;
align-items: center;
}
.item:not(:last-of-type) {
margin-bottom: 14px;
}
.item a {
color: hsla(77, 76%, 61%, 1);
text-decoration: none;
}
.item a:hover {
text-decoration: underline;
}
.fileType {
font-weight: 600;
flex-grow: 1;
}
.url {
font-weight: 400;
}
.size {
color: #404040;
white-space: nowrap;
}
footer {
display: flex;
align-items: center;
flex-wrap: wrap;
}
footer > * {
margin-top: 40px;
}
footer a {
color: gray;
text-decoration: none;
}
footer a:hover {
text-decoration: underline;
}
#version {
margin-right: 8px;
padding: 2px 6px;
border-radius: 4px;
color:hsla(210, 17%, 10%, 1);
background: hsla(77, 76%, 61%, 0.8);
}
#release-notes {
font-weight: 600;
color: white;
}
#all-releases {
text-align: center;
flex-grow: 1;
}
</style>
<link rel='icon' href='stashpad.svg' />
<link rel='stylesheet' href='index.css' />
</head>

<body>
<div id="wrap">
<div id='wrap'>
<main>
<header>
<div id="release">{{account}}/<span id="repo">{{repository}}</span></div>
<div id="date">{{date}}</div>
</header>

<div id="list">
{{#each files}}
<div class="item">
<div class="fileType">{{@key}}: <span class="url"><a href={{this.url}}>/latest/{{@key}}</a></span></div>
<div class="size">{{this.size}} MB</div>
</div>
{{/each}}
</div>

<footer>
<div id="version">{{version}}</div>
<a id="release-notes" href={{releaseNotes}}>Release Notes</a>
<a id="all-releases" href={{allReleases}}>All Releases</a>
<a href={{github}}>GitHub</a>
</footer>
<header>
<div id='release'>{{account}}/<span
id='repo'
>{{repository}}</span></div>
<div id='date'>{{date}}</div>
</header>

<div id='list'>
{{#each files}}
<div class='item'>
<div class='fileType'>{{@key}}:
<span class='url'><a
href={{this.url}}
>/latest/{{@key}}</a></span></div>
<div class='size'>{{this.size}} MB</div>
</div>
{{/each}}
</div>

<footer>
<div id='version'>{{version}}</div>
<a id='release-notes' href={{releaseNotes}}>Release Notes</a>
<a id='all-releases' href={{allReleases}}>All Releases</a>
<a href={{github}}>GitHub</a>
</footer>
</main>
</div>
</body>
</html>
</html>

0 comments on commit f4cb3f6

Please sign in to comment.