Skuid templates were changed on a demo. Williams-Sonoma improvements. Script was updated slightly.
This commit is contained in:
@ -92,6 +92,9 @@
|
|||||||
{% endif%}
|
{% endif%}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
{{ school.custom_properties.banner_text}}
|
||||||
|
<if></if>
|
||||||
|
|
||||||
{% if view_more_counter >= 4%}
|
{% if view_more_counter >= 4%}
|
||||||
<button class="np-top-button np-button-font-color np-button np-button-big view-more-button" onclick="viewMore()">View More</button>
|
<button class="np-top-button np-button-font-color np-button np-button-big view-more-button" onclick="viewMore()">View More</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@ -8,7 +8,6 @@
|
|||||||
/* 4.3 Overview */
|
/* 4.3 Overview */
|
||||||
/* 4.4 Dashboard filter */
|
/* 4.4 Dashboard filter */
|
||||||
/* 5. Course */
|
/* 5. Course */
|
||||||
|
|
||||||
/* 1. Global */
|
/* 1. Global */
|
||||||
|
|
||||||
@media (min-width: 769px) and (max-width: 1600px) {
|
@media (min-width: 769px) and (max-width: 1600px) {
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
{% assign new_hire_progress = 0 %}
|
{% assign new_hire_progress = 0 %}
|
||||||
{% assign day_offset_in_seconds = 864000 %}
|
{% assign day_offset_in_seconds = 864000 %}
|
||||||
{% assign zoom_url = "NULL" %}
|
{% assign zoom_url = "NULL" %}
|
||||||
|
{% assign in_center_group = false %}
|
||||||
|
|
||||||
{% for learning_path in learning_paths.enrolled %}
|
{% for learning_path in learning_paths.enrolled %}
|
||||||
{% for category in learning_path.categories %}
|
{% for category in learning_path.categories %}
|
||||||
@ -26,6 +27,15 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% for group in current_person.groups %}
|
||||||
|
{% if group.name contains " IC " %}
|
||||||
|
{% assign in_center_group = true %}
|
||||||
|
{% else %}
|
||||||
|
{% assign in_center_group = false %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
{% include "header" %}
|
{% include "header" %}
|
||||||
<main class="np-main np-homepage">
|
<main class="np-main np-homepage">
|
||||||
<div class="np-homepage-hero">
|
<div class="np-homepage-hero">
|
||||||
@ -45,7 +55,7 @@
|
|||||||
{% include "new_hire_homepage"
|
{% include "new_hire_homepage"
|
||||||
, zoom_url: zoom_url %}
|
, zoom_url: zoom_url %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if is_enrolled_in_new_hire_lp == true %}
|
{% if is_enrolled_in_new_hire_lp == true or in_center_group == true %}
|
||||||
{% if new_hire_progress == 100 %}
|
{% if new_hire_progress == 100 %}
|
||||||
<script>
|
<script>
|
||||||
console.log("User new hire progress is 100")
|
console.log("User new hire progress is 100")
|
||||||
@ -75,7 +85,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %} {% endcomment %}
|
{% endif %} {% endcomment %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if new_hire_progress > 0 %}
|
{% if new_hire_progress > 0 or in_center_group == true %}
|
||||||
<script>
|
<script>
|
||||||
window.location.replace("/app/dashboard")
|
window.location.replace("/app/dashboard")
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
import re
|
import re
|
||||||
from html.parser import HTMLParser
|
from html.parser import HTMLParser
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import pandas as pd
|
# import pandas as pd
|
||||||
|
from bs4 import BeautifulSoup
|
||||||
|
|
||||||
# MASDICT = {'file': "", 'attributes' : { 'id': [], 'class': [] } }
|
# MASDICT = {'file': "", 'attributes' : { 'id': [], 'class': [] } }
|
||||||
MASLIST = []
|
MASLIST = []
|
||||||
@ -11,38 +12,50 @@ x = list(p.glob('**/*.html.liquid'))
|
|||||||
for posfile in x:
|
for posfile in x:
|
||||||
file = str(posfile)
|
file = str(posfile)
|
||||||
htmlfile = open(file, 'r', encoding='utf-8')
|
htmlfile = open(file, 'r', encoding='utf-8')
|
||||||
finfile = file.split('/')[-1]
|
file2 = open(file, 'r', encoding='utf-8')
|
||||||
code = htmlfile.readlines()
|
# finfile = file.split('/')[-1]
|
||||||
ids = []
|
code = file2.readlines()
|
||||||
classes = []
|
inclst = [include for include in code if '{% include' in include]
|
||||||
|
print(inclst)
|
||||||
for lines in code:
|
for lines in code:
|
||||||
if "class=" in lines:
|
if '{% include' in lines:
|
||||||
tmpline = lines
|
|
||||||
if "id=" not in tmpline:
|
|
||||||
try:
|
|
||||||
htmlclass = re.search('class="(.*)"', tmpline)
|
|
||||||
classes.append(htmlclass.group(1))
|
|
||||||
except AttributeError as t:
|
|
||||||
print("Class: ", t)
|
|
||||||
pass
|
|
||||||
finally:
|
|
||||||
pass
|
|
||||||
elif "id=" in lines:
|
|
||||||
try:
|
|
||||||
id = re.search('id="(.*)"', lines)
|
|
||||||
ids.append(id.group(1))
|
|
||||||
except AttributeError as t:
|
|
||||||
print("ID: ", t)
|
|
||||||
pass
|
|
||||||
finally:
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
pass
|
pass
|
||||||
seconddict = { 'file': finfile, 'attributes': { 'id' : ids, 'class': classes } }
|
|
||||||
MASLIST.append(seconddict)
|
|
||||||
|
|
||||||
df = pd.json_normalize(MASLIST)
|
soup = BeautifulSoup(htmlfile, 'html.parser')
|
||||||
print(df)
|
clst = [node['class'] for node in soup.find_all() if node.has_attr('class')]
|
||||||
|
# print(clst)
|
||||||
|
ilst = [node['id'] for node in soup.find_all() if node.has_attr('id')]
|
||||||
|
# print(ilst)
|
||||||
|
|
||||||
|
# ids = []
|
||||||
|
# classes = []
|
||||||
|
# if "class=" in lines:
|
||||||
|
# tmpline = lines
|
||||||
|
# if "id=" not in tmpline:
|
||||||
|
# try:
|
||||||
|
# htmlclass = re.search('class="(.*)"', tmpline)
|
||||||
|
# classes.append(htmlclass.group(1))
|
||||||
|
# except AttributeError as t:
|
||||||
|
# print("Class: ", t)
|
||||||
|
# pass
|
||||||
|
# finally:
|
||||||
|
# pass
|
||||||
|
# elif "id=" in lines:
|
||||||
|
# try:
|
||||||
|
# id = re.search('id="(.*)"', lines)
|
||||||
|
# ids.append(id.group(1))
|
||||||
|
# except AttributeError as t:
|
||||||
|
# print("ID: ", t)
|
||||||
|
# pass
|
||||||
|
# finally:
|
||||||
|
# pass
|
||||||
|
# else:
|
||||||
|
# pass
|
||||||
|
# seconddict = { 'file': finfile, 'attributes': { 'id' : ids, 'class': classes } }
|
||||||
|
# MASLIST.append(seconddict)
|
||||||
|
#
|
||||||
|
# df = pd.json_normalize(MASLIST)
|
||||||
|
# print(df)
|
||||||
# kp = (df.set_index('file').apply(lambda x: x.str.split(",").explode()).reset_index())
|
# kp = (df.set_index('file').apply(lambda x: x.str.split(",").explode()).reset_index())
|
||||||
# ksp = df.set_index('file').apply(lambda x: df['attributes.class']([x.split(',') ]))
|
# ksp = df.set_index('file').apply(lambda x: df['attributes.class']([x.split(',') ]))
|
||||||
# print(ksp)
|
# print(ksp)
|
||||||
|
|||||||
Reference in New Issue
Block a user