Skip to content

Commit

Permalink
chore: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jofftiquez committed May 25, 2023
0 parents commit 560bc9a
Show file tree
Hide file tree
Showing 25 changed files with 9,387 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
YOUR_ENV=
7 changes: 7 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.eslintrc.js
.nuxt
.output
/.quasar
/dist
/node_modules
babel.config.js
82 changes: 82 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
module.exports = {
// https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy
// This option interrupts the configuration hierarchy at this file
// Remove this if you have an higher level ESLint config file (it usually happens into a monorepos)
root: true,

parserOptions: {
parser: '@babel/eslint-parser',
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module' // Allows for the use of imports
},

env: {
browser: true,
'vue/setup-compiler-macros': true
},

// Rules order is important, please avoid shuffling them
extends: [
// Base ESLint recommended rules
// 'eslint:recommended',

// Uncomment any of the lines below to choose desired strictness,
// but leave only one uncommented!
// See https://eslint.vuejs.org/rules/#available-rules
'plugin:vue/vue3-essential', // Priority A: Essential (Error Prevention)
// 'plugin:vue/vue3-strongly-recommended', // Priority B: Strongly Recommended (Improving Readability)
// 'plugin:vue/vue3-recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)

'standard'

],

plugins: [
// https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-files
// required to lint *.vue files
'vue',

],

globals: {
ga: 'readonly', // Google Analytics
process: 'readonly',
chrome: 'readonly'
},

// add your custom rules here
rules: {
// allow async-await
'generator-star-spacing': 'off',
// allow paren-less arrow functions
'arrow-parens': 'off',
'one-var': 'off',

'import/first': 'off',
'import/named': 'error',
'import/namespace': 'error',
'import/default': 'error',
'import/export': 'error',
'import/extensions': 'off',
'import/no-unresolved': 'off',
'import/no-extraneous-dependencies': 'off',
'prefer-promise-reject-errors': 'off',

// allow debugger during development only
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',

// custom
'semi': [2, 'always'],
'space-before-function-paren': [2, 'always'],
'keyword-spacing': [2, { before: true, after: true }],
'space-before-blocks': [2, 'always'],
'comma-dangle': [2, 'always-multiline'],
'no-console': 'off',
'no-multi-str': 'off',
'curly': 1,
'no-undef': 'off',

// plugins
'vue/multi-word-component-names': 'off'
}
}
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
node_modules
*.log*
.nuxt
.nitro
.cache
.output
.env
dist
.DS_Store
.firebase/*
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"editor.codeActionsOnSave": [
"source.fixAll.eslint"
],
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"vue"
]
}
Binary file added Nuxtwind Daisy Banner.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<p style="text-align: center">
<img style="width: 900px" src="Nuxtwind Daisy Banner.jpg"/>
</p>

<h1 align="center">Nuxtwind Daisy 🟢💨🌼</h1>
<p style="text-align: center">
Nuxtwind Daisy is a starter template for Nuxt.js 3 + Tailwind CSS + Daisy UI with additional installed setup for custom font, icons, animation, and more.
</p>


2 changes: 2 additions & 0 deletions app.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// eslint-disable-next-line no-undef
export default defineAppConfig({});
7 changes: 7 additions & 0 deletions app.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<template>
<div>
<NuxtLayout>
<NuxtPage/>
</NuxtLayout>
</div>
</template>
13 changes: 13 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* eslint-disable */

module.exports = api => {
return {
presets: [
[
api.caller(caller => caller && caller.target === 'node')
? { targets: { node: 'current' } }
: {}
]
]
}
}
89 changes: 89 additions & 0 deletions nuxt.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
// const LANG = 'en_US';
// const TYPE = 'website';
// const URL = 'https://hippocrades.com';
// const SITE_NAME = 'hippocrades.com';

// https://nuxt.com/docs/api/configuration/nuxt-config
// eslint-disable-next-line no-undef
export default defineNuxtConfig({
preset: 'node-server',

modules: [
'@nuxtjs/tailwindcss',
'nuxt-headlessui',
'nuxt-gtag',
],

nitro: {
preset: 'firebase',
},

gtag: {
id: '', // TODO: Add your google analytics 4 tag here
},

srcDir: './src',

runtimeConfig: {
public: {
yourEnv: process.env.YOUR_ENV,
},
},

plugins: [
{
src: '@/plugins/aos',
ssr: false,
mode: 'client',
},
],

app: {
head: {
link: [
{
rel: 'stylesheet',
href: 'https://maxst.icons8.com/vue-static/landings/line-awesome/line-awesome/1.3.0/css/line-awesome.min.css',
},
],
},
},

tailwindcss: {
cssPath: '~/assets/css/tailwind.css',
configPath: 'tailwind.config',
exposeConfig: false,
exposeLevel: 2,
config: {},
injectPosition: 'first',
viewer: true,
},

headlessui: {
prefix: 'Headless',
},

build: {
extend (config, ctx) {
config.resolve.symlinks = false;
},
},

image: {
dir: 'assets/images',
screens: {
xs: 320,
sm: 640,
md: 768,
lg: 1024,
xl: 1280,
xxl: 1536,
'2xl': 1536,
'3xl': 1920,
},
},

devtools: {
enabled: true,
},
});
53 changes: 53 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"name": "nuxtwind-daisy",
"version": "1.0.0",
"main": ".eslintrc.js",
"description": "Nuxtwind Daisy is a starter template for Nuxt.js 3 + Tailwind CSS + Daisy UI with additional installed setup for custom font, icons, animation, and more.",
"productName": "Nuxtwind Daisy 🟢💨🌼",
"author": "Joff Tiquez <[email protected]>",
"scripts": {
"lint": "eslint --ext .js,.vue ./ --fix",
"build": "nuxt build",
"postbuild": "cd .output/server && rimraf node_modules && yarn && cd .. && yarn rename-server",
"rename-server": "node scripts/rename-server.js",
"dev": "nuxt dev",
"generate": "nuxt generate",
"serve": "firebase emulators:start",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
},
"devDependencies": {
"@babel/eslint-parser": "^7.13.14",
"@nuxt/devtools": "^0.5.3",
"@nuxtjs/tailwindcss": "^6.7.0",
"@tailwindcss/container-queries": "^0.1.0",
"@tailwindcss/forms": "^0.5.3",
"eslint": "^8.29.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-n": "^15.0.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-vue": "^9.0.0",
"eslint-webpack-plugin": "^3.1.1",
"nuxt": "^3.5.1",
"nuxt-gtag": "^0.5.7",
"nuxt-headlessui": "^1.1.1",
"rimraf": "^3.0.2"
},
"dependencies": {
"@tailwindcss/typography": "^0.5.9",
"aos": "^3.0.0-beta.6",
"axios": "^1.4.0",
"daisyui": "^2.51.6",
"postcss-custom-properties": "^13.1.5"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ossphilippines/nuxtwind-daisy.git"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/ossphilippines/nuxtwind-daisy/issues"
},
"homepage": "https://github.com/ossphilippines/nuxtwind-daisy#readme"
}
29 changes: 29 additions & 0 deletions scripts/rename-server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* This method is meant to be run after the Nuxt build process.
* It will rename the Nuxt server function to a custom name.
* This is done to avoid conflicts with the Firebase Functions handler function.
* The Firebase Functions handler function is named "nuxtSSRHandler".
* Because sometimes you want to upload more than one Nuxt app to Firebase Functions.
*/

const nodeFs = require('node:fs');
const readFile = nodeFs.readFile;
const writeFileSync = nodeFs.writeFileSync;
const serverFunctionName = 'nuxtSSRHandler';

readFile('.output/server/index.mjs', 'utf-8', (errRead, contents) => {
if (errRead) {
return console.error(errRead);
}

console.log('Found index.mjs file contents:', contents);

const updated = contents.replace(
/{ s as server }/gi,
'{ s as ' + serverFunctionName + ' }',
);

console.log('Replacing nuxt server function name with ' + serverFunctionName);

writeFileSync('.output/server/index.mjs', updated, 'utf-8');
});
31 changes: 31 additions & 0 deletions src/assets/css/tailwind.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* Custom fonts here */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');
@tailwind base;
@tailwind components;
@tailwind utilities;

body {
background-color: white;
font-family: 'Inter', sans-serif;
@apply text-gray-900;
}

.btn {
@apply normal-case;
}

.title-hero {
@apply text-7xl text-gray-900;
}

.subtitle-hero {
@apply text-3xl text-gray-500;
}

.title-panel {
@apply text-6xl text-gray-900;
}

.subtitle-panel {
@apply text-3xl text-gray-500;
}
Binary file added src/assets/images/nuxtwind-daisy-og-banner.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/components/commons/GenericPanel.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<template>
<div class="mx-auto md:max-w-6xl px-5 py-10">
<slot/>
</div>
</template>
Loading

0 comments on commit 560bc9a

Please sign in to comment.