Commit 31062e48 authored by Cherie Yang's avatar Cherie Yang

Port over frontend files

parent a8901f1e
......@@ -14,4 +14,4 @@
(with-open-file (stream filepath)
(let ((data (make-string (file-length stream))))
(read-sequence data stream)
data)))
data)))
\ No newline at end of file
html{
height:100%;
}
body{
position:relative;
min-height:100%;
padding-top:4.5rem;
padding-bottom:75px;
}
.navigation {
background-color:#52a361;
}
.navigation>.navbar-brand{
height:2.5rem;
}
.navigation>.navbar-brand>img{
max-height:100%;
vertical-align:top;
}
.main {
overflow: auto;
}
.footer{
position:absolute;
bottom:0;
width:100%;
height:60px;
line-height:60px;
}
a {
color: #199728;
}
a:hover {
color: #97e0a0;
text-decoration: none;
}
a.navbar-brand,a.nav-link{
color: #fff!important;
}
a.navbar-brand:hover,a.nav-link:hover{
text-decoration:underline;
}
h2{
border-bottom:3px solid #eee;
}
hr {
color: #080;
}
.tocbox{
display: inline-block;
float: right;
border: 3px solid #ddd;
border-radius: 0.5em;
overflow: hidden;
padding: 0em 0em 0em 0em;
margin: 0em 0em 1em 1em;
}
.tocbox h4 {
font-family: 'Varela Round', sans-serif;
font-size: 15pt;
background-color: #ddd;
padding: 0.5em 1em 0.5em 0.5em;
margin-top: 0em;
margin-bottom: 0em;
}
.tocbox ul {
padding: 0em 1em 0em 0em;
list-style-position: inside;
list-style-type: none;
}
.tocbox li {
padding-top: 0.7em;
}
.tocbox li:before {
content: "\00BB \0020";
}
.emphasize {
font-weight: bold;
}
#lost-contact td {
padding-left: 2em;
padding-right: 2em;
}
#lost-contact th {
text-align: center;
}
@media screen and (min-width: 900px) {
#news { float: right; width: 30%; box-sizing: border-box; }
#introduction,#description,#services,#support,#about { float: left; width: 65%; box-sizing: border-box; }
}
.cltable {
font-size: 13pt;
}
.cltable td, th {
vertical-align: top;
padding: 3px 10px 3px 10px;
}
.cltable thead {
border-bottom: 3px solid #004;
}
.cltable tr:nth-child(even) {background: #ccc;}
html, body {
margin: 0;
padding: 0;
height: 100%;
}
* { box-sizing: border-box; }
.header, .main {
width: 70%;
margin-left: auto;
margin-right: auto;
}
.header {
}
\ No newline at end of file
$(document).ready(function(){
$('.dropdown').on('show.bs.dropdown', function(e){
$(this).find('.dropdown-menu').first().stop(true,true).slideDown(300);
});
$('.dropdown').on('hide.bs.dropdown', function(e){
$(this).find('.dropdown-menu').first().stop(true,true).slideUp(200);
});
});
\ No newline at end of file
<!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">
<title>{{title}}</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700" rel="stylesheet" type="text/css">
<link href="./static/css/layout_2018.css" rel="stylesheet" type="text/css">
{{#styles}}
<link href="{{location}}" rel="stylesheet" type="text/css">
{{/styles}}
</head>
<body>
<nav class="navbar navbar-expand-md fixed-top navbar-dark navigation">
<a class="navbar-brand" href="./index.html">
<img width="30px" height="30px"
src="/static/imgs/lisplogo.png" />
Common-Lisp.net</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href="./about/">about</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">get started <span class="caret"></span></a>
<div class="dropdown-menu" role="menu">
<a class="dropdown-item" href="./downloads/">download+install</a>
<a class="dropdown-item" href="./tutorials/">tutorials</a>
</div>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">community <span class="caret"></span></a>
<div class="dropdown-menu" role="menu">
<a class="dropdown-item" href="http://mailman.common-lisp.net/cgi-bin/mailman/listinfo">mailing lists</a>
<a class="dropdown-item" href="./independent-lists/">independent lists</a>
<a class="dropdown-item" href="./orphaned-mailing-lists/">orphaned lists</a>
</div>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">projects <span class="caret"></span></a>
<div class="dropdown-menu" role="menu">
<a class="dropdown-item" href="./phub/">projects hub</a>
<a class="dropdown-item" href="./project-intro/">hosting services</a>
<a class="dropdown-item" href="./orphaned-projects/">orphaned projects</a>
<a class="dropdown-item" href="./faq/">FAQ</a>
</div>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">resources <span class="caret"></span></a>
<div class="dropdown-menu" role="menu">
<a class="dropdown-item" href="http://www.lispworks.com/documentation/lw50/CLHS/Front/Contents.htm">clhs</a>
<a class="dropdown-item" href="./tools/">tools</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="./contribute/">contribute</a>
</li>
</ul>
</div>
</nav>
<main role="main" class="container main">
{{{page-content}}}
</main>
<footer class="footer border-top bg-light">
<div class="container">
&copy; 2014-2018 <a href="http://cl-foundation.org/">The Common Lisp Foundation</a>.
</div>
</footer>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script src="/static/js/scripts.js"></script>
</body>
</html>
......@@ -3,5 +3,6 @@
(defun make-site ()
(progn
(process-static)
(process-styles)
(process-pages)))
\ No newline at end of file
......@@ -12,9 +12,24 @@
*STYLES*)))
(push (cons :styles styles-list) *GLOBAL-CONTEXT*)))
;; Copies/renders static assets (imgs, etc)
(defun process-static () )
;; Copies/renders script files + adds to global context
(defun process-scripts () nil)
;; Copies/renders static assets (imgs, etc)
(defun process-static ()
(let*
((static-output-dir (merge-pathnames #P"static/" *OUTPUT-DIR*))
(static-list (mapcar
(lambda (s) (progn
(uiop:copy-file (make-path *STATIC-DIR* s)
(make-path static-output-dir s))
(cons :location s)))
(mapcar
(lambda (p) (file-namestring p))
(directory (make-pathname :defaults *STATIC-DIR*
:name :wild
:type :wild))))))
(push (cons :static static-list) *GLOBAL-CONTEXT*)))
;; process-pages : Copies/renders pages - called last
(defun render-page (page template-path)
......@@ -36,5 +51,3 @@
(progn (ensure-directories-exist *OUTPUT-DIR*)
(loop for page in *PAGES*
do (render-page page template-path)))))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment