This commit is contained in:
@@ -0,0 +1,227 @@
|
||||
* {
|
||||
margin: 0;
|
||||
}
|
||||
html {
|
||||
font-size: 100%;
|
||||
padding: 0;
|
||||
background-attachment: fixed;
|
||||
background-image: -webkit-linear-gradient(top, #eef0f2, #d3d5d9);
|
||||
background-image: -moz-linear-gradient(top, #eef0f2, #d3d5d9);
|
||||
background-image: linear-gradient(to bottom, #eef0f2, #d3d5d9);
|
||||
}
|
||||
body {
|
||||
color: #333;
|
||||
font-size: 1em;
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
text-align: left;
|
||||
margin: 1em;
|
||||
padding: 0;
|
||||
}
|
||||
p,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
p {
|
||||
line-height: 1.5em;
|
||||
-webkit-hyphens: auto;
|
||||
-moz-hyphens: auto;
|
||||
hyphens: auto;
|
||||
}
|
||||
p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
a {
|
||||
color: #2f83e8;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
strong,
|
||||
b {
|
||||
font-weight: bold;
|
||||
}
|
||||
em,
|
||||
i {
|
||||
font-style: italic;
|
||||
}
|
||||
.float_left {
|
||||
float: left;
|
||||
}
|
||||
.float_right {
|
||||
float: right;
|
||||
}
|
||||
.disabled {
|
||||
opacity: 0.4;
|
||||
cursor: default;
|
||||
}
|
||||
.message_number {
|
||||
color: #fff;
|
||||
font-size: 0.8em;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
line-height: 1em;
|
||||
position: absolute;
|
||||
top: -0.5em;
|
||||
left: -0.5em;
|
||||
display: block;
|
||||
padding-top: 0.3em;
|
||||
min-width: 2em;
|
||||
height: 2em;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
cursor: default;
|
||||
background-color: #ea2314;
|
||||
background-image: -webkit-linear-gradient(top, #f78f91, #c50404);
|
||||
background-image: -moz-linear-gradient(top, #f78f91, #c50404);
|
||||
background-image: linear-gradient(to bottom, #f78f91, #c50404);
|
||||
border: 2px solid #fff;
|
||||
-webkit-border-radius: 1em;
|
||||
-moz-border-radius: 1em;
|
||||
border-radius: 1em;
|
||||
-webkit-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.3);
|
||||
-moz-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.3);
|
||||
box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
.newsboard_wrapper {
|
||||
margin: 0 auto 2em auto;
|
||||
padding: 13px 0 0 17px;
|
||||
max-width: 550px;
|
||||
position: relative;
|
||||
background: url('../img/sheets.png') no-repeat;
|
||||
}
|
||||
.newsboard_wrapper:before {
|
||||
content: url('../img/paperclip.png');
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: 35px;
|
||||
z-index: 1;
|
||||
}
|
||||
.newsboard_wrapper .newsboard {
|
||||
padding: 29px 1.25rem 4rem 1.25rem;
|
||||
min-height: 20em;
|
||||
position: relative;
|
||||
border: 1px solid #ccc;
|
||||
background-color: #fff;
|
||||
background-image: -webkit-linear-gradient(#dddddd, #ffffff 1px);
|
||||
background-image: -moz-linear-gradient(#dddddd, #ffffff 1px);
|
||||
background-image: linear-gradient(#dddddd, #ffffff 1px);
|
||||
background-position: 0 1.3em;
|
||||
-webkit-background-size: 100% 1.5em;
|
||||
-moz-background-size: 100% 1.5em;
|
||||
background-size: 100% 1.5em;
|
||||
-webkit-box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.3);
|
||||
-moz-box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.3);
|
||||
box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
.newsboard_wrapper .newsboard .close_button {
|
||||
color: #777;
|
||||
font-size: 1.2em;
|
||||
text-decoration: none;
|
||||
line-height: 1em;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 14px;
|
||||
display: block;
|
||||
}
|
||||
.newsboard_wrapper .newsboard .close_button:hover {
|
||||
color: #444;
|
||||
}
|
||||
.newsboard_wrapper .newsboard .newsboard_footer {
|
||||
color: #999;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
.newsboard_wrapper .newsboard .paging_bar {
|
||||
font-size: 1.8em;
|
||||
padding: 0 1.25rem;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 1rem;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.newsboard_wrapper .newsboard .paging_bar .float_left a,
|
||||
.newsboard_wrapper .newsboard .paging_bar .float_right a {
|
||||
color: #777;
|
||||
text-decoration: none;
|
||||
}
|
||||
.newsboard_wrapper .newsboard .paging_bar .float_left a {
|
||||
margin-right: 0.3em;
|
||||
}
|
||||
.newsboard_wrapper .newsboard .paging_bar .float_right a {
|
||||
margin-left: 0.3em;
|
||||
}
|
||||
.newsboard_wrapper .newsboard .paging_bar .progressbar {
|
||||
display: block;
|
||||
width: 40%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.newsboard_wrapper .newsboard .paging_bar progress {
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
vertical-align: 0;
|
||||
line-height: normal;
|
||||
color: #2f83e8;
|
||||
width: 100%;
|
||||
height: 0.6rem;
|
||||
border-style: none;
|
||||
padding: 0;
|
||||
background-color: #eee;
|
||||
-webkit-border-radius: 0.3rem;
|
||||
-moz-border-radius: 0.3rem;
|
||||
border-radius: 0.3rem;
|
||||
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
|
||||
-moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
|
||||
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
.newsboard_wrapper .newsboard .paging_bar progress::-webkit-progress-bar {
|
||||
padding: 0;
|
||||
border-style: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
.newsboard_wrapper .newsboard .paging_bar progress::-webkit-progress-value {
|
||||
-webkit-border-radius: 0.3rem;
|
||||
border-radius: 0.3rem;
|
||||
background-color: #2f83e8;
|
||||
background-image: -webkit-linear-gradient(top, #8bbaf2, #176acd);
|
||||
background-image: linear-gradient(to bottom, #8bbaf2, #176acd);
|
||||
}
|
||||
.newsboard_wrapper .newsboard .paging_bar progress::-moz-progress-bar {
|
||||
-moz-border-radius: 0.3rem;
|
||||
border-radius: 0.3rem;
|
||||
background-color: #2f83e8;
|
||||
background-image: -moz-linear-gradient(top, #8bbaf2, #176acd);
|
||||
background-image: linear-gradient(to bottom, #8bbaf2, #176acd);
|
||||
}
|
||||
.newsboard_wrapper .newsboard .newsboard_content h1,
|
||||
.newsboard_wrapper .newsboard .newsboard_content h2 {
|
||||
font-weight: normal;
|
||||
font-family:
|
||||
'Helvetica Neue Light', 'HelveticaNeue-Light', 'Helvetica Light', 'Helvetica-Light', Helvetica, Arial, sans-serif;
|
||||
letter-spacing: 0.03em;
|
||||
}
|
||||
.newsboard_wrapper .newsboard .newsboard_content h1 {
|
||||
font-size: 1.75em;
|
||||
}
|
||||
.newsboard_wrapper .newsboard .newsboard_content h2 {
|
||||
color: #2f83e8;
|
||||
font-size: 1.2em;
|
||||
line-height: 1.4em;
|
||||
}
|
||||
.newsboard_wrapper .newsboard .newsboard_content:empty {
|
||||
color: #999;
|
||||
font-size: 1.15em;
|
||||
text-align: center;
|
||||
padding-top: 10.5rem;
|
||||
background: url('../img/empty.png') no-repeat center 3.75rem;
|
||||
}
|
||||
.newsboard_wrapper .newsboard .newsboard_content:empty:after {
|
||||
content: 'Keine neuen Mitteilungen.';
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
@@ -0,0 +1,50 @@
|
||||
'use strict';
|
||||
|
||||
{
|
||||
const init = () => {
|
||||
showFirstMessage();
|
||||
$('[title=next]').addEventListener('click', nextMessage);
|
||||
$('[title=prev]').addEventListener('click', prevMessage);
|
||||
};
|
||||
|
||||
const showFirstMessage = () => showMessageByNumber(1);
|
||||
|
||||
const showMessageByNumber = (messageNumber) => {
|
||||
$('.newsboard_content').innerHTML = messages[messageNumber - 1];
|
||||
};
|
||||
|
||||
const nextMessage = (e) => {
|
||||
e.preventDefault(); // Standardverhalten unterbinden
|
||||
showMessageByNumber(++currentMessageNumber);
|
||||
console.log('next');
|
||||
};
|
||||
const prevMessage = (e) => {
|
||||
e.preventDefault(); // Standardverhalten unterbinden
|
||||
showMessageByNumber(--currentMessageNumber);
|
||||
console.log('prev');
|
||||
};
|
||||
|
||||
const messages = [
|
||||
`<h1>Tutors are on a strike!!!</h1>
|
||||
<h2>All assignmnent are automatically graded with 0 points</h2>
|
||||
<p>Duis pretium ornare odio nec cursus. Nulla quis dolor vitae nulla condimentum maximus nec vitae purus. Curabitur ut mi non nulla molestie porta. Curabitur dignissim lacinia condimentum. In hac habitasse platea dictumst. Mauris ut urna magna. Mauris venenatis eu quam nec posuere. Nulla facilisi. Donec convallis sodales massa, et consequat nunc vehicula malesuada.</p>
|
||||
<p class="newsboard_footer">9/25/2015 by N. O'body</p>`,
|
||||
|
||||
`<h1>Madness!</h1>
|
||||
<h2>How to earn a fortune, with a complete stupid idea</h2>
|
||||
<p>Ut molestie elementum risus, eget rutrum dui tristique id. Duis ac elit a mi convallis lacinia. Sed at ultricies magna. Pellentesque nisl est, mattis eget porta eu, rhoncus in urna. Integer faucibus lectus nec malesuada tempus. Duis consectetur sollicitudin ultricies. Cras massa nulla, aliquet vitae interdum quis, venenatis at quam.</p>
|
||||
<p class="newsboard_footer">08/13/20156 by Dr. Ken Hurt</p>`,
|
||||
|
||||
`<h1>I did something, and you will never guess what happened next...</h1>
|
||||
<h2>Donec tristique, leo at suscipit pellentesque, mauris neque congue leo!</h2>
|
||||
<p>Aenean egestas mauris at neque egestas hendrerit id ut erat. Donec iaculis ornare gravida. Vestibulum condimentum, tortor nec eleifend consectetur, justo lacus dignissim ante, eget commodo enim urna sollicitudin arcu. Odio eu leo pulvinar rutrum sed a turpis. Nunc dui tortor, rutrum vitae gravida quis, hendrerit a massa. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas</p>
|
||||
<p>Integer non venenatis tellus. Phasellus tellus leo, suscipit ac vulputate non, varius nec eros. Etiam scelerisque nisi arcu, interdum tempus dui volutpat vel. Donec eget posuere nulla. Etiam ornare dapibus tortor, ac sollicitudin nisi porta a. Donec tristique, leo at suscipit pellentesque, mauris neque congue leo, sed tempor massa justo a ligula. Curabitur vitae rhoncus lacus, quis varius felis. Ut tincidunt sit amet nisl finibus tempus. Curabitur mollis sit amet leo a sagittis.</p>
|
||||
<p class="newsboard_footer">2015/06/02 by Chris P. Bacon</p>`,
|
||||
];
|
||||
let currentMessageNumber = 1;
|
||||
|
||||
const $ = (qs) => document.querySelector(qs);
|
||||
const $$ = (qs) => Array.from(document.querySelectorAll(qs));
|
||||
|
||||
init();
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<title>Newsboard</title>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="stylesheet" type="text/css" href="assets/css/main.css" />
|
||||
<script src="assets/js/main.js" defer></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="newsboard_wrapper">
|
||||
<div class="newsboard">
|
||||
<span class="message_number">X</span>
|
||||
|
||||
<a href="#" class="close_button" title="Delete message">×</a>
|
||||
|
||||
<div class="newsboard_content"></div>
|
||||
|
||||
<div class="paging_bar">
|
||||
<span class="float_left">
|
||||
<a href="#" title="first">«</a>
|
||||
<a href="http://example.com" title="prev">‹</a>
|
||||
</span>
|
||||
|
||||
<span class="float_right">
|
||||
<a href="http://example.com" title="next">›</a>
|
||||
<a href="#" title="last">»</a>
|
||||
</span>
|
||||
|
||||
<span class="progressbar">
|
||||
<progress max="3" value="1" id="messages_progress"></progress>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user