feat: Make more use of the shared assets

This commit is contained in:
PapaTutuWawa 2022-05-31 20:17:47 +02:00
parent 1e531f07b6
commit 5cf8725e01
6 changed files with 61 additions and 86 deletions

35
Makefile Normal file
View File

@ -0,0 +1,35 @@
BUILD_DATE := $(shell date '+%H:%M %d.%m.%Y')
serve:
python ../shared-assets/makesite.py \
-p params.json \
-v page_assets=/assets \
-v build_time="${BUILD_DATE}" \
--assets ../shared-assets/assets \
--assets ./assets \
--copy-assets \
--ignore ../shared-assets/assets/img \
--include robots.txt
# A workaround to making the fonts load without the CDN
mv _site/assets/fonts _site/fonts
cd _site/ && python -m http.server 8080
build:
python ../shared-assets/makesite.py \
-p params.json \
-v page_assets=https://cdn.polynom.me \
-v build_time="${BUILD_DATE}" \
--assets ./assets \
--copy-assets \
--ignore assets/img/raw \
--include robots.txt \
--blog \
--rss
python ../shared-assets/pgp-sign.py $(wildcard _site/*.html)
gpg \
--armor \
--output _site/assets/files/verify.sh.sig \
--local-user papatutuwawa@polynom.me \
--detach-sign \
assets/files/verify.sh
tar -czf blog.tar.gz _site

View File

@ -1,74 +1,13 @@
.vertical-flex {
display: flex;
flex-direction: column;
}
.horizontal-flex {
display: flex;
flex-direction: row;
}
.horizontal-center {
display: flex;
flex-direction: row;
justify-content: center;
}
.vertical-center {
display: flex;
flex-direction: column;
justify-content: center;
height: 100%;
}
.avatar {
width: 200px;
height: 200px;
border-radius: 10px;
margin-right: 30px;
}
.name-title {
font-size: xxx-large;
}
.clickable {
cursor: pointer;
}
.header {
width: 42%;
}
#header-links ul {
list-style: none;
padding-left: 0px;
margin-bottom: 0px;
margin-top: 0px;
}
#header-links li {
display: inline;
font-size: large;
margin-left: 20px;
}
#header-links li:first-child {
margin-left: 0px;
}
h1, h2 {
margin-top: 0px;
margin-bottom: 0px;
}
html {
background-color: #f6f6f6;
}
body {
padding: 5px;
font-size: large;
}
@ -77,8 +16,6 @@ body {
box-sizing: border-box;
}
.agressive-word-breaking {}
/* Screenshots */
.screenshot {
width: 270px;
@ -101,12 +38,6 @@ body {
}
@media screen and (max-width: 720px) {
.avatar {
width: 100px;
height: 100px;
margin-right: 10px;
}
.screenshot {
width: 100px;
}
@ -120,18 +51,9 @@ body {
font-size: 43px;
}
.name-title {
font-size: x-large;
}
.header {
width: 100%;
}
#social-links td:nth-child(2) {
word-break: break-word;
}
#social-links td {
padding-top: 5px;
padding-bottom: 5px;

View File

@ -5,11 +5,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1652540787,
"narHash": "sha256-VU598G+6sAPkmHRIOoZohduMMjwXv/zRf2BYlgIcChA=",
"lastModified": 1654021036,
"narHash": "sha256-O2RlvhV4jOtCJTEVNSeZYDJEE0xh4rTPxXLqHKrKVSo=",
"ref": "refs/heads/master",
"rev": "de5a0ba39fb9da7eec81f1f59d07af67ec4a9233",
"revCount": 17,
"rev": "31dee4654f6b0577345a6d0a4bbbf1b795d5b7bc",
"revCount": 19,
"type": "git",
"url": "https://git.polynom.me/polynom.me/shared-assets.git"
},

View File

@ -21,5 +21,14 @@
shared-assets = assets.packages.${system}.default;
};
});
devShell = forAllSystems (system: let
pkgs = import nixpkgs { inherit system; };
pythonEnv = pkgs.python3.withPackages (ps: with ps; [ markdown ]);
in pkgs.mkShell {
buildInputs = with pkgs; [
pythonEnv
];
});
};
}

View File

@ -17,8 +17,8 @@
</head>
<body>
<div class="horizontal-center">
<div class="vertical-flex header">
<div id="header" class="horizontal-flex">
<div class="vertical header">
<div id="header" class="horizontal">
<img class="avatar" src="assets/img/avatar.jpg" />
<div class="vertical-center">
@ -36,6 +36,15 @@
</div>
{{ content }}
<br />
<center class="footer">
Created by <i>PapaTutuWawa</i> with &lt;3 using
<a href="https://github.com/google/roboto">Roboto</a>,
<a href="https://github.com/RedHatOfficial/Overpass">Overpass</a> and
<a href="https://github.com/sunainapai/makesite">makesite</a>
</center>
</div>
</body>
</html>

View File

@ -1,6 +1,6 @@
<div class="horizontal-flex project-row">
<div class="horizontal project-row">
{{ template_if_empty item.screenshot layout/templates/no_screenshot.html layout/templates/screenshot.html }}
<div class="vertical-flex">
<div class="vertical">
<h2>{{ item.title }}</h2>
<p>{{ item.description }}</p>