sacado el div del salamandra devs y aplicado flexbox para separar a ambos lados del...
[salamandradevs.site/.git] / themes / droda / assets / css / main.css
1 /* ESTILOS CSS PARA EL SITIO WEB DE SALAMANDRADEVS */
2
3 /* Copyright GNU LGPL. 
4    Puedes copiar, modificar y usar este software bajo los términos de la licencia general de uso público reducida de GNU.
5    Encontrarás una copia de la licencia aquí https://www.gnu.org/licenses/lgpl-3.0.html */
6
7 /* Metodología mobile first o pantallas pequeñas primero.
8    Primero se escriben las reglas para el ancho de portview
9    más pequeño a considerar */
10
11 /* VARIABLES Y REGLAS GENERALES */
12 @charset "UTF-8";
13
14 * {
15    box-sizing: border-box;
16    margin: 0;
17    padding: 0;
18 }
19
20 :root {
21    --bgColorDark: #0e0e0e;
22    --bgColorMidDark: #353b43;
23    --bgColorLightDark: #4f5864;
24    --bgColorLight: #D2D2D2;
25    --globalScale: 1;
26    
27 }
28
29 h1 {
30    font-size: 6rem;
31 }
32
33 h2 {
34    font-size: 4rem;
35 }
36
37 h3 {
38    font-size: 3rem;
39 }
40
41 h4 {
42    font-size: 2rem;
43 }
44
45 p {
46    font-size: 1.5rem;
47 }
48
49 h1, h2, h3, h4, p {
50    padding: 0.5rem 0;
51    margin: 0;
52 }
53
54 a:link,
55 a:visited,
56 a:hover,
57 a:active {
58    text-decoration: none;
59    font-size: 1.5rem;
60 }
61
62 html {
63    font-size: calc(62.5% * var(--globalScale));
64    background-color: var(--bgColorLight);
65    height: 100%;
66 }
67
68 /* REGLAS DEL HOME */
69
70 body {
71    display: grid;
72    grid-template-columns: 1fr;
73    grid-template-rows: 5rem 1fr 5rem;
74    grid-template-areas: /* No mostramos el aside en móbiles */
75       "navbar"
76       "main"
77       "footer";
78    height: 100%;
79 }
80
81 aside {
82    grid-area: aside;
83    display: none;
84    flex-flow: column nowrap;
85    align-items: flex-start;
86    justify-content: flex-start;
87    width: 100%;
88    padding: 0 1rem;
89    background-color: var(--bgColorDark);
90 }
91
92 aside .item {
93    display: flex;
94    flex-flow: row nowrap;
95    align-items: center;
96    justify-content: space-between;
97    font-size: 1.5rem;
98    width: 100%;
99    padding: 1rem 0;
100 }
101
102 nav {
103    display: flex;
104    justify-content: space-between;
105    grid-area: navbar;
106    background-color: var(--bgColorDark);
107    width: 100%;
108 }
109
110 nav div {
111    display: flex;
112    align-self: center;
113    flex-flow: nowrap;
114    width: 100%;
115 }
116
117 nav ul {
118    display: flex;
119    flex-flow: row nowrap;
120    align-items: center;
121    justify-content: flex-end;
122    list-style-type: none;
123    width: 100%;
124    height: 100%;
125    margin: 0;
126    padding: 0;
127    overflow: hidden;
128 }
129
130 .hover {
131    --c:linear-gradient(#1482c8 0 0); /* update the color here */
132
133    padding-bottom: .15em;
134    background: var(--c), var(--c);
135    background-size: .3em .1em;
136    background-position:50% 100%;
137    background-repeat: no-repeat;
138    transition: .3s linear, background-size .3s .2s linear;
139 }
140
141 .hover:hover {
142    background-size: 50% .1em;
143    background-position: 10% 100%, 90% 100%;
144 }
145
146 nav li {
147    display: flex;
148    align-items: center;
149    height: 100%;
150  }
151  
152 nav a {
153    display: block;
154    color: white;
155    text-align: center;
156    padding: 1rem 1.5rem;
157    text-decoration: none;
158  }
159
160 main {
161    grid-area: main;
162    padding: 2rem;
163    background-color: var(--bgColorMidDark);
164    background-image: url('../images/salamandra_margin.svg');
165    background-size: 10rem;
166    background-position-x: right;
167    background-position-y: bottom;
168    background-repeat: no-repeat;
169 }
170
171 /* Regla que aplica solo a firefox */
172 @-moz-document url-prefix() {
173    main {
174       background-image: url('../images/salamandra.svg');
175       background-position-x: right 1rem;
176       background-position-y: bottom 1rem;
177    }
178 }
179
180 main hr {
181    width: 100%;
182 }
183
184 .articles {
185    display: flex;
186    flex-flow: row wrap;
187    align-items: flex-start;
188    justify-content: space-between;
189 }
190
191 .articles article {
192    width: 30rem;
193    border: 1px solid;
194    border-radius: 0.5rem;
195    padding: 1rem;
196    margin: 1rem;
197 }
198
199 .content table {
200    padding-top: 2rem;
201    margin: 0 auto;
202 }
203
204 .content table img {
205    width: 3rem;
206 }
207
208 .content table td {
209    padding: 0 0.3rem;
210 }
211
212 .content .highlight code {
213    white-space: pre-wrap;
214    overflow-x: auto;
215 }
216
217 footer {
218    grid-area: footer;
219    display: flex;
220    align-items: center;
221    width: 100%;
222    padding: 0 2rem;
223    background-color: var(--bgColorLightDark);
224 }
225
226 .greetings {
227    width: 80%;
228    height: 80%;
229    margin: 0 auto;
230 }
231
232 @media screen and (min-width: 780px) {
233    :root {
234       --globalScale: 1.5;
235    }
236
237    body {
238       grid-template-columns: 11rem 1fr;
239       grid-template-areas: /* Tabletas se muestra el aside */
240          "navbar navbar"
241          "aside main"
242          "footer footer";
243    }
244
245    aside {
246       display: flex;
247    }
248 }
249
250 @media screen and (min-width: 1280px) {
251    :root {
252       --globalScale: 2;
253    }
254 }
255