css: CSS style is now decent (mobile menu still to fix)
git-svn-id: svn+ssh://atelier.inf.usi.ch/home/bevilj/group-1@28 a672b425-5310-4d7a-af5c-997e18724b81
This commit is contained in:
parent
2fa51cd0ca
commit
e6179c1569
9 changed files with 201 additions and 124 deletions
site
|
@ -1,21 +1,19 @@
|
|||
<footer>
|
||||
<div>
|
||||
<div class="head">INFO</div>
|
||||
<div class="child">
|
||||
Author: {{page.author}}<br>
|
||||
<a href="/credits.html">Credits</a> <!-- TODO: talk about link formatting in footer -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="head">What was it again?</div>
|
||||
<div class="child">
|
||||
something<br>
|
||||
something else
|
||||
</div>
|
||||
<div class="footer container">
|
||||
<section class="author">
|
||||
<h3>INFO</h3>
|
||||
<strong>Author:</strong> {{ page.author }}<br>
|
||||
<!-- TODO: talk about link formatting in footer -->
|
||||
<a href="/credits.html">Credits</a>
|
||||
</section>
|
||||
<section>
|
||||
<h3>Other section</h3>
|
||||
<a href="www.malusa.it">Other link</a>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<img src="test"> <!-- TODO: replace with actual image and add metadata attr -->
|
||||
<div class="copyright">
|
||||
<div class="container">
|
||||
<i class="far fa-copyright"></i> Group 1, all rights reserved.
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
|
|
@ -2,11 +2,15 @@
|
|||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<meta name="author" content="{{ page.author }}">
|
||||
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
|
||||
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
|
||||
|
||||
|
||||
<!-- fonts -->
|
||||
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet">
|
||||
|
||||
<link rel="stylesheet" href="{{ "/main.css" | prepend: site.baseurl | prepend: site.url }}">
|
||||
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
|
||||
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.2/css/all.css" integrity="sha384-/rXc/GQVaYpyDdyxK+ecHPVYJSN9bmVFBvjA/9eOB+pb3F2w2N6fc5qB9Ew5yIns" crossorigin="anonymous">
|
||||
</head>
|
||||
|
|
|
@ -1,18 +1,22 @@
|
|||
<header>
|
||||
<span><a href="" class="title">THE SHELL</a></span>
|
||||
<span id="menuDesktop">
|
||||
<a href="">FILE SYSTEM</a>
|
||||
<a href="">BASIC</a>
|
||||
<a href="">INTERMEDIATE</a>
|
||||
<a href="">ADVANCED</a>
|
||||
<a href="">SCRIPTING</a>
|
||||
</span>
|
||||
<section class="desktop grow">
|
||||
<h1 class="title">{{ site.title }}</h1>
|
||||
</section>
|
||||
|
||||
<section class="menu desktop">
|
||||
<a href="">FILE SYSTEM</a>
|
||||
<a href="">BASIC</a>
|
||||
<a href="">INTERMEDIATE</a>
|
||||
<a href="">ADVANCED</a>
|
||||
<a href="">SCRIPTING</a>
|
||||
</section>
|
||||
|
||||
<span id="menuTriggerMobile" onclick="triggerMenu(this)">
|
||||
<div class="strip1"></div>
|
||||
<div class="strip2"></div>
|
||||
<div class="strip3"></div>
|
||||
</span>
|
||||
|
||||
<div id="menuMobile" style="margin-left:-100%;">
|
||||
<a class="menuItem selected" href="">FILE SYSTEM</a>
|
||||
<a class="menuItem" href="">BASIC</a>
|
||||
|
@ -37,4 +41,4 @@
|
|||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</nav>-->
|
||||
</nav>-->
|
||||
|
|
|
@ -1,16 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
{% include head.html %}
|
||||
<body>
|
||||
<header class="header">
|
||||
<section class="head container">
|
||||
<h1 class="title">{{ site.title }}</h1>
|
||||
</section>
|
||||
{% include header.html %}
|
||||
</header>
|
||||
<main class="container">
|
||||
{{ content }}
|
||||
</main>
|
||||
{% include footer.html %}
|
||||
</body>
|
||||
<body>
|
||||
<header class="header">
|
||||
{% include header.html %}
|
||||
</header>
|
||||
<main class="container">
|
||||
{{ content }}
|
||||
</main>
|
||||
{% include footer.html %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,38 +1,39 @@
|
|||
/* Author: Marco Tereh */
|
||||
/* this file only concerns elements which are children of the <footer> */
|
||||
/**
|
||||
* Author: Marco Tereh and Claudio Maggioni
|
||||
* this file only concerns elements which are children of the <footer>
|
||||
*/
|
||||
|
||||
footer{
|
||||
background-color: grey; /* TODO: replace placeholder color and add text color */
|
||||
overflow: auto;
|
||||
text-align: left;
|
||||
}
|
||||
footer {
|
||||
background-color: #333;
|
||||
color: white;
|
||||
|
||||
footer > div {
|
||||
float: left;
|
||||
margin: 10px;
|
||||
width: CALC(33% - 20px);
|
||||
}
|
||||
.footer.container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
footer .head {
|
||||
text-decoration: underline;
|
||||
}
|
||||
section {
|
||||
flex-grow: 1;
|
||||
padding: .5rem;
|
||||
|
||||
footer .child {
|
||||
margin-left: 5px;
|
||||
}
|
||||
h3 {
|
||||
text-transform: uppercase;
|
||||
padding-bottom: .5em;
|
||||
}
|
||||
}
|
||||
|
||||
footer > div:nth-child(2){
|
||||
text-align: center;
|
||||
|
||||
.child{
|
||||
text-align: left;
|
||||
width: fit-content;
|
||||
margin: auto;
|
||||
.copyright {
|
||||
background: #111;
|
||||
width: 100%;
|
||||
|
||||
.container {
|
||||
padding-top: 1em;
|
||||
padding-bottom: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
section.author {
|
||||
width: 30%;
|
||||
}
|
||||
}
|
||||
|
||||
footer div img {
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
margin-left: CALC(100% - 50px);
|
||||
}
|
73
site/_sass/_global.scss
Normal file
73
site/_sass/_global.scss
Normal file
|
@ -0,0 +1,73 @@
|
|||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Lato", sans-serif;
|
||||
font-size: 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
main {
|
||||
text-align: justify;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 1000px;
|
||||
width: calc(100% - 6em);
|
||||
margin: auto;
|
||||
padding-top: 2em;
|
||||
padding-bottom: 2em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #6a6;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
background: white;
|
||||
}
|
||||
|
||||
main {
|
||||
pre, section, p {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
td.code pre, pre.lineno {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
pre {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
pre, code {
|
||||
font-family: "Source Code Pro", monospace;
|
||||
}
|
||||
|
||||
pre code {
|
||||
overflow-wrap: normal;
|
||||
white-space: pre;
|
||||
}
|
||||
}
|
||||
|
||||
.rouge-table {
|
||||
.gutter.gl {
|
||||
border-right: 1px solid #555;
|
||||
text-align: left;
|
||||
padding-right: .5em;
|
||||
}
|
||||
|
||||
.code {
|
||||
padding-left: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
ul, dl, ol {
|
||||
margin-left: 2em;
|
||||
}
|
|
@ -1,36 +1,21 @@
|
|||
/*------- GLOBAL ------*/
|
||||
|
||||
*{
|
||||
margin:0;
|
||||
padding:0;
|
||||
z-index:0;
|
||||
header {
|
||||
color: white;
|
||||
background-color: #000;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
section.grow {
|
||||
flex-grow: 1;
|
||||
}
|
||||
}
|
||||
|
||||
body{
|
||||
font-size:16px;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
a{
|
||||
display:inline-block;
|
||||
text-decoration:none;
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
header{
|
||||
background-color:#000;
|
||||
}
|
||||
|
||||
span{
|
||||
display:inline-block;
|
||||
}
|
||||
|
||||
/* ------ HEADER -----*/
|
||||
|
||||
.title{
|
||||
color:green;
|
||||
padding: 20px 55px 20px 0;
|
||||
}
|
||||
header .title {
|
||||
padding: 1em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
/*------- MENU ------*/
|
||||
|
||||
|
@ -42,34 +27,34 @@ span{
|
|||
display:none;
|
||||
}
|
||||
|
||||
#menuDesktop{
|
||||
float:right;
|
||||
text-align:right;
|
||||
padding:20px;
|
||||
font-size:2vh;
|
||||
}
|
||||
header .menu.desktop {
|
||||
background: #333;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.menuItem{
|
||||
padding:10px 20px;
|
||||
background-color:#000;
|
||||
transition:500ms;
|
||||
}
|
||||
a {
|
||||
text-decoration: none;
|
||||
text-transform: uppercase;
|
||||
font-weight: bold;
|
||||
line-height: 100%;
|
||||
font-size: 1.15em;
|
||||
padding: 0 1em;
|
||||
}
|
||||
|
||||
.menuItem:hover{
|
||||
background-color:#d2cfcf;
|
||||
color:#000;
|
||||
}
|
||||
|
||||
#menuDesktop .menuItem:hover{
|
||||
transform:translateY(10px);
|
||||
-webkit-transform:translateY(10px);
|
||||
}
|
||||
a:hover {
|
||||
color: #8e8;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: #6a6;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 800px) {
|
||||
|
||||
#menuDesktop{
|
||||
display:none;
|
||||
header .desktop, header .main.desktop {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#menuTriggerMobile{
|
||||
|
@ -117,4 +102,4 @@ span{
|
|||
transition:500ms;
|
||||
font-size:4.5vh;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
layout: main
|
||||
author: Claudio Maggioni
|
||||
---
|
||||
|
||||
<section>
|
||||
|
@ -8,7 +9,20 @@ layout: main
|
|||
<p>The ls command is used to list files</p>
|
||||
|
||||
<ul>
|
||||
<li>Item 1</li>
|
||||
<li>Item 2</li>
|
||||
<li>Hello</li>
|
||||
</ul>
|
||||
|
||||
{% highlight ruby linenos %}
|
||||
def show
|
||||
puts "Outputting a very lo-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-ong lo-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-ong line"
|
||||
@widget = Widget(params[:id])
|
||||
respond_to do |format|
|
||||
format.html # show.html.erb
|
||||
format.json { render json: @widget }
|
||||
end
|
||||
end
|
||||
{% endhighlight %}
|
||||
|
||||
</section>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
---
|
||||
@import "global";
|
||||
@import "header";
|
||||
@import "footer";
|
||||
@import "syntax-highlighting";
|
||||
|
|
Loading…
Reference in a new issue