Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add home page structure to Help Site #10117

Merged
merged 26 commits into from
Aug 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
177e074
add html structure for home page
marcochavezf Jul 16, 2022
a7c26ca
add icons
marcochavezf Jul 16, 2022
3a966d2
add icons to home page and change color
marcochavezf Jul 16, 2022
eea4fbf
add styles to homepage
marcochavezf Jul 16, 2022
fa4f9e6
restructure html in homepage
marcochavezf Jul 16, 2022
f935943
set color and border styles to cards in main page
marcochavezf Jul 19, 2022
00e5855
center the content area for bigger screens
marcochavezf Jul 19, 2022
8a9d1d7
fix title for main page
marcochavezf Jul 20, 2022
f4ddf53
fix margin for title h1
marcochavezf Jul 20, 2022
3f20e81
fix selected home link
marcochavezf Jul 26, 2022
df39738
remove underling for hover
marcochavezf Jul 26, 2022
99705d8
use default font for strong
marcochavezf Jul 26, 2022
b6a1d2b
add onclick events to home page cards
marcochavezf Jul 26, 2022
2281ec1
change card border color for hover
marcochavezf Jul 27, 2022
c7c6328
use font-weight: bold for strong tag
marcochavezf Jul 27, 2022
93a1a85
replace divs by a with href
marcochavezf Aug 2, 2022
72a71b4
set original color for a tags with card class
marcochavezf Aug 2, 2022
8fa30a4
change remaining card divs to a tags
marcochavezf Aug 2, 2022
30de7bb
update instructions that use card div
marcochavezf Aug 2, 2022
88aeb6f
replace navigateTo with anchore with href
marcochavezf Aug 3, 2022
d89c7f6
change navigateToHome with anchor with href
marcochavezf Aug 3, 2022
fcee8e6
add click event to header-button
marcochavezf Aug 3, 2022
6757edc
attach back button logic in js
marcochavezf Aug 3, 2022
bf96ccd
remove unnecessary div in home lhn
marcochavezf Aug 3, 2022
57cc4a8
move event listeners and tocbot.init to DOMContentLoaded event
marcochavezf Aug 9, 2022
1a0f9bc
add comment to back button
marcochavezf Aug 9, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,23 +68,23 @@ There are 3 main components in the hub page: 1. Stage title, 2. Row of Card butt

<!-- 3. Card buttons -->

<div class="card" onclick="navigateTo('./request-money/SmartScan')">
<a class="card" href="/articles/request-money/SmartScan">
<div class="body">
<div class="title">SmartScan</div>
</div>
<div class="right-icon">
<i class="fa-solid fa-angle-right icon"></i>
</div>
</div>
</a>

<div class="card" onclick="navigateTo('./request-money/AnotherArticle')">
<a class="card" href="/articles/request-money/AnotherArticle">
<div class="body">
<div class="title">Another Article</div>
</div>
<div class="right-icon">
<i class="fa-solid fa-angle-right icon"></i>
</div>
</div>
</a>

<!-- More Card buttons here... -->

Expand Down Expand Up @@ -119,14 +119,14 @@ A card button is the box that contains the article title and the caret right ico
In order to add a new Card button in the respective hub page ([send-money/index.html](https://github.com/Expensify/App/blob/main/docs/hubs/send-money.html) or [request-money/index.html](https://github.com/Expensify/App/blob/main/docs/hubs/request-money.html)) just copy and pase the following Card element:

```html
<div class="card" onclick="navigateTo('./request-money/SmartScan')">
<a class="card" href="/articles/request-money/SmartScan">
<div class="body">
<div class="title">SmartScan</div>
</div>
<div class="right-icon">
<i class="fa-solid fa-angle-right icon"></i>
</div>
</div>
</a>
```

Then replace the article title accordingly (in this case replace the value `SmartScan` with the new article title) and add a link to the relative path of the article (in this case replace `./request-money/SmartScan` accordingly to the path of the new article file without the file extension).
Expand Down
14 changes: 7 additions & 7 deletions docs/_includes/home-lhn.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<ul class="lhn-items">
<li class="home-link">
<div class="link" onclick="navigateToHome()">Home</div>
<div class="selected">Home</div>
marcochavezf marked this conversation as resolved.
Show resolved Hide resolved
</li>
<li>
<div onclick="navigateTo('/hubs/send-money')" class="icon-with-link">
<a href="/hubs/send-money" class="icon-with-link">
<i class="fa-solid fa-angle-right icon"></i>
<div class="link">Send money</div>
</div>
Send money
</a>
</li>
<li>
<div onclick="navigateTo('/hubs/request-money')" class="icon-with-link">
<a href="/hubs/request-money" class="icon-with-link">
<i class="fa-solid fa-angle-right icon"></i>
<div class="link">Request money</div>
</div>
Request money
</a>
</li>
</ul>
10 changes: 5 additions & 5 deletions docs/_includes/request-money-lhn.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<ul class="lhn-items">
<li class="home-link">
<div class="link" onclick="navigateToHome()">Home</div>
<a href="/main">Home</a>
</li>
<li>
<div onclick="navigateTo('/hubs/send-money')" class="icon-with-link">
<a href="/hubs/send-money" class="icon-with-link">
<i class="fa-solid fa-angle-right icon"></i>
<span class="link">Send money</span>
</div>
Send money
</a>
</li>
<li>
<div class="icon-with-link selected">
Expand All @@ -23,7 +23,7 @@
<li><a href="#request-money">Request money</a>
<ul>
<!-- Article links -->
<li onclick="navigateTo('/articles/request-money/SmartScan')"><a>SmartScan</a></li>
<li><a href="/articles/request-money/SmartScan">SmartScan</a></li>
<!-- More Article links here (if required)... -->
</ul>
</li>
Expand Down
8 changes: 4 additions & 4 deletions docs/_includes/send-money-lhn.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<ul class="lhn-items">
<li class="home-link">
<div class="link" onclick="navigateToHome()">Home</div>
<a href="/main">Home</a>
</li>
<li>
<div class="icon-with-link selected">
Expand All @@ -15,9 +15,9 @@
</ul>
</li>
<li>
<div onclick="navigateTo('/hubs/request-money')" class="icon-with-link">
<a href="/hubs/request-money" class="icon-with-link">
<i class="fa-solid fa-angle-right icon"></i>
<a href="/hubs/request-money">Request money</a>
</div>
Request money
</a>
</li>
</ul>
4 changes: 2 additions & 2 deletions docs/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<div id="lhn">

<div class="lhn-header">
<div class="header-button" onclick="toggleHeaderMenu()">
<div id="header-button">
<i id="angle-up-icon" class="fa-solid fa-angle-up icon hide"></i>
<i id="bars-icon" class="fa-solid fa-bars icon"></i>
</div>
Expand All @@ -41,7 +41,7 @@
{% when "send-money" %}
{% include send-money-lhn.html %}
{% else %}
<div onclick="navigateBack()" class="icon-with-link">
<div id="back-button" class="icon-with-link">
<i class="fa-solid fa-angle-left icon"></i>
<div class="link">Back</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions docs/_sass/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ $color-gray1: #FAFAFA;
$color-gray2: #ECECEC;
$color-gray3: #C6C9CA;
$color-white: #FFFFFF;
$color-green: #07d973;
4 changes: 0 additions & 4 deletions docs/_sass/_fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,3 @@
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

strong {
font-weight: 600;
}
94 changes: 76 additions & 18 deletions docs/_sass/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ hr {
display: inline-block;
width: 24px;
height: 2px;
margin: 0 0 15px;
margin: 0 0 16px;
}

strong {
font-family: "GTAmericaExp-Bold", "Helvetica Neue", "Helvetica", Arial, sans-serif;
font-weight: bold;
}

em {
Expand All @@ -84,7 +84,6 @@ a {

&:hover {
color: $color-blueHover;
text-decoration: underline;
}
}

Expand All @@ -95,9 +94,15 @@ h4,
h5,
h6 {
color: $color-dark;
font-family: "GTAmericaExp-Regular";
font-weight: bold;
padding-bottom: 12px;
}

h2,
h3,
h4,
h5,
h6 {
margin-top: 20px;
}

Expand Down Expand Up @@ -197,7 +202,7 @@ textarea {
padding: 24px;
}

.header-button {
#header-button {
position: absolute;
display: none;

Expand All @@ -223,15 +228,12 @@ textarea {
display: grid;
grid-template-columns: 40px auto;
cursor: pointer;
}

&.selected {
cursor: auto;

span {
font-weight: bold;
color: $color-dark;
}
}
.selected {
cursor: auto;
font-weight: bold;
color: $color-dark;
}

.hide {
Expand All @@ -247,6 +249,13 @@ textarea {
padding: 52px 68px;
box-sizing: border-box;

@media screen and (min-width: 1600px) {
/* Center content area for bigger screens */
margin-left: calc(420px + (100vw - 1000px - 420px)/2);
padding: 52px 0;
max-width: 1000px;
}

@media screen and (max-width: 1024px) {
margin-left: 320px;
}
Expand Down Expand Up @@ -279,7 +288,6 @@ textarea {

&:hover {
color: $color-blueHover;
text-decoration: underline;
}
}

Expand Down Expand Up @@ -331,22 +339,51 @@ textarea {
.card {
display: flex;
flex-wrap: nowrap;
border-radius: 15px;
border-radius: 16px;
border: 1px solid $color-gray2;
padding: 28px;
font-weight: bold;
cursor: pointer;
$border-amount-darken: 15%;
color: $color-dark;

&:hover {
border-color: darken($color-gray2, $border-amount-darken);
color: $color-dark;
}

&.send-money {
border-color: $color-blue;
border-width: 1.5px;

&:hover {
border-color: darken($color-blue, $border-amount-darken);
}
}

&.request-money {
border-color: $color-green;
border-width: 1.5px;

&:hover {
border-color: darken($color-green, $border-amount-darken);
}
}

.left-icon {
display: flex;
align-items: center;
padding-right: 15px;
padding-right: 28px;

img {
width: 32px;
}
}

.right-icon {
display: flex;
align-items: center;
padding-left: 15px;
padding-left: 16px;
}

.body {
Expand All @@ -357,7 +394,8 @@ textarea {
}

.description {
margin-top: 15px;
margin-top: 16px;
font-weight: normal;
}
}

Expand All @@ -371,6 +409,26 @@ textarea {
}
}

.homepage {
h1 {
padding-bottom: 20px;

@media screen and (max-width: 800px) {
margin-top: 0;
padding-top: 8px;
}
}
h2 {
padding-bottom: 24px;
}
p {
margin-bottom: 20px;
}
.cards-group {
padding-bottom: 32px;
}
}

.coming-soon {
overflow: hidden;

Expand Down
5 changes: 5 additions & 0 deletions docs/assets/images/concierge-avatar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/assets/images/shield.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions docs/assets/images/users.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading