1
0
mirror of https://github.com/barthuijgen/factorio-sites.git synced 2025-01-07 13:40:12 +02:00

Fix button font size, tags placeholder and deploy task order

This commit is contained in:
Bart 2021-03-14 23:40:54 +01:00
parent a18c827fba
commit 11d53dfc75
5 changed files with 14 additions and 16 deletions

View File

@ -33,7 +33,6 @@ jobs:
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
export_default_credentials: true
- run: gsutil -h "Cache-Control:public, max-age=604800" -m rsync -r -d ./dist/apps/blueprints/.next/static gs://factorio-blueprints-assets/dev/_next/static
- run: gcloud auth configure-docker --quiet
- name: Build and push
uses: docker/build-push-action@v2
@ -42,4 +41,5 @@ jobs:
file: blueprints.github.Dockerfile
push: true
tags: eu.gcr.io/factorio-sites/blueprints:dev
- run: gsutil -h "Cache-Control:public, max-age=31536000" -m rsync -r -d ./dist/apps/blueprints/.next/static gs://factorio-blueprints-assets/dev/_next/static
- run: gcloud run deploy factorio-blueprints-dev --image=eu.gcr.io/factorio-sites/blueprints:dev --platform managed --region=europe-west4

View File

@ -21,6 +21,7 @@ const StyledButton = styled.button`
padding: 10px 12px;
text-align: left;
color: #000;
font-size: 16px;
font-weight: 600;
border: none;
line-height: 100%;

View File

@ -36,15 +36,7 @@ export const CopyButton: React.FC<CopyButtonProps> = ({ content, label, ...props
};
return (
<Button
css={{
display: "inline-flex",
minWidth: "128px",
}}
disabled={loading}
{...props}
onClick={handleClick}
>
<Button css={{ display: "inline-flex" }} disabled={loading} {...props} onClick={handleClick}>
<span className="icon" css={{ marginRight: "5px" }}>
{icon}
</span>

View File

@ -354,11 +354,15 @@ export const Index: NextPage<IndexProps> = ({
</Panel>
<Panel className="tags" gridColumn="2" gridRow={isBlueprintBook ? "3" : "2"} title={"Tags"}>
{blueprint_page.tags.map((tag) => (
<span key={tag} className="tag">
{TAGS_BY_KEY[tag].category}: {TAGS_BY_KEY[tag].label}
</span>
))}
{blueprint_page.tags.length ? (
blueprint_page.tags.map((tag) => (
<span key={tag} className="tag">
{TAGS_BY_KEY[tag].category}: {TAGS_BY_KEY[tag].label}
</span>
))
) : (
<div>No tags have been added yet</div>
)}
</Panel>
{showEntities && (

View File

@ -204,6 +204,7 @@ export async function getServerSideProps({ query }: NextPageContext) {
const page = Number(query.page || "1");
const perPage = Number(query["per-page"] || "20");
const order = (query["order"] as string) || "date";
const _query = query.q ? String(query.q) : undefined;
const tags = query.tags ? String(query.tags).split(",") : undefined;
const entities = query.entities ? String(query.entities).split(",") : undefined;
const items = query.items ? String(query.items).split(",") : undefined;
@ -217,7 +218,7 @@ export async function getServerSideProps({ query }: NextPageContext) {
const { count, rows } = await searchBlueprintPages({
page,
perPage,
query: query.q as string,
query: _query,
order,
mode,
tags,