Skip to content

Commit

Permalink
v0.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
cletqui committed Jun 25, 2024
1 parent 1597a73 commit 6547361
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "petithub",
"version": "0.5.0",
"version": "0.5.1",
"private": false,
"description": "PetitHub - Explore obscure GitHub repositories",
"author": {
Expand Down
31 changes: 25 additions & 6 deletions public/static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,23 @@ a:hover {
margin-right: 0.6rem !important;
filter: var(--svg-font-color-muted);
}
@media (max-width: 1000px) {
.button .label {
display: none;
}
}
@media (max-width: 800px) {
.layout-main-header {
display: inline-block;
}
.layout-main-header .code-button {
margin-top: 0.5rem;
}
}
@media (max-width: 600px) {
html {
font-size: small;
}
.container-layout {
flex-direction: column-reverse;
}
Expand All @@ -130,18 +146,17 @@ a:hover {
.row {
display: flex;
flex-direction: row;
gap: 8px;
gap: 0.5rem;
margin-right: 0.5rem;
}
.main-table {
width: 100%;
border: 1px solid var(--border-color);
border-collapse: separate;
border-spacing: 0px;
border-width: 1px;
border-style: solid;
border-image: none;
border-color: var(--border-color);
border-radius: 6px;
table-layout: fixed;
table-layout: auto;
overflow: unset;
box-sizing: border-box;
font-size: 0.875rem;
Expand Down Expand Up @@ -208,6 +223,9 @@ a:hover {
font-size: 14px;
gap: 6px;
padding: 0.25rem 0.75rem;
white-space: nowrap;
overflow: hidden;
position: relative;
}
.button:hover {
background-color: var(--bg-color-hover);
Expand Down Expand Up @@ -256,7 +274,8 @@ a:hover {
.footer {
width: 100%;
text-align: center;
padding: 0.5em 0;
padding: 0.5rem 0;
margin-top: 1rem;
font-size: 0.875rem;
color: var(--font-color);
border-top: 1px solid var(--border-color);
Expand Down
3 changes: 2 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ app.get(
"/id",
async (c: Context<{ Bindings: Bindings }>): Promise<Response> => {
const octokit = getOctokitInstance(c);
const id = await getMaxId(octokit, Number(MAX_ID));
const cookieId = getCookieId(c);
const id = await getMaxId(octokit, Number(cookieId || MAX_ID));
setCookieId(c, id);
const timestamp = new Date();
return c.json({ id, timestamp });
Expand Down
12 changes: 6 additions & 6 deletions src/utils/renderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ export const Container = ({
minute: "2-digit",
second: "2-digit",
};
const now = new Date();
return (
<div class="container">
<div class="container-title">
Expand Down Expand Up @@ -128,17 +127,18 @@ export const Container = ({
</button>
<button id="watch-button" class="button">
<img src="/static/icons/eye.svg" alt="watch" class="icon" />
<div>{`Watch ${
(watchers_count || 0) + (subscribers_count || 0)
}`}</div>
<div class="label">{"Watch"}</div>
<div>{(watchers_count || 0) + (subscribers_count || 0)}</div>
</button>
<button id="fork-button" class="button">
<img src="/static/icons/fork.svg" alt="fork" class="icon" />
<div>{`Fork ${forks_count || 0}`}</div>
<div class="label">{"Fork"}</div>
<div>{forks_count || 0}</div>
</button>
<button id="star-button" class="button">
<img src="/static/icons/star.svg" alt="star" class="icon" />
<div>{`Star ${stargazers_count || 0}`}</div>
<div class="label">{"Star"}</div>
<div>{stargazers_count || 0}</div>
</button>
</div>
<button id="code-button" class="button code-button">
Expand Down

0 comments on commit 6547361

Please sign in to comment.