Skip to content

Commit

Permalink
v0.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cletqui committed Jun 27, 2024
1 parent eecc4cc commit 326305e
Show file tree
Hide file tree
Showing 7 changed files with 201 additions and 102 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ npm run deploy
- [ ] Change the document title dynamically (with nested `Suspense`)
- [ ] Improve GUI
- [x] add additional info about the repo
- [ ] mimic GitHub layout
- [x] implement dark/light themes
- [x] mimic GitHub layout
- [ ] set page title as `full_name` & use GitHub link in header like GitHub page
- [ ] cache svg imports
- [ ] add reload button
- [ ] fix header hidden on small screens
- [x] add reload button
- [x] fix header hidden on small screens
- [ ] add colors for languages
- [ ] Define unit tests
- [ ] Fix interfaces and type definitions
- [ ] Setup GitHub Actions
Expand Down
194 changes: 106 additions & 88 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "petithub",
"version": "0.5.2",
"version": "0.6.0",
"private": false,
"description": "PetitHub - Explore obscure GitHub repositories",
"author": {
Expand Down Expand Up @@ -30,15 +30,15 @@
"deploy": "$npm_execpath run build && wrangler pages deploy"
},
"dependencies": {
"hono": "^4.4.7",
"hono": "^4.4.9",
"octokit": "^4.0.2"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20240620.0",
"@hono/vite-cloudflare-pages": "^0.4.1",
"@hono/vite-dev-server": "^0.12.2",
"vite": "^5.3.1",
"vite": "^5.3.2",
"vitest": "^1.6.0",
"wrangler": "^3.61.0"
"wrangler": "^3.62.0"
}
}
6 changes: 6 additions & 0 deletions public/static/icons/refresh.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/static/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ const maxIdCookie = getCookie("max_id");
if (!maxIdCookie) {
fetch("/id");
}

const refresh = () => {
window.location.reload();
};
60 changes: 56 additions & 4 deletions public/static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,21 @@ body {
}
body {
display: flex;
flex-direction: column;
flex-flow: row wrap;
flex-direction: row;
justify-content: center;
align-items: center;
background-color: var(--bg-color);
color: var(--font-color-default);
}
.container-wrapper {
display: flex;
flex: 1;
flex: 1 0 auto;
box-sizing: border-box;
justify-content: center;
align-items: center;
width: 100%;
min-height: calc(100vh - 12rem);
}
.container {
width: 80%;
Expand All @@ -34,15 +37,62 @@ body {

/* HEADER */
.header {
display: block;
display: flex;
flex: 0 0 auto;
min-width: 100%;
min-height: 2rem;
box-sizing: border-box;
margin-left: auto;
margin-right: auto;
-moz-box-orient: horizontal;
-moz-box-direction: normal;
flex-direction: row;
-moz-box-align: center;
align-items: center;
-moz-box-pack: justify;
justify-content: space-between;
}
.header a {
display: flex;
-moz-box-orient: horizontal;
-moz-box-direction: normal;
flex-direction: row;
}
.header .icon {
width: 1.5rem;
height: 1.5rem;
margin: 0 1rem;
cursor: pointer;
filter: var(--svg-icon-color);
}
.title {
.header .title {
font-size: 2rem;
font-weight: 600;
color: var(--font-color-default);
margin-bottom: 20px;
display: flex;
-moz-box-orient: horizontal;
-moz-box-direction: normal;
flex-direction: row;
-moz-box-align: center;
align-items: center;
}
.header .refresh {
-moz-box-align: center;
-moz-box-pack: end;
animation: 1s cubic-bezier(0.165, 0.84, 0.44, 1) 0s 1 refresh;
transition: transform 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.header .refresh:hover {
transform: rotate(90deg);
}
@keyframes refresh {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}

/* CONTAINER */
Expand Down Expand Up @@ -314,9 +364,11 @@ a:hover {

/* FOOTER */
.footer {
flex: 0 0 auto;
width: 100%;
text-align: center;
padding: 0.5rem 0;
min-height: 1rem;
margin-top: 1rem;
font-size: 0.875rem;
color: var(--font-color-default);
Expand Down
23 changes: 20 additions & 3 deletions src/utils/renderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export const Container = ({
<td class="label-column">
<img
src="/static/icons/create.svg"
alt="license"
alt="create"
class="icon small-icon"
/>
{"creation"}
Expand All @@ -210,7 +210,7 @@ export const Container = ({
<td class="label-column">
<img
src="/static/icons/update.svg"
alt="license"
alt="update"
class="icon small-icon"
/>
{"update"}
Expand All @@ -229,7 +229,7 @@ export const Container = ({
<td class="label-column">
<img
src="/static/icons/push.svg"
alt="license"
alt="push"
class="icon small-icon"
/>
{"push"}
Expand Down Expand Up @@ -399,7 +399,24 @@ export const renderer = jsxRenderer(
</head>
<body>
<header class="header">
<a
target="_blank"
rel="noopener noreferrer"
href="https://github.com/"
title="GitHub"
>
<img
src="/static/icons/github.svg"
alt="GitHub"
class="icon github-icon"
/>
</a>
<h1 class="title">{"PetitHub"}</h1>
<img
class="icon refresh"
src="/static/icons/refresh.svg"
onclick="window.location.reload()"
/>
</header>
<div class="container-wrapper">{children}</div>
<footer class="footer">
Expand Down

0 comments on commit 326305e

Please sign in to comment.