예제 #1
0
    def __init__(self, venue):
        location = venue['location']
        coords = [location['lat'], location['lng']]

        dot = L.circleMarker(coords, dict(
            color='red',
            fillColor='red',
            fillOpacity=1,
        )).addTo(map)
        dot.setRadius(5)
        dot.on('click', self.select_and_scroll)
        self.dot = dot

        li = LI(
            get_img(venue) +
            DIV(
                get_name_el(venue) +
                DIV(location['address']) +
                get_category_div(venue) +
                DIV('Rating: %s' % venue['rating']),
                Class='info'
            )
        )
        li.bind('click', self.select_and_pan)
        restaurant_ul <= li
        self.li = li
예제 #2
0
def menu():
    menu = UL()
    lien_ouvrages = A('Ouvrages', href='#liste')
    lien_auteurs = A('Auteurs', href='#liste')
    lien_editeurs = A('Éditeurs', href='#liste')
    lien_ouvrages.bind('click',
                       lambda ev: charger_liste(ev, 'ouvrages', 'titre'))
    lien_auteurs.bind('click', lambda ev: charger_liste(ev, 'auteurs', 'nom'))
    lien_editeurs.bind('click',
                       lambda ev: charger_liste(ev, 'editeurs', 'nom'))
    menu <= LI(lien_ouvrages)
    menu <= LI(lien_auteurs)
    menu <= LI(lien_editeurs)
    doc['menu'].clear()
    doc['menu'] <= menu
예제 #3
0
def menu():
    div = DIV(Class="menu")
    ul = UL()

    li_inicio = LI(A('Início', href="index.html"))
    li_curriculo = LI(A('Currículo', href="curriculo.html"))
    li_sobre = LI(A('Sobre', href="sobre.html"))

    a_utilidades = A('Utilidades', href="utilidades.html", Class="dropbtn")
    li_utilidades = LI(Class="dropdown")
    li_utilidades <= a_utilidades
    div_utilidades = DIV(Class="dropdown-content")
    div_utilidades <= A('Sites Úteis', href="sites.html") + A(
        'Dicas Úteis', href="dicas.html") + A(
            'Códigos Úteis', href="codigos.html") + A(
                'Livros Úteis', href="livros.html") + A(
                    'Programas Úteis', href="programas.html") + A(
                        'Frases Úteis', href="frases.html") + A(
                            'Materiais Úteis', href="materiais.html")
    li_utilidades <= div_utilidades

    li_python = LI(A('Python', href="python.html"))
    li_jquery = LI(A('JQuery', href="jquery.html"))
    li_contato = LI(A('Contato', href="contato.html"))

    ul <= li_inicio + li_curriculo + li_sobre + li_utilidades + li_python + li_jquery + li_contato
    div <= ul
    return div
예제 #4
0
def list_link(text, link):
    li_element = LI()

    element = A(text)
    element.target = '_blank'
    element.href = link

    li_element <= element
    return li_element
예제 #5
0
def nav_element(text, link):
    """
    Cria links para uma lista.

    Parans:
       - text: texto que aparecerá no link
       - link: href
    """
    li_element = LI()

    element = A(text, Class='menu-item')
    element.target = '_blank'
    element.href = link

    li_element <= element
    return li_element
예제 #6
0
def handle_msg_config_process_mgr_list(msg):
    """Enable the dropdown, clear out the old contents, and update"""
    dropListNode = doc['procmgrlist']

    dropListNode.clear()
    doc["procmgrdropbox"].classList.remove('disabled')

    print("MsgConfigProcessMgrList")
    for process_mgr in msg['process_mgrs']:
        print(process_mgr)
        newNode = A(process_mgr['name'])
        id_ = process_mgr['id']
        #newNode.bind('click', lambda evt :switch_to_new_process_mgr(evt=evt,id_=id_) )
        newNode.bind('click',
                     functools.partial(switch_to_new_process_mgr, id_=id_))
        dropListNode <= LI(newNode)

    # And switch to the first node by default:
    switch_to_new_process_mgr(None, id_=msg['process_mgrs'][0]['id'])
예제 #7
0
def init_characters():
	t = TABLE(Class='body')
	t <= COLGROUP(
		COL() +
		COL() +
		COL(Class='left_border') +
		COL(Class='left_dotted') +
		COL(Class='left_border') +
		COL(Class='left_dotted') +
		COL(Class='left_border') +
		COL(Class='left_dotted') +
		COL(Class='left_border') +
		COL(Class='left_dotted') +
		COL(Class='left_border') +
		COL(Class='left_dotted') +
		COL(Class='left_dotted') +
		COL(Class='left_border') +
		COL(Class='left_dotted') +
		COL(Class='left_dotted')
	)
	t <= TR(
		TH(strings["character"], colspan=2) +
		TH(strings["level"], colspan=2) +
		TH(strings["normal"], colspan=2) +
		TH(strings["skill"], colspan=2) +
		TH(strings["burst"], colspan=2) +
		TH(strings["weapon"], colspan=3) +
		TH(strings["artifacts"], colspan=3)
	)
	t <= TR(
		TH() +
		TH(strings["name"]) +
		TH(strings["now"]) +
		TH(strings["goal"]) +
		TH(strings["now"]) +
		TH(strings["goal"]) +
		TH(strings["now"]) +
		TH(strings["goal"]) +
		TH(strings["now"]) +
		TH(strings["goal"]) +
		TH() +
		TH(strings["now"]) +
		TH(strings["goal"]) +
		TH(strings["click_to_remove"], colspan=3)
	)
	for char in sorted(characters):
		if char == 'traveler':
			continue
		# set up level select
		lvlc = SELECT(Id=f"level_c-{char}", Class=f"{char} save")
		lvlt = SELECT(Id=f"level_t-{char}", Class=f"{char} save")
		for lvl in [lvlc, lvlt]:
			for c, val in [(0, "1"),
						   (1, "20"), (11, "20 A"),
						   (2, "40"), (12, "40 A"),
						   (3, "50"), (13, "50 A"),
						   (4, "60"), (14, "60 A"),
						   (5, "70"), (15, "70 A"),
						   (6, "80"), (16, "80 A"),
						   (7, "90")]:
				lvl <= OPTION(f"{val}", value=c)
		# Set up talent select
		t1c = SELECT(Id=f"talent_1_c-{char}", Class=f"{char} save")
		t1t = SELECT(Id=f"talent_1_t-{char}", Class=f"{char} save")
		t2c = SELECT(Id=f"talent_2_c-{char}", Class=f"{char} save")
		t2t = SELECT(Id=f"talent_2_t-{char}", Class=f"{char} save")
		t3c = SELECT(Id=f"talent_3_c-{char}", Class=f"{char} save")
		t3t = SELECT(Id=f"talent_3_t-{char}", Class=f"{char} save")
		for st in [t1t, t1c, t2t, t2c, t3t, t3c]:
			for cost in costs['talent']:
				st <= OPTION(cost)
		# Set up weapon select
		ws = SELECT(Id=f"weapon-{char}", data_id=f"select-{char}", Class=f'weapon {char} save')
		ws <= OPTION('--', value='--')
		sort_dict_wep = {}
		for item in weapons[characters[char]['weapon']]:
			if weapons[characters[char]['weapon']][item]['wam'] != 'unk':
				sort_dict_wep[strings[item]] = item
			else:
				if f"missing-{item}" not in doc:
					doc['missing'] <= LI(strings[item], Id=f"missing-{item}")

		for k in sorted(sort_dict_wep):
			ws <= OPTION(k, value=sort_dict_wep[k])
		wlvlc = SELECT(Id=f"weapon_c-{char}", Class=f"{char} save")
		wlvlt = SELECT(Id=f"weapon_t-{char}", Class=f"{char} save")
		for lvl in [wlvlc, wlvlt]:
			for c, val in [(0, "1"),
						   (1, "20"), (11, "20 A"),
						   (2, "40"), (12, "40 A"),
						   (3, "50"), (13, "50 A"),
						   (4, "60"), (14, "60 A"),
						   (5, "70"), (15, "70 A"),
						   (6, "80"), (16, "80 A"),
						   (7, "90")]:
				lvl <= OPTION(f"{val}", value=c)
		# Create table row for character
		t <= TR(
			TD(INPUT(Id=f"check-{char}", type='checkbox', data_id=f"check-{char}", Class='char_select save')) +
			TD(IMG(src=f"img/{char}.png", alt=strings[char], title=strings[char], loading="lazy")) +
			TD(lvlc) +
			TD(lvlt) +
			TD(t1c) +
			TD(t1t) +
			TD(t2c) +
			TD(t2t) +
			TD(t3c) +
			TD(t3t) +
			TD(ws) +
			TD(wlvlc) +
			TD(wlvlt) +
			TD(INPUT(Id=f"use_arti-{char}", type='checkbox', Class='save', checked='checked')) +
			TD(BUTTON(strings["add"], Class='arti_list text_button', data_id=f"arti-{char}")) +
			TD(DIV(Id=f"arti-{char}", Class=f'arti_span'))
			,
			data_id=f"check-{char}", Class='unchecked', data_color=characters[char]['element'], data_weapon=characters[char]['weapon']
		)
	# set up traveler base row
	# set up level select
	char = 'traveler'
	lvlc = SELECT(Id=f"level_c-{char}", Class=f"{char} save")
	lvlt = SELECT(Id=f"level_t-{char}", Class=f"{char} save")
	for lvl in [lvlc, lvlt]:
		for c, val in [(0, "1"),
					   (1, "20"), (11, "20 A"),
					   (2, "40"), (12, "40 A"),
					   (3, "50"), (13, "50 A"),
					   (4, "60"), (14, "60 A"),
					   (5, "70"), (15, "70 A"),
					   (6, "80"), (16, "80 A"),
					   (7, "90")]:
			lvl <= OPTION(f"{val}", value=c)
	# Set up weapon select
	ws = SELECT(Id=f"weapon-{char}", data_id=f"select-{char}", Class=f'weapon {char} save')
	ws <= OPTION('--', value='--')
	sort_dict_wep = {}
	for item in weapons[characters[char]['weapon']]:
		if weapons[characters[char]['weapon']][item]['wam'] != 'unk':
			sort_dict_wep[strings[item]] = item
		else:
			if f"missing-{item}" not in doc:
				doc['missing'] <= LI(strings[item], Id=f"missing-{item}")

	for k in sorted(sort_dict_wep):
		ws <= OPTION(k, value=sort_dict_wep[k])
	wlvlc = SELECT(Id=f"weapon_c-{char}", Class=f"{char} save")
	wlvlt = SELECT(Id=f"weapon_t-{char}", Class=f"{char} save")
	for lvl in [wlvlc, wlvlt]:
		for c, val in [(0, "1"),
					   (1, "20"), (11, "20 A"),
					   (2, "40"), (12, "40 A"),
					   (3, "50"), (13, "50 A"),
					   (4, "60"), (14, "60 A"),
					   (5, "70"), (15, "70 A"),
					   (6, "80"), (16, "80 A"),
					   (7, "90")]:
			lvl <= OPTION(f"{val}", value=c)
	# Create table row for character
	t <= TR(
		TD(INPUT(Id=f"check-{char}", type='checkbox', data_id=f"check-{char}", Class='char_select save')) +
		TD(IMG(src=f"img/{char}.png", alt=strings[char], title=strings[char], loading="lazy")) +
		TD(lvlc) +
		TD(lvlt) +
		TD() +
		TD() +
		TD() +
		TD() +
		TD() +
		TD() +
		TD(ws) +
		TD(wlvlc) +
		TD(wlvlt) +
		TD(INPUT(Id=f"use_arti-{char}", type='checkbox', Class='save', checked='checked')) +
		TD(BUTTON(strings["add"], Class='arti_list text_button', data_id=f"arti-{char}")) +
		TD(DIV(Id=f"arti-{char}", Class=f'arti_span'))
		,
		data_id=f"check-{char}", Class='unchecked', data_color='multi', data_weapon=characters[char]['weapon']
	)
	# set up traveler anemo/geo row
	for char in sorted(traveler_talent):
		ele = char.split('_')[1]
		# Set up talent select
		t1c = SELECT(Id=f"talent_1_c-{char}", Class=f"{char} save")
		t1t = SELECT(Id=f"talent_1_t-{char}", Class=f"{char} save")
		t2c = SELECT(Id=f"talent_2_c-{char}", Class=f"{char} save")
		t2t = SELECT(Id=f"talent_2_t-{char}", Class=f"{char} save")
		t3c = SELECT(Id=f"talent_3_c-{char}", Class=f"{char} save")
		t3t = SELECT(Id=f"talent_3_t-{char}", Class=f"{char} save")
		for st in [t1t, t1c, t2t, t2c, t3t, t3c]:
			for cost in costs['talent']:
				st <= OPTION(cost)
		# Create table row for character
		t <= TR(
			TD(INPUT(Id=f"check-{char}", type='checkbox', data_id=f"check-{char}", Class='char_select save')) +
			TD(IMG(src=f"img/{char}.png", alt=strings['traveler'], title=strings['traveler'], loading="lazy")) +
			TD() +
			TD() +
			TD(t1c) +
			TD(t1t) +
			TD(t2c) +
			TD(t2t) +
			TD(t3c) +
			TD(t3t) +
			TD() +
			TD() +
			TD() +
			TD() +
			TD() +
			TD()
			,
			data_id=f"check-{char}", Class='unchecked', data_color=ele, data_weapon=characters['traveler']['weapon']
		)
	doc['character_list'] <= t
예제 #8
0
파일: app.py 프로젝트: pbandierapaiva/nut
	def menuOption(self, frase, action):
		o = LI(A(frase))
		o.bind('click', action)
		return o
예제 #9
0
 def _generate_list_element(self, item):
     li = LI(item["name"])
     li.attrs["data-url"] = item["url"]
     li.bind("click", self._load_details)
     return li
예제 #10
0
파일: app.py 프로젝트: pbandierapaiva/nut
 def separator(self):
     return LI(role='separator', Class="divider")
예제 #11
0
파일: app.py 프로젝트: pbandierapaiva/nut
 def menuOption(self, frase, action):
     o = LI(A(frase))
     o.bind('click', action)
     return o
예제 #12
0
def init_about():
	t = doc['About']
	t <= H1('Usage Hint')
	t <= P('This tool is for finding additions to your current gear set.  So if you are replacing an item, you should unequip it in PoB first and save, before doing a search.')
	t <= H1('Design Choices')
	t <= P("This page is designed for finding rares for any slot based on how they affect your damage.  Attack weapons are not supported due to them not being modelable with weights.  Additionally almost all unique only mods are ignored.")
	t <= P("A summary of mods/items that aren't supported (yet?).  Some list items will be revisited after PoB 2.0 update.")
	t <= UL(
		LI('Curse/Mark on hit') +
		LI('Flasks') +
		LI('All uniques except delve rings and Shaper/Elder rings') +
		LI('effect of non-damaging ailments') +
		LI('cooldown reduction') +
		LI('while focused') +
		LI('with this weapon') +
		LI('bleed & ignite duration') +
		LI('chance to bleed/poison/ignite') +
		LI('local weapon mods except flat phys & element, for spellslinger and battlemage.  phys can\'t account for % mods or weapon base stats') +
		LI('Heist weapon only implicits for mods that depend on the base weapon stats also.  EG #% to Damage over Time Multiplier for Bleeding (Sundering Axe)') +
		LI('Increases and Reductions to Damage of Vaal Skills also apply to Non-Vaal Skills') +
		LI('+ minimum charges') +
		LI('onslaught') +
		LI('Mods such as # to # Added Attack Lightning Damage per 200 Accuracy Rating + 25% less accuracy') +
		LI('attack mods that can only appear on weapons') +
		LI('mh/oh specific mods') +
		LI('annoints') +
		LI('Flasks applied to you have #% increased Effect') +
		LI('#% to Quality (any type)') +
		LI('# to Level of Socketed Gems and other mods that require your skill to be socketed in that item.')
	)
	t <= P("Here are all the " + A('Good Mods', href="https://github.com/xanthics/PoE_Weighted_Search/blob/master/helper_files/goodmod.py", target="_blank") + " that are implemented and " + A('Where they appear', href="https://github.com/xanthics/PoE_Weighted_Search/blob/master/restrict_mods.py", target="_blank") + "  Here are all the " + A('Bad Mods', href="https://github.com/xanthics/PoE_Weighted_Search/blob/master/helper_files/badmod.py", target="_blank") + ' which are skipped.')
	t <= H1('Using this page.')
	t <= P('There are 2 primary ways to use this page. A script created by VolatilePulse and coldino, or manually adding the jewels with the necessary mods to PoB and copying the values over by hand.')
	t <= H3('Using VolatilePulse and coldino\'s script')
	t <= UL(
		LI("Go to" + A(" PoB Fork releases page ", href="https://github.com/PathOfBuildingCommunity/PathOfBuilding/releases", target="_blank") + "and download Path Of Building(Community Fork).") +
		LI("Install or extract files") +
		LI("Create and save a build. Leave PoB running") +
		LI("Navigate to" + A(" VolatilePulse's Github Repository", href="https://github.com/VolatilePulse/PoB-Item-Tester", target="_blank")) +
		LI("Clone or download, unzip, and enter directory") +
		LI("Run TestItem.ahk, select the build you want from the list.") +
		LI("Ctrl+Windows+d and it should automatically open this page with values filled out.") +
		LI("Ctrl+Alt+Windows+d will prompt you to choose build and then automatically open this page.") +
		LI("Double check all of the flags to make sure they match what you are trying to do. EG if you are molten strike you probably don't care about the melee flag as the projectile part is more important")
	)
	t <= STRONG("Troubleshooting:")
	t <= P('After the first time you run TestItem.ahk it will generate TestItem.ini. You may need to modify "PathToPoB"')
	t <= H3("Manually copy from PoB")
	t <= P("This is what the Item Tester is automating for you.  It is generally not recommended to use this method as it is more time consuming.")
	t <= P("You need to add jewels to Path of Building, if you have not yet done so.  Note these will always be the latest verions.")
	t <= A("Text file to add jewels by hand", href="jewellist.txt", target="_blank")
	t <= P(A("xml file to add jewels direction to Path of Building Settings (at your own risk). ", href="jewellistxml.txt", target="_blank") + "As pointed out by github user coldino, you can edit your My Documents/Path of Building/Settings.xml directly. The lines from jewellistxml.txt should be added directly after the <SharedItems> tag. <Shared Items> should be right after </Accounts>. If you only have <SharedItems/> in that file, you will need to replace it with <SharedItems></SharedItems>")
	t <= P("You then need to spec an empty jewel node on your tree, or modify an item to have an empty socket, in PoB and mouse over each added jewel for the values to add in this table. After filling in the table and selection the relevant mods, click \"Generate Query\" and a query string will be created for you.")