Repair menu highlighting, both for main menu and submenus

During the recent improvements made on the website, the menus and
submenu highlighting for selected menus fell into disarray.
Correction requires changes to the CSS and templates both, because
Django doesn't really have a convenient way to set variables in
templates to use to solve this.

There are still a few submenu items highlighting not working even
after this commit.  More work needs  to be done.
This commit is contained in:
Bradley M. Kuhn 2021-10-20 11:34:24 -07:00
parent 814b629006
commit 09a4b021c1
22 changed files with 116 additions and 52 deletions

View file

@ -1,6 +1,7 @@
{% extends "base_conservancy.html" %}
{% load cache %}
{% load humanize %}
{% block category %}WhatWeDo{% endblock %}
{% block head %}
<link href="/jquery-ui.css" rel="stylesheet" type="text/css"/>
<link href="/forms.css" rel="stylesheet" type="text/css"/>
@ -10,17 +11,21 @@
{% block outercontent %}
<div class="content-with-donate-sidebar">
<div id="container">
<div id="sidebar" class="{% block submenuselection %}other{% endblock %}">
<div id="sidebar" class="{% block submenuselection %}{% endblock %}">
<h2>What We Do</h2>
{% include 'submenus/what_we_do_partial.html' %}
<h2>Our Copyleft {% block category %}Compliance{% endblock %} Projects</h2>
<h2>Vizio Lawsuit</h2>
<ul>
<li class="AboutCompliance"><a href="/copyleft-compliance/about.html">About</a></li>
<li class="EnforcementStrategy"><a href="/copyleft-compliance/enforcement-strategy.html">Strategic GPL Enforcement Initiative</a></li>
<li class="CopyleftPrinciples"><a href="/copyleft-compliance/principles.html">Principles of Community-Oriented GPL Enforcement</a></li>
<li class="LiberateFirmware"><a href="/copyleft-compliance/firmware-liberation.html">Liberate IoT Firmware via GPL Enforcement</a></li>
<li class="PastLawsuits"><a href="/copyleft-compliance/past-lawsuits.html">Previous Copyleft Litigation</a></li>
<li class="CopyleftOrg"><a href="https://copyleft.org/">copyleft.org</a></li>
<li class="VizioMain"><a href="/copyleft-compliance/vizio.html">About the Lawsuit</a></li>
<li class="VizioPressRelease"><a href="/copyleft-compliance/vizio.html">Press Release</a></li>
<li class="VizioComplaint"><a href="/docs/software-freedom-conservancy-v-vizio-complaint-2021-10-19.pdf">Complaint</a></li>
<li class="VizioQandA"><a href="/press/qanda.html">Q&amp;A</a></li>
</ul>
<h2>Resources for Journalists on Vizio</h2>
<ul>
<li class="VizioPressKit"><a href="/docs/software-freedom-conservancy-v-vizio-announce-press-kit.pdf">Press Kit</a></li>
<li class="VizioPhotoAssets"><a href="/docs/software-freedom-conservancy-v-vizio-photo-assets.zip">Photo Assets</a></li>
<li class="Glossary"><a href="/copyleft-compliance/glossary.html">Glossary</a></li>
</ul>
</div>
<div id="mainContent">

View file

@ -1,6 +1,6 @@
{% extends "base_compliance.html" %}
{% block subtitle %}Copyleft Compliance Projects - {% endblock %}
{% block submenuselection %}AboutCompliance{% endblock %}
{% block submenuselection %}CopyleftCompliance{% endblock %}
{% block content %}
<h1 id="ourwork">Conservancy's Copyleft Compliance Projects</h1>

View file

@ -1,6 +1,6 @@
{% extends "base_compliance.html" %}
{% extends "base_vizio.html" %}
{% block subtitle %}Copyleft Compliance Projects - {% endblock %}
{% block submenuselection %}Vizio{% endblock %}
{% block submenuselection %}VizioMain{% endblock %}
{% block content %}
<h1>Software Freedom Conservancy files right-to-repair lawsuit against California TV manufacturer Vizio Inc. for alleged GPL violations</h1>

View file

@ -1,6 +1,6 @@
{% extends "base_compliance.html" %}
{% block subtitle %}Copyleft Compliance Projects - {% endblock %}
{% block submenuselection %}VMwareCodeSimilarity{% endblock %}
{% block submenuselection %}PastLawsuits{% endblock %}
{% block content %}
<h1 id="contribution-and-similarity-analysis-of-christoph-hellwigs-linux-code-as-found-in-vmware-esxi-5.5">Contribution and Similarity Analysis of Christoph Hellwig's Linux Code as found in VMware ESXi 5.5</h1>

View file

@ -1,6 +1,6 @@
{% extends "base_compliance.html" %}
{% block subtitle %}Copyleft Compliance Projects - {% endblock %}
{% block submenuselection %}VMwareLawsuitAppeal{% endblock %}
{% block submenuselection %}PastLawsuits{% endblock %}
{% block content %}
<h2>The time has come to stand up for the GPL.</h2>

View file

@ -1,6 +1,6 @@
{% extends "base_compliance.html" %}
{% block subtitle %}Copyleft Compliance Projects - {% endblock %}
{% block submenuselection %}VMwareLawsuitFAQ{% endblock %}
{% block submenuselection %}PastLawsuits{% endblock %}
{% block content %}
<h1>Frequently Asked Questions about Christoph Hellwig's VMware Lawsuit</h1>

View file

@ -364,6 +364,7 @@ body > header {
}
#container #sidebar li a:hover { background: #577632; color: #fff; }
#container #sidebar.Sponsors ul li.Sponsors,
#container #sidebar.Directors ul li.Directors,
#container #sidebar.Eval ul li.Eval,
#container #sidebar.Overview ul li.Overview,
@ -375,19 +376,22 @@ body > header {
#container #sidebar.Current ul li.Current,
#container #sidebar.Services ul li.Services,
#container #sidebar.Applying ul li.Applying,
#container #sidebar.PastLawsuits ul li.PastLawsuits,
#container #sidebar.VizioAbout ul li.VizioAbout,
#container #sidebar.VizioTopBar ul li.VizioTopBar,
#container #sidebar.VizioMain ul li.VizioMain,
#container #sidebar.VizioPressRelease ul li.VizioPressRelase,
#container #sidebar.VizioComplaint ul li.VizioPressComplaint,
#container #sidebar.VizioComplaint ul li.VizioComplaint,
#container #sidebar.VizioQandA ul li.VizioQandA,
#container #sidebar.VizioPressKit ul li.VizioPressKit,
#container #sidebar.VizioPhotoAssets ul li.VizioPhotoAssets,
#container #sidebar.VizioQandA ul li.VizioQandA,
#container #sidebar.Glossary ul li.Glossary,
#container #sidebar.CopyleftPrinciples ul li.CopyleftPrinciples,
#container #sidebar.AboutCompliance ul li.AboutCompliance,
#container #sidebar.CopyleftCompliance ul li.CopyleftCompliance,
#container #sidebar.HelpComply ul li.HelpComply,
#container #sidebar.CopyleftPrinciples ul li.CopyleftPrinciples,
#container #sidebar.EnforcementStrategy ul li.EnforcementStrategy,
#container #sidebar.LiberateFirmware ul li.LiberateFirmware
#container #sidebar.CopyleftCompliance ul li.CopyleftCompliance,
#container #sidebar.LiberateFirmware ul li.LiberateFirmware,
#container #sidebar.PastLawsuits ul li.PastLawsuits,
#container #sidebar.CopyleftOrg ul li.CopyleftOrg /* Never put a comma here */
{
color: #000033;
font-weight: bold;
@ -529,7 +533,11 @@ span.subsectionToc { padding-left: 4em; }
span.subsubsectionToc { padding-left: 6em;}
.js, .js p, .js p.bibitem, .js p.bibitem-p { background-color: #cde7e9; }
body.conservancy-Home #navbar ul li.Home > a,
body.conservancy-Projects #navbar ul li.Projects > a,
body.conservancy-WhoWeAre #navbar ul li.WhoWeAre > a,
body.conservancy-WhatWeDo #navbar ul li.WhatWeDo > a,
body.conservancy-Learn #navbar ul li.Learn > a,
body.conservancy-news #navbar ul li.news > a,
body.conservancy-blog #navbar ul li.blog > a,
body.conservancy-About #navbar ul li.About > a,

View file

@ -1,6 +1,6 @@
{% extends "base_learn.html" %}
{% block subtitle %}Press Kit - {% endblock %}
{% block submenuselection %}Press Kit{% endblock %}
{% block submenuselection %}PressKit{% endblock %}
{% block content %}
<h1 id="PressInformation">Press Kit</h1>

View file

@ -1,6 +1,6 @@
{% extends "base_compliance.html" %}
{% extends "base_vizio.html" %}
{% block subtitle %}Press - {% endblock %}
{% block submenuselection %}Press{% endblock %}
{% block submenuselection %}VizioQandA{% endblock %}
{% block content %}
<h1 id="QandA">Vizio Lawsuit Q &amp; A</h1>

View file

@ -1,8 +1,9 @@
{% extends "base_conservancy.html" %}
{% block category %}WhoWeAre{% endblock %}
{% block outercontent %}
<div id="container">
<div id="sidebar" class="{% block submenuselection %}other{% endblock %}">
<h2>{% block category %}Who We Are{% endblock %}</h2>
<div id="sidebar" class="{% block submenuselection %}{% endblock %}">
<h2>Who We Are</h2>
{% include 'submenus/who_we_are_partial.html' %}
</div>
<div id="mainContent">{% block content %}{% endblock %}

View file

@ -8,7 +8,7 @@
{% block outercontent %}
<div id="container">
<div id="sidebar" class="{% block submenuselection %}other{% endblock %}">
<div id="sidebar" class="{% block submenuselection %}{% endblock %}">
<h2>Authors</h2>
<ul>
{% for author in all_authors %}

View file

@ -1,4 +1,5 @@
{% extends "base_conservancy.html" %}
{% block category %}WhatWeDo{% endblock %}
{% load cache %}
{% load humanize %}
{% block head %}
@ -10,12 +11,12 @@
{% block outercontent %}
<div class="content-with-donate-sidebar">
<div id="container">
<div id="sidebar" class="{% block submenuselection %}other{% endblock %}">
<div id="sidebar" class="{% block submenuselection %}{% endblock %}">
<h2>What We Do</h2>
{% include 'submenus/what_we_do_partial.html' %}
<h2>Vizio Lawsuit</h2>
<ul>
<li class="VizioAbout"><a href="/copyleft-compliance/vizio.html">About the Lawsuit</a></li>
<li class="VizioMain"><a href="/copyleft-compliance/vizio.html">About the Lawsuit</a></li>
<li class="VizioPressRelease"><a href="/copyleft-compliance/vizio.html">Press Release</a></li>
<li class="VizioComplaint"><a href="/docs/software-freedom-conservancy-v-vizio-complaint-2021-10-19.pdf">Complaint</a></li>
<li class="VizioQandA"><a href="/press/qanda.html">Q&amp;A</a></li>
@ -26,9 +27,8 @@
<li class="VizioPhotoAssets"><a href="/docs/software-freedom-conservancy-v-vizio-photo-assets.zip">Photo Assets</a></li>
<li class="Glossary"><a href="/copyleft-compliance/glossary.html">Glossary</a></li>
</ul>
<h2>More About Copyleft Compliance&hellip;</h2>
<h2>More About Copyleft Compliance</h2>
<ul>
<li class="AboutCompliance"><a href="/copyleft-compliance/about.html">About</a></li>
<li class="HelpComply"><a href="/copyleft-compliance/help.html">How To Help</a></li>
<li class="EnforcementStrategy"><a href="/copyleft-compliance/enforcement-strategy.html">Strategic GPL Enforcement Initiative</a></li>
<li class="CopyleftPrinciples"><a href="/copyleft-compliance/principles.html">Principles of Community-Oriented GPL Enforcement</a></li>

View file

@ -27,7 +27,7 @@
{% block head %}{% endblock %}
</head>
<body class="conservancy-{% block category %}other{% endblock %}">
<body class="conservancy-{% block category %}{% endblock %}">
<header>
<div class="flex-ns center mw8">
<div class="w-60-ns">
@ -69,17 +69,17 @@
</button>
</form>
</li>
<li class="home dn db-ns"><a href="/">Home</a></li>
<li class="what"><a href="/activities">What we do</a>
<li class="Home dn db-ns"><a href="/">Home</a></li>
<li class="WhatWeDo"><a href="/activities">What we do</a>
{% include 'submenus/what_we_do_partial.html' %}
</li>
<li class="who"><a href="/about/">Who we are</a>
<li class="WhoWeAre"><a href="/about/">Who we are</a>
{% include 'submenus/who_we_are_partial.html' %}
</li>
<li class="learn"><a href="/learn">Learn</a>
<li class="Learn"><a href="/learn">Learn</a>
{% include 'submenus/learn_partial.html' %}
</li>
<li class="news"><a href="/news/">News</a>
<li class="News"><a href="/news/">News</a>
{% include 'submenus/news_partial.html' %}
</li>
</ul>

View file

@ -1,7 +1,8 @@
{% extends "base_conservancy.html" %}
{% block category %}Learn{% endblock %}
{% block outercontent %}
<div id="container">
<div id="sidebar" class="{% block submenuselection %}other{% endblock %}">
<div id="sidebar" class="{% block submenuselection %}{% endblock %}">
<h2>Learn</h2>
{% include 'submenus/learn_partial.html' %}
<h2>Resources for Journalists</h2>

View file

@ -1,6 +1,6 @@
{% extends "base_standard.html" %}
{% block category %}news{% endblock %}
{% block category %}News{% endblock %}
{% block head %}
<link rel="alternate" type="application/rss+xml" title="RSS" href="/feeds/news/" />

View file

@ -10,7 +10,7 @@
{% block outercontent %}
<div class="content-with-donate-sidebar">
<div id="container">
<div id="sidebar" class="{% block submenuselection %}other{% endblock %}">
<div id="sidebar" class="{% block submenuselection %}{% endblock %}">
<h2>What We Do</h2>
{% include 'submenus/what_we_do_partial.html' %}
<h2>Resources for Journalists</h2>

View file

@ -1,7 +1,7 @@
{% extends "base_conservancy.html" %}
{% block outercontent %}
<div id="container">
<div id="sidebar" class="{% block submenuselection %}other{% endblock %}">
<div id="sidebar" class="{% block submenuselection %}{% endblock %}">
<h2>What We Do</h2>
{% include 'submenus/what_we_do_partial.html' %}
<h2>{% block category %}Projects{% endblock %} &amp; Services</h2>

View file

@ -0,0 +1,49 @@
{% extends "base_conservancy.html" %}
{% load cache %}
{% load humanize %}
{% block category %}WhatWeDo{% endblock %}
{% block head %}
<link href="/jquery-ui.css" rel="stylesheet" type="text/css"/>
<link href="/forms.css" rel="stylesheet" type="text/css"/>
{% endblock %}
{% block outercontent %}
<div class="content-with-donate-sidebar">
<div id="container">
<div id="sidebar" class="VizioTopBar {% block submenuselection %}{% endblock %}">
<h2>What We Do</h2>
{% include 'submenus/what_we_do_partial.html' %}
<h2>Vizio Lawsuit</h2>
<ul>
<li class="VizioMain"><a href="/copyleft-compliance/vizio.html">About the Lawsuit</a></li>
<li class="VizioMain"><a href="/copyleft-compliance/vizio.html">Press Release</a></li>
<li class="VizioComplaint"><a href="/docs/software-freedom-conservancy-v-vizio-complaint-2021-10-19.pdf">Complaint</a></li>
<li class="VizioQandA"><a href="/press/qanda.html">Q&amp;A</a></li>
</ul>
<h2>Resources for Journalists</h2>
<ul>
<li class="VizioPressKit"><a href="/docs/software-freedom-conservancy-v-vizio-announce-press-kit.pdf">Press Kit</a></li>
<li class="VizioPhotoAssets"><a href="/docs/software-freedom-conservancy-v-vizio-photo-assets.zip">Photo Assets</a></li>
<li class="Glossary"><a href="/copyleft-compliance/glossary.html">Glossary</a></li>
</ul>
<h2><ul><li class="ComplianceMain"><a href="/copyleft-compliance/index.html">More About Copyleft Compliance</a></li></ul></h2>
</div>
<div id="mainContent">{% block content %}{% endblock %}
</div>
</div>
<div class="donate-sidebar">
<details>
<summary>Support Now!</summary>
<h3>Support Copyleft Enforcement Now!</h3>
<p>
To support our copyleft compliance &amp; enforcement work,
please <a href="/sustainer/#annual"><span class="donate-box-highlight">become a Conservancy
Sustainer <strong>right now</strong></span></a>. We can't sustain
this work without ongoing support from donors like you!</p>
</details>
</div>
</div>
{% endblock %}

View file

@ -1,7 +1,7 @@
{% extends "base_conservancy.html" %}
{% load date_within %}
{% load static %}
{% block category %}Home{% endblock %}
{% block head %}
<link rel="alternate" type="application/rss+xml" title="Software Freedom Conservancy Complete Feed" href="/feeds/omnibus/" />
<link rel="alternate" type="application/rss+xml" title="Software Freedom Conservancy News" href="/feeds/news/" />

View file

@ -3,7 +3,7 @@
{% block outercontent %}
<div id="container">
<div id="sidebar" class="{% block submenuselection %}other{% endblock %}">
<div id="sidebar" class="{% block submenuselection %}{% endblock %}">
<h2>News Index by Year</h2>
<ul>
{% for year in date_list reversed %}<li class="{{ year|date:"Y" }}"><a href="{{ year|date:"Y" }}/">{{ year|date:"Y" }}</a></li>{% endfor %}

View file

@ -1,6 +1,6 @@
<ul>
<li class="AboutCompliance"><a href="/copyleft-compliance/">Copyleft Compliance</a></li>
<li class="VizioAbout"><a href="/vizio/">Vizio Lawsuit</a></li>
<li class="CopyleftCompliance"><a href="/copyleft-compliance/">Copyleft Compliance</a></li>
<li class="VizioTopBar"><a href="/copyleft-compliance/vizio.html">Vizio Lawsuit</a></li>
<li class="FIXME"><a href="/projects/">Member Projects</a></li>
<li class="Outreachy"><a href="https://outreachy.org">Outreachy</a></li>
</ul>

View file

@ -1,10 +1,10 @@
<ul>
<li><a href="/sponsors/">Sponsors</a></li>
<li><a href="/sustainer/">Sustainers</a></li>
<li><a href="/about/board/">Board of Directors</a></li>
<li><a href="/about/staff/">Staff</a></li>
<li><a href="/about/eval-committee/">Evaluation Committee</a></li>
<li><a href="/about/outside/">Outside Counsel, et alia</a></li>
<li class="Sponsors"><a href="/sponsors/">Sponsors</a></li>
<li class="Sustainers"><a href="/sustainer/">Sustainers</a></li>
<li class="Directors"><a href="/about/board/">Board of Directors</a></li>
<li class="Staff"><a href="/about/staff/">Staff</a></li>
<li clas="Eval"><a href="/about/eval-committee/">Evaluation Committee</a></li>
<li clas="Outside"><a href="/about/outside/">Outside Counsel, et alia</a></li>
<li class="Transparency"><a href="/about/transparency">Transparency</a></li>
<li><a href="/about/contact/">Contact</a></li>
<li class="Contact"><a href="/about/contact/">Contact</a></li>
</ul>