Skip to content

Commit 041ba13

Browse files
committed
index navbar detail styles
1 parent e9a98e0 commit 041ba13

File tree

6 files changed

+146
-111
lines changed

6 files changed

+146
-111
lines changed

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"python.pythonPath": "env\\Scripts\\python.exe"
3+
}

index/templates/index/details.html

+101-89
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,117 @@
11
{% extends 'base.html' %}
22
{% block style %}
33
{% load static %}
4+
<link rel="stylesheet" href="{% static 'base.css' %}" type="text/css" />
45
<link rel="stylesheet" href="{% static 'details.css' %}" type="text/css" />
56
{% endblock %}
67
{% block content %}
7-
<div class="jumbotron jumbotron-fluid">
8-
<div class="container">
9-
<h1>{{ org.Name }}</h1>
10-
<h3>{{ org.Region }}, {{ org.Address }}</h3>
8+
9+
<div class="jumbotron jumbotron-fluid bg-gr-blue shadow p-3 mb-5 bg-white">
10+
<div class="container text-white">
11+
<h1 class="display-3">{{ org.Name }}</h1>
12+
<h3 class="lead">{{ org.Region }}, {{ org.Address }}</h3>
1113
</div>
1214
</div>
13-
{% if user.is_authenticated %}
14-
<a href="{% url 'editPage' org.id %}">
15-
<button type="button" name="button" class="btn" style="background-color:lightblue">
16-
Edit Page
17-
</button>
18-
</a>
19-
{% endif %}
15+
16+
2017
<main>
21-
<section>
22-
<h2>Overview</h2>
18+
<section class="shadow p-3 mb-5 bg-white rounded">
19+
{% if user.is_authenticated %}
20+
<div class="row">
21+
<a class="btn btn-primary ml-auto mr-2" href="{% url 'editPage' org.id %}" >
22+
Edit Page
23+
</a>
24+
</div>
25+
{% endif %}
2326

24-
<table>
25-
<tr>
26-
<td class="lead">Industory Tag:</td><td class="tableright">{{ org.Industry }}</td>
27-
</tr>
28-
<tr>
29-
<td>Service Tag:</td>
30-
<td class="tableright">{% for service in org.ServiceCategory.all %}
31-
<span class="servicespan">{{ service.Name }}</span>
32-
{% endfor %}
33-
</td>
34-
</tr>
35-
<tr>
36-
<td>PR</td><td class="tableright">{{ org.PR }}</td>
37-
</tr>
38-
<tr>
39-
<td>Registration Date<br>(YYYY-MM-DD)</td><td class="tableright">{{ org.RegistrationDate|date:"Y-m-d" }}</td>
40-
</tr>
41-
<tr>
42-
<td>Affiliation</td><td class="tableright">{{ org.Affiliation }}</td>
43-
</tr>
44-
<tr>
45-
<td>URL</td><td class="tableright">{{ org.Url }}</td>
46-
</tr>
47-
<tr>
48-
<td>ContactPerson</td><td class="tableright">{{ org.ContactPerson }}</td>
49-
</tr>
50-
<tr>
51-
<td>Email</td><td class="tableright">{{ org.Email }}</td>
52-
</tr>
53-
<tr>
54-
<td>Telephone</td><td class="tableright">{{ org.Telephone }}</td>
55-
</tr>
56-
</table>
57-
</section>
27+
<table class="table table-borderless">
28+
<tbody>
29+
<tr>
30+
<th class="lead" scope="row">Industory</th>
31+
<td class="tableright">{{ org.Industry }}</td>
32+
</tr>
33+
<tr>
34+
<th class="lead" scope="row">Service</th>
35+
<td class="tableright">
36+
{% for service in org.ServiceCategory.all %}
37+
<span class="servicespan">{{ service.Name }}, </span>
38+
{% endfor %}
39+
</td>
40+
</tr>
41+
<tr>
42+
<th class="lead" scope="row">PR</th>
43+
<td class="tableright">{{ org.PR }}</td>
44+
</tr>
45+
<tr>
46+
<th class="lead" scope="row">Registration Date</th>
47+
<td class="tableright">{{ org.RegistrationDate|date:"Y-m-d" }}</td>
48+
</tr>
49+
<tr>
50+
<th class="lead" scope="row">Affiliation</th>
51+
<td class="tableright">{{ org.Affiliation }}</td>
52+
</tr>
53+
<tr>
54+
<th class="lead" scope="row">URL</th>
55+
<td class="tableright">
56+
<a href="{{ org.Url }}">{{ org.Url }}</a>
57+
</td>
58+
</tr>
59+
<tr>
60+
<th class="lead" scope="row">Contact</th>
61+
<td class="tableright">
62+
<span>{{ org.ContactPerson }}&nbsp;&nbsp;</span>
63+
<span>Email:{{ org.Email }}&nbsp;&nbsp;</span>
64+
<span>Tel:{{ org.Telephone }}</span>
65+
</td>
66+
</tr>
67+
</tbody>
68+
</table>
69+
</section>
5870

59-
<section style="margin-top:20px;">
60-
<h2>Services</h2>
61-
<table>
62-
<tr>
63-
<th>Service</th><th>Category</th><th>Service</th><th>Contents</th>
64-
</tr>
65-
{% for service in services %}
66-
<tr>
67-
<td>{{ service.OrgName }}</td><td>{{ service.ServiceCategory }}</td>
68-
<td>{{ service.Service }}</td><td>{{ service.Contents }}</td>
69-
</tr>
70-
{% endfor %}
71-
</table>
72-
</section>
71+
<section style="margin-top:20px;">
72+
<h2>Services</h2>
73+
<table>
74+
<tr>
75+
<th>Service</th><th>Category</th><th>Service</th><th>Contents</th>
76+
</tr>
77+
{% for service in services %}
78+
<tr>
79+
<td>{{ service.OrgName }}</td><td>{{ service.ServiceCategory }}</td>
80+
<td>{{ service.Service }}</td><td>{{ service.Contents }}</td>
81+
</tr>
82+
{% endfor %}
83+
</table>
84+
</section>
7385

74-
<section style="margin-top:20px;">
75-
<h2>Experience</h2>
76-
<table>
77-
<tr>
78-
<th>Large</th><th>Medium</th><th>SmallandMicro</th>
79-
</tr>
80-
{% for experience in experiences %}
81-
<tr>
82-
<td>{{ experience.Large }}</td>
83-
<td>{{ experience.Medium }}</td><td>{{ experience.SmallandMicro }}</td>
84-
</tr>
85-
{% endfor %}
86-
</table>
87-
</section>
86+
<section style="margin-top:20px;">
87+
<h2>Experience</h2>
88+
<table>
89+
<tr>
90+
<th>Large</th><th>Medium</th><th>SmallandMicro</th>
91+
</tr>
92+
{% for experience in experiences %}
93+
<tr>
94+
<td>{{ experience.Large }}</td>
95+
<td>{{ experience.Medium }}</td><td>{{ experience.SmallandMicro }}</td>
96+
</tr>
97+
{% endfor %}
98+
</table>
99+
</section>
88100

89-
<section style="margin-top:20px;">
90-
<h2>Experience</h2>
91-
<table>
92-
<tr>
93-
<th>Large</th><th>Medium</th><th>SmallandMicro</th>
94-
</tr>
95-
{% for experience in experiences %}
96-
<tr>
97-
<td>{{ experience.Large }}</td>
98-
<td>{{ experience.Medium }}</td><td>{{ experience.SmallandMicro }}</td>
99-
</tr>
100-
{% endfor %}
101-
</table>
102-
</section>
101+
<section style="margin-top:20px;">
102+
<h2>Experience</h2>
103+
<table>
104+
<tr>
105+
<th>Large</th><th>Medium</th><th>SmallandMicro</th>
106+
</tr>
107+
{% for experience in experiences %}
108+
<tr>
109+
<td>{{ experience.Large }}</td>
110+
<td>{{ experience.Medium }}</td><td>{{ experience.SmallandMicro }}</td>
111+
</tr>
112+
{% endfor %}
113+
</table>
114+
</section>
103115
</main>
104116

105117

index/templates/index/list.html

+30-20
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,37 @@
55
{% endblock %}
66

77
{% block content %}
8-
<header>
8+
<!-- <header>
99
<span>*ada-Addid Adaba, </span><span>*jhn-Johanesberg, </span><span>*smd- Something</span>
10-
</header>
11-
<table>
12-
<tr>
13-
<th>Region</th><th>Industry</th><th>ServiceCategory</th><th>Name</th>
14-
</tr>
15-
{% for query in query_result %}
16-
<tr>
17-
<td>{{ query.Region }}*</td><td>{{ query.Industry }}</td>
18-
<td>
19-
{% for service in query.ServiceCategory.all %}
20-
<p>{{ service.Name }}</p>
21-
{% endfor %}
22-
</td>
23-
24-
<td><a href="{% url 'details' query.id %}">
25-
{{ query.Name }}</a></td>
26-
</tr>
27-
{% endfor %}
28-
10+
</header> -->
11+
<table class="table table-hover mt-5">
12+
<thead>
13+
<tr>
14+
<th scope="col">Region</th>
15+
<th scope="col">Industry</th>
16+
<th scope="col">ServiceCategory</th>
17+
<th scope="col">Name</th>
18+
</tr>
19+
</thead>
20+
<tbody>
21+
{% for query in query_result %}
22+
<tr>
23+
<td>{{ query.Region }}</td>
24+
<td>{{ query.Industry }}</td>
25+
<td>
26+
{% for service in query.ServiceCategory.all %}
27+
<span class="text-muted">{{ service.Name }}, </span>
28+
<!-- <p class="text-muted"></p> -->
29+
{% endfor %}
30+
</td>
31+
<td>
32+
<a href="{% url 'details' query.id %}">
33+
{{ query.Name }}
34+
</a>
35+
</td>
36+
</tr>
37+
{% endfor %}
38+
</tbody>
2939
</table>
3040

3141
{% endblock %}

static/base.css

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.navbar-gr {
2+
background: rgb(2,0,36);
3+
background: linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(9,9,121,1) 35%, rgba(0,212,255,1) 100%);
4+
}
5+
6+
.bg-gr-blue {
7+
background: rgb(98,133,255);
8+
background: linear-gradient(180deg, rgba(98,133,255,1) 0%, rgba(12,123,255,1) 100%);
9+
}

templates/base.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88

99
<!-- Bootstrap CSS -->
1010
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
11+
<link rel="stylesheet" href="{% static 'base.css' %}">
1112
{% block style %}{% endblock %}
1213
<title>BDSP|Network</title>
1314
</head>
1415
<body>
1516
{% include 'base/navbar.html' %}
16-
<div class="container">
17+
<div class="container ">
1718
{% block content %}
1819
{% endblock %}
1920
</div>

templates/base/navbar.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
1+
<nav class="navbar-gr navbar navbar-expand-lg navbar-dark bg-dark">
22
<a class="navbar-brand" href="{% url 'index' %}">BDSP Network</a>
33
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
44
<span class="navbar-toggler-icon"></span>

0 commit comments

Comments
 (0)