Skip to content

Commit

Permalink
Feature: added default page
Browse files Browse the repository at this point in the history
  • Loading branch information
James Levell committed Mar 17, 2024
1 parent 8bc846f commit 1ea48d1
Show file tree
Hide file tree
Showing 12 changed files with 729 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
nginx.conf
node_modules
7 changes: 7 additions & 0 deletions assets/bootstrap.min.css

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions assets/bootstrap.min.js

Large diffs are not rendered by default.

115 changes: 115 additions & 0 deletions assets/cover.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
/*
* Globals
*/

/* Links */
a,
a:focus,
a:hover {
color: #fff;
}

/* Custom default button */
.btn-secondary,
.btn-secondary:hover,
.btn-secondary:focus {
color: #333;
text-shadow: none;
/* Prevent inheritance from `body` */
background-color: #fff;
border: .05rem solid #fff;
}


/*
* Base structure
*/

html,
body {
height: 100%;
background-color: #333;
}

body {
display: -ms-flexbox;
display: -webkit-box;
display: flex;
-ms-flex-pack: center;
-webkit-box-pack: center;
justify-content: center;
color: #fff;
text-shadow: 0 .05rem .1rem rgba(0, 0, 0, .5);
box-shadow: inset 0 0 5rem rgba(0, 0, 0, .5);
}

.cover-container {
max-width: 42em;
}


/*
* Header
*/
.masthead {
margin-bottom: 2rem;
}

.masthead-brand {
margin-bottom: 0;
}

.nav-masthead .nav-link {
padding: .25rem 0;
font-weight: 700;
color: rgba(255, 255, 255, .5);
background-color: transparent;
border-bottom: .25rem solid transparent;
}

.nav-masthead .nav-link:hover,
.nav-masthead .nav-link:focus {
border-bottom-color: rgba(255, 255, 255, .25);
}

.nav-masthead .nav-link+.nav-link {
margin-left: 1rem;
}

.nav-masthead .active {
color: #fff;
border-bottom-color: #fff;
}

@media (min-width: 48em) {
.masthead-brand {
float: left;
}

.nav-masthead {
float: right;
}
}


/*
* Cover
*/
.cover {
padding: 0 1.5rem;
}

.cover .btn-lg {
padding: .75rem 1.25rem;
font-weight: 700;
}


/*
* Footer
*/
.mastfoot {
color: rgba(255, 255, 255, .5);
background-image: url('/assets/footer.svg');
padding-bottom: 100px;
}
4 changes: 4 additions & 0 deletions assets/footer.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/jquery-3.2.1.slim.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/pbs_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions assets/popper.min.js

Large diffs are not rendered by default.

20 changes: 15 additions & 5 deletions convertToNginx.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,21 @@ def convertLinksToNginx(links):
}
http {
server {
listen 80;
listen [::]:80;
include mime.types;
default_type application/octet-stream;
sendfile on;
server_name shortener.thilo.learn2cloud.ch;
server {
listen 80;
listen [::]:80;
server_name shortener.thilo.learn2cloud.ch;
location /
{
root /etc/nginx/html;
index index.html;
}
"""
for link in links:
Expand All @@ -38,7 +48,7 @@ def convertLinksToNginx(links):
nginx += """
}
}
"""
"""

return nginx

Expand Down
60 changes: 60 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="/assets/pbs_logo.svg">

<title>Thilo - Link Shortener</title>

<!-- Bootstrap core CSS -->
<link href="/assets/bootstrap.min.css" rel="stylesheet">

<!-- Custom styles for this template -->
<link href="/assets/cover.css" rel="stylesheet">

<body class="text-center">
<div class="cover-container d-flex h-100 p-3 mx-auto flex-column">
<header class="masthead mb-auto">
<div class="inner">
<h3 class="masthead-brand">Thilo - Link Shortener</h3>
<nav class="nav nav-masthead justify-content-center">
</nav>
</div>
</header>

<main role="main" class="inner cover">
<h1 class="cover-heading">Thilo</h1>
<p class="lead">Du bist auf dem Link-Shortner von Thilo gelandet. Gehe hier zur Thilo App: </p>
<p class="lead">
<a href="https://scout-ch.github.io/thilo/" target="_blank" class="btn btn-lg btn-secondary">zur Thilo</a>
</p>
</main>

<footer class="mastfoot mt-auto">
<div class="inner footer">
<p>Cover template for <a href="https://getbootstrap.com/">Bootstrap</a>, by <a
href="https://twitter.com/mdo">@mdo</a>.</p>
</div>
</footer>
</div>


<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="/assets/jquery-3.2.1.slim.min.js"
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="/assets/js/vendor/jquery-slim.min.js"><\/script>')</script>
<script src="/assets/popper.min.js"></script>
<script src="/assets/bootstrap.min.js"></script>


</body>

</html>
Loading

0 comments on commit 1ea48d1

Please sign in to comment.