Skip to content

Commit

Permalink
Intro mais explicativa
Browse files Browse the repository at this point in the history
Links pros posts vão direto a janela do conteúdo
  • Loading branch information
Ariel Santos committed Jan 16, 2018
1 parent 5edfecb commit eeb6b26
Show file tree
Hide file tree
Showing 17 changed files with 312 additions and 285 deletions.
8 changes: 3 additions & 5 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ sass:
sass_dir: _sass

# Markdown
markdown: kramdown
kramdown:
input: GFM
syntax_highlighter_opts:
disable : true
# markdown: kramdown
# highlighter: rouge
# excerpt_separator: "\n\n"
18 changes: 10 additions & 8 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
<div class="wrapper window">
<div class="window" id="wrapper">
<div class="window_title">
<img src="{{ "/assets/img/mycomputer.png" | relative_url }}" />
{% if page.tag %}
Expand All @@ -42,29 +42,31 @@ <h1>{{ site.title }}</h1>
</li>
</ul>
</div>
{% if page.intro %} <!-- If at root, rendering index.md -->
<div class="intro">
{{ content }}
</div>
{% else %}
<div class="post_list">
{% unless page.date %}
{% if page.title == '404...' %}
<ul>
{% for post in site.posts %}
<li><a href="{{ post.url | relative_url }}" title="{{ post.title }}"><img src="{{ "/assets/img/file.ico" | relative_url }}" title="{{ post.title }}" />{{ post.title }}</a></li>
<li><a href="{{ post.url | relative_url }}#content" title="{{ post.title }}"><img src="{{ "/assets/img/file.ico" | relative_url }}" title="{{ post.title }}" />{{ post.title }}</a></li>
{% endfor %}
</ul>
{% elsif page.intro %} <!-- If at root, rendering index.md -->
<div class="intro">
{{ content }}
</div>
{% else %} <!-- If page is showing a tag -->
{{ content }}
{% endif %}
{% else %} <!-- If page is showing a post -->
<ul>
{% for post in site.posts %}
<li><a href="{{ post.url | relative_url }}" title="{{ post.title }}"><img src="{{ "/assets/img/file.ico" | relative_url }}" title="{{ post.title }}" />{{ post.title }}</a></li>
<li><a href="{{ post.url | relative_url }}#content" title="{{ post.title }}"><img src="{{ "/assets/img/file.ico" | relative_url }}" title="{{ post.title }}" />{{ post.title }}</a></li>
{% endfor %}
</ul>
{% endunless %}
</div>
{% endif %}
<div class="post_total">
{% if page.tag %}
<div class="left">{{ site.tags[page.tag] | size }} post(s)</div>
Expand All @@ -75,7 +77,7 @@ <h1>{{ site.title }}</h1>
</div>
</div>
{% if page.title %}
<div class="content window">
<div class="window" id="content">
<div class="window_title">
<img src="{{ "/assets/img/file.png" | relative_url }}" />
<h1>{{ page.title }}</h1>
Expand Down
2 changes: 1 addition & 1 deletion _layouts/tag.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<ul>
{% for post in site.tags[page.tag] %}
<li>
<a href="{{ post.url | relative_url }}" title="{{ post.title }}">
<a href="{{ post.url | relative_url }}#content" title="{{ post.title }}">
<img src="{{ "/assets/img/file.ico" | relative_url }}" title="{{ post.title }}" />{{ post.title }}</a>
</li>
{% endfor %}
Expand Down
64 changes: 38 additions & 26 deletions _sass/_postlist.scss
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
.post_list {
width: 70.2%;
margin: 0 auto;
min-height: 150px;
max-height: 150px;
min-height: $windowHeight;
max-height: $windowHeight;
overflow-y: scroll;
display: inline-block;
ul {
list-style: none;
li {
display: inline-block;
margin: 10px;
max-width: 16ch;
max-width: 12em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
Expand All @@ -28,28 +28,39 @@
}
}

.post_list>.intro {
margin: 4px 2px 2px 2px;
.intro {
width: 70%;
margin: 0 auto;
padding-left: 4px;
min-height: $windowHeight;
max-height: $windowHeight;

overflow-y: scroll;
overflow-wrap: break-word;
overflow-x: hidden;
white-space: pre-wrap;

display: inline-block;

a {
color: #0000ff;
}
h1 {
font-size: 20px;
font-weight: 700;
margin: 5px 0 5px 0;
margin: 12px 0 8px 0;
}
h2 {
font-size: 18px;
font-weight: 700;
margin: 25px 0 5px 0;
margin: 12px 0 6px 0;
}
em {
font-style: italic;
}
blockquote {
padding: 0 0 0 15px;
margin: 15px 5px;
margin: 5px 5px;
border-left: 8px solid #000000;
}
strong {
Expand All @@ -60,37 +71,38 @@
border-left: 0;
}
ul {
margin: 0 0 15px 30px;
list-style: square;
margin: 0 0 10px 15px;
li {
padding: 5px;
white-space: normal;
text-align: left;
margin: 3px 0;
ul {
margin: 10px 0 0 15px;
li {
padding: 5px;
}
}
}
}
ol {
list-style: decimal-leading-zero;
margin: 0 0 15px 30px;
// list-style: decimal-leading-zero;
// margin: 0 0 15px 30px;
li {
padding: 5px;
// padding: 5px;
ul {
margin: 10px 0 0 15px;
// margin: 10px 0 0 15px;
li {
padding: 5px;
// padding: 5px;
}
}
}
}
table,
th,
td {
border: 1px solid #222222;
padding: 2px;
}
pre {
margin-bottom: 15px;
}
// table,
// th,
// td {
// // border: 1px solid #222222;
// // padding: 2px;
// }
// pre {
// // margin-bottom: 15px;
// }
}
2 changes: 2 additions & 0 deletions _sass/_variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
$windowHeight: 300px;
$contentHeight: 96vh;
98 changes: 97 additions & 1 deletion _sass/_window.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,103 @@
}
}

.content>.window_title {
#wrapper,
#content {
width: 800px;
margin: auto;
margin-top: 20px;
background: #bfb8bf;
border: 2px solid;
border-color: #fff8ff #000000 #000000 #fff8ff;
padding: 2px 0;
}

#content {
max-height: $contentHeight;
min-height: $contentHeight;
display: flex;
flex-direction: column;
margin-bottom: 2vh;
}

#content>.post_content {
flex-grow: 1;
width: 98.5%;
padding: 2px;
margin: 0 auto;
overflow-y: scroll;
overflow-x: hidden;
p {
line-height: 150%;
margin-bottom: 15px;
}
a {
color: #0000ff;
margin-bottom: 15px;
}
h1 {
font-size: 20px;
font-weight: 700;
margin: 50px 0 10px 0;
}
h2 {
font-size: 18px;
font-weight: 700;
margin: 25px 0 5px 0;
}
em {
font-style: italic;
}
blockquote {
padding: 0 0 0 15px;
margin: 15px 5px;
border-left: 8px solid #000000;
}
strong {
font-weight: 700;
}
hr {
border-top: 3px solid #333333;
border-left: 0;
}
ul {
list-style: square;
margin: 0 0 15px 30px;
li {
padding: 5px;
ul {
margin: 10px 0 0 15px;
li {
padding: 5px;
}
}
}
}
ol {
list-style: decimal-leading-zero;
margin: 0 0 15px 30px;
li {
padding: 5px;
ul {
margin: 10px 0 0 15px;
li {
padding: 5px;
}
}
}
}
table,
th,
td {
border: 1px solid #222222;
padding: 2px;
}
pre {
margin-bottom: 15px;
}
}

#content>.window_title {
h1 {
display: inline-block;
}
Expand Down
Loading

0 comments on commit eeb6b26

Please sign in to comment.