Skip to content

Commit 6e25abf

Browse files
committed
optimize for desktop, add images folder w/ README
1 parent 424c1ef commit 6e25abf

18 files changed

+175
-53
lines changed

docusaurus.config.js

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,7 @@ const config = {
1616
organizationName: '0xHabitat', // Usually your GitHub org/user name.
1717
projectName: 'docs', // Usually your repo name.
1818

19-
/** SEARCHBAR DEPRECATED */
20-
// plugins: [
21-
// [
22-
// require.resolve("@cmfcmf/docusaurus-search-local"),
23-
// {
24-
// indexDocs: true,
25-
// indexBlog: false,
26-
// indexPages: false,
27-
// language: "en",
28-
// style: undefined,
29-
// },
30-
// ],
31-
// ],
32-
// plugins: [
33-
// [
34-
// '@docusaurus/plugin-ideal-image',
35-
// {
36-
// // quality: 70,
37-
// // max: 1030, // max resized image's size.
38-
// // min: 640, // min resized image's size. if original is lower, use that size.
39-
// // steps: 2, // the max number of images generated between min and max (inclusive)
40-
// disableInDev: false,
41-
// },
42-
// ],
43-
// ],
19+
// TODO: Integrate Algolia search - https://docusaurus.io/docs/search
4420

4521
presets: [
4622
[
@@ -68,6 +44,9 @@ const config = {
6844
themeConfig:
6945
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
7046
({
47+
metadata: [{
48+
name: 'habitat, 0xhabitat, crypto, blockchain, dao, daos, communities, governance, govern, voting, vote, votes, ethereum, eth, optimism, rollup, diamond, diamonds, diamond standard, modules, library, facets, facet, code, solidity, contract, contracts, smart contracts, smart contract, evm, nft, token, tokens, economics',
49+
content: 'docs, documentation, documents, homepage, home, index, community, main, mainpage, blog, discord, github, twitter, blog, substack, sourcecode, code, roadmap, info'}],
7150
colorMode: {
7251
defaultMode: 'light',
7352
disableSwitch: false,
@@ -103,7 +82,7 @@ const config = {
10382
className: 'navbar_item',
10483
},
10584
{
106-
to: 'blog',
85+
to: 'https://0xhabitat.substack.com/',
10786
label: 'Blog',
10887
position: 'left',
10988
className: 'navbar_item',

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"write-heading-ids": "docusaurus write-heading-ids"
1515
},
1616
"dependencies": {
17-
"@cmfcmf/docusaurus-search-local": "^0.10.0",
1817
"@docusaurus/core": "2.0.0-beta.9",
1918
"@docusaurus/plugin-ideal-image": "^2.0.0-beta.15",
2019
"@docusaurus/preset-classic": "2.0.0-beta.9",

src/css/custom.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ div[class*="toggleTrackThumb"] {
168168
background-size: contain;
169169
}
170170

171-
172171
/* Background animation */
173172
@keyframes loop {
174173
0% {

src/pages/components/Shapes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default function useCurrentWidth() {
3333
}, [])
3434

3535
let scaleMode;
36-
if (width > 996) {
36+
if (width > 995.99) {
3737
scaleMode = "none"
3838
} else if (width < 996) {
3939
scaleMode = "xMidYMid slice"

src/pages/index.module.css

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,50 @@
6161
}
6262
@media screen and (min-width: 1500px) {
6363
.landing {
64-
--height_about: 38em;
64+
--height_about: 42em;
6565
--height_token: 35em;
6666
--height_diamond: 45em;
6767
--height_roadmap: 30em;
68-
--height_info: 55em;
68+
--height_info: 57em;
69+
}
70+
p {
71+
font-size: 1.25em;
72+
}
73+
h1 {
74+
font-size: 2em;
75+
}
76+
h2 {
77+
font-size: 1.75em;
78+
}
79+
h3 {
80+
font-size: 1.5em;
81+
}
82+
h4 {
83+
font-size: 1.25em;
6984
}
7085
}
7186
@media screen and (min-width: 2000px) {
7287
.landing {
73-
--height_about: 38em;
88+
--height_about: 44em;
7489
--height_token: 35em;
75-
--height_diamond: 45em;
90+
--height_diamond: 48em;
7691
--height_roadmap: 30em;
77-
--height_info: 50em;
92+
--height_info: 62em;
93+
}
94+
p {
95+
font-size: 1.5em;
96+
}
97+
h1 {
98+
font-size: 2.25em;
99+
}
100+
h2 {
101+
font-size: 2em;
102+
}
103+
h3 {
104+
font-size: 1.75em;
105+
}
106+
h4 {
107+
font-size: 1.5em;
78108
}
79109
}
80110
.background_wrapper {

src/pages/sections/AboutSection.css

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,50 @@
88
#about_container {
99
display: flex;
1010
flex-wrap: wrap;
11+
gap: 2em;
1112
justify-content: center;
1213
align-items: center;
1314
margin: auto;
15+
max-width: 120em;
1416
}
1517
#about_content {
1618
max-width: 40em;
1719
min-width: 16em;
1820
flex: 1 1 0;
19-
margin-right: 2em;
21+
margin: auto;
2022
}
21-
#about_img {
23+
@media screen and (min-width: 1500px) {
24+
#about_content {
25+
max-width: 48em !important;
26+
}
27+
#about_image {
28+
max-width: 40em !important;
29+
}
30+
}
31+
@media screen and (min-width: 2000px) {
32+
#about_content {
33+
max-width: 55em !important;
34+
}
35+
#about_image {
36+
max-width: 40em !important;
37+
}
38+
}
39+
#about_image {
40+
display: flex;
41+
justify-content: center;
42+
align-items: center;
2243
margin: auto;
2344
min-width: 20em;
2445
max-width: 30em;
25-
min-height:10em;
2646
flex: 1 1 0;
47+
}
48+
#about_img {
49+
border: 3px orange solid;
50+
/* margin: auto;
51+
min-width: 20em;
52+
max-width: 30em; */
53+
/* min-height:10em; */
54+
55+
margin: auto;
56+
/* flex: 1 1 0; */
2757
}

src/pages/sections/AboutSection.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ export default function AboutSection() {
2222
<p>Start your community on Habitat and enjoy the scaling benefits of optimistic rollups on Ethereum. Rollups can extend the DAO space by enabling more organisation features and trustless execution of voting results. New modules and features are built and maintained by the Habitat DAO and its contributors making them free to use for every community.</p>
2323
</div>
2424
</div>
25-
<DAO className={clsx('about_img', styles.svg_img)}/>
25+
<div id='about_image'>
26+
<DAO className={clsx('about_img', styles.svg_img)}/>
27+
</div>
2628
</div>
2729
</div>
2830
</div>

src/pages/sections/CoverSection.css

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,32 @@
2222
color: #fff;
2323
text-shadow: 1px 1px 8px #000;
2424
margin: 0;
25-
line-height: 1.1em;
2625
}
2726
.cover_title {
2827
font-size: 3em;
28+
line-height: 1.1em;
2929
}
3030
.cover_subtitle {
3131
font-size: 1.5em;
32+
line-height: 1.1em;
33+
}
34+
@media screen and (min-width: 1500px) {
35+
.cover_title {
36+
font-size: 4em !important;
37+
line-height: 1.1em !important;
38+
}
39+
.cover_subtitle {
40+
font-size: 2em !important;
41+
line-height: 1.1em !important;
42+
}
43+
}
44+
@media screen and (min-width: 2000px) {
45+
.cover_title {
46+
font-size: 5em !important;
47+
line-height: 1.1em !important;
48+
}
49+
.cover_subtitle {
50+
font-size: 2.5em !important;
51+
line-height: 1.1em !important;
52+
}
3253
}

src/pages/sections/DiamondSection.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,9 @@
133133
margin-top: -5em;
134134
font-size: x-small;
135135
}
136+
}
137+
@media screen and (min-width: 1500px) {
138+
#diamond_container {
139+
max-width: 100em !important;
140+
}
136141
}

src/pages/sections/DiamondSection.js

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,21 @@ function DiamondSection() {
3030

3131

3232
useEffect(() => {
33-
let anim = Lottie.loadAnimation({
34-
container: el.current,
35-
renderer: 'svg',
36-
loop: false,
37-
autoplay: false,
38-
path: '/img/diamond-animation.json',
39-
rendererSettings: {
40-
preserveAspectRatio: 'xMidYMid slice',
41-
hideOnTransparent: true
42-
}
43-
})
33+
let anim;
34+
if (!anim) {
35+
anim = Lottie.loadAnimation({
36+
container: el.current,
37+
renderer: 'svg',
38+
loop: false,
39+
autoplay: false,
40+
path: '/img/diamond-animation.json',
41+
rendererSettings: {
42+
preserveAspectRatio: 'xMidYMid slice',
43+
hideOnTransparent: true
44+
}
45+
})
46+
}
47+
anim.setSpeed(1.1)
4448
const loop = () => {
4549
anim.playSegments([101, 271], true);
4650
}

0 commit comments

Comments
 (0)