Browse Source

added vars

master
rdrew 8 months ago
parent
commit
409856c018
  1. 12
      bs.js
  2. 184
      css/base.css
  3. 9
      css/components.css
  4. 8
      css/footer.css
  5. 9
      css/header.css
  6. 2
      css/layout.css
  7. 46
      css/site-variables.css
  8. 2912
      package-lock.json
  9. 3
      package.json
  10. 1
      vre2024.libraries.yml

12
bs.js

@ -1,13 +1,17 @@
var browserSync = require('browser-sync'); var browserSync = require('browser-sync');
var themeName = 'vre2024';
var siteUrl = 'https://library_local.lndo.site';
var cssWatchDir = 'css/**/*.css';
var filesToServe = '.';
browserSync({ browserSync({
proxy: 'https://islandlives2023.lndo.site', proxy: siteUrl,
files: 'css/**/*.css', files: cssWatchDir,
plugins: ['bs-rewrite-rules'], plugins: ['bs-rewrite-rules'],
serveStatic: ['.'], serveStatic: [filesToServe],
rewriteRules: [ rewriteRules: [
{ {
match: /\/themes\/custom\/robertsonlibrary_v1/g, match: /\/themes\/custom\/vre2024/g,
replace: '' replace: ''
} }
] ]

184
css/base.css

@ -1,22 +1,3 @@
/* Font info
---------------------------------------- */
/* Variables
---------------------------------------- */
:root {
--upei-red: #8c2004;
--upei-green: #5C8727;
--upei-yellow: #fbb040;
--primary: #365AB5;
--secondary: #D05700;
--dark: #232742;
--light: #D5DCEE;
--border: #99A4C1;
--color-text: #444444;
--color-heading: #111111;
}
/* Default box sizing. /* Default box sizing.
---------------------------------------- */ ---------------------------------------- */
*, *,
@ -47,7 +28,7 @@ html:focus-within {
} }
html { html {
font-size: 16px; font-size: 16px;
scroll-behavior: smooth; scroll-behavior: smooth;
} }
html, html,
body { body {
@ -55,7 +36,19 @@ body {
} }
body { body {
color: var(--color-text); color: var(--color-text);
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; background-color: var(--body-bg-color);
font-family:
system-ui,
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Roboto,
Oxygen,
Ubuntu,
Cantarell,
'Open Sans',
'Helvetica Neue',
sans-serif;
font-size: 1rem; font-size: 1rem;
font-weight: 400; font-weight: 400;
min-height: 100vh; min-height: 100vh;
@ -112,22 +105,22 @@ h6 {
line-height: 1.6; line-height: 1.6;
} }
h1 { h1 {
font-size: 2.2rem; font-size: var(--h1-size);
} }
h2 { h2 {
font-size: 1.9rem; font-size: var(--h2-size);
} }
h3 { h3 {
font-size: 1.6rem; font-size: var(--h3-size);
} }
h4 { h4 {
font-size: 1.3rem; font-size: var(--h4-size);
} }
h5 { h5 {
font-size: 1.1rem; font-size: var(--h5-size);
} }
h6 { h6 {
font-size: 1.1rem; font-size: var(--h6-size);
} }
p { p {
margin: 0 0 1.2rem 0; margin: 0 0 1.2rem 0;
@ -210,11 +203,12 @@ var {
mark { mark {
background: var(--primary); background: var(--primary);
} }
acronym[title], abbr[title] { acronym[title],
abbr[title] {
border-bottom: none; border-bottom: none;
text-decoration: underline; text-decoration: underline;
-webkit-text-decoration: underline dotted; -webkit-text-decoration: underline dotted;
text-decoration: underline dotted; text-decoration: underline dotted;
} }
abbr, abbr,
acronym { acronym {
@ -228,7 +222,7 @@ canvas,
progress, progress,
video { video {
vertical-align: baseline; vertical-align: baseline;
max-width:100%; max-width: 100%;
} }
audio:not([controls]) { audio:not([controls]) {
display: none; display: none;
@ -297,13 +291,13 @@ select {
text-transform: none; text-transform: none;
} }
.button { .button {
display:inline-block; display: inline-block;
} }
.button, .button,
button, button,
[type="button"], [type='button'],
[type="reset"], [type='reset'],
[type="submit"] { [type='submit'] {
position: relative; position: relative;
cursor: pointer; cursor: pointer;
border: 0; border: 0;
@ -312,16 +306,16 @@ button,
-webkit-appearance: button; -webkit-appearance: button;
} }
button::-moz-focus-inner, button::-moz-focus-inner,
[type="button"]::-moz-focus-inner, [type='button']::-moz-focus-inner,
[type="reset"]::-moz-focus-inner, [type='reset']::-moz-focus-inner,
[type="submit"]::-moz-focus-inner { [type='submit']::-moz-focus-inner {
border-style: none; border-style: none;
padding: 0; padding: 0;
} }
button:-moz-focusring, button:-moz-focusring,
[type="button"]:-moz-focusring, [type='button']:-moz-focusring,
[type="reset"]:-moz-focusring, [type='reset']:-moz-focusring,
[type="submit"]:-moz-focusring { [type='submit']:-moz-focusring {
outline: 0; outline: 0;
} }
button[disabled], button[disabled],
@ -346,19 +340,19 @@ input,
textarea { textarea {
max-width: 100%; max-width: 100%;
} }
input[type="text"], input[type='text'],
input[type="email"], input[type='email'],
input[type="url"], input[type='url'],
input[type="password"], input[type='password'],
input[type="search"], input[type='search'],
textarea { textarea {
padding: 10px; padding: 10px;
} }
input[type="text"]:focus, input[type='text']:focus,
input[type="email"]:focus, input[type='email']:focus,
input[type="url"]:focus, input[type='url']:focus,
input[type="password"]:focus, input[type='password']:focus,
input[type="search"]:focus, input[type='search']:focus,
textarea:focus { textarea:focus {
outline: 0; outline: 0;
} }
@ -366,28 +360,28 @@ textarea {
width: 100%; width: 100%;
overflow: auto; overflow: auto;
} }
[type="checkbox"], [type='checkbox'],
[type="radio"] { [type='radio'] {
padding: 0; padding: 0;
cursor: pointer; cursor: pointer;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
} }
[type="number"]::-webkit-inner-spin-button, [type='number']::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button { [type='number']::-webkit-outer-spin-button {
height: auto; height: auto;
} }
[type="search"] { [type='search'] {
-webkit-appearance: textfield; -webkit-appearance: textfield;
outline-offset: -2px; outline-offset: -2px;
-webkit-appearance: textfield; -webkit-appearance: textfield;
-moz-appearance: textfield; -moz-appearance: textfield;
} }
[type="search"]::-webkit-search-decoration { [type='search']::-webkit-search-decoration {
-webkit-appearance: none; -webkit-appearance: none;
} }
[type="file"] { [type='file'] {
cursor: pointer; cursor: pointer;
} }
fieldset { fieldset {
@ -420,7 +414,7 @@ label[for] {
margin-bottom: 1rem; margin-bottom: 1rem;
} }
.form-required:after { .form-required:after {
content: "*"; content: '*';
display: inline-block; display: inline-block;
padding-left: 4px; padding-left: 4px;
color: red; color: red;
@ -445,11 +439,11 @@ label.option {
:-ms-input-placeholder { :-ms-input-placeholder {
color: var(--border); color: var(--border);
} }
.field--name-body input[type="text"], .field--name-body input[type='text'],
.field--name-body input[type="email"], .field--name-body input[type='email'],
.field--name-body input[type="url"], .field--name-body input[type='url'],
.field--name-body input[type="password"], .field--name-body input[type='password'],
.field--name-body input[type="search"], .field--name-body input[type='search'],
.field--name-body textarea { .field--name-body textarea {
display: block; display: block;
margin-bottom: 0.8rem; margin-bottom: 0.8rem;
@ -490,38 +484,38 @@ blockquote > :last-child {
/* List /* List
---------------------------------------- */ ---------------------------------------- */
ul, ul,
ol { ol {
margin: 0; margin: 0;
padding: 0 0 0.25rem 1rem; padding: 0 0 0.25rem 1rem;
} }
[dir="rtl"] ul, [dir='rtl'] ul,
[dir="rtl"] ol { [dir='rtl'] ol {
padding: 0 1rem 0.25rem 0; padding: 0 1rem 0.25rem 0;
} }
ol ol, ol ol,
ul ul { ul ul {
margin: 0; margin: 0;
padding: 0 0 0.25rem 1rem; padding: 0 0 0.25rem 1rem;
} }
[dir="rtl"] ol ol, [dir='rtl'] ol ol,
[dir="rtl"] ul ul { [dir='rtl'] ul ul {
padding: 0 1rem 0.25rem 0; padding: 0 1rem 0.25rem 0;
} }
ul { ul {
list-style: disc; list-style: disc;
} }
li > ul, li > ul,
li > ol { li > ol {
margin-bottom: 0; margin-bottom: 0;
} }
[dir="rtl"] ul, [dir='rtl'] ul,
[dir="rtl"] ol { [dir='rtl'] ol {
padding: 0 1rem 0.25rem 0; padding: 0 1rem 0.25rem 0;
} }
li { li {
padding: 4px 0; padding: 4px 0;
} }
/* Table /* Table
---------------------------------------- */ ---------------------------------------- */

9
css/components.css

@ -78,15 +78,16 @@ ul.page-tabs {
display: inline-flex; display: inline-flex;
padding: 0; padding: 0;
} }
.page-tabs li a { .page-tabs li a {
background-color: var(--dark); background-color: var(--page-tab-bg-color);
color: #ffffff; color: var(--page-tab-text-color);
padding: 0.5rem 1rem; padding: 0.5rem 1rem;
border-right: 2px solid var(--border); border-right: 2px solid var(--page-tab-border-color);
} }
.page-tabs li.active-page-tab a, .page-tabs li.active-page-tab a,
.page-tabs li a:hover { .page-tabs li a:hover {
color: var(--primary); color: var(--page-tab-text-color-active);
} }
/* Node submitted details */ /* Node submitted details */
.node-submitted-details { .node-submitted-details {

8
css/footer.css

@ -4,11 +4,15 @@
/* Footer */ /* Footer */
.footer { .footer {
position: relative; position: relative;
background-color: var(--light); background-color: var(--footer-bg-color);
color: var(--footer-text-color);
width: 100%; width: 100%;
margin: 0; margin: 0;
padding: 0; padding: 0;
} a {
color: var(--footer-link-color);
}
}
.footer ul { .footer ul {
list-style: none; list-style: none;
padding: 0; padding: 0;

9
css/header.css

@ -8,6 +8,8 @@
width: 100%; width: 100%;
margin: 0; margin: 0;
padding: 0.5rem 0; padding: 0.5rem 0;
background: var(--header-bg-color);
color: var(--header-text-color);
} }
.header-top-container { .header-top-container {
position: relative; position: relative;
@ -81,6 +83,7 @@
} }
.site-logo { .site-logo {
padding-right: 5px; padding-right: 5px;
width: var(--logo-width);
} }
.site-logo img { .site-logo img {
display: block; display: block;
@ -101,6 +104,12 @@
.site-slogan { .site-slogan {
line-height: 1.1; line-height: 1.1;
} }
.site-name {
a {
font-size: var(--site-name-font-size);
color: var(--site-name-font-color);
}
}
/* Header -> header right */ /* Header -> header right */
.header-right { .header-right {

2
css/layout.css

@ -5,7 +5,7 @@
.container { .container {
position: relative; position: relative;
width: 100%; width: 100%;
max-width: 1170px; max-width: var(--page-container-width);
margin: 0 auto; margin: 0 auto;
padding: 0 10px; padding: 0 10px;
} }

46
css/site-variables.css

@ -0,0 +1,46 @@
/* Font info
---------------------------------------- */
/* Variables
---------------------------------------- */
:root {
--upei-red: #8c2004;
--upei-green: #5c8727;
--upei-yellow: #fbb040;
--primary: #365ab5;
--primary: var(--upei-red);
--secondary: #d05700;
--dark: #232742;
--light: #ccc;
--border: #a8a6a6;
--color-text: #444444;
--color-heading: #111111;
--body-bg-color: #fff;
--page-tab-bg-color: var(--light);
--page-tab-text-color: #333;
--page-tab-text-color-active: var(--primary);
--page-tab-border-color: var(--border);
--h1-size: 2.2rem;
--h2-size: 1.9rem;
--h3-size: 1.6rem;
--h4-size: 1.3rem;
--h5-size: 1.1rem;
--h6-size: 1.1rem;
--page-container-width: 1440px;
--header-bg-color: #333;
--header-text-color: #fff;
--logo-width: 100px;
--site-name-font-size: 2em;
--site-name-font-color: var(--header-text-color);
/*footer*/
--footer-bg-color: #ccc;
--footer-text-color: initial;
--footer-link-color: var(--upei-red);
}

2912
package-lock.json generated

File diff suppressed because it is too large Load Diff

3
package.json

@ -11,6 +11,7 @@
"license": "ISC", "license": "ISC",
"devDependencies": { "devDependencies": {
"browser-sync": "^3.0.2", "browser-sync": "^3.0.2",
"bs-rewrite-rules": "^2.1.2" "bs-rewrite-rules": "^2.1.2",
"prettier": "3.2.5"
} }
} }

1
vre2024.libraries.yml

@ -2,6 +2,7 @@ global-styling:
version: VERSION version: VERSION
css: css:
base: base:
css/site-variables.css: {}
css/base.css: {} css/base.css: {}
layout: layout:
css/layout.css: {} css/layout.css: {}

Loading…
Cancel
Save