html – How to dynamically change css content for navbar links

Right Now this is my homepage:

Homepage

I used css content to show the link texts when the user hovers over the icons. However, right now whichever icon you hover over, it will show the same text “home”. My question is how can I set different text outputs for each icon/link . Thank you in advance.

Navbar.html:

<nav class="navbar">
    <ul class="navbar-nav">
        <li class="logo">
            <img src="{% static 'portfolio/logo.png' %}" alt="">
            
        </li>
        
        <li class="nav-item">
            <a href="" class="nav-link">
                <i class="fas fa-home "></i>
            </a>
        </li>
        <li class="nav-item">
            <a href="" class="nav-link">
                <i class="fas fa-cog"></i>
            </a>
        </li>
        <li class="nav-item">
            <a href="" class="nav-link">
                <i class="fas fa-book"></i>
            </a>
        </li>
        <li class="nav-item">
            <a href="" class="nav-link">
                <i class="fas fa-tasks"></i>
            </a>
        </li>
        <li class="nav-item">
            <a href="" class="nav-link">
                <i  class="fas fa-phone"></i>
            </a>
        </li>
    </ul>
</nav>

_sidebar.scss:

.navbar{
    position:fixed;
    background-color: $navbg;
    
}

.navbar-nav{
    list-style: none;
    padding: 0;
    margin: 0;
    display:flex;
    flex-direction: column;
    align-items:center;
    height: 100%;
}



.nav-item{
    width:100%;

    &:last-child {
        margin-top: auto;

    }


}



.nav-link{
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 5rem;
    font-size: 2rem;
    padding:1.5rem;
    text-decoration: none;

    i{
        font-size: 3rem;
        color: $navicon;

        &:hover{
            color:$icon-hover;
        }



    }

    &:hover::after{
        content : "Home";
        position: absolute;
        color:#12181b;
        background: #b2becd;
        right:-7rem;
        border-radius: 0.5rem;
        padding:0.5rem;
        
        margin-left:2rem;
    }
}






.logo{
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
    margin-bottom: 2.5rem;
    width: 100%;

    img{
        width:60%;
    }


}

html – Select multiple, insertar varios datos en un solo campo (Postgresql php) 1 a N

Lo que sucede es que yo le pongo la información de la tabla cursos a el select múltiple,ahora lo que quiero hacer es que los cursos que se seleccionen se inserten en la tabla de los estudiantes, es decir, que es una relación de 1 a N

Estas son las dos tablas que tengo.

CREATE TABLE Cursos (
cod_cur varchar(6),
nomb_cur varchar(30),
cod_doc varchar(10));
ALTER TABLE Cursos ADD CONSTRAINT rk_cursos PRIMARY KEY(cod_cur);
CREATE TABLE Estudiantes (
cod_est varchar(10),
nomb_est varchar(30),
telefono varchar(10),
email varchar(50),
cod_programa varchar(10),
cod_cur varchar(10));
ALTER TABLE Estudiantes ADD CONSTRAINT ek_estudiantes PRIMARY KEY(cod_est);
ALTER TABLE Estudiantes ADD CONSTRAINT PERTENECE FOREIGN KEY (cod_programa) REFERENCES 
Programas(cod_programa) ON DELETE NO ACTION ON UPDATE NO ACTION;
ALTER TABLE Estudiantes ADD CONSTRAINT PERTENECE FOREIGN KEY (cod_cur) REFERENCES 
Programas(cod_cur) ON DELETE NO ACTION ON UPDATE NO ACTION;`

Aquí esta el código en donde inserto los datos,lo que me esta insertado es la palabra “array” en la columna cod_cur en la tabla docentes,no entiendo muy bien porque sucede esto.

<?php
include("conexion.php");
$con=conectar();


$cod_est=$_POST('cod_est');
$nomb_est=$_POST('nomb_est');
$telefono=$_POST('telefono');
$email=$_POST('email');
$cod_programa=$_POST('cod_programa');
$cod_cur=$_POST('cod_cur');
print_r ($cod_cur);

if ($cod_programa=="Seleccione el programa...") {
    $cod_programa="na";
} else{
$i=0;
$cod_programa_aux="";
while ($cod_programa($i)!=" ") {
$cod_programa_aux.=$cod_programa($i);
$i++;
}
$cod_programa=$cod_programa_aux;
}

$query="SELECT insertar_estudiante('$cod_est','$nomb_est','$telefono','$email','$cod_programa','$cod_cur');";
$ejecutar=pg_query($con,$query);

if(!$ejecutar){
    echo"Error";
}else{
    if ($cod_programa=="na") {
            header("Status: 301 Moved Permanently");
            header("Location: /ProyectoNOTAS/registrar_estudiante.php");        }
            else {
                header("Status: 301 Moved Permanently");
                header("Location: /ProyectoNOTAS/info_estudiante.php");}
}

?>

Y este es el select multiple en donde estan los cursos de los cuales se seleccionan algunos para asignarlos al estudiante

  <?php
          $query2 = 'select cod_cur, nomb_cur from cursos order by cod_cur asc';
          $resultado = pg_query($con, $query2) or die("Error en la consulta sql");
          $numReg = pg_num_rows($resultado);
          if ($numReg > 0) {
          ?>
          <select id="ms" multiple="multiple" class="control" width="80" type="cod_cur" name="cod_cur()" >
          <?php
            while ($fila = pg_fetch_array($resultado)) {
              ?>
            <option><?php echo $fila('cod_cur'), " - ", $fila('nomb_cur') ?> </option>;
          <?php
            }
            ?>
          </select>
          <br>
          <?php
          } else {
          ?>
          <h1 align="center"> <?php echo "No hay registros"; ?> </h1>
          <?php
          }
          pg_close($con);
          ?>
          <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
          <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js" integrity="sha384-cs/chFZiN24E4KMATLdqdvsezGxaGsi4hLGOzlXwp5UZB1LY//20VyM2taTB4QvJ" crossorigin="anonymous"></script>
          <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js" integrity="sha384-uefMccjFJAIv6A+rW+L4AHf99KvxDjWSu1z9VI8SKNVmz4sk7buKt/6v9KI65qnm" crossorigin="anonymous"></script>
          <script src="CSS/multiple-select.js"></script>
          <script>
          $(function() {
          $('#ms').change(function() {
              console.log($(this).val());
          }).multipleSelect({
              width: '100%'
          });
          });
          </script>

redirects – 500 Internal Server Error for *.html and *.htm files

I look after the website airandmore.at, it is a wordpess site.

Now I ran into the problem that *.html and *.htm requests don´t work, for example do I get a “500 Internal Server Error” in case of https://airandmore.at/test.html

I disabled Yoast plugin (where I configured some redirects) and also renamed .htaccess. Problem still there.

In my eyes there should be a 404 in case this file is not available on the server or I should have the possibility to redirect certain (legacy) urls with *.html.

Any idea what could be the reason for the 500 error message in this case or how/where this could be changed?

Best regards and thank you in advance
Markus

list – HTML Button Doesn’t Redirect to SharePoint Form

As per my understanding (Correct me if I am wrong), you forgot to add the type="button" to your button element.

So, Add type=”button” to the button.

<button type="button" onclick="yourFunction()">Click Here</button>

Reference: prevent refresh of page when button inside form clicked

Also, it will be easier to answer your question more precisely by looking at at the code you are using currently. Can you please add the code you are using to your question?

html – Will Google Images ignore images with empty alt text?

You can put images that are just decorative into a HTML document like this, by setting their alt text to nothing:

<img src="decorative.png" alt="" />

This means that screen readers won’t announce the image, and that if the image doesn’t load, it won’t show anything.

My question is, will Google Images ignore these images as well, and will it hide them in search results?

html – Importar dados de um site para o Google Sheets

Boa noite, estou precisando importar uma tabela com historico de jogos para o GOOGLE SHEETS “https://www.flashscore.com.br/jogo/rBjWFYMO/#h2h;overall” já tentei usar o importHTML mas não encontra tabela e o importXML só importa o nome do confronto. Tento o //div[@id=”tab-h2h-overall”]/div/table/tbody/tr/td/span/strong mas sempre da #N/D.

plugins – How can I recreate my HTML page with custom grid layout (blocks spanning rows and columns) in WordPress?

I’m attempting to recreate my website on WordPress in the style of my old HTML code, and I don’t know how to recreate the grid of my old homepage here: http://selamawit.com/index-old.html

The problem is that while it’s a grid, the blocks span multiple rows and columns. Is there a (free) wordpress plugin I can use or is there a way to upload custom HTML code in order to recreate this layout?

text – Convert bulleted and numbered list HTML code to Markdown in AppleScript?

I have this text to manipulate in AppleScript (e.g. the text of a variable):

Example note exported from Apple.

<ul>
  <li>Indent</li>
  <ul>
    <li>*Further* indent</li>
    <ul>
      <li>Even **further **indent. With a (link)(https://duck.com).</li>
    </ul>
  </ul>
</ul>

End note.

I’m converting it all to Markdown from HTML. I need to clean up this remaining bit of HTML which is the bullet list, so that the result is:

Example note exported from Apple.

- Indent
    - *Further* indent
        - Even **further **indent. With a (link)(https://duck.com).

End note.

It has to be able to cater to nested indenting with some rich text inside the items such as this example. I prefer Markdown output to use hyphens and either a tab or two spaces for the indenting.

It also has to be containable inside the applescript – no external .py files etc, and to not require homebrew or a third party tool to be installed.

html – Flex forçado em 2 colunas sem haver um height fixo

Bom dia pessoal.

Estou criando um menu para um restaurante dentro do wordpress, utilizando Advanced Custom Fields Pro para criar a lista do menu.

A ideia é criar, para desktop, o menu dentro de duas colunas, desta forma:

inserir a descrição da imagem aqui

Porém a dificuldade está em lidar com o tamanho total do container, pois eu não sei a quantidade de categorias e nem a quantidade de produtos dentro de cada categoria, isso irá depender do restaurante e pode mudar quando eles quiserem. Com isso, precisava forçar a quebra da coluna 1 em algum momento, mas, se faço isso com uma height definida e o restaurante tira/acrescenta itens, o esquema todo quebra.

Se eu deixo o flex em column, ele coloca as categorias uma abaixo da outra e se eu coloco uma height fixa ele quebra ali e pode gerar itens pra fora do container ou grandes espaços vazios se as categorias forem retiradas ou acrescidas… Não sei o que fazer!

Vou deixar aqui a “ideia” do código, pois como o ambiente é o WP e estou usando ACF fica impossível mostrar corretamente aqui fora…

Resumindo:

Como fazer o Flex entender que eu quero sempre 2 colunas e, forçando ainda mais a barra, que ele deixe mais ou menos com a mesma altura ambas as colunas.

Seria possível?

Desde já agradeço a colaboração.

webkit – Swift Inject Javascript to remove HTML element into WebView

I am trying to inject my self directly into the source code.

We want to execute this script to remove a banner on google.com by injecting the javascript into the webview, but it’s not working.

This is block of code we are trying to remove:

<mobile-promo jsname="EfADOe" jscontroller="sqHuef" jsaction="rcuQ6b:npT2md"> </mobile-promo>

This is what is not working:

func webView(_ webView: WKWebView, didStartProvisionalNavigation navigation: WKNavigation!) {
    let removeGoogleBottomBar = """
        function removeDummy() {
            var elem = document.getElementById('mobile-promo');
            elem.parentNode.removeChild(elem);
            return false;
        }
        removeDummy()
    """
    webView.evaluateJavaScript(removeGoogleBottomBar)
}

Is there anything wrong with this approach to injecting javascript?