added basic site template
This commit is contained in:
parent
b3dec93039
commit
6ef58d975d
16 changed files with 68 additions and 50 deletions
6
.idea/jsLibraryMappings.xml
generated
Normal file
6
.idea/jsLibraryMappings.xml
generated
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="JavaScriptLibraryMappings">
|
||||||
|
<file url="file://$PROJECT_DIR$" libraries="{jquery-3.6.0, jquery-3.6.0.slim}" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
2
.idea/mdblog.iml
generated
2
.idea/mdblog.iml
generated
|
|
@ -20,6 +20,8 @@
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="jdk" jdkName="Python 3.10 (mdblog)" jdkType="Python SDK" />
|
<orderEntry type="jdk" jdkName="Python 3.10 (mdblog)" jdkType="Python SDK" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="library" name="jquery-3.6.0.slim" level="application" />
|
||||||
|
<orderEntry type="library" name="jquery-3.6.0" level="application" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PyDocumentationSettings">
|
<component name="PyDocumentationSettings">
|
||||||
<option name="format" value="PLAIN" />
|
<option name="format" value="PLAIN" />
|
||||||
|
|
|
||||||
|
|
@ -7,4 +7,5 @@ def viewblog(request):
|
||||||
|
|
||||||
|
|
||||||
def addpost(request):
|
def addpost(request):
|
||||||
return render(request, 'blog/addpost.html')
|
context = {'title': 'Neuen Post erstellen'}
|
||||||
|
return render(request, 'blog/addpost.html', context)
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
from django.contrib import admin
|
|
||||||
|
|
||||||
# Register your models here.
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
from django.apps import AppConfig
|
|
||||||
|
|
||||||
|
|
||||||
class LoginConfig(AppConfig):
|
|
||||||
default_auto_field = 'django.db.models.BigAutoField'
|
|
||||||
name = 'login'
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
from django.db import models
|
|
||||||
|
|
||||||
# Create your models here.
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
from django.test import TestCase
|
|
||||||
|
|
||||||
# Create your tests here.
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
from django.urls import path
|
|
||||||
from login.views import loginview
|
|
||||||
|
|
||||||
urlpatterns = [
|
|
||||||
path('login/', loginview)
|
|
||||||
]
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
from django.shortcuts import render
|
|
||||||
|
|
||||||
|
|
||||||
# Create your views here.
|
|
||||||
def loginview(request):
|
|
||||||
return render(request, 'login/login.html')
|
|
||||||
|
|
@ -31,7 +31,6 @@ ALLOWED_HOSTS = []
|
||||||
# Application definition
|
# Application definition
|
||||||
|
|
||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = [
|
||||||
'login',
|
|
||||||
'blog',
|
'blog',
|
||||||
'markdownblog',
|
'markdownblog',
|
||||||
'django.contrib.admin',
|
'django.contrib.admin',
|
||||||
|
|
|
||||||
53
markdownblog/markdownblog/templates/base/base.html
Normal file
53
markdownblog/markdownblog/templates/base/base.html
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
{% load static %}
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="de">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>{{ title }}</title>
|
||||||
|
<!-- Compiled and minified CSS -->
|
||||||
|
<link type="text/css" rel="stylesheet"
|
||||||
|
href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"
|
||||||
|
media="screen,projection"/>
|
||||||
|
|
||||||
|
<!--Let browser know website is optimized for mobile-->
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
|
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<nav class="top-nav">
|
||||||
|
<a href="#" data-target="slide-out" class="sidenav-trigger full hide-on-large-only"><i class="material-icons">menu</i></a>
|
||||||
|
</nav>
|
||||||
|
<ul id="slide-out" class="sidenav sidenav-fixed">
|
||||||
|
|
||||||
|
<li><a href="#!"><i class="material-icons">cloud</i>First Link With Icon</a></li>
|
||||||
|
<li><a href="#!">Second Link</a></li>
|
||||||
|
<li>
|
||||||
|
<div class="divider"></div>
|
||||||
|
</li>
|
||||||
|
<li><a class="subheader">Subheader</a></li>
|
||||||
|
<li><a class="waves-effect" href="#!">Third Link With Waves</a></li>
|
||||||
|
</ul>
|
||||||
|
</header>
|
||||||
|
<main>
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
<!-- Compiled and minified JavaScript -->
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
|
||||||
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
const elems = document.querySelectorAll('.sidenav');
|
||||||
|
M.Sidenav.init(elems);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -1,10 +1,4 @@
|
||||||
<!DOCTYPE html>
|
{% extends 'base/base.html' %}
|
||||||
<html lang="en">
|
{% block content %}
|
||||||
<head>
|
<h1>Neuen Post erstellen</h1>
|
||||||
<meta charset="UTF-8">
|
{% endblock %}
|
||||||
<title>Title</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title>Title</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
|
from django.shortcuts import redirect
|
||||||
from django.urls import path, include
|
from django.urls import path, include
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('', include('blog.urls')),
|
path('', include('blog.urls')),
|
||||||
path('admin/', admin.site.urls),
|
path('admin/', admin.site.urls),
|
||||||
path('auth/', include('login.urls')),
|
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue