Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
www.hackthewater.co.za
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hackthewater
www.hackthewater.co.za
Commits
28180b9e
Commit
28180b9e
authored
Jan 21, 2018
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add sidebar
parent
2bcefc03
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
173 additions
and
15 deletions
+173
-15
index.html
layouts/index.html
+19
-15
sidebar.html
layouts/partials/sidebar.html
+15
-0
sidebarjs.html
layouts/partials/sidebarjs.html
+12
-0
htw.css
static/css/htw.css
+127
-0
No files found.
layouts/index.html
View file @
28180b9e
...
@@ -4,25 +4,29 @@
...
@@ -4,25 +4,29 @@
{{ partial "header" . }}
{{ partial "header" . }}
{{ partial "cpt" . }}
{{ partial "cpt" . }}
<main
id=
"site-main"
class=
"site-main outer"
role=
"main"
>
<main
class=
"site-main outer"
role=
"main"
>
<div
class=
"inner"
>
<div
id=
"site-main"
class=
"inner"
>
<div
class=
"post-feed"
>
<div
id=
"sidebar"
>
{{ partial "post-list" . }}
{{ partial "sidebar" . }}
</div>
</div>
<div
id=
"main-content"
class=
"post-feed"
>
{{ partial "post-list" . }}
</div>
<nav
class=
"pagination"
role=
"navigation"
>
<nav
id=
"pagination"
class=
"pagination"
role=
"navigation"
>
{{if .Paginator.HasPrev}}
{{if .Paginator.HasPrev}}
<a
class=
"newer-posts"
href=
"{{ .Paginator.Prev.URL }}"
>
←
<span
class=
"hide"
>
Next Posts
</span></a>
<a
class=
"newer-posts"
href=
"{{ .Paginator.Prev.URL }}"
>
←
<span
class=
"hide"
>
Next Posts
</span></a>
{{end}}
{{end}}
<span
class=
"page-number"
><span
class=
"hide"
>
Page {{ .Paginator.PageNumber }} of {{.Paginator.TotalPages}}
</span>
</span>
<span
class=
"page-number"
><span
class=
"hide"
>
Page {{ .Paginator.PageNumber }} of {{.Paginator.TotalPages}}
</span>
</span>
{{if .Paginator.HasNext}}
{{if .Paginator.HasNext}}
<a
class=
"older-posts"
href=
"{{ .Paginator.Next.URL }}"
><span
class=
"hide"
>
Previous Posts
</span>
→
</a>
<a
class=
"older-posts"
href=
"{{ .Paginator.Next.URL }}"
><span
class=
"hide"
>
Previous Posts
</span>
→
</a>
{{end}}
{{end}}
</nav>
</nav>
</div>
</div>
</main>
</main>
{{ partial "footer" . }}
{{ partial "footer" . }}
</div>
{{ partial "js" . }}
</div>
{{ partial "js" . }}
{{ partial "cptjs" . }}
{{ partial "cptjs" . }}
{{ partial "sidebarjs" . }}
</body></html>
</body></html>
layouts/partials/sidebar.html
0 → 100644
View file @
28180b9e
<div
class=
"side-content"
>
<h3>
Tags:
</h3>
{{ range $name, $taxonomy := .Site.Taxonomies.tags }}
{{ $currentTagCount := len $taxonomy.Pages }}
<div
class=
"sidelink"
><a
class=
"shadow"
href=
"/tags/{{ $name | urlize }}"
>
{{ $name }} ({{$currentTagCount}})
</a></div>
{{ end }}
<h3>
Categories:
</h3>
{{ range $name, $taxonomy := .Site.Taxonomies.categories }}
{{ $currentCatCount := len $taxonomy.Pages }}
<div
class=
"sidelink"
><a
class=
"shadow"
href=
"/tags/{{ $name | urlize }}"
>
{{ $name }} ({{$currentCatCount}})
</a></div>
{{ end }}
</div>
<div
id=
"side-button"
onClick=
"toggleSidebar();"
>
<div
class=
"bar-button"
></div>
</div>
layouts/partials/sidebarjs.html
0 → 100644
View file @
28180b9e
<script
language=
"javascript"
>
function
toggleSidebar
()
{
var
widthpad
=
parseInt
(
$
(
"#sidebar"
).
css
(
"padding-left"
))
+
parseInt
(
$
(
"#sidebar"
).
css
(
"padding-right"
));
if
(
parseInt
(
$
(
"#sidebar"
).
css
(
"width"
))
==
widthpad
)
{
$
(
"#sidebar"
).
css
(
"width"
,
"100%"
);
}
else
{
$
(
"#sidebar"
).
css
(
"width"
,
"0px"
);
}
}
</script>
static/css/htw.css
View file @
28180b9e
...
@@ -14,6 +14,128 @@
...
@@ -14,6 +14,128 @@
color
:
red
;
color
:
red
;
}
}
#sidebar
{
min-width
:
250px
;
z-index
:
1000
;
margin-top
:
-70px
;
margin-left
:
20px
;
padding-bottom
:
40px
;
text-align
:
center
;
}
#side-button
{
display
:
none
;
}
.side-content
{
padding-top
:
10px
;
height
:
100%
;
background-color
:
white
;
border-radius
:
5px
;
background-size
:
cover
;
box-shadow
:
8px
14px
38px
rgba
(
39
,
44
,
49
,
.06
),
1px
3px
8px
rgba
(
39
,
44
,
49
,
.03
);
background
:
#fff
50%
;
transition
:
all
.5s
ease
;
}
.sidelink
{
padding
:
1px
;
border
:
1px
solid
grey
;
margin-top
:
3px
;
margin-left
:
10px
;
margin-right
:
10px
;
border-radius
:
7px
;
background-size
:
cover
;
background-color
:
white
;
box-shadow
:
8px
14px
38px
rgba
(
39
,
44
,
49
,
.06
),
1px
3px
8px
rgba
(
39
,
44
,
49
,
.03
);
background
:
#fff
80%
;
}
.sidelink
a
{
text-decoration
:
none
;
color
:
grey
;
}
.sidelink
:hover
{
box-shadow
:
0px
0px
0px
rgba
(
39
,
44
,
49
,
.06
),
0px
0px
0px
rgba
(
39
,
44
,
49
,
.03
);
background
:
#fff
0%
;
background-color
:
#e8e8e8
;
}
.inner
{
max-width
:
1400px
;
}
@media
(
min-width
:
1005px
)
{
#sidebar
{
grid-area
:
sidebar
;
}
#site-main
{
display
:
grid
;
grid-template-areas
:
"content sidebar"
"navigation navigation"
;
}
#main-content
{
grid-area
:
content
;
}
#pagination
{
grid-area
:
navigation
;
}
}
@media
(
max-width
:
1005px
)
{
#side-button
{
position
:
fixed
;
top
:
10px
;
right
:
10px
;
display
:
block
;
z-index
:
2000
;
border
:
1px
solid
grey
;
padding
:
2px
;
background-color
:
white
;
border-radius
:
5px
;
}
.bar-button
{
border-bottom
:
18px
double
grey
;
border-top
:
6px
solid
grey
;
content
:
""
;
height
:
30px
;
width
:
40px
;
}
#sidebar
{
position
:
fixed
;
display
:
block
;
margin-left
:
5px
;
bottom
:
-33px
;
top
:
5px
;
right
:
0px
;
z-index
:
1000
;
overflow-x
:
hidden
;
margin-top
:
0px
;
width
:
0
;
min-width
:
0
;
transition
:
.5s
;
padding-left
:
5px
;
padding-right
:
5px
;
}
}
@media
(
max-width
:
1005px
)
and
(
min-width
:
901px
)
{
.post-feed
{
margin-top
:
-40px
!important
;
}
}
@media
(
max-width
:
900px
)
{
@media
(
max-width
:
900px
)
{
#capetown
{
#capetown
{
...
@@ -35,5 +157,10 @@
...
@@ -35,5 +157,10 @@
.cpthead
{
.cpthead
{
float
:
left
;
float
:
left
;
}
}
}
@media
(
max-width
:
650px
){
.post-feed
{
padding-top
:
10vw
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment