Skip to content

Commit

Permalink
Merge branch 'main' into wdn/scramble
Browse files Browse the repository at this point in the history
  • Loading branch information
WillNilges authored Apr 21, 2024
2 parents e6e9598 + 32352db commit 8ccbfb1
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 58 deletions.
49 changes: 49 additions & 0 deletions src/meshweb/static/meshweb/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
.max-width-container {
max-width: 1200px !important;
padding: 0em 3em;
/* margin: 0 auto; */
/* padding: 10em; */
}

a {
color: inherit !important;
}

body {
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: stretch;
}

footer,
nav {
--bs-bg-opacity: 1;
background-color: #f4f4f4 !important;
}

footer {
width: 100%;
left: 0;
bottom: 0;
flex-grow: 1;
}

footer a {
text-decoration: none;
}

.links {
display: flex;
justify-content: center !important;
column-gap: 3rem;
row-gap: 2rem;
flex-wrap: wrap;
align-content: flex-start;
}

.toolList {
display: flex;
flex-direction: column;
line-height: 3em;
}
68 changes: 11 additions & 57 deletions src/meshweb/templates/meshweb/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,51 +10,7 @@
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<link rel="shortcut icon" href="{% static 'meshweb/favicon.png' %}" />
<style>
.max-width-container {
max-width: 1200px !important;
padding: 0em 3em;
/* margin: 0 auto; */
/* padding: 10em; */
}

a {
color: inherit !important;
}

body {
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: stretch;
}

footer,
nav {
--bs-bg-opacity: 1;
background-color: #f4f4f4 !important;
}

footer {
width: 100%;
left: 0;
bottom: 0;
flex-grow: 1;
}

footer a {
text-decoration: none;
}

.links {
display: flex;
justify-content: center !important;
column-gap: 3rem;
row-gap: 2rem;
flex-wrap: wrap;
align-content: flex-start;
}
</style>
<link rel="stylesheet" href="{% static 'meshweb/styles.css' %}" />
</head>

<body>
Expand Down Expand Up @@ -105,19 +61,17 @@ <h1>Welcome to MeshDB!</h1>
It can be used to track Installs, Members, and Buildings in the mesh.
</p>
<p>Reach out on Slack if you need access.</p>
<b>Here are some links to various services provided by this server:</b>
<div style=" display:flex; flex-direction: row; justify-content: space-between; margin-top: 20px" class="links">
<a href="https://forms.grandsvc.mesh.nycmesh.net/join/">Join Our Community Network!</a>
<a href="/admin">Admin Panel</a>
<a href="https://forms.grandsvc.mesh.nycmesh.net/">Other Forms</a>
<a href="/api/v1/">MeshDB Data API</a>
<a href="/api-docs/swagger/">API Documentation (Swagger)</a>
<a href="/api-docs/redoc/">API Documentation (Redoc)</a>
<a href="https://los.grandsvc.mesh.nycmesh.net/">Line of Sight Tool</a>
<a href="https://map.grandsvc.mesh.nycmesh.net">Map</a>
<a href="https://github.com/nycmeshnet/meshdb">Source Code</a>
<hr>
<div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 20px" class="links">
{% for category, tools in links.items %}
<div class="toolList">
<h3>{{ category }}</h3>
{% for link, description in tools %}
<a href={{ link }}>{{ description }}</a>
{% endfor %}
</div>
{% endfor %}
</div>

</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
Expand Down
20 changes: 19 additions & 1 deletion src/meshweb/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,23 @@
@permission_classes([permissions.AllowAny])
def index(request):
template = loader.get_template("meshweb/index.html")
context = {}
links = {
"Member Tools": [
("https://forms.grandsvc.mesh.nycmesh.net/join/", "Join Form"),
("https://los.grandsvc.mesh.nycmesh.net/", "Line of Sight Tool"),
("https://map.grandsvc.mesh.nycmesh.net", "Map"),
],
"Volunteer Tools": [
("/admin", "Admin Panel"),
("/api/v1/geography/whole-mesh.kml", "KML Download"),
("https://forms.grandsvc.mesh.nycmesh.net/", "Other Forms"),
],
"Developer Tools": [
("https://github.com/nycmeshnet/meshdb", "Source Code"),
("/api/v1/", "MeshDB Data API"),
("/api-docs/swagger/", "API Documentation (Swagger)"),
("/api-docs/redoc/", "API Documentation (Redoc)"),
],
}
context = {"links": links}
return HttpResponse(template.render(context, request))

0 comments on commit 8ccbfb1

Please sign in to comment.