Skip to content

Commit

Permalink
begin styling
Browse files Browse the repository at this point in the history
  • Loading branch information
Abraham Toriz committed Jul 26, 2023
1 parent 50903eb commit a4ff980
Show file tree
Hide file tree
Showing 34 changed files with 222 additions and 3 deletions.
7 changes: 7 additions & 0 deletions app/cells/decidim/content_blocks/hero/show.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<section id="hero" style="background-image:url('<%= background_image %>');">
<div class="hero__container">
<div class="row">
<%= cta_button %>
</div>
</div>
</section>
Binary file added app/packs/fonts/hk-grotesk/HKGrotesk-Black.otf
Binary file not shown.
Binary file added app/packs/fonts/hk-grotesk/HKGrotesk-Bold.otf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added app/packs/fonts/hk-grotesk/HKGrotesk-Italic.otf
Binary file not shown.
Binary file not shown.
Binary file added app/packs/fonts/hk-grotesk/HKGrotesk-Light.otf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added app/packs/fonts/hk-grotesk/HKGrotesk-Medium.otf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added app/packs/fonts/hk-grotesk/HKGrotesk-Regular.otf
Binary file not shown.
Binary file not shown.
Binary file added app/packs/fonts/hk-grotesk/HKGrotesk-SemiBold.otf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added app/packs/fonts/nectomono/NectoMono-Regular.otf
Binary file not shown.
1 change: 1 addition & 0 deletions app/packs/stylesheets/decidim/_decidim-settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
// To override styles use decidim_application.scss
//
// By default this is empty.
@import 'stylesheets/okbr/variables.scss';
7 changes: 4 additions & 3 deletions app/packs/stylesheets/decidim/decidim_application.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// This is a file that can be overridden by the application in order to override styles
// Notice that this file is included at the very end of the stylesheets packs to have
// more priority
// This is a file that can be overridden by the application in order to override
// styles Notice that this file is included at the very end of the stylesheets
// packs to have more priority
//
// To override CSS variables or Foundation settings use _decidim-settings.scss
//
// By default this is empty.
@import 'stylesheets/okbr/application.scss';
41 changes: 41 additions & 0 deletions app/packs/stylesheets/okbr/_fonts.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
@font-face {
font-family: 'HK Grotesk';
src: url(fonts/hk-grotesk/HKGrotesk-LightLegacy.otf) format('opentype');
font-weight: 100;
font-style: normal;
}

@font-face {
font-family: 'HK Grotesk';
src: url(fonts/hk-grotesk/HKGrotesk-Regular.otf) format('opentype');
font-weight: 400;
font-style: normal;
}

@font-face {
font-family: 'HK Grotesk';
src: url(fonts/hk-grotesk/HKGrotesk-SemiBold.otf) format('opentype');
font-weight: 600;
font-style: normal;
}

@font-face {
font-family: 'HK Grotesk';
src: url(fonts/hk-grotesk/HKGrotesk-LightLegacyItalic.otf) format('opentype');
font-weight: 100;
font-style: italic;
}

@font-face {
font-family: 'HK Grotesk';
src: url(fonts/hk-grotesk/HKGrotesk-Italic.otf) format('opentype');
font-weight: 400;
font-style: italic;
}

@font-face {
font-family: 'HK Grotesk';
src: url(fonts/hk-grotesk/HKGrotesk-SemiBoldItalic.otf) format('opentype');
font-weight: 600;
font-style: italic;
}
29 changes: 29 additions & 0 deletions app/packs/stylesheets/okbr/_hero.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* Hero
*/
.hero-heading {
display: none;
}

.hero__container {
text-align: right;
}

.hero-cta {
padding: .7rem 1rem;
border-radius: 100px;
color: black;
font-weight: 600;
margin-top: 0;
margin-bottom: 0;
}

.hero-cta.button.expanded {
width: auto;
display: inline-block;
}

.button--sc.large {
font-size: 28px;
font-weight: 600;
}
38 changes: 38 additions & 0 deletions app/packs/stylesheets/okbr/_nav.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.navbar {
background-color: white;
color: black;
text-transform: uppercase;
font-weight: 100;
}

.main-nav__link a {
padding: 0;
}

.main-nav ul {
justify-content: center;
padding: 2rem 0;
line-height: 1;
}

.main-nav ul > li {
flex: none;
}

.main-nav ul > li > a {
padding: 0 1rem;
}

.main-nav ul > li:not(:last-child) a {
border-right: solid 1px black;
}

.main-nav__link--active a {
box-shadow: inset 0 -4px 0 0 var(--primary);
}

.main-nav__link a,
.main-nav__link a:hover {
color: black;
font-weight: 100;
}
41 changes: 41 additions & 0 deletions app/packs/stylesheets/okbr/_search.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
* Search bar
*/
.okbr-search {
background-color: $color-cyan;
height: 2.4rem;
border-radius: 1.2rem;
overflow: hidden;
}

.okbr-search__form {
display: flex;
}

.okbr-search__input {
border: 0;
background-color: transparent;
box-shadow: none;
height: 100%;
margin: 0;
}

.okbr-search__input::placeholder {
color: black;
font-weight: 100;
text-transform: uppercase;
}

.okbr-search__input:focus {
border: none;
box-shadow: none;
background-color: transparent;
}

.okbr-search__button {
height: 100%;
padding: 0 .7rem;
display: flex;
justify-content: center;
align-items: center;
}
29 changes: 29 additions & 0 deletions app/packs/stylesheets/okbr/_title.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* Title bar
*/
.title-bar {
background-color: white;
text-transform: uppercase;
}

.title-bar,
.topbar__admin__link a,
.topbar__user__login a,
.topbar__search input,
.topbar__dropmenu > ul > li > a {
color: black;
font-weight: 100;
}

.topbar__admin__link a:hover {
color: #333;
}

.topbar__notifications .icon,
.topbar__conversations .icon {
fill: black;
}

.topbar__search input {
background-color: $color-cyan;
}
17 changes: 17 additions & 0 deletions app/packs/stylesheets/okbr/application.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@import 'stylesheets/okbr/_fonts.scss';
@import 'stylesheets/okbr/_title.scss';
@import 'stylesheets/okbr/_search.scss';
@import 'stylesheets/okbr/_hero.scss';
@import 'stylesheets/okbr/_nav.scss';

body {
font-family: 'HK Grotesk', sans-serif;
font-weight: 100;
font-style: normal;
}

.heading3 {
text-transform: uppercase;
font-weight: 600;
text-align: left;
}
5 changes: 5 additions & 0 deletions app/packs/stylesheets/okbr/variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
$color-pink: #e077ff;
$color-purple: #6173e8;
$color-cyan: #adffed;

$color-primary: $color-pink;
10 changes: 10 additions & 0 deletions app/views/layouts/decidim/_topbar_search.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<div class="okbr-search">
<%= form_tag(decidim.search_path, method: :get, class: "okbr-search__form") do %>
<div class="okbr-search__button-wrapper">
<%= submit_tag icon("magnifying-glass", aria_label: t("decidim.search.term_input_placeholder"), role: "img"), title: t("decidim.search.term_input_placeholder"), id: :submit, class: "okbr-search__button" %>
</div>
<%= label_tag :term do %>
<%= text_field_tag :term, nil, class: "okbr-search__input", placeholder: t("decidim.search.term_input_placeholder"), title: t("decidim.search.term_input_placeholder") %>
<% end %>
<% end %>
</div>

0 comments on commit a4ff980

Please sign in to comment.