Skip to content

Commit

Permalink
Working on template, fix static routes
Browse files Browse the repository at this point in the history
  • Loading branch information
jamonholmgren committed Nov 30, 2023
1 parent c780ed1 commit a91d2a4
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 8 deletions.
4 changes: 2 additions & 2 deletions template/qub/server.bas
Expand Up @@ -44,7 +44,7 @@ port$ = DEFAULT_PORT

' check if qub.conf exists, and read in the configuration if so
If _FILEEXISTS("./qub/qub.conf") Then
Print "Reading configuration from qub.conf"
Print "Reading configuration from qub/qub.conf"
Open "./qub/qub.conf" For Input As #1
Do While Not EOF(1)
Line Input #1, line$
Expand Down Expand Up @@ -487,7 +487,7 @@ Function PageExists(filename$)
End Function

Function StaticExists(filename$)
StaticExists = _FILEEXISTS("./web/static" + filename$) * -1
StaticExists = _FILEEXISTS("./web/static/" + filename$) * -1
End Function

' Actually responds to the request
Expand Down
Binary file added template/server
Binary file not shown.
3 changes: 2 additions & 1 deletion template/web/footer.html
@@ -1,4 +1,5 @@
</div>
<footer>
Copyright &copy; ${year} $DOMAIN
<div class="container">Copyright &copy; ${year} $DOMAIN</div>
</footer>
</main>
16 changes: 12 additions & 4 deletions template/web/header.html
@@ -1,5 +1,13 @@
<main>
<nav>
<a href="/">Home</a>
<a href="/contact">Contact</a>
</nav>
<section class="hero">
<!-- Constrain width area -->
<div class="container">
<h1>It's a Qub-ical Playground</h1>
<p class="subtitle">...and we're just playing in it!</p>
<nav>
<a href="/">Home</a>
<a href="/contact">Contact</a>
</nav>
</div>
</section>
<div class="container">
1 change: 0 additions & 1 deletion template/web/pages/home.html
@@ -1,7 +1,6 @@
<!--TITLE
$DOMAIN - Official Website
-->

<h1>$DOMAIN</h1>

<p>Welcome to the official website of $DOMAIN.</p>
56 changes: 56 additions & 0 deletions template/web/static/styles.css
@@ -1,3 +1,59 @@
/*
Add your styles here
*/

body {
/* reset */
margin: 0;
padding: 0;
font-family: sans-serif;
/* full width, 100% tall */
width: 100%;
height: 100%;
/* center content */
justify-content: center;
align-items: center;
}

.container {
/* constrained width */
width: 800px;
margin: 0 auto;
}

.hero {
background-color: #fedb6b;
/* full width, 400px tall, content is centered */
width: 100%;
height: 400px;
display: flex;
justify-content: center;
align-items: center;
}

.hero h1 {
font-size: 3em;
text-align: center;
font-family: Georgia, "Times New Roman", Times, serif;
}

.hero .subtitle {
font-size: 1.5em;
text-align: center;
font-family: Georgia, "Times New Roman", Times, serif;
}

.hero nav {
display: flex;
justify-content: center;
align-items: center;
}

.hero nav a {
margin: 0 1em;
text-decoration: none;
color: #000;
font-weight: normal;
font-size: 1.5em;
padding: 0.5em;
}

0 comments on commit a91d2a4

Please sign in to comment.