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

Added more to styleguide #559

Merged
merged 1 commit into from
Mar 3, 2025
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
106 changes: 105 additions & 1 deletion app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,108 @@
@extend .h2;
}
}
}
}

.color-box {
width: 100px;
height: 100px;
border-radius: 5px;
display: inline-block;
}

// Primary Colors
.color-box--purple {
background-color: $color-purple;
}

.color-box--purple-light {
background-color: $color-purple-light;
}

.color-box--purple-dark {
background-color: $color-purple-dark;
}

// Secondary Colors
.color-box--green {
background-color: $color-green;
}

.color-box--green-light {
background-color: $color-green-light;
}

.color-box--green-dark {
background-color: $color-green-dark;
}

.color-box--green-darker {
background-color: $color-green-darker;
}

// Tertiary Colors
.color-box--orange {
background-color: $color-orange;
}

.color-box--orange-light {
background-color: $color-orange-light;
}

.color-box--orange-dark {
background-color: $color-orange-dark;
}

// Tones
.color-box--black {
background-color: $color-black;
}

.color-box--white {
background-color: $color-white;
}

.color-box--grey-light {
background-color: $color-grey-light;
}

.color-box--grey {
background-color: $color-grey;
}

.color-box--grey-dark {
background-color: $color-grey-dark;
}

//Gradients {
.color-box--purple-gradient {
background: linear-gradient(0deg, $color-purple-dark 50%, $color-purple 100%);
}
.color-box--grey-grad-bg {
background: linear-gradient(180deg, #FFFFFF 0%, #F5F5FF 100%);
}

.character-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 20px;
margin-top: 20px;
}

.character-box {
border: 1px solid #DCDCE0;
border-radius: 5px;
padding: 10px;
text-align: center;
}

.character-box p {
margin: 10px 0 0;
font-size: 14px;
color: #4C4C61;
}

.page-content--demo {
border: 1px solid $color-grey;
max-width: 48em;
}
166 changes: 166 additions & 0 deletions app/views/pages/styleguide.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,174 @@


<div class="bd-cheatsheet container bg-body styleguide">
<h2>Styles</h2>
<article>
<h3 class="mt-5">Typeface</h3>
<p>Inter is a variable font family carefully crafted & designed for computer screens.</p>

<p>Inter features a tall x-height to aid in readability of mixed-case and lower-case text. Several OpenType features are provided as well, like contextual alternates that adjusts punctuation depending on the shape of surrounding glyphs, slashed zero for when you need to disambiguate "0" from "o", tabular numbers, etc.</p>

<p>The Inter project is led by Rasmus Andersson, a Swedish maker–of–software living in San Francisco. To contribute, see <a href="https://github.com/rsms/inter/">github.com/rsms/inter</a></p>

<h4 class="mt-5">Weights and styles</h4>
<div class="character-grid">

<div class="character-box" style="font-weight: 400;">
Aa Bb Cc
<p>Regular (400)</p>
</div>
<div class="character-box" style="font-weight: 700;">
Aa Bb Cc
<p>Bold (700)</p>
</div>
<div class="character-box" style="font-weight: 900;">
Aa Bb Cc
<p>Black (900)</p>
</div>

<div class="character-box" style="font-style: normal;">
Aa Bb Cc
<p>Normal</p>
</div>
<div class="character-box" style="font-style: italic;">
Aa Bb Cc
<p>Italic</p>
</div>
</div>
<h4 class="mt-4">Numbers and punctuation</h4>
<div class="character-grid">
<div class="character-box">
0123456789
<p>Digits</p>
</div>
<div class="character-box">
. , ; : ! ?
<p>Punctuation Marks</p>
</div>
</div>

</article>
<article>
<h3>Colours</h3>
<h4 class="mt-3">Primary Colours</h4>
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-5 g-4">
<div class="col">
<div class="color-box color-box--purple"></div>
<p><code>$purple (#7878EF)</code></p>
</div>
<div class="col">
<div class="color-box color-box--purple-light"></div>
<p><code>$purple-light (#BBBBFF)</code></p>
</div>
<div class="col">
<div class="color-box color-box--purple-dark"></div>
<p><code>$purple-dark (#5C5CCF)</code></p>
</div>
</div>

<h4 class="mt-4">Secondary Colours</h4>
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-5 g-4">
<div class="col">
<div class="color-box color-box--green"></div>
<p><code>$green (#45E56E)</code></p>
</div>
<div class="col">
<div class="color-box color-box--green-light"></div>
<p><code>$green-light (#87F5AA)</code></p>
</div>
<div class="col">
<div class="color-box color-box--green-dark"></div>
<p><code>$green-dark (#2EAF6B)</code></p>
</div>
<div class="col">
<div class="color-box color-box--green-darker"></div>
<p><code>$green-darker (#189654)</code></p>
</div>
</div>

<h4 class="mt-4">Tertiary Colours</h4>
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-5 g-4">
<div class="col">
<div class="color-box color-box--orange"></div>
<p><code>$orange (#FF807D)</code></p>
</div>
<div class="col">
<div class="color-box color-box--orange-light"></div>
<p><code>$orange-light (#FEBDB9)</code></p>
</div>
<div class="col">
<div class="color-box color-box--orange-dark"></div>
<p><code>$orange-dark (#DE5858)</code></p>
</div>
</div>

<h4 class="mt-4">Tones</h4>
<div class="row row-cols-1 row-cols-sm-3 row-cols-md-5 g-4">
<div class="col">
<div class="color-box color-box--black"></div>
<p><code>$black (#1D1D28)</code></p>
</div>
<div class="col">
<div class="color-box color-box--white"></div>
<p><code>$white (#FFFFFF)</code></p>
</div>
<div class="col">
<div class="color-box color-box--grey"></div>
<p><code>$grey (#DCDCE0)</code></p>
</div>
<div class="col">
<div class="color-box color-box--grey-light"></div>
<p><code>$grey-light (#F5F5FF)</code></p>
</div>
<div class="col">
<div class="color-box color-box--grey-dark"></div>
<p><code>$grey-dark (#4C4C61)</code></p>
</div>
</div>

<h4 class="mt-4">Gradients</h4>
<div class="row row-cols-1 row-cols-sm-3 row-cols-md-5 g-4">
<div class="col">
<div class="color-box color-box--purple-gradient"></div>
<p>
<code>$purple-grad-bg <br />
50% $purple<br />
100% $purple-dark</code>
</p>
</div>
<div class="col">
<div class="color-box color-box--grey-grad-bg"></div>
<p>
<code>$grey-grad-bg <br />
0% $white<br />
100% $grey-light</code>
</p>
</div>
</div>
</article>

<h2>ecosyste.ms components</h2>
<article class="my-3">
<h3>Page content</h3>
<p>Pages with article-style text require a little help to look their best, add the class <code>.page-content</code> to enhance readability</p>
<div class="page-content page-content--demo p-5 rounded">
<h1 class="page-content__title display-2">FAQ</h1>

<p class="lead">ecosystem funds is new, we’ll expand this FAQ as we develop the service, until then here are a few questions we anticipate</p>

<h2>What is ecosyste.ms?</h2>
<p>ecosyste.ms is a set of free services and tools for developers, researchers and policymakers to help identify, secure and sustain open source software. It was developed throughout 2022 by Andrew Nesbitt and Benjamin Nickols, with support from the now disbanded Plaintext Group at Schmidt Futures and Open Source Collective.</p>

<h2>Who are Open Source Collective?</h2>
<p><a href="https://oscollective.org">Open Source Collective</a> is a non-profit working for the common interests of those who create and use open source software. They are best known for their fiscal sponsorship program, accepting and managing the funds for thousands of financially active open source projects and their communities using the <a href="https://opencollective.com/home">Open Collective</a> platform. Open Source Collective continues to provide financial support to develop and maintain ecosyste.ms.</p>
</div>
</article>
<article class="my-3">
<div class="bd-heading align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2">
<h3 class="mb-5">Links</h3>
<p>Links with our <a href="#" class="spesh-link">signature underline</a> are activated by the class <code>.spesh-link</code> or the SCSS <code>@include spesh-link();</code>
</div>
</article>
<article class="my-3">
<div class="bd-heading align-self-start mt-5 mb-3 mt-xl-0 mb-xl-2">
<h3 class="mb-5">Sidebar</h3>
Expand Down