mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-29 18:06:15 -06:00
update css pipeline
This commit is contained in:
parent
1c8e847b3d
commit
c5917392c3
5 changed files with 21 additions and 11 deletions
1
web/assets/colors.css
Normal file
1
web/assets/colors.css
Normal file
|
|
@ -0,0 +1 @@
|
|||
|
||||
|
|
@ -63,7 +63,7 @@ main {
|
|||
grid-column: span 3;
|
||||
display: grid;
|
||||
grid-template-columns: 50% 50%;
|
||||
grid-auto-rows: 16rem;
|
||||
grid-auto-rows: 10rem;
|
||||
overflow: hidden;
|
||||
gap: 0.3rem;
|
||||
}
|
||||
|
|
@ -108,7 +108,7 @@ main {
|
|||
grid-column: span 2;
|
||||
}
|
||||
|
||||
.toot .media.odd a:first-child {
|
||||
.toot .media.odd a:first-child, .toot .media.double a {
|
||||
grid-row: span 2;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,17 +46,26 @@ let buildDir = process.env.BUILD_DIR;
|
|||
if (buildDir == undefined) {
|
||||
buildDir = `${__dirname}/build`;
|
||||
}
|
||||
console.log("bundling to", buildDir);
|
||||
|
||||
if (process.env.NODE_ENV != "development") {
|
||||
getTemplates().then((templates) => {
|
||||
function bundleAll() {
|
||||
return getTemplates().then((templates) => {
|
||||
return Promise.map(templates, bundle);
|
||||
});
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV != "development") {
|
||||
bundleAll();
|
||||
} else {
|
||||
const chokidar = require("chokidar");
|
||||
console.log("Watching for changes");
|
||||
let watcher = chokidar.watch(`${__dirname}/templates`).on("all", (a) => {
|
||||
// bundle();
|
||||
console.log(a)
|
||||
chokidar.watch(`${__dirname}/templates`).on("all", (_, path) => {
|
||||
if (path.endsWith(".css")) {
|
||||
bundle([path.split("/").slice(-1)[0], path]);
|
||||
}
|
||||
});
|
||||
chokidar.watch(`${__dirname}/colors.css`).on("all", () => {
|
||||
console.log("colors.css updated, rebuilding all templates");
|
||||
bundleAll();
|
||||
});
|
||||
watcher.add(`${__dirname}/colors.css`);
|
||||
}
|
||||
|
|
@ -62,7 +62,7 @@ main {
|
|||
grid-column: span 3;
|
||||
display: grid;
|
||||
grid-template-columns: 50% 50%;
|
||||
grid-auto-rows: 16rem;
|
||||
grid-auto-rows: 10rem;
|
||||
overflow: hidden;
|
||||
gap: 0.3rem;
|
||||
|
||||
|
|
@ -105,7 +105,7 @@ main {
|
|||
grid-column: span 2;
|
||||
}
|
||||
|
||||
&.odd a:first-child {
|
||||
&.odd a:first-child, &.double a {
|
||||
grid-row: span 2;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
{{.Content |noescape}}
|
||||
</div>
|
||||
{{with .MediaAttachments}}
|
||||
<div class="media {{(len .) | oddOrEven }} {{if eq (len .) 1}}single{{end}}">
|
||||
<div class="media {{(len .) | oddOrEven }}{{if eq (len .) 1}} single{{end}}{{if eq (len .) 2}} double{{end}}">
|
||||
{{range .}}
|
||||
<a href="{{.URL}}" target="_blank" title="{{.Description}}">
|
||||
{{if not .Description}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue