Add store page
This commit is contained in:
parent
0cca1ed501
commit
dff9b9809c
@ -15,10 +15,11 @@ Including another URLconf
|
||||
"""
|
||||
from django.contrib import admin
|
||||
from django.urls import path, include
|
||||
import store, front
|
||||
import store, front, doc
|
||||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
path('', include('front.urls')),
|
||||
path('store/', include('store.urls'))
|
||||
path('', include('front.urls'), name='front'),
|
||||
path('store/', include('store.urls'), name='store'),
|
||||
path('doc/', include('doc.urls'), name='doc')
|
||||
]
|
||||
|
21
PDMI/doc/urls.py
Normal file
21
PDMI/doc/urls.py
Normal file
@ -0,0 +1,21 @@
|
||||
"""PDMI URL Configuration
|
||||
|
||||
The `urlpatterns` list routes URLs to views. For more information please see:
|
||||
https://docs.djangoproject.com/en/3.0/topics/http/urls/
|
||||
Examples:
|
||||
Function views
|
||||
1. Add an import: from my_app import views
|
||||
2. Add a URL to urlpatterns: path('', views.home, name='home')
|
||||
Class-based views
|
||||
1. Add an import: from other_app.views import Home
|
||||
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
|
||||
Including another URLconf
|
||||
1. Import the include() function: from django.urls import include, path
|
||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||
"""
|
||||
from django.urls import path, include
|
||||
from django.views.generic import TemplateView
|
||||
|
||||
urlpatterns = [
|
||||
path('', TemplateView.as_view(template_name="index.html"), name='index')
|
||||
]
|
@ -10,7 +10,7 @@
|
||||
<div class="container">
|
||||
<h1 class="display-3">PDMI - Python Discord Module Index</h1>
|
||||
<p>
|
||||
PDMI is a part of PDBA project. PDBA is a basic discord bot which integrate possibility to install
|
||||
PDMI is a part of PDBA project. PDBA is a basic discord bot which integrates possibility to install
|
||||
modules.
|
||||
PDMI is the website where most of modules are uploaded. If you want to create your own module you can
|
||||
check
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
<div class="container">
|
||||
<!-- Example row of columns -->
|
||||
<div class="row">
|
||||
<!-- <div class="row">
|
||||
<div class="col-md-4">
|
||||
<h2>Heading</h2>
|
||||
<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor
|
||||
@ -47,7 +47,7 @@
|
||||
ut fermentum massa justo sit amet risus.</p>
|
||||
<p><a class="btn btn-secondary" href="#" role="button">View details »</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="row">
|
||||
{% for i in '123'|make_list %}
|
@ -17,5 +17,5 @@ from django.urls import path, include
|
||||
from django.views.generic import TemplateView
|
||||
|
||||
urlpatterns = [
|
||||
path('', TemplateView.as_view(template_name="index.html"), name='index')
|
||||
path('', TemplateView.as_view(template_name="front/index.html"), name='front_page')
|
||||
]
|
||||
|
83
PDMI/store/templates/store/index.html
Normal file
83
PDMI/store/templates/store/index.html
Normal file
@ -0,0 +1,83 @@
|
||||
{% extends "base/base.html" %}
|
||||
|
||||
{% block navbar %}
|
||||
{% include "store/store-navbar.html" %}
|
||||
{% endblock navbar %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<main role="main">
|
||||
<div class="jumbotron">
|
||||
<div class="container">
|
||||
<h1 class="display-3">PDMI Store</h1>
|
||||
<!-- Search form -->
|
||||
<form class="form-inline d-flex justify-content-center md-form form-sm mt-0">
|
||||
<i class="fa fa-search" aria-hidden="true"></i>
|
||||
<input class="form-control ml-3 w-75" type="text" placeholder="Search"
|
||||
aria-label="Search">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
{% for i in '123'|make_list %}
|
||||
<div class="col-md-4 my-3">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title">Card title</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<h6 class="card-subtitle mb-2 text-muted">Card subtitle - Description</h6>
|
||||
<p class="card-text">Donec id elit non mi porta gravida at eget metus. Fusce dapibus,
|
||||
tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo
|
||||
sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.
|
||||
</p>
|
||||
<p><a class="btn btn-secondary" href="#" role="button">View details »</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
{% for i in '123'|make_list %}
|
||||
<div class="col-md-4 my-3">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title">Card title</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<h6 class="card-subtitle mb-2 text-muted">Card subtitle - Description</h6>
|
||||
<p class="card-text">Donec id elit non mi porta gravida at eget metus. Fusce dapibus,
|
||||
tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo
|
||||
sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.
|
||||
</p>
|
||||
<p><a class="btn btn-secondary" href="#" role="button">View details »</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
{% for i in '123'|make_list %}
|
||||
<div class="col-md-4 my-3">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="card-title">Card title</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<h6 class="card-subtitle mb-2 text-muted">Card subtitle - Description</h6>
|
||||
<p class="card-text">Donec id elit non mi porta gravida at eget metus. Fusce dapibus,
|
||||
tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo
|
||||
sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.
|
||||
</p>
|
||||
<p><a class="btn btn-secondary" href="#" role="button">View details »</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
{% endblock body %}
|
11
PDMI/store/templates/store/store-navbar.html
Normal file
11
PDMI/store/templates/store/store-navbar.html
Normal file
@ -0,0 +1,11 @@
|
||||
{% extends "base/navbar.html" %}
|
||||
{% block 'navbar-right' %}
|
||||
<ul class="nav navbar-nav ml-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#"><span class="fa fa-user"></span> Sign Up</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#"><span class="fa fa-sign-in-alt"></span> Login</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock 'navbar-right' %}
|
@ -14,8 +14,8 @@ Including another URLconf
|
||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||
"""
|
||||
from django.urls import path
|
||||
import store.views
|
||||
import store
|
||||
from django.views.generic import TemplateView
|
||||
|
||||
urlpatterns = [
|
||||
path('', TemplateView.as_view(template_name="store/index.html"), name='store_front_page'),
|
||||
]
|
||||
|
@ -11,10 +11,16 @@
|
||||
<!-- Favicon.ico -->
|
||||
<link rel="shortcut icon" href="{% static 'favicon.ico' %}">
|
||||
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
|
||||
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"
|
||||
crossorigin="anonymous">
|
||||
<link href="https://use.fontawesome.com/releases/v5.0.4/css/all.css" rel="stylesheet">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<body class="pt-5">
|
||||
{% block navbar %}
|
||||
{% include "base/navbar.html" %}
|
||||
{% endblock navbar %}
|
||||
{% block body %}
|
||||
{% endblock %}
|
||||
</body>
|
||||
|
@ -1,31 +1,22 @@
|
||||
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
|
||||
<a class="navbar-brand" href="#">P.D.M.I</a>
|
||||
<a class="navbar-brand" href="{% url 'front_page' %}">P.D.M.I</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
|
||||
<li class="nav-item {% if request.path == '/' %}active{% endif %}">
|
||||
<a class="nav-link" href="{% url 'front_page' %}">Home <span class="sr-only">(current)</span></a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<li class="nav-item {% if request.path == '/store/' %}active{% endif %}">
|
||||
<a class="nav-link" href="{% url 'store_front_page' %}">Store</a>
|
||||
</li>
|
||||
<li class="nav-item {% if request.path == '/doc/' %}active{% endif %}">
|
||||
<a class="nav-link" href="#">Documentation</a>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="dropdown01" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Download</a>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdown01">
|
||||
<a class="dropdown-item" href="#">Download bot</a>
|
||||
<a class="dropdown-item" href="#">Download server</a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#">Gestion des modules</a>
|
||||
</<li></li>>
|
||||
</ul>
|
||||
<form class="form-inline my-2 my-lg-0">
|
||||
<input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search">
|
||||
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
|
||||
</form>
|
||||
{% block 'navbar-right' %}
|
||||
{% endblock 'navbar-right' %}
|
||||
</div>
|
||||
</nav>
|
||||
|
Loading…
Reference in New Issue
Block a user