Skip to content

Commit

Permalink
Update frontend to Nuxt 3, initial CMS work
Browse files Browse the repository at this point in the history
  • Loading branch information
lutoma committed Mar 22, 2024
1 parent 050d763 commit 80d765d
Show file tree
Hide file tree
Showing 67 changed files with 7,767 additions and 9,147 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker
name: Docker frontend

on:
push:
Expand Down
95 changes: 5 additions & 90 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,90 +1,5 @@
# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs
/logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# Nuxt generate
dist

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless

# IDE / Editor
.idea

# Service worker
sw.*

# macOS
.DS_Store

# Vim swap files
*.swp
*.ruff_cache
*.pyc
/media
/static-collect
db.sqlite3
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# lutoma.org

## Build Setup
## Backend

```bash
$ poetry install
$ poetry run ./manage.py migrate
$ poetry run ./manage.py runserver
```

## Frontend

```bash
# install dependencies
Expand Down
Binary file removed assets/undercurrent.png
Binary file not shown.
Empty file added cms/__init__.py
Empty file.
6 changes: 6 additions & 0 deletions cms/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.contrib import admin
from .models import License

@admin.register(License)
class LicenseAdmin(admin.ModelAdmin):
list_display = ['identifier', 'name']
7 changes: 7 additions & 0 deletions cms/api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from ninja import Router

router = Router()

@router.get('')
def list_posts(request):
return {}
6 changes: 6 additions & 0 deletions cms/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class CmsConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'cms'
23 changes: 23 additions & 0 deletions cms/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 5.0.3 on 2024-03-22 10:08

from django.db import migrations, models


class Migration(migrations.Migration):

initial = True

dependencies = [
]

operations = [
migrations.CreateModel(
name='License',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('identifier', models.SlugField(unique=True, verbose_name='SPDX license identifier')),
('name', models.CharField(max_length=500, verbose_name='Name')),
('url', models.CharField(blank=True, max_length=500, verbose_name='License URL')),
],
),
]
18 changes: 18 additions & 0 deletions cms/migrations/0002_alter_license_url.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 5.0.3 on 2024-03-22 10:08

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('cms', '0001_initial'),
]

operations = [
migrations.AlterField(
model_name='license',
name='url',
field=models.CharField(max_length=500, verbose_name='License URL'),
),
]
18 changes: 18 additions & 0 deletions cms/migrations/0003_alter_license_identifier.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 5.0.3 on 2024-03-22 10:09

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('cms', '0002_alter_license_url'),
]

operations = [
migrations.AlterField(
model_name='license',
name='identifier',
field=models.CharField(max_length=50, unique=True, verbose_name='SPDX license identifier'),
),
]
Empty file added cms/migrations/__init__.py
Empty file.
10 changes: 10 additions & 0 deletions cms/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from django.utils.translation import gettext_lazy as _
from django.db import models

class License(models.Model):
identifier = models.CharField(unique=True, max_length=50, verbose_name=_('SPDX license identifier'))
name = models.CharField(max_length=500, verbose_name=_('Name'))
url = models.CharField(max_length=500, verbose_name=_('License URL'))

def __str__(self):
return self.name
3 changes: 3 additions & 0 deletions cms/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
3 changes: 3 additions & 0 deletions cms/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.shortcuts import render

# Create your views here.
89 changes: 0 additions & 89 deletions components/PhotoGrid.vue

This file was deleted.

Loading

0 comments on commit 80d765d

Please sign in to comment.