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 dfeac78
Show file tree
Hide file tree
Showing 8 changed files with 75 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 bootstrap-icons.zip
unzip bootstrap-icons.zip
rm -rf src/public/bootstrap-icons bootstrap-icons.zip
mv bootstrap-icons-* bootstrap-icons
mkdir src/public/bootstrap-icons
for icon in $(jq -r .[] src/bootstrap-icons.json); do mv 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 "[email protected]"
git diff-index --quiet HEAD || git commit -sm "bootstrap-icons"
git push
25 changes: 25 additions & 0 deletions .github/workflows/tailwindcss-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
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
- run: cp -v src/tailwind.config.js tailwind.config.js
- name: update tailwindcss (minify)
uses: ZoeyVid/tailwindcss-update@main
with:
input: src/tailwind-input.css
output: src/public/tailwind.css
params: "--minify"
- name: push changes
run: |
git config user.name "GitHub"
git config user.email "[email protected]"
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/public/bootstrap-icons/github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 dfeac78

Please sign in to comment.