Skip to content
This repository was archived by the owner on Dec 23, 2021. It is now read-only.

Commit b1ff337

Browse files
committed
footer -> element with inline css
1 parent de462a3 commit b1ff337

5 files changed

Lines changed: 79 additions & 105 deletions

File tree

client/js/components/auth/user-panel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ module.exports = function (state, emit) {
8888
Signed in as <b>${state.township.profile.username}</b>
8989
</div>
9090
</div>
91-
<ul>
91+
<ul class="list">
9292
<li><a href="/${state.township.username}" data-no-routing>View Profile</a></li>
9393
<li><a href="/profile/edit" data-no-routing>Edit Profile</a></li>
9494
<li><a href="http://github.com/datproject/datproject.org/issues" target="_blank" class="color-neutral-50 hover-color-neutral-70">Report Bug</a></li>

client/js/elements/footer/index.js

Lines changed: 68 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,80 @@
1-
var html = require('choo/html')
1+
const html = require('choo/html')
2+
const css = require('sheetify')
3+
4+
module.exports = function () {
5+
const rule = css`
6+
:host {
7+
&:after {
8+
content: '';
9+
display: block;
10+
width: 2rem;
11+
height: 4px;
12+
background-color: var(--color-neutral-70);
13+
margin-top: .75rem;
14+
margin-bottom: 1.5rem;
15+
}
16+
}
17+
`
18+
19+
const datList = css`
20+
:host {
21+
text-indent: -20px;
22+
margin-left: -20px;
23+
}
24+
25+
:host li:before {
26+
content: '';
27+
display: inline-block;
28+
position: relative;
29+
top: -0.125rem;
30+
width: .5rem;
31+
height: .5rem;
32+
margin-right: .75rem;
33+
background-image: url(/public/img/dat-hexagon.svg);
34+
background-size: 100%;
35+
background-repeat: no-repeat;
36+
}
37+
`
238

3-
module.exports = function (state, emit) {
439
return html`
5-
<footer class="footer">
6-
<div class="container">
7-
<div class="row">
8-
<div class="col-xs-6 col-sm-4">
9-
<h4 class="footer-heading horizontal-rule-footer">Explore</h4>
10-
<ul class="footer-nav-list">
11-
<li><a href="/explore" data-no-routing>Explore Datasets</a></li>
12-
<li><a href="/team">Team</a></li>
13-
<li><a href="https://blog.datproject.org">Blog</a></li>
40+
<footer class="bg-neutral white">
41+
<section class="pa2 ph4-m mw8-ns center-ns">
42+
<div class="pt2 cf">
43+
<div class="fl w-third">
44+
<h4 class="f4 ${rule}">Explore</h4>
45+
<ul class="${datList} p0 list lh-copy">
46+
${liLink('/explore', 'Explore Datasets')}
47+
${liLink('https://blog.datproject.org', 'Dat Blog')}
1448
</ul>
1549
</div>
16-
<div class="col-xs-6 col-sm-4">
17-
<h4 class="footer-heading horizontal-rule-footer">Learn</h4>
18-
<ul class="footer-nav-list">
19-
<li><a href="/about">About</a></li>
20-
<li><a href="http://docs.datproject.org">Docs</a></li>
50+
<div class="fl w-third">
51+
<h4 class="f4 ${rule}">Learn</h4>
52+
<ul class="${datList} p0 list lh-copy">
53+
${liLink('/about', 'About Dat')}
54+
${liLink('http://docs.datproject.org', 'Docs')}
2155
</ul>
2256
</div>
23-
<div class="col-xs-6 col-sm-4">
24-
<h4 class="footer-heading horizontal-rule-footer">Connect</h4>
25-
<ul class="footer-nav-list">
26-
<li><a href="https://twitter.com/dat_project">Twitter</a></li>
27-
<li><a href="https://github.com/datproject">GitHub</a></li>
28-
<li>
29-
<a href="https://tinyletter.com/datdata" target="_blank">Newsletter </a>
30-
</li>
31-
<li><a href="https://www.stickermule.com/en/marketplace/9709-dat-data-v3">Get Stickers</a></li>
57+
<div class="fl w-third">
58+
<h4 class="f4 ${rule}">Connect</h4>
59+
<ul class="${datList} list p0 lh-copy">
60+
${liLink('https://twitter.com/dat_project', 'Twitter')}
61+
${liLink('https://github.com/datproject', 'Github')}
62+
${liLink('https://www.stickermule.com/en/marketplace/9709-dat-data-v3', 'Get Stickers')}
3263
</ul>
3364
</div>
3465
</div>
35-
<p class="footer-credits">
36-
<strong>Dat</strong> 2017 • Page source on <a href="https://github.com/datproject/datproject.org">github</a>
66+
<p class="bt b--dat-neutral-80 color-neutral-50 tc f7 pv3">
67+
<strong>Dat</strong> 2017 • Page source on <a class="color-neutral-50 hover-color-pink" href="https://github.com/datproject/datproject.org">github</a>
3768
</p>
38-
</div>
69+
</section>
3970
</footer>
4071
`
41-
}
72+
73+
function liLink (url, text) {
74+
return html`
75+
<li>
76+
<a class="f5 fw6 link color-neutral-20 hover-color-pink" href="${url}">${text}</a>
77+
</li>
78+
`
79+
}
80+
}

client/scss/app.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
@import "imports/sections";
2222
@import "imports/horizontal-rule";
2323
@import "imports/block-create";
24-
@import "imports/footer";
2524
@import "imports/status-bar";
2625
@import "imports/file-system";
2726
@import "imports/buttons";
@@ -45,10 +44,11 @@ pre {
4544
box-shadow: inset 0 1px 3px rgba(0,0,0,.5);
4645
}
4746

48-
ul {
49-
list-style: initial;
50-
padding-left: 1rem;
51-
}
47+
// Comment out for footer, does it break anything else
48+
// ul {
49+
// list-style: initial;
50+
// padding-left: 1rem;
51+
// }
5252

5353
.content-title {
5454
font-size: 2rem;

client/scss/imports/_base.scss

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,11 @@ a {
4747
}
4848
}
4949

50-
ul,
51-
li {
52-
@include list-plain;
53-
}
50+
// Comment out for footer, does it break anything else
51+
// ul,
52+
// li {
53+
// @include list-plain;
54+
// }
5455

5556
svg {
5657
fill: currentColor;

client/scss/imports/_footer.scss

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)