Skip to content

Commit

Permalink
add bootstrap icons and tailwind workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoey2936 committed Jun 1, 2024
1 parent ef83fe9 commit d554f12
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 2 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/bootstrap-icons.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: bootstrap-icons
on:
push:
paths:
- src/bootstrap-icons.json
- .github/workflows/bootstrap-icons.yml
schedule:
- cron: "0 */6 * * *"
workflow_dispatch:
jobs:
bootstrap-icons:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: update bootstrap-icons
run: |
curl -sL $(curl -sL https://api.github.com/repos/twbs/icons/releases/latest --header "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" | jq -r .assets[].browser_download_url) -o /tmp/bootstrap-icons.zip
unzip /tmp/bootstrap-icons.zip
rm -rf src/public/bootstrap-icons /tmp/bootstrap-icons.zip
mv /tmp/bootstrap-icons-* /tmp/bootstrap-icons
mkdir src/public/bootstrap-icons
for icon in $(jq -r .[] src/bootstrap-icons.json); do mv /tmp/bootstrap-icons/"$icon".svg src/public/bootstrap-icons/"$icon".svg; done
- name: push changes
run: |
git add src/public/bootstrap-icons
git config user.name "GitHub"
git config user.email "noreply@github.com"
git diff-index --quiet HEAD || git commit -sm "bootstrap-icons"
git push
26 changes: 26 additions & 0 deletions .github/workflows/tailwindcss-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: tailwindcss-update
on:
push:
schedule:
- cron: "0 */6 * * *"
workflow_dispatch:
jobs:
tailwindcss-update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: update tailwindcss (minify)
uses: ZoeyVid/tailwindcss-update@main
working-directory: src
with:
input: tailwind-input.css
output: public/tailwind.css
params: "--minify"
- name: push changes
run: |
git add src/public/tailwind.css
git config user.name "GitHub"
git config user.email "noreply@github.com"
git diff-index --quiet HEAD || git commit -sm "tailwindcss-update"
git push
3 changes: 3 additions & 0 deletions src/bootstrap-icons.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[
"github"
]
3 changes: 2 additions & 1 deletion src/public/auth/login/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
<meta name="author" content="ZoeyVid">
<meta name="description" content="Login Page for NPMplus">
<meta name="keywords" content="NPMplus, login">
<link rel="stylesheet" href="/tailwind.css">
<link rel="icon" type="image/webp" href="/favicon.webp">
<!--<script src="https://js.hcaptcha.com/1/api.js?hl=en&render=onload&recaptchacompat=off" async defer></script>-->
</head>

<body>
<div style="text-align: center;">
<div class="text-center">
<?php function login($msg): void
{ ?>
<h1>Login</h1>
Expand Down
2 changes: 1 addition & 1 deletion src/public/auth/setup/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<meta name="author" content="ZoeyVid">
<meta name="description" content="Login Page for NPMplus">
<meta name="keywords" content="NPMplus, Setup">
<link rel="stylesheet" href="/tailwind.css">
<link rel="icon" type="image/webp" href="/favicon.webp">
<!--<script src="https://js.hcaptcha.com/1/api.js?hl=en&render=onload&recaptchacompat=off" async defer></script>-->
</head>
<?php }
3 changes: 3 additions & 0 deletions src/tailwind-input.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
8 changes: 8 additions & 0 deletions src/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["**/*.php"],
theme: {
extend: {},
},
plugins: [],
}

0 comments on commit d554f12

Please sign in to comment.