Skip to content

Commit ea3404b

Browse files
authored
Merge pull request #4 from obsidian-rs/feature/home
feat: add logo
2 parents 8d08873 + a1f9071 commit ea3404b

File tree

4 files changed

+29
-2
lines changed

4 files changed

+29
-2
lines changed

src/css/custom.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,12 @@
2323
margin: 0 calc(-1 * var(--ifm-pre-padding));
2424
padding: 0 var(--ifm-pre-padding);
2525
}
26+
27+
.logo {
28+
width: 600px;
29+
}
30+
31+
.title {
32+
margin-top: 40px;
33+
font-size: 48px;
34+
}

src/pages/index.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import React from 'react';
22
import classnames from 'classnames';
33
import Layout from '@theme/Layout';
4+
import useTheme from '@theme/hooks/useTheme';
45
import Link from '@docusaurus/Link';
56
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
67
import useBaseUrl from '@docusaurus/useBaseUrl';
8+
9+
import '../css/custom.css';
710
import styles from './styles.module.css';
811

912
const features = [
@@ -55,14 +58,18 @@ function Feature({imageUrl, title, description}) {
5558

5659
function Home() {
5760
const context = useDocusaurusContext();
61+
const theme = useTheme();
62+
console.log('theme: ', theme);
5863
const {siteConfig = {}} = context;
64+
5965
return (
6066
<Layout
6167
title={`${siteConfig.title} Web Framework`}
6268
description="Ergonomic way of building web.">
63-
<header className={classnames('hero hero--primary', styles.heroBanner)}>
69+
<header className={classnames(styles.heroBanner)}>
6470
<div className="container">
65-
<h1 className="hero__title">{siteConfig.title}</h1>
71+
<img className="logo" src={useBaseUrl('img/obsidian.svg')} />
72+
<h1 className={classnames("hero__title title")}>{siteConfig.title}</h1>
6673
<p className="hero__subtitle">{siteConfig.tagline}</p>
6774
<div className={styles.buttons}>
6875
<Link

src/pages/styles.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,4 @@
3333
height: 200px;
3434
width: 200px;
3535
}
36+

static/img/obsidian.svg

Lines changed: 10 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)