things
This commit is contained in:
@@ -545,6 +545,68 @@ table.cols-5 td.incorrect {
|
||||
right: 34px;
|
||||
}
|
||||
|
||||
#block-dchadwick-breadcrumbs {
|
||||
background: var(--site-gray);
|
||||
}
|
||||
#block-dchadwick-breadcrumbs ol {
|
||||
max-width: 1300px;
|
||||
margin: 0 50px;
|
||||
padding: 10px 0;
|
||||
list-style: none;
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
}
|
||||
#block-dchadwick-breadcrumbs ol li:not(:last-child):after {
|
||||
content: "/";
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
margin-left: 10px;
|
||||
}
|
||||
#block-dchadwick-breadcrumbs ol a, #block-dchadwick-breadcrumbs ol li {
|
||||
color: var(--site-platinum);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.node-type-character .layout--twocol-section {
|
||||
gap: 20px;
|
||||
}
|
||||
.node-type-character .layout--twocol-section .layout__region--first {
|
||||
flex: 0 1 calc(67% - 20px);
|
||||
}
|
||||
.node-type-character .layout--twocol-section .layout__region--first h1 {
|
||||
margin-bottom: 5px;
|
||||
background: var(--site-primary);
|
||||
color: var(--site-platinum);
|
||||
padding: 0 10px;
|
||||
}
|
||||
.node-type-character .layout--twocol-section .layout__region--first h3 {
|
||||
margin: 0;
|
||||
font-style: italic;
|
||||
font-size: 16px;
|
||||
color: var(--site-gray);
|
||||
display: inline-block;
|
||||
padding: 0 10px;
|
||||
}
|
||||
.node-type-character .layout--twocol-section .layout__region--second {
|
||||
flex: 0 1 calc(33% - 20px);
|
||||
text-align: center;
|
||||
}
|
||||
.node-type-character .layout--twocol-section .layout__region--second [class^=field] > div:first-child {
|
||||
background: var(--site-gray);
|
||||
color: var(--site-white);
|
||||
font-size: 18px;
|
||||
font-weight: 900;
|
||||
padding: 5px 0;
|
||||
}
|
||||
.node-type-character .layout--twocol-section .layout__region--second [class^=field] div:nth-child(2) {
|
||||
padding: 5px 0;
|
||||
color: var(--site-gray);
|
||||
}
|
||||
.node-type-character .layout__region--first p {
|
||||
font-size: 18px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
html {
|
||||
font-size: 100%;
|
||||
box-sizing: border-box;
|
||||
|
||||
@@ -16,9 +16,15 @@ function dchadwick_preprocess_node__article(&$vars) {
|
||||
$vars['#attached']['library'] = 'dchadwick/articles';
|
||||
}
|
||||
|
||||
function dchadwick_preprocess_field(&$vars) {
|
||||
if (isset($vars['field_name'])) {
|
||||
$vars['attributes']['class'][] = $vars['field_name'];
|
||||
}
|
||||
}
|
||||
|
||||
function dchadwick_page_attachments_alter(&$page) {
|
||||
// Attach brain.js to all pages? No reason at the moment.
|
||||
/* $page['#attached']['library'][] = 'dchadwick/brainjs'; */
|
||||
$page['#attached']['library'][] = 'dchadwick/brainjs';
|
||||
}
|
||||
|
||||
function dchadwick_preprocess_node__fighter(&$vars) {
|
||||
|
||||
@@ -2,7 +2,7 @@ document.addEventListener('readystatechange', event => {
|
||||
// When HTML/DOM elements are ready:
|
||||
if (event.target.readyState === "interactive") { //does same as: ..addEventListener("DOMContentLoaded"..
|
||||
highlightFightHistory();
|
||||
let train = false;
|
||||
let train = true;
|
||||
if (train) {
|
||||
setTimeout(() => {
|
||||
trainTheBrain();
|
||||
@@ -32,9 +32,9 @@ function highlightFightHistory() {
|
||||
|
||||
function trainTheBrain() {
|
||||
const config = {
|
||||
iterations: 50000,
|
||||
iterations: 5000,
|
||||
log: true,
|
||||
logPeriod: 1000,
|
||||
logPeriod: 100,
|
||||
binaryThresh: 0.5,
|
||||
hiddenLayers: [40, 20], // array of ints for the sizes of the hidden layers in the network
|
||||
activation: 'sigmoid', // supported activation types: ['sigmoid', 'relu', 'leaky-relu', 'tanh'],
|
||||
|
||||
1180
web/themes/custom/dchadwick/package-lock.json
generated
1180
web/themes/custom/dchadwick/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -15,8 +15,7 @@
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-concat": "^2.6.1",
|
||||
"gulp-sass": "^5.1.0",
|
||||
"postcss": "^8.4.47",
|
||||
"tailwindcss": "^3.4.13"
|
||||
"postcss": "^8.4.47"
|
||||
},
|
||||
"dependencies": {
|
||||
"sass": "^1.71.1"
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
#block-dchadwick-breadcrumbs {
|
||||
background: var(--site-gray);
|
||||
|
||||
ol {
|
||||
max-width: 1300px;
|
||||
margin: 0 50px;
|
||||
padding: 10px 0;
|
||||
list-style: none;
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
|
||||
li:not(:last-child) {
|
||||
&:after {
|
||||
content: "/";
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
a,li {
|
||||
color: var(--site-platinum);
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
.node-type-character {
|
||||
|
||||
.layout--twocol-section {
|
||||
gap: 20px;
|
||||
|
||||
.layout__region--first {
|
||||
flex: 0 1 calc(67% - 20px);
|
||||
|
||||
h1 {
|
||||
margin-bottom: 5px;
|
||||
background: var(--site-primary);
|
||||
color: var(--site-platinum);
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin: 0;
|
||||
font-style: italic;
|
||||
font-size: 16px;
|
||||
color: var(--site-gray);
|
||||
display: inline-block;
|
||||
padding: 0 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.layout__region--second {
|
||||
flex: 0 1 calc(33% - 20px);
|
||||
text-align: center;
|
||||
|
||||
[class^=field] {
|
||||
> div:first-child {
|
||||
background: var(--site-gray);
|
||||
color: var(--site-white);
|
||||
font-size: 18px;
|
||||
font-weight: 900;
|
||||
padding: 5px 0;
|
||||
}
|
||||
div:nth-child(2) {
|
||||
padding: 5px 0;
|
||||
color: var(--site-gray);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
.layout__region--first p {
|
||||
font-size: 18px;
|
||||
line-height: 24px;
|
||||
}
|
||||
}
|
||||
@@ -51,6 +51,8 @@ $container-plus-padding: 1216px;
|
||||
@import "partials/fight";
|
||||
@import "partials/event";
|
||||
@import "partials/article";
|
||||
@import "partials/breadcrumbs";
|
||||
@import "partials/characters";
|
||||
|
||||
html {
|
||||
font-size: 100%;
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{%
|
||||
set title_classes = [
|
||||
label_display == 'visually_hidden' ? 'visually-hidden',
|
||||
]
|
||||
%}
|
||||
<div{{ attributes }}>
|
||||
{% for item in items %}
|
||||
<img src="{{ item.content }}"/>
|
||||
{% endfor %}
|
||||
</div>
|
||||
@@ -0,0 +1,10 @@
|
||||
{%
|
||||
set title_classes = [
|
||||
label_display == 'visually_hidden' ? 'visually-hidden',
|
||||
]
|
||||
%}
|
||||
<div{{ attributes }}>
|
||||
{% for item in items %}
|
||||
<iframe src="{{ item.content }}" width="100%" height="400px"></iframe>
|
||||
{% endfor %}
|
||||
</div>
|
||||
Reference in New Issue
Block a user