Skip to content

Commit

Permalink
v2.1.0
Browse files Browse the repository at this point in the history
- Docs ready for v2.1

Changes have been written in CHANGELOG
  • Loading branch information
SavanDev committed Oct 23, 2020
1 parent d6de5db commit fa9228f
Show file tree
Hide file tree
Showing 15 changed files with 93 additions and 46 deletions.
2 changes: 1 addition & 1 deletion dist/css/cleanify.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/css/cleanify.css

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions scss/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ $colors: (
@each $name, $color in $colors {
--color-#{$name}: #{$color};
}
}

body {
// Theme support
--bubble: var(--color-light);
--background: #eee;
Expand Down
42 changes: 19 additions & 23 deletions scss/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@
header {
@include init-container();

&.withImage {
img {
width: 100%;
max-width: 256px;
max-height: 256px;
}
}

> * {
display: block;
text-align: center;
Expand All @@ -40,36 +32,40 @@ header {
@include font-size(1.5rem);
}

img {
width: 100%;
max-width: 256px;
max-height: 256px;
}

@media screen and (min-width: 1000px) {
display: grid;
grid-template:
'text'
'subText';
padding: 3rem;

> * {
display: inline-block;
margin: auto;
}

&.withImage {
grid-template:
'logo text'
'logo subText';

img {
grid-area: logo;
}
}

h1 {
@include font-size(4.5rem);
grid-area: text;
grid-row: 1 / 2;
grid-column: 2 / 3;
}

h2 {
@include font-size(2rem);
grid-area: subText;
grid-row: 2 / 3;
grid-column: 2 / 3;
}

img {
grid-column: 1 / 2;
grid-row: 1 / span 2;
}

&:not(.withImage) {
grid-template-columns: 0 100%;
}
}

Expand Down
1 change: 1 addition & 0 deletions scss/_navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ nav {

.navbar-right-menu {
@include menuMobile();
border-radius: 0 0 $border-size $border-size;
text-align: center;
float: none;
}
Expand Down
4 changes: 2 additions & 2 deletions scss/mixins/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
@include disableAppareance();
@include form-baseStyle();
outline: none;
background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' height='16px' width='20px'><text y='15' font-size='20'>▾</text></svg>")
background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' height='16px' width='20px'><text y='15' fill='gray' font-size='20'>▾</text></svg>")
no-repeat right var(--fields);
padding: 0.5rem 1rem;
}
Expand Down Expand Up @@ -77,7 +77,7 @@

&:hover {
background-color: var(--color-lightgray);
color: var(--color-light);
color: var(--color-dark);
}
}

Expand Down
4 changes: 3 additions & 1 deletion src/App.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#darkToggle { color: var(--text) }

#darkToggle:hover {
color: var(--color-dark);
color: var(--color-warning);
cursor: pointer;
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { faDownload, faBook, faAddressCard, faLightbulb } from '@fortawesome/fre
let darkState = false;

function darkMode() {
document.documentElement.setAttribute("dark", darkState ? "0" : "1");
document.body.setAttribute("dark", darkState ? "0" : "1");
darkState = !darkState;
}

Expand Down
Binary file modified src/img/CDExample.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/img/Mobile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 7 additions & 4 deletions src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,13 @@ const Home: React.FC = () => {
<article className="grid">
<section className="transparent">
<h4>Dark Mode</h4>
<p>Depending on the theme established in the system (dark or light), Cleanify will adapt to it automatically!</p>
<hr/>
<p>Now if Windows is dark, Cleanify too. If Windows is light, Cleanify will be as well.</p>
<p>Also, this was tested in GNOME 3 and also works!</p>
<p>The framework has a dark variant that can also be modified with the theme system.</p>
<p>You <b>can activate</b> it using:</p>
<Highlight>
{'<body dark="1">'}<br />
{' ...'}<br />
{'</body>'}
</Highlight>
</section>
<section className="transparent">
<img src={DarkExample} alt="Example" className="rounded" width="100%"/>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/docs/Components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const Components: React.FC = () => {
<section>
<header className="withImage">
<img src={logo} alt="Logo" />
<h1>Example Title</h1>
<h1>Example</h1>
<h2>Example Subtitle</h2>
</header>
</section>
Expand Down
43 changes: 43 additions & 0 deletions src/pages/docs/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,49 @@ const Content: React.FC = () => {
{'<img class="rounded" src="...">'}
</Highlight>
</section>
<section className="transparent">
<h2>Theme system</h2>
<p>Now you can change the Cleanify Design colors by creating a new <b>.css</b> file following these rules:</p>
<Highlight>
{'/* Color base */'}<br />
{':root {'}<br />
{' --color-primary: #color;'}<br />
{' --color-secondary: #color;'}<br />
{' --color-success: #color;'}<br />
{' --color-danger: #color;'}<br />
{' --color-warning: #color;'}<br />
{' --color-info: #color;'}<br />
{' --color-light: #color;'}<br />
{' --color-dark: #color;'}<br />
{' --color-muted: #color;'}<br />
{' --color-lightgray: #color;'}<br />
{'}'}<br />
<br />
{'/* Theme specific colors */'}<br />
{'body {'}<br />
{' --bubble: #color;'}<br />
{' --background: #color;'}<br />
{' --backgroundTransparent: #color;'}<br />
{' --text: #color;'}<br />
{' --list1: #color;'}<br />
{' --list2: #color;'}<br />
{' --list: #color;'}<br />
{' --fields: #color;'}<br />
{'}'}<br />
<br />
{'/* Dark mode variant */'}<br />
{'body[dark="1"] {'}<br />
{' --bubble: #color;'}<br />
{' --background: #color;'}<br />
{' --backgroundTransparent: #color;'}<br />
{' --text: #color;'}<br />
{' --list1: #color;'}<br />
{' --list2: #color;'}<br />
{' --list: #color;'}<br />
{' --fields: #color;'}<br />
{'}'}<br />
</Highlight>
</section>
<section className="transparent">
<h2>Typography</h2>
<section>
Expand Down
14 changes: 7 additions & 7 deletions src/pages/docs/GStarted.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ const GStarted: React.FC = () => {
<h2>Let's start!</h2>
<p>Once the files have been <Link to="/download">downloaded</Link>, the directory should look like this.</p>
<section>
<pre style={{ margin: 5 }}>
{'website'}<br/>
{'--> css'}<br/>
{'-----> cleanify.css'}<br/>
{'--> js'}<br/>
{'-----> cleanify.js'}<br/>
{'--> index.html'}
<pre style={{ margin: 3 }}>
{'> website'}<br/>
{'-> css'}<br/>
{'--> cleanify.css'}<br/>
{'-> js'}<br/>
{'--> cleanify.js'}<br/>
{'-> index.html'}
</pre>
</section>
<h4>Starter template</h4>
Expand Down
10 changes: 5 additions & 5 deletions src/pages/docs/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@ const Layout: React.FC = () => {
<div id="containerTransparentExample">
</div>
<Highlight>
{'<article class="fluid">'}<br/>
{' <section>'}<br/>
{' ...'}<br/>
{' </section>'}<br/>
{'</article>'}
{'<section class="transparent">'}<br/>
{' ...'}<br/>
{'</section>'}
</Highlight>
</section>
<section className="transparent">
Expand All @@ -50,6 +48,8 @@ const Layout: React.FC = () => {
<Highlight>
{'<article class="grid">'}<br/>
{' <section>...</section>'}<br/>
{' <section>...</section>'}<br/>
{' <section>...</section>'}<br/>
{'</article>'}
</Highlight>
</section>
Expand Down

0 comments on commit fa9228f

Please sign in to comment.