Skip to content

Commit

Permalink
DEC-000: Small fixes and background image assets.
Browse files Browse the repository at this point in the history
  • Loading branch information
sherakama committed Jan 5, 2021
1 parent a244e32 commit d922978
Show file tree
Hide file tree
Showing 11 changed files with 63 additions and 20 deletions.
2 changes: 1 addition & 1 deletion dev/webpack.dev.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ module.exports.optimization = {
// Entry points.
// -----------------------------------------------------------------------------
module.exports.entry = {
'test': path.resolve(__dirname, "src/index.js"),
'decanter': path.resolve(__dirname, "../src/decanter.js"),
'test': path.resolve(__dirname, "src/index.js"),
};

// Output points.
Expand Down
3 changes: 3 additions & 0 deletions dist/assets/img/icon-search.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 37 additions & 14 deletions dist/decanter.css
Original file line number Diff line number Diff line change
Expand Up @@ -1026,12 +1026,7 @@ table tbody th{
}
.su-logo{
display: inline-block;
font-family: "Stanford";
font-family: "Source Serif Pro";
font-family: Georgia;
font-family: Times;
font-family: "Times New Roman";
font-family: serif;
font-family: Stanford, "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
font-weight: 400;
line-height: 0.75;
text-decoration: none;
Expand Down Expand Up @@ -1064,7 +1059,7 @@ table tbody th{
background-color: #8C1515;
}
.su-brand-bar .su-logo{
font-family: "Stanford", "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
font-family: Stanford, "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
margin-top: 8px;
font-size: 20px;
}
Expand Down Expand Up @@ -1514,6 +1509,7 @@ table tbody th{
margin-right: 0;
margin-bottom: 0;
opacity: 0.6;
background: url(/assets/img/icon-search.svg) no-repeat 0 0;
}
.su-site-search__submit:hover, .su-site-search__submit:active, .su-site-search__submit:focus{
background-color: transparent;
Expand Down Expand Up @@ -3873,6 +3869,9 @@ table tbody th{
background-image: -webkit-gradient(linear, right bottom, left top, from(var(--tw-gradient-stops)));
background-image: linear-gradient(to top left, var(--tw-gradient-stops));
}
.su-bg-icon-search{
background-image: url(/assets/img/icon-search.svg);
}
.su-from-transparent{
--tw-gradient-from: transparent;
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(0, 0, 0, 0));
Expand Down Expand Up @@ -7697,7 +7696,7 @@ table tbody th{
font-family: "Roboto Slab", Georgia, Times, "Times New Roman", serif;
}
.su-font-stanford{
font-family: "Stanford", "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
font-family: Stanford, "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
}
.su-font-fab{
font-family: "Font Awesome 5 Brands";
Expand Down Expand Up @@ -25402,6 +25401,10 @@ table tbody th{
background-image: linear-gradient(to top left, var(--tw-gradient-stops));
}

.xs\:su-bg-icon-search{
background-image: url(/assets/img/icon-search.svg);
}

.xs\:su-from-transparent{
--tw-gradient-from: transparent;
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(0, 0, 0, 0));
Expand Down Expand Up @@ -30399,7 +30402,7 @@ table tbody th{
}

.xs\:su-font-stanford{
font-family: "Stanford", "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
font-family: Stanford, "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
}

.xs\:su-font-fab{
Expand Down Expand Up @@ -48509,6 +48512,10 @@ table tbody th{
background-image: linear-gradient(to top left, var(--tw-gradient-stops));
}

.sm\:su-bg-icon-search{
background-image: url(/assets/img/icon-search.svg);
}

.sm\:su-from-transparent{
--tw-gradient-from: transparent;
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(0, 0, 0, 0));
Expand Down Expand Up @@ -53506,7 +53513,7 @@ table tbody th{
}

.sm\:su-font-stanford{
font-family: "Stanford", "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
font-family: Stanford, "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
}

.sm\:su-font-fab{
Expand Down Expand Up @@ -71616,6 +71623,10 @@ table tbody th{
background-image: linear-gradient(to top left, var(--tw-gradient-stops));
}

.md\:su-bg-icon-search{
background-image: url(/assets/img/icon-search.svg);
}

.md\:su-from-transparent{
--tw-gradient-from: transparent;
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(0, 0, 0, 0));
Expand Down Expand Up @@ -76613,7 +76624,7 @@ table tbody th{
}

.md\:su-font-stanford{
font-family: "Stanford", "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
font-family: Stanford, "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
}

.md\:su-font-fab{
Expand Down Expand Up @@ -94723,6 +94734,10 @@ table tbody th{
background-image: linear-gradient(to top left, var(--tw-gradient-stops));
}

.lg\:su-bg-icon-search{
background-image: url(/assets/img/icon-search.svg);
}

.lg\:su-from-transparent{
--tw-gradient-from: transparent;
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(0, 0, 0, 0));
Expand Down Expand Up @@ -99720,7 +99735,7 @@ table tbody th{
}

.lg\:su-font-stanford{
font-family: "Stanford", "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
font-family: Stanford, "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
}

.lg\:su-font-fab{
Expand Down Expand Up @@ -117830,6 +117845,10 @@ table tbody th{
background-image: linear-gradient(to top left, var(--tw-gradient-stops));
}

.xl\:su-bg-icon-search{
background-image: url(/assets/img/icon-search.svg);
}

.xl\:su-from-transparent{
--tw-gradient-from: transparent;
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(0, 0, 0, 0));
Expand Down Expand Up @@ -122827,7 +122846,7 @@ table tbody th{
}

.xl\:su-font-stanford{
font-family: "Stanford", "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
font-family: Stanford, "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
}

.xl\:su-font-fab{
Expand Down Expand Up @@ -140937,6 +140956,10 @@ table tbody th{
background-image: linear-gradient(to top left, var(--tw-gradient-stops));
}

.\32xl\:su-bg-icon-search{
background-image: url(/assets/img/icon-search.svg);
}

.\32xl\:su-from-transparent{
--tw-gradient-from: transparent;
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(0, 0, 0, 0));
Expand Down Expand Up @@ -145934,7 +145957,7 @@ table tbody th{
}

.\32xl\:su-font-stanford{
font-family: "Stanford", "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
font-family: Stanford, "Source Serif Pro", Georgia, Times, "Times New Roman", serif;
}

.\32xl\:su-font-fab{
Expand Down
Empty file removed src/assets/img/.gitkeep
Empty file.
3 changes: 3 additions & 0 deletions src/assets/img/icon-search.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/plugins/components/brand-bar/brand-bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
module.exports = function () {
return function ({ addComponents, theme, config }) {

var stanford = config('theme.fontFamily.stanford').join(", ");
let stanford = config('theme.fontFamily.stanford').join(", ");

const components = {
'.brand-bar': {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/components/logo/logo.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
module.exports = function () {
return function ({ addComponents, theme, config }) {
const stanford = config('theme.fontFamily.stanford');
let stanford = config('theme.fontFamily.stanford').join(", ");

const components = {
'.logo': {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/components/site-search/site-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = function () {
marginRight: '0',
marginBottom: '0',
opacity: '0.6',
//background: 'url("#{$su-image-path}/icon-search.svg") no-repeat 0 0',
background: theme('backgroundImage.icon-search') + ' no-repeat 0 0',
'&:hover, &:active, &:focus': {
backgroundColor: 'transparent',
opacity: '1',
Expand Down
12 changes: 12 additions & 0 deletions src/plugins/theme/backgroundImage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
let path = require('path')

/**
* Aspect ratio options for containers
*/
module.exports = function () {
let dir = path.resolve(__dirname, '../../', 'assets/img')

return {
'icon-search': "url('" + dir + "/icon-search.svg')",
}
}
2 changes: 1 addition & 1 deletion src/plugins/theme/fontFamily.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = function () {
sans: ['"Source Sans Pro"', '"Helvetica Neue"', 'Helvetica', 'Arial', 'sans-serif'],
serif: ['"Source Serif Pro"', 'Georgia', 'Times', '"Times New Roman"', 'serif'],
slab: ['"Roboto Slab"', 'Georgia', 'Times', '"Times New Roman"', 'serif'],
stanford: ['"Stanford"','"Source Serif Pro"', 'Georgia', 'Times','"Times New Roman"', 'serif'],
stanford: ['Stanford','"Source Serif Pro"', 'Georgia', 'Times','"Times New Roman"', 'serif'],
fab: ['"Font Awesome 5 Brands"'],
far: ['"Font Awesome 5 Free"'],
fas: ['"Font Awesome 5 Free"'],
Expand Down
4 changes: 3 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ module.exports = {
// Decanter Custom.
decanter: require(dir + '/theme/decanter.js')(),
// Extensions of tailwind core config.
extend: {}
extend: {
backgroundImage: require(dir + '/theme/backgroundImage.js')()
}
},

// The corePlugins section lets you completely disable classes that Tailwind
Expand Down

0 comments on commit d922978

Please sign in to comment.