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

Blog design #23

Merged
merged 7 commits into from
Sep 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .scss-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ exclude:
- 'coverage/**'
- 'app/assets/stylesheets/scaffolds.scss'
- 'app/assets/stylesheets/vendor/**/*'
- 'app/assets/stylesheets/components/*'

linters:
BangFormat:
Expand Down
Empty file removed app/assets/images/.keep
Empty file.
Binary file added app/assets/images/header-image.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/write-blog.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 6 additions & 4 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@

// Layouts

// Scaffolds
// We want to remove it in the front end tickets
@import 'scaffolds';

// Components
@import 'components/navbar';
@import 'components/header';
@import 'components/footer';
@import 'components/trix-editor';
@import 'components/comment';
@import 'components/post';

// Screens
Empty file.
44 changes: 44 additions & 0 deletions app/assets/stylesheets/components/_comment.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
@media (min-width: 0) {
.g-mr-15 {
margin-right: 1.07143rem !important;
}
}
@media (min-width: 0) {
.g-mt-3 {
margin-top: 0.21429rem !important;
}
}

.g-height-50 {
height: 50px;
}

.g-width-50 {
width: 50px !important;
}

@media (min-width: 0) {
.g-pa-30 {
padding: 2.14286rem !important;
}
}

.g-bg-secondary {
background-color: #fafafa !important;
}

.u-shadow-v18 {
box-shadow: 0 5px 10px -6px rgba(0, 0, 0, 0.15);
}

.g-color-gray-dark-v4 {
color: #777 !important;
}

.g-font-size-12 {
font-size: 0.85714rem !important;
}

.media-comment {
margin-top: 20px;
}
4 changes: 4 additions & 0 deletions app/assets/stylesheets/components/_footer.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
footer {
padding-top: 3rem;
padding-bottom: 3rem;
}
101 changes: 101 additions & 0 deletions app/assets/stylesheets/components/_header.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@

header.masthead {
position: relative;
margin-bottom: 3rem;
padding-top: calc(8rem + 57px);
padding-bottom: 8rem;
background: no-repeat center center;
background-attachment: scroll;
background-color: #6c757d;
background-size: cover;
}

header.masthead::before {
content: '';
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
opacity: 0.5;
background-color: #212529;
}

header.masthead .page-heading,
header.masthead .post-heading,
header.masthead .site-heading {
color: #fff;
}

header.masthead .page-heading,
header.masthead .site-heading {
text-align: center;
}

header.masthead .page-heading h1,
header.masthead .page-heading .h1,
header.masthead .site-heading h1,
header.masthead .site-heading .h1 {
font-size: 3rem;
}

header.masthead .page-heading .subheading,
header.masthead .site-heading .subheading {
display: block;
margin-top: 0.625rem;
font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
font-size: 1.5rem;
font-weight: 300;
line-height: 1.1;
}

header.masthead .post-heading h1,
header.masthead .post-heading .h1 {
font-size: 2.25rem;
}

header.masthead .post-heading .meta,
header.masthead .post-heading .subheading {
display: block;
line-height: 1.1;
}

header.masthead .post-heading .subheading {
margin: 0.75rem 0 2rem;
font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
font-size: 1.5rem;
font-weight: 600;
}

header.masthead .post-heading .meta {
font-family: 'Lora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
font-size: 1.25rem;
font-style: italic;
font-weight: 300;
}

header.masthead .post-heading .meta a {
color: #fff;
}
@media (min-width: 992px) {
header.masthead {
padding-top: 12.5rem;
padding-bottom: 12.5rem;
}

header.masthead .page-heading h1,
header.masthead .page-heading .h1,
header.masthead .site-heading h1,
header.masthead .site-heading .h1 {
font-size: 5rem;
}

header.masthead .post-heading h1,
header.masthead .post-heading .h1 {
font-size: 3.5rem;
}

header.masthead .post-heading .subheading {
font-size: 1.875rem;
}
}
93 changes: 93 additions & 0 deletions app/assets/stylesheets/components/_navbar.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
#mainNav {
position: absolute;
z-index: 1030;
top: 0;
right: 0;
left: 0;
border-bottom: 1px solid #dee2e6;
background-color: #fff;
font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
}

#mainNav .navbar-brand {
font-weight: 800;
}

#mainNav .navbar-toggler {
padding: 0.75rem;
font-size: 0.75rem;
font-weight: 800;
text-transform: uppercase;
}

#mainNav .navbar-nav > li.nav-item > a.nav-link {
font-size: 0.75rem;
font-weight: 800;
letter-spacing: 0.0625em;
text-transform: uppercase;
}
@media (min-width: 992px) {
#mainNav {
border-bottom: 1px solid transparent;
background: transparent;
}

#mainNav .navbar-brand {
color: #fff;
}

#mainNav .navbar-brand:focus,
#mainNav .navbar-brand:hover {
color: rgba(255, 255, 255, 0.8);
}

#mainNav .navbar-nav > li.nav-item > a.nav-link {
color: #fff;
}

#mainNav .navbar-nav > li.nav-item > a.nav-link:focus,
#mainNav .navbar-nav > li.nav-item > a.nav-link:hover {
color: rgba(255, 255, 255, 0.8);
}
}
@media (min-width: 992px) {
#mainNav {
/* Force Hardware Acceleration in WebKit */
transform: translate3d(0, 0, 0);
backface-visibility: hidden;
backface-visibility: hidden;
transition: background-color 0.2s;
}

#mainNav.is-fixed {
/* when the user scrolls down, we hide the header right above the viewport */
position: fixed;
top: -83px;
transition: transform 0.2s;
border-bottom: 1px solid white;
background-color: rgba(255, 255, 255, 0.9);
}

#mainNav.is-fixed .navbar-brand {
color: #212529;
}

#mainNav.is-fixed .navbar-brand:focus,
#mainNav.is-fixed .navbar-brand:hover {
color: #0085a1;
}

#mainNav.is-fixed .navbar-nav > li.nav-item > a {
color: #212529;
}

#mainNav.is-fixed .navbar-nav > li.nav-item > a:focus,
#mainNav.is-fixed .navbar-nav > li.nav-item > a:hover {
color: #0085a1;
}

#mainNav.is-visible {
/* if the user changes the scrolling direction, we show the header */
transform: translate3d(0, 100%, 0);
}
}
51 changes: 51 additions & 0 deletions app/assets/stylesheets/components/_post.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
.section-heading {
margin-top: 3.75rem;
font-size: 2.25rem;
font-weight: 700;
}

.caption {
display: block;
margin: 0;
padding: 0.625rem;
font-size: 0.875rem;
font-style: italic;
text-align: center;
}

.post-preview > a {
color: #212529;
}

.post-preview > a:focus,
.post-preview > a:hover {
color: #0085a1;
text-decoration: none;
}

.post-preview > a > .post-title {
margin-top: 1.875rem;
margin-bottom: 0.625rem;
font-size: 1.875rem;
}

.post-preview > a > .post-subtitle {
margin-bottom: 0.625rem;
font-weight: 300;
}

.post-preview > .post-meta {
margin-top: 0;
color: #6c757d;
font-size: 1.125rem;
font-style: italic;
}

.post-preview > .post-meta > a {
text-decoration: none;
}
@media (min-width: 992px) {
.post-preview > a > .post-title {
font-size: 2.25rem;
}
}
3 changes: 3 additions & 0 deletions app/assets/stylesheets/components/_trix-editor.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
trix-editor {
min-height: rem(300px);
}
65 changes: 0 additions & 65 deletions app/assets/stylesheets/scaffolds.scss

This file was deleted.

Loading