Skip to content

Commit

Permalink
Set up tailwind; WIP homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
vcavallo committed Aug 15, 2023
1 parent 5b306e2 commit 4f69f5e
Show file tree
Hide file tree
Showing 33 changed files with 2,464 additions and 494 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

# Setup

- Ruby 3.2.2 (or close)
- Have bundler installed (`gem install bundler`)
- Node 18.17.0

- `bundle install`
- `npm install` (maybe don't do this from root)
- `cd _frontend && npm install`

## What's where

- `_frontend` holds vue components loaded by div id in layouts
- `_frontend/entrypoints/application.js` is basically the Vue `main.js`
- `root` directory tailwind configs are the real tailwind configs
- but use `_frontend/src/assets/index.scss` for any customization

# Running the app

- `bin/vite dev` then
- `bin/jekyll-vite wait && bundle exec jekyll serve --livereload`
- go to the jekyll port reported by the prior command

18 changes: 12 additions & 6 deletions _frontend/entrypoints/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,18 @@ import '~/src/assets/index.scss'
import { createApp } from 'vue'
import App from '~/src/App.vue'
import Post from '~/src/Post.vue'
import Cta from '~/src/components/Cta.vue'

createApp(App).mount('#app')
const app = createApp(App)
app.component("CTA", Cta);
app.mount('#app')

const postElement = document.querySelector('#post')
const title = postElement.dataset.title
const post = createApp(Post, {
title
});
post.mount('#post')

if (postElement) {
const title = postElement.dataset.title
const post = createApp(Post, {
title
});
post.mount('#post')
}
Loading

0 comments on commit 4f69f5e

Please sign in to comment.