mirror of
https://github.com/kristoferssolo/FOSSDB.git
synced 2025-10-21 17:50:35 +00:00
Created main app
This commit is contained in:
parent
6ea8e2c3c3
commit
a77bf0eb5b
@ -35,6 +35,7 @@ DEBUG = config["DEBUG"]
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
"main",
|
||||
"account",
|
||||
"fossdb",
|
||||
"django_filters",
|
||||
|
||||
@ -21,6 +21,7 @@ urlpatterns = [
|
||||
path("admin/", admin.site.urls),
|
||||
path("", include("account.urls")),
|
||||
path("", include("fossdb.urls")),
|
||||
path("", include("main.urls")),
|
||||
path("", include("django.contrib.auth.urls")),
|
||||
]
|
||||
if settings.DEBUG:
|
||||
|
||||
0
src/apps/main/__init__.py
Normal file
0
src/apps/main/__init__.py
Normal file
3
src/apps/main/admin.py
Normal file
3
src/apps/main/admin.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
6
src/apps/main/apps.py
Normal file
6
src/apps/main/apps.py
Normal file
@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class MainConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'main'
|
||||
0
src/apps/main/migrations/__init__.py
Normal file
0
src/apps/main/migrations/__init__.py
Normal file
3
src/apps/main/models.py
Normal file
3
src/apps/main/models.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
3
src/apps/main/tests.py
Normal file
3
src/apps/main/tests.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
11
src/apps/main/urls.py
Normal file
11
src/apps/main/urls.py
Normal file
@ -0,0 +1,11 @@
|
||||
from django.urls import path
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path("", views.homepage, name="homepage"),
|
||||
path("contribute/", views.contribute, name="contribute"),
|
||||
path("news/", views.news, name="news"),
|
||||
path("dashboard/", views.dashboard, name="dashboard"),
|
||||
path("help/", views.help, name="help"),
|
||||
]
|
||||
21
src/apps/main/views.py
Normal file
21
src/apps/main/views.py
Normal file
@ -0,0 +1,21 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
|
||||
def homepage(request):
|
||||
return render(request, "main/homepage.html", {"title": "FOSSDB"})
|
||||
|
||||
|
||||
def contribute(request):
|
||||
return render(request, "main/contribute.html", {"title": "FOSSDB | Contribute"})
|
||||
|
||||
|
||||
def news(request):
|
||||
return render(request, "main/news.html", {"title": "FOSSDB | News"})
|
||||
|
||||
|
||||
def dashboard(request):
|
||||
return render(request, "main/dashboard.html", {"title": "FOSSDB | Dashboard"})
|
||||
|
||||
|
||||
def help(request):
|
||||
return render(request, "main/help.html", {"title": "FOSSDB | Help"})
|
||||
@ -21,7 +21,8 @@
|
||||
width="40"
|
||||
src="{% static 'img/icons/logo.svg' %}"
|
||||
alt="logo" />
|
||||
<a class="hover:text-skyblue transform duration-300 ease-in-out" href="">foss<span class="text-skyblue">db</span></a>
|
||||
<a class="hover:text-skyblue transform duration-300 ease-in-out"
|
||||
href="{% url 'homepage' %}">foss<span class="text-skyblue">db</span></a>
|
||||
</div>
|
||||
<!-- search -->
|
||||
<div class="relative items-center flex">
|
||||
@ -31,11 +32,16 @@
|
||||
</div>
|
||||
<!-- navbar -->
|
||||
<nav class="uppercase flex gap-x-6 items-center">
|
||||
<a href="" class="hover:text-skyblue transform duration-200 ease-in-out">explore</a>
|
||||
<a href="" class="hover:text-skyblue transform duration-200 ease-in-out">contribute</a>
|
||||
<a href="" class="hover:text-skyblue transform duration-200 ease-in-out">news</a>
|
||||
<a href="" class="hover:text-skyblue transform duration-200 ease-in-out">dashboard</a>
|
||||
<a href="" class="hover:text-skyblue transform duration-200 ease-in-out">help</a>
|
||||
<a href="{% url 'explore' %}"
|
||||
class="hover:text-skyblue transform duration-200 ease-in-out">explore</a>
|
||||
<a href="{% url 'contribute' %}"
|
||||
class="hover:text-skyblue transform duration-200 ease-in-out">contribute</a>
|
||||
<a href="{% url 'news' %}"
|
||||
class="hover:text-skyblue transform duration-200 ease-in-out">news</a>
|
||||
<a href="{% url 'dashboard' %}"
|
||||
class="hover:text-skyblue transform duration-200 ease-in-out">dashboard</a>
|
||||
<a href="{% url 'help' %}"
|
||||
class="hover:text-skyblue transform duration-200 ease-in-out">help</a>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="">
|
||||
@ -45,6 +51,7 @@
|
||||
</div>
|
||||
</header>
|
||||
<main class="flex-grow">
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
<footer class="h-32 flex items-center text-slategray bg-gray-200 mb-1 mt-4 font-condensed">
|
||||
<div class="p-8">
|
||||
|
||||
5
src/templates/main/homepage.html
Normal file
5
src/templates/main/homepage.html
Normal file
@ -0,0 +1,5 @@
|
||||
{% extends "layout.html" %}
|
||||
{% load static %}
|
||||
{% block title %}{{ title }}{% endblock %}
|
||||
{% block meta %}{% endblock %}
|
||||
{% block content %}{% endblock %}
|
||||
Loading…
Reference in New Issue
Block a user