diff --git a/.woodpecker.yaml b/.woodpecker.yaml index 5822293..6f9c873 100644 --- a/.woodpecker.yaml +++ b/.woodpecker.yaml @@ -7,12 +7,12 @@ steps: image: woodpeckerci/plugin-docker-buildx secrets: [ gitpat ] settings: - repo: git.clatter.cc/hexlocation/disseminate + repo: git.iwakura.rip/hex/disseminate platforms: linux/amd64 dockerfile: Dockerfile tags: ["${CI_COMMIT_BRANCH}-latest","${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA}"] - username: hexlocation - registry: git.clatter.cc + username: hex + registry: git.iwakura.rip #insecure: true password: from_secret: gitpat diff --git a/README.md b/README.md index bf4c6cd..55ac0d7 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@

Disseminate

Buy Me A Coffee - - status-badge + + status-badge
diff --git a/data.template/config.json b/data.template/config.json index 6a52681..ac643e8 100644 --- a/data.template/config.json +++ b/data.template/config.json @@ -1,6 +1,9 @@ { "branding": { - "title": "hexlocation's blog" + "title": "iwakura.rip" }, - "theme":"default" + "themeOpts": { + "accentColor":"#DDC4D8" + }, + "theme":"iwakura" } diff --git a/src/index.ts b/src/index.ts index dcf75b3..004ae59 100644 --- a/src/index.ts +++ b/src/index.ts @@ -72,6 +72,7 @@ app.use("/post/:post", async (req:express.Request,res:express.Response) => { res.render(`post`, {posts: posts, post: post[0], config: config}) }) -app.use('/static', express.static(path.join(__dirname, '../', 'data',"static"))) +app.use('/static', express.static(path.join(__dirname, '../', "static"))) +if (config['use_custom_assets']) app.use('/assets', express.static(path.join(__dirname, "../", "data", "assets"))); app.listen(3024) diff --git a/src/types/Config.ts b/src/types/Config.ts index a040a4f..0cdf969 100644 --- a/src/types/Config.ts +++ b/src/types/Config.ts @@ -5,4 +5,5 @@ export default interface Config { branding: Branding; theme: string; themeOpts: any; + use_custom_assets: boolean; } diff --git a/src/views/themes/iwakura/footer.ejs b/src/views/themes/iwakura/footer.ejs new file mode 100644 index 0000000..4ea0579 --- /dev/null +++ b/src/views/themes/iwakura/footer.ejs @@ -0,0 +1,3 @@ + diff --git a/src/views/themes/iwakura/global-style.ejs b/src/views/themes/iwakura/global-style.ejs new file mode 100644 index 0000000..5648484 --- /dev/null +++ b/src/views/themes/iwakura/global-style.ejs @@ -0,0 +1,84 @@ + diff --git a/src/views/themes/iwakura/header.ejs b/src/views/themes/iwakura/header.ejs new file mode 100644 index 0000000..5fb694d --- /dev/null +++ b/src/views/themes/iwakura/header.ejs @@ -0,0 +1,39 @@ +<%= config.branding.title %> + +
+

<%= config.branding.title %>

+ <% if(config.branding.hasOwnProperty("subtitle")) { %> +

<%= config.branding.subtitle %>

+ <% } %> + +
+ + diff --git a/src/views/themes/iwakura/index.ejs b/src/views/themes/iwakura/index.ejs new file mode 100644 index 0000000..5f19042 --- /dev/null +++ b/src/views/themes/iwakura/index.ejs @@ -0,0 +1,25 @@ +<%- include('header') %> +
+ + + <% posts = posts.sort((a,b) => {return new Date(b.metadata.mtime) - new Date(a.metadata.mtime)}) %> + <% for(const post of posts) { %> + + + + + <% } %> + + +<%- include('global-style'); %> +<%- include('footer') %> diff --git a/src/views/themes/iwakura/post.ejs b/src/views/themes/iwakura/post.ejs new file mode 100644 index 0000000..a2ef96e --- /dev/null +++ b/src/views/themes/iwakura/post.ejs @@ -0,0 +1,6 @@ +<%- include('header') %> +
+ <%- post['parsedPost'] %> +
+<%- include('global-style') %> +<%- include('footer') %> diff --git a/static/lain.png b/static/lain.png new file mode 100644 index 0000000..5c70f81 Binary files /dev/null and b/static/lain.png differ
<%= post.title %><%= new Date(post.metadata.mtime).toDateString() %>