Commit 591969d5 authored by Erik Huelsmann's avatar Erik Huelsmann

Merge branch 'master' into 'master'

Added announcement box

See merge request !76
parents de560e64 7511e474
......@@ -6,6 +6,32 @@ body{
min-height:100%;
padding-top:4.5rem;
}
#header {
display: flex;
flex-direction: column;
}
#message-box {
width: 100%;
padding: 8px;
background-color: #ba1e0d;
color: white;
display: none;
flex-direction: row;
}
#message-box-close {
align-self: center;
}
#message-hidden-btn {
align-self: flex-end;
display: none;
color: #ba1e0d;
font-weight: bold;
padding-top: 10px;
padding-right: 10px;
}
#message-box-text {
flex-grow: 1;
}
.main {
padding-top: 20px;
font-size: 0.9rem;
......@@ -22,7 +48,6 @@ body{
}
.cl-navbar {
border-width: 0px;
box-shadow: 0px 1px 10px lightgrey;
font-weight: bold;
padding-top: 0;
padding-bottom: 0;
......
$(document).ready(function () {
$("span.menu-link").click(function (event) {
var nextMenu = $(this).next(".menu");
console.log(nextMenu.siblings(".menu").slideUp());
nextMenu.siblings(".menu").slideUp();
$('span.menu-link').click(function (event) {
var nextMenu = $(this).next('.menu');
console.log(nextMenu.siblings('.menu').slideUp());
nextMenu.siblings('.menu').slideUp();
nextMenu.slideToggle();
});
......@@ -13,4 +13,64 @@ $(document).ready(function () {
var $quote = $($quotes[Math.floor(Math.random() * $quotes.length)]);
$('#lisp-quote').html($quote.html());
/* Announcement box */
let announcementUrl = "https://common-lisp.net/broadcast.html";
let closeMessageBoxBtn = $('#message-box-close');
let openMessasgeBoxBtn = $('#message-hidden-btn');
let messageBox = $('#message-box');
let messageText = $('#message-box-text');
let initialBodyPadding = $('body').outerHeight() - $('body').height();
function calculateNewPadding(isMessageShowing) {
let messageHeight = $('#message-box').outerHeight();
return isMessageShowing ? initialBodyPadding + messageHeight : initialBodyPadding;
}
function closeMessageBox() {
messageBox.css('display', 'none');
openMessasgeBoxBtn.css('display', 'block');
localStorage.setItem('was_message_closed', true);
$('body').css('padding-top', calculateNewPadding(false));
}
function openMessageBox() {
messageBox.css('display', 'flex');
openMessasgeBoxBtn.css('display', 'none');
localStorage.removeItem('was_message_closed');
$('body').css('padding-top', calculateNewPadding(true));
}
closeMessageBoxBtn.click(function (event) {
event.preventDefault();
closeMessageBox();
});
openMessasgeBoxBtn.click(function (event) {
event.preventDefault();
openMessageBox();
});
$.ajax({
url: announcementUrl,
success: function (resp) {
if (resp == null || resp.length < 1) { return; }
messageText.html(resp);
let previousMessage = localStorage.getItem('previous_message');
if (previousMessage == null || previousMessage !== resp) {
localStorage.setItem('previous_message', resp);
openMessageBox();
return;
}
let wasMessageClosed = localStorage.getItem('was_message_closed');
if (wasMessageClosed) {
closeMessageBox();
} else {
openMessageBox();
}
}
})
});
<!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="shortcut icon" type="image/x-icon" href="/static/imgs/favicon.ico" />
<link rel="icon" type="image/x-icon" href="/static/imgs/favicon.ico" />
<link rel="stylesheet" href="/static/css/bootstrap.simplex.min.css">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
<link href="/static/css/layout_2018.css" rel="stylesheet" type="text/css">
</head>
<body>
<nav id="navbar" class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top cl-navbar">
<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="shortcut icon" type="image/x-icon" href="/static/imgs/favicon.ico" />
<link rel="icon" type="image/x-icon" href="/static/imgs/favicon.ico" />
<link rel="stylesheet" href="/static/css/bootstrap.simplex.min.css">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp"
crossorigin="anonymous">
<link href="/static/css/layout_2018.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="header" class="fixed-top">
<nav id="navbar" class="navbar navbar-expand-lg navbar-dark bg-dark cl-navbar">
<a class="navbar-brand regular-text" style="line-height: 36px;" href="/">
<span style="border:3px white;display:inline-block;height:36px;width:36px;background:white;border-radius:36px;">
<img width="30px" height="30px" style="left:3px;position:relative"
src="/static/imgs/lisplogo.png" />
</span>
<span style="vertical-align: middle; padding-left: 5px; padding-right: 20px;">Common-Lisp.net</span>
<span style="border:3px white;display:inline-block;height:36px;width:36px;background:white;border-radius:36px;">
<img width="30px" height="30px" style="left:3px;position:relative" src="/static/imgs/lisplogo.png" />
</span>
<span style="vertical-align: middle; padding-left: 5px; padding-right: 20px;">Common-Lisp.net</span>
</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>
<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 href="/downloads" class="nav-link">Getting started</a>
</li>
<li class="nav-item">
<a href="/documentation" class="nav-link">Documentation</span></a>
</li>
<li class="nav-item">
<a href="/community" class="nav-link">Community</span></a>
</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="/project-intro">Hosting services</a>
<a class="dropdown-item" href="/phub">Projects hub</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="/implementations">Implementations</a>
<a class="dropdown-item" href="/libraries">Libraries</a>
<a class="dropdown-item" href="/tools">Tools</a>
<a class="dropdown-item" href="/faq">FAQ</a>
<a class="dropdown-item" href="/lisp-companies">Companies</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="/contribute">Contribute</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/about">About</a>
</li>
</ul>
</div>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a href="/downloads" class="nav-link">Getting started</a>
</li>
<li class="nav-item">
<a href="/documentation" class="nav-link">Documentation</span></a>
</li>
<li class="nav-item">
<a href="/community" class="nav-link">Community</span></a>
</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="/project-intro">Hosting services</a>
<a class="dropdown-item" href="/phub">Projects hub</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="/implementations">Implementations</a>
<a class="dropdown-item" href="/libraries">Libraries</a>
<a class="dropdown-item" href="/tools">Tools</a>
<a class="dropdown-item" href="/faq">FAQ</a>
<a class="dropdown-item" href="/lisp-companies">Companies</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="/contribute">Contribute</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/about">About</a>
</li>
</ul>
</div>
</nav>
<div id="message-hidden-btn">
<i class="fas fa-lg fa-exclamation-circle"></i>
</div>
<div id="message-box">
<div id="message-box-text">
</div>
<i id="message-box-close" class="far fa-times-circle"></i>
</div>
</div>
<main role="main" class="container main">
{{{page-content}}}
</main>
<main role="main" class="container main">
{{{page-content}}}
</main>
<div style="margin-left:auto;margin-right:auto;padding-bottom:120px;text-align:center">
<a class="btn btn-secondary" style="color: #29aa22;border-color: #29aa22" href="https://gitlab.common-lisp.net/clo/cl-site/blob/master/content/{{{rel-path}}}">
<i class="far fa-edit"></i>&nbsp;Edit this page
</a>
</div>
<div style="margin-left:auto;margin-right:auto;padding-bottom:120px;text-align:center">
<a class="btn btn-secondary" style="color: #29aa22;border-color: #29aa22" href="https://gitlab.common-lisp.net/clo/cl-site/blob/master/content/{{{rel-path}}}">
<i class="far fa-edit"></i>&nbsp;Edit this page
</a>
</div>
<footer class="footer border-top bg-light">
<div class="container">
<div class="row">
<div class="col-md-6" style="font-style: italic;">
<div style="text-align:left;width:100%; margin-bottom: 0px;">
&copy; 2003-2018 <a href="http://cl-foundation.org/">Common-Lisp.Net maintainers</a>.
</div>
<div style="margin-top: 5px; line-height: 15px;">
<a style="float:left;margin-right: 5px;" rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
</div>
<footer class="footer border-top bg-light">
<div class="container">
<div class="row">
<div class="col-md-6" style="font-style: italic;">
<div style="text-align:left;width:100%; margin-bottom: 0px;">
&copy; 2003-2018 <a href="http://cl-foundation.org/">Common-Lisp.Net maintainers</a>.
</div>
<div class="col-md-6">
<div id="lisp-quote" class="lisp-quote">
</div>
<div style="margin-top: 5px; line-height: 15px;">
<a style="float:left;margin-right: 5px;" rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img
alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a>This
work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative
Commons Attribution 4.0 International License</a>.
</div>
</div>
<div class="col-md-6">
<div id="lisp-quote" class="lisp-quote">
</div>
</div>
</div>
</footer>
</div>
</footer>
<div id="quotes" style="display: none;">
<div>
<p class="quote-text">
"Programs must be written for people to read, and only incidentally for machines to execute."
</p>
<p class="quote-author">- Abelson & Sussman, SICP, preface to the first edition</p>
</div>
<div>
<p class="quote-text">"That language is an instrument of human reason, and not merely a medium for the expression of thought, is a truth generally admitted."</p>
<p class="quote-author">- George Boole, quoted in Iverson's Turing Award Lecture</p>
</div>
<div>
<p class="quote-text">"One of the most important and fascinating of all computer languages is Lisp (standing for "List Processing"), which was invented by John McCarthy around the time Algol was invented."</p>
<p class="quote-author">- Douglas Hofstadter, Godel, Escher, Bach</p>
</div>
<div>
<p class="quote-text">"Lisp is a programmable programming language."</p>
<p class="quote-author">- John Foderaro, CACM, September 1991</p>
</div>
<div>
<p class="quote-text">"Lisp isn't a language, it's a building material."</p>
<p class="quote-author">- Alan Kay</p>
</div>
<div>
<p class="quote-text">"Any sufficiently complicated C or Fortran program contains an ad hoc informally-specified bug-ridden slow implementation of half of Common Lisp."</p>
<p class="quote-author">- Philip Greenspun (Greenspun's Tenth Rule of Programming)</p>
</div>
<div>
<p class="quote-text">"Lisp is worth learning for the profound enlightenment experience you will have when you finally get it; that experience will make you a better programmer for the rest of your days, even if you never actually use Lisp itself a lot."</p>
<p class="quote-author">- Eric Raymond, "How to Become a Hacker"</p>
</div>
<div>
<p class="quote-text">"Lisp is a programmer amplifier."</p>
<p class="quote-author">- Martin Rodgers</p>
</div>
<div>
<p class="quote-text">"Common Lisp, a happy amalgam of the features of previous Lisps."</p>
<p class="quote-author">- Winston & Horn, Lisp</p>
</div>
<div>
<p class="quote-text">"Lisp doesn't look any deader than usual to me."</p>
<p class="quote-author">- David Thornley</p>
</div>
<div>
<p class="quote-text">"SQL, Lisp, and Haskell are the only programming languages that I've seen where one spends more time thinking than typing."</p>
<p class="quote-author">- Philip Greenspun</p>
</div>
<div>
<p class="quote-text">"Don't worry about what anybody else is going to do. The best way to predict the future is to invent it."</p>
<p class="quote-author">- Alan Kay</p>
</div>
<div>
<p class="quote-text">"The greatest single programming language ever designed."</p>
<p class="quote-author">- Alan Kay, on Lisp</p>
</div>
<div>
<p class="quote-text">"I object to doing things that computers can do."</p>
<p class="quote-author">- Olin Shivers</p>
</div>
<div>
<p class="quote-text">"Lisp is a language for doing what you've been told is impossible."</p>
<p class="quote-author">- Kent Pitman</p>
</div>
<div>
<p class="quote-text">"Lisp is the red pill."</p>
<p class="quote-author">- John Fraser</p>
</div>
<div>
<p class="quote-text">"Within a couple weeks of learning Lisp I found programming in any other language unbearably constraining."</p>
<p class="quote-author">- Paul Graham</p>
</div>
<div>
<p class="quote-text">"Programming in Lisp is like playing with the primordial forces of the universe. It feels like lightning between your fingertips. No other language even feels close."</p>
<p class="quote-author">- Glenn Ehrlich</p>
</div>
<div>
<p class="quote-text">"A Lisp programmer knows the value of everything, but the cost of nothing."</p>
<p class="quote-author">- Alan Perlis</p>
</div>
<div>
<p class="quote-text">"Lisp is the most sophisticated programming language I know. It is literally decades ahead of the competition ... it is not possible (as far as I know) to actually use Lisp seriously before reaching the point of no return."</p>
<p class="quote-author">- Christian Lynbech, Road to Lisp</p>
</div>
<div>
<p class="quote-text">"[Lisp] has assisted a number of our most gifted fellow humans in thinking previously impossible thoughts."</p>
<p class="quote-author">- Edsger Dijkstra, CACM, 15:10</p>
</div>
<div>
<p class="quote-text">"The limits of my language are the limits of my world."</p>
<p class="quote-author">
- Ludwig Wittgenstein, Tractatus Logico-Philosophicus 5.6, 1918
</p>
</div>
<div id="quotes" style="display: none;">
<div>
<p class="quote-text">
"Programs must be written for people to read, and only incidentally for machines to execute."
</p>
<p class="quote-author">- Abelson & Sussman, SICP, preface to the first edition</p>
</div>
<div>
<p class="quote-text">"That language is an instrument of human reason, and not merely a medium for the expression
of thought, is a truth generally admitted."</p>
<p class="quote-author">- George Boole, quoted in Iverson's Turing Award Lecture</p>
</div>
<div>
<p class="quote-text">"One of the most important and fascinating of all computer languages is Lisp (standing for
"List Processing"), which was invented by John McCarthy around the time Algol was invented."</p>
<p class="quote-author">- Douglas Hofstadter, Godel, Escher, Bach</p>
</div>
<div>
<p class="quote-text">"Lisp is a programmable programming language."</p>
<p class="quote-author">- John Foderaro, CACM, September 1991</p>
</div>
<div>
<p class="quote-text">"Lisp isn't a language, it's a building material."</p>
<p class="quote-author">- Alan Kay</p>
</div>
<div>
<p class="quote-text">"Any sufficiently complicated C or Fortran program contains an ad hoc informally-specified
bug-ridden slow implementation of half of Common Lisp."</p>
<p class="quote-author">- Philip Greenspun (Greenspun's Tenth Rule of Programming)</p>
</div>
<div>
<p class="quote-text">"Lisp is worth learning for the profound enlightenment experience you will have when you
finally get it; that experience will make you a better programmer for the rest of your days, even if you never
actually use Lisp itself a lot."</p>
<p class="quote-author">- Eric Raymond, "How to Become a Hacker"</p>
</div>
<div>
<p class="quote-text">"Lisp is a programmer amplifier."</p>
<p class="quote-author">- Martin Rodgers</p>
</div>
<div>
<p class="quote-text">"Common Lisp, a happy amalgam of the features of previous Lisps."</p>
<p class="quote-author">- Winston & Horn, Lisp</p>
</div>
<div>
<p class="quote-text">"Lisp doesn't look any deader than usual to me."</p>
<p class="quote-author">- David Thornley</p>
</div>
<div>
<p class="quote-text">"SQL, Lisp, and Haskell are the only programming languages that I've seen where one spends
more time thinking than typing."</p>
<p class="quote-author">- Philip Greenspun</p>
</div>
<div>
<p class="quote-text">"Don't worry about what anybody else is going to do. The best way to predict the future is
to invent it."</p>
<p class="quote-author">- Alan Kay</p>
</div>
<div>
<p class="quote-text">"The greatest single programming language ever designed."</p>
<p class="quote-author">- Alan Kay, on Lisp</p>
</div>
<div>
<p class="quote-text">"I object to doing things that computers can do."</p>
<p class="quote-author">- Olin Shivers</p>
</div>
<div>
<p class="quote-text">"Lisp is a language for doing what you've been told is impossible."</p>
<p class="quote-author">- Kent Pitman</p>
</div>
<div>
<p class="quote-text">"Lisp is the red pill."</p>
<p class="quote-author">- John Fraser</p>
</div>
<div>
<p class="quote-text">"Within a couple weeks of learning Lisp I found programming in any other language
unbearably constraining."</p>
<p class="quote-author">- Paul Graham</p>
</div>
<div>
<p class="quote-text">"Programming in Lisp is like playing with the primordial forces of the universe. It feels
like lightning between your fingertips. No other language even feels close."</p>
<p class="quote-author">- Glenn Ehrlich</p>
</div>
<div>
<p class="quote-text">"A Lisp programmer knows the value of everything, but the cost of nothing."</p>
<p class="quote-author">- Alan Perlis</p>
</div>
<div>
<p class="quote-text">"Lisp is the most sophisticated programming language I know. It is literally decades ahead
of the competition ... it is not possible (as far as I know) to actually use Lisp seriously before reaching the
point of no return."</p>
<p class="quote-author">- Christian Lynbech, Road to Lisp</p>
</div>
<div>
<p class="quote-text">"[Lisp] has assisted a number of our most gifted fellow humans in thinking previously
impossible thoughts."</p>
<p class="quote-author">- Edsger Dijkstra, CACM, 15:10</p>
</div>
<div>
<p class="quote-text">"The limits of my language are the limits of my world."</p>
<p class="quote-author">
- Ludwig Wittgenstein, Tractatus Logico-Philosophicus 5.6, 1918
</p>
</div>
</div>
<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>
<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>
</html>
\ No newline at end of file
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