Compare commits
3 Commits
2b6e9077c7
...
e3a3875949
| Author | SHA1 | Date | |
|---|---|---|---|
|
e3a3875949
|
|||
| 5e70b417db | |||
| 5e4fa25fc4 |
22
.gitea/workflows/npm-publish.yaml
Normal file
22
.gitea/workflows/npm-publish.yaml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
name: npm-publish
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: self-hosted
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '20.x'
|
||||||
|
registry-url: 'https://registry.npmjs.org'
|
||||||
|
- run: npm ci
|
||||||
|
- run: npm run build
|
||||||
|
- run: npm publish --access public
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -9,6 +9,7 @@ lerna-debug.log*
|
|||||||
|
|
||||||
node_modules
|
node_modules
|
||||||
dist
|
dist
|
||||||
|
dist-app
|
||||||
dist-ssr
|
dist-ssr
|
||||||
*.local
|
*.local
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ RUN npm run build
|
|||||||
# Stage 2: Serve the application with Nginx
|
# Stage 2: Serve the application with Nginx
|
||||||
FROM nginx:stable-alpine as production-stage
|
FROM nginx:stable-alpine as production-stage
|
||||||
|
|
||||||
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
COPY --from=build-stage /app/dist-app /usr/share/nginx/html
|
||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|||||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2026 Grzegorz Kucmierz
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
53
README.md
53
README.md
@@ -1,5 +1,52 @@
|
|||||||
# Vue 3 + Vite
|
# @gkucmierz/bitcoin-logo
|
||||||
|
|
||||||
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
|

|
||||||
|

|
||||||
|
|
||||||
Learn more about IDE Support for Vue in the [Vue Docs Scaling up Guide](https://vuejs.org/guide/scaling-up/tooling.html#ide-support).
|
A premium, customizable, and interactive 3D-style Bitcoin logo component for Vue 3.
|
||||||
|
|
||||||
|
## 🚀 Features
|
||||||
|
|
||||||
|
- **Interactive 3D Rotation**: Tilt and rotate the logo with mouse or touch.
|
||||||
|
- **Inertia & Momentum**: Smooth rotation that continues after release.
|
||||||
|
- **Customizable**: Control size, colors, and animation speed via props.
|
||||||
|
- **Premium Aesthetics**: Clean SVG-based design with subtle gradients and shadows.
|
||||||
|
|
||||||
|
## 📦 Installation
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm install @gkucmierz/bitcoin-logo
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🛠 Usage
|
||||||
|
|
||||||
|
```vue
|
||||||
|
<script setup>
|
||||||
|
import { BitcoinLogo } from '@gkucmierz/bitcoin-logo'
|
||||||
|
import '@gkucmierz/bitcoin-logo/style.css'
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<BitcoinLogo
|
||||||
|
:size="256"
|
||||||
|
symbolColor="#f7931a"
|
||||||
|
:inertia="true"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Props
|
||||||
|
|
||||||
|
| Prop | Type | Default | Description |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| `size` | `Number` | `256` | The width and height of the logo in pixels. |
|
||||||
|
| `symbolColor` | `String` | `'#f7931a'` | The color of the Bitcoin symbol. |
|
||||||
|
| `autoRotate` | `Boolean` | `true` | Whether the logo should rotate automatically. |
|
||||||
|
| `rotationDuration` | `Number` | `10` | Duration of one full rotation in seconds. |
|
||||||
|
| `inertia` | `Boolean` | `true` | Enable inertia during manual interaction. |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📄 License
|
||||||
|
|
||||||
|
MIT
|
||||||
|
|||||||
28
package.json
28
package.json
@@ -1,21 +1,35 @@
|
|||||||
{
|
{
|
||||||
"name": "bitcoin-logo",
|
"name": "@gkucmierz/bitcoin-logo",
|
||||||
"private": true,
|
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "Premium 3D SVG rotating Bitcoin logo",
|
"description": "Premium 3D SVG rotating Bitcoin logo",
|
||||||
"author": "Grzegorz Kucmierz",
|
"author": "Grzegorz Kucmierz",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
"main": "./dist/bitcoin-logo.umd.cjs",
|
||||||
|
"module": "./dist/bitcoin-logo.js",
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"import": "./dist/bitcoin-logo.js",
|
||||||
|
"require": "./dist/bitcoin-logo.umd.cjs"
|
||||||
|
},
|
||||||
|
"./style.css": "./dist/bitcoin-logo.css"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "npm run build:lib && npm run build:app",
|
||||||
|
"build:lib": "vite build",
|
||||||
|
"build:app": "vite build --config vite.config.app.js",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"peerDependencies": {
|
||||||
"vue": "^3.5.25"
|
"vue": "^3.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vitejs/plugin-vue": "^6.0.2",
|
"@vitejs/plugin-vue": "^6.0.2",
|
||||||
"vite": "^7.3.1"
|
"vite": "^7.3.1",
|
||||||
|
"vue": "^3.5.25"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
4
src/index.js
Normal file
4
src/index.js
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
import BitcoinLogo from './components/BitcoinLogo.vue'
|
||||||
|
|
||||||
|
export { BitcoinLogo }
|
||||||
|
export default BitcoinLogo
|
||||||
19
vite.config.app.js
Normal file
19
vite.config.app.js
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import { defineConfig } from 'vite'
|
||||||
|
import vue from '@vitejs/plugin-vue'
|
||||||
|
import { resolve } from 'path'
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [vue()],
|
||||||
|
build: {
|
||||||
|
outDir: 'dist-app'
|
||||||
|
},
|
||||||
|
server: {
|
||||||
|
host: true,
|
||||||
|
allowedHosts: true,
|
||||||
|
headers: {
|
||||||
|
'Cache-Control': 'no-store, no-cache, must-revalidate, proxy-revalidate',
|
||||||
|
'Pragma': 'no-cache',
|
||||||
|
'Expires': '0',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
@@ -1,8 +1,24 @@
|
|||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vite'
|
||||||
import vue from '@vitejs/plugin-vue'
|
import vue from '@vitejs/plugin-vue'
|
||||||
|
import { resolve } from 'path'
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [vue()],
|
plugins: [vue()],
|
||||||
|
build: {
|
||||||
|
lib: {
|
||||||
|
entry: resolve(__dirname, 'src/index.js'),
|
||||||
|
name: 'BitcoinLogo',
|
||||||
|
fileName: 'bitcoin-logo',
|
||||||
|
},
|
||||||
|
rollupOptions: {
|
||||||
|
external: ['vue'],
|
||||||
|
output: {
|
||||||
|
globals: {
|
||||||
|
vue: 'Vue',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
server: {
|
server: {
|
||||||
host: true,
|
host: true,
|
||||||
allowedHosts: true,
|
allowedHosts: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user