Explore all Content Management System open source software, libraries, packages, source code, cloud functions and APIs.

Popular New Releases in Content Management System

strapi

v4.1.8

Ghost

4.45.0

grapesjs

v0.18.3

netlify-cms

netlify-cms@2.10.192

grav

Popular Libraries in Content Management System

strapi

by strapi doticonjavascriptdoticon

star image 44444 doticonNOASSERTION

🚀 Open source Node.js Headless CMS to easily build customisable APIs

Ghost

by TryGhost doticonjavascriptdoticon

star image 39959 doticonMIT

Turn your audience into a business. Publishing, memberships, subscriptions and newsletters.

WordPress

by WordPress doticonphpdoticon

star image 16054 doticonNOASSERTION

WordPress, Git-ified. This repository is just a mirror of the WordPress subversion repository. Please do not send pull requests. Submit pull requests to https://github.com/WordPress/wordpress-develop and patches to https://core.trac.wordpress.org/ instead.

grapesjs

by artf doticonjavascriptdoticon

star image 15272 doticonBSD-3-Clause

Free and Open source Web Builder Framework. Next generation tool for building templates without coding

netlify-cms

by netlify doticonjavascriptdoticon

star image 15212 doticonMIT

A Git-based CMS for Static Site Generators

grav

by getgrav doticonphpdoticon

star image 13208 doticonMIT

Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS powered by PHP, Markdown, Twig, and Symfony

wp-calypso

by Automattic doticonjavascriptdoticon

star image 12026 doticonGPL-2.0

The JavaScript and API powered WordPress.com

wagtail

by wagtail doticonpythondoticon

star image 11968 doticonBSD-3-Clause

A Django content management system focused on flexibility and user experience

sage

by roots doticonphpdoticon

star image 11698 doticonMIT

WordPress starter theme with Laravel Blade components and templates, Tailwind CSS, and a modern development workflow

Trending New libraries in Content Management System

brick-design

by brick-design doticontypescriptdoticon

star image 4218 doticonMIT

全场景流式布局,可视化拖拽、随意嵌套组合、实时渲染、实时辅助线展示,实时组件间距展示、实时拖拽排序、状态域管理,可视化属性配置、可视化样式配置、多设备适配展示,支持逻辑渲染、模板字符变量、表达式、自定义方法、自定义状态

plasmic

by plasmicapp doticontypescriptdoticon

star image 1455 doticonMIT

Visual page builder and web design tool for any website or web app tech stack

stylestage

by 5t3ph doticoncssdoticon

star image 1414 doticon

A modern CSS showcase styled by community contributions. Add your stylesheet!

Sakurairo

by mirai-mamori doticonphpdoticon

star image 1120 doticonGPL-2.0

一个多彩,轻松上手,体验完善,具有强大自定义功能的WordPress主题(基于Sakura主题)A Colorful, Easy-to-use, Perfect Experience, and Powerful Customizable WordPress Theme (Based on Theme Sakura)

awesome-strapi

by strapi doticonjavascriptdoticon

star image 1097 doticonMIT

A curated list of awesome things related to Strapi

register

by is-a-dev doticonjavascriptdoticon

star image 960 doticonGPL-3.0

Grab your own sweet-looking '.is-a.dev' subdomain

winter

by wintercms doticonphpdoticon

star image 913 doticonMIT

Free, open-source, self-hosted CMS platform based on the Laravel PHP Framework.

faustjs

by wpengine doticontypescriptdoticon

star image 845 doticonNOASSERTION

Faust.js - The Headless WordPress Framework

baserow

by bram2w doticonpythondoticon

star image 835 doticonNOASSERTION

Baserow is an open source no-code database tool and Airtable alternative. This is a mirrored repository, the official one is hosted on https://gitlab.com/bramw/baserow.

Top Authors in Content Management System

1

wp-plugins

393 Libraries

star icon1450

2

Automattic

130 Libraries

star icon33629

3

humanmade

76 Libraries

star icon5692

4

symphonists

59 Libraries

star icon642

5

svn2github

52 Libraries

star icon606

6

adobe

49 Libraries

star icon2136

7

WebDevStudios

45 Libraries

star icon2909

8

10up

44 Libraries

star icon5736

9

justintadlock

44 Libraries

star icon1918

10

xwp

41 Libraries

star icon1460

1

393 Libraries

star icon1450

2

130 Libraries

star icon33629

3

76 Libraries

star icon5692

4

59 Libraries

star icon642

5

52 Libraries

star icon606

6

49 Libraries

star icon2136

7

45 Libraries

star icon2909

8

44 Libraries

star icon5736

9

44 Libraries

star icon1918

10

41 Libraries

star icon1460

Trending Kits in Content Management System

Here are some of the famous NodeJs CMS Libraries. NodeJs CMS Libraries can be used in Website and Blog Development, Content Management, E-commerce and Shopping Carts, Data Visualization, and User Management. 


Nodejs CMS Libraries are libraries that allow developers to create content management systems (CMS) using the Node.js JavaScript runtime. Node.js is an open-source, cross-platform runtime environment for developing server-side and networking applications. Node.js CMS libraries are used to create rich and dynamic content for websites and applications. 


Let us look at these libraries in detail below. 

strapi 

  • Optimized for speed, allowing developers to quickly publish content and build applications. 
  • Supports both frontend and backend development. 
  • Built-in support for authentication, authorization, and other security features.

sails 

  • Automatic endpoint and model generation. 
  • Built-in ORM support. 
  • Real-time communication. 

directus 

  • Provides a powerful RESTful API. 
  • Provides a built-in, multilingual interface. 
  • Allows you to easily create custom user roles. 

keystone-classic 

  • Flexible Content Modeling. 
  • Automated Admin UI Generation. 
  • Simple Integration. 

feathers 

  • Supports real-time communication with its built-in socket.io integration. 
  • Makes use of hooks to allow developers to customize their applications. 
  • Written in JavaScript and can be used on servers, browsers, and mobile devices. 

apostrophe 

  • Asset manager allows users to store, organize, and access digital files.  
  • Integrated search capabilities make finding content and information on the website easy.  
  • Drag-and-drop page builder makes creating complex, multi-page websites easy without coding knowledge. 

locomotive 

  • Powerful templating engine. 
  • Flexible support for multiple database engines. 
  • Built-in authentication and authorization. 

Trending Discussions on Content Management System

Is it possible to remove the letter prefix ("a. ", "b. ", etc.) from the possible answers in mulitple choice tests?

How to return 404 page for a server-side rendered dynamic route after client-side page transition

How make HTML table row background change with hover by inline CSS

How to fetch main object and sub objects with WebFlux

How to represent a tree structure with ORDER BY OR GROUP BY

how can I add variables for another input field I've created using a CMS in php

Can I install Django Rest Framework in an uploaded website in pythonanywhere?

Doctrine in Symfony: use a single “Author” associative entity related to different entities

Modifying bash script including MySQL query to determine if query returns content or no result

How do i fix Upwork clone sliding page problem (JS)

QUESTION

Is it possible to remove the letter prefix ("a. ", "b. ", etc.) from the possible answers in mulitple choice tests?

Asked 2022-Jan-21 at 22:12

When producing multiple choice questions, exams prefixes the possible answers with lower case letters. Is it possible to change this behaviour when using exams2qti21 so that the answers are displayed without this prefix?

e.g. to go from

1a. 12
2b. 35
3c. 15
4d. 25
5

to simply,

1a. 12
2b. 35
3c. 15
4d. 25
512
635
715
825
9

I would like to do this because our content management system, "itsLearning" can randomise the possible answers (per student) and the inclusion of the letter prefixes messes this up.

ANSWER

Answered 2022-Jan-21 at 22:12

You can do this by setting the enumerate argument to FALSE for the mchoice and/or schoice questions. By default, the setting of mchoice is also propagated to schoice. So this should do what you want:

1a. 12
2b. 35
3c. 15
4d. 25
512
635
715
825
9exams2qti21(..., mchoice = list(enumerate = FALSE))
10

As an additional comment:

  • Letting the learning management system do the randomization is more efficient if the exercises and choice lists are otherwise static. Then you just need to upload one exercise and re-use it because the learning management system does the shuffling.

  • Letting the exams2xyz() interface from R/exams do the shuffling, on the other hand, gives you far more options than most learning management systems support. In particular you can generate the choice lists fully dynamically (as in deriv2 or tstat2) or you can do subsampling from a large static list (as in capitals). In both cases I would switch off the shuffling in the learning management system.

Source https://stackoverflow.com/questions/70801343

QUESTION

How to return 404 page for a server-side rendered dynamic route after client-side page transition

Asked 2022-Jan-05 at 16:46

I'm working on a next.js project with Contentful as Content Management System. I want to return the 404 page for a server-side rendered dynamic route after a client-side page transition.

When I request the page directly (by entering the url or refresh the page) everything's working fine and the 404 page gets returned. But when the user is already on the site and navigates through a "next/link" Link (client-side page transition) to a server-side rendered page, getServerSideProps only returns the JSON that contains the result. Which is ok as documented here: https://nextjs.org/docs/basic-features/data-fetching#only-runs-on-server-side. This results in a completely empty website and the following console error:

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (page.json, line 0)

Here's my getServerSideProps of the page I want navigate to:

1export const getServerSideProps: GetServerSideProps = async ({ params }: Params) => {
2  const { slug } = params;
3  try {
4    const entry: Entry<any> = await (
5      await ContentfulService.getInstance().getEntryBySlugAndType(slug, 'page', 4)
6    ).items[0];
7    const page: IPageFields = entry.fields;
8    return {
9      props: { page }
10    };
11  } catch (error) {
12    return { notFound: true };
13  }
14};
15

What am I doing wrong? Is there any opportunity to return the 404 page also for a client-side page transition?

ANSWER

Answered 2022-Jan-05 at 16:46

I just could fix my problem by adding a simple getStaticProps to my 404 page.

Like this:

1export const getServerSideProps: GetServerSideProps = async ({ params }: Params) => {
2  const { slug } = params;
3  try {
4    const entry: Entry<any> = await (
5      await ContentfulService.getInstance().getEntryBySlugAndType(slug, 'page', 4)
6    ).items[0];
7    const page: IPageFields = entry.fields;
8    return {
9      props: { page }
10    };
11  } catch (error) {
12    return { notFound: true };
13  }
14};
15export const getStaticProps: GetStaticProps = async () => {
16  return {
17    props: {}
18  };
19};
20

Source https://stackoverflow.com/questions/70595984

QUESTION

How make HTML table row background change with hover by inline CSS

Asked 2021-Nov-30 at 12:25

I have an HTML table with columns of different colours. This is done by assigning to each table cell 'td' element a CSS class defined with the appropriate colour.

Any table row background colour changes when it is subject to a mouse hover. This is done by the following CSS declaration in the style block of my HTML document:

1table tr:hover td { background-color: pink; }
2

That's all very well. But I need to make this work using inline style strings. Such as: <table style="...">.

How can this be done?

I need to drop the table into a content management system that does not accommodate custom CSS style block interventions well.

Workaround suggested here won't work because it defines a before and after highlight colour. This would have to be defined for the whole row, so that the whole row would highlight upon hover. But when the hover is removed, the whole row would then have to return to its prior colours, and those are defined at the level not of row but cell.

ANSWER

Answered 2021-Nov-18 at 23:59

You can't.

Use CSS Stylesheet or <style></style>

Source https://stackoverflow.com/questions/70028189

QUESTION

How to fetch main object and sub objects with WebFlux

Asked 2021-Nov-07 at 01:02

I'm building a Content Management System with Pages that contain Blocks. I fetch a page with an id and then fetch blocks that is associated with the same page id. In a blocking fashion, I would do:

1Page page = repo.getPageById(47);
2page.setBlocks(repo.getBlocksByPageId(47));
3

When doing this reactive it is a mess of flatMaps and zipWith:

1Page page = repo.getPageById(47);
2page.setBlocks(repo.getBlocksByPageId(47));
3Mono&lt;Page&gt; = repo.getPageById(47)
4    .flatMap(page -&gt; repo.getBlocksByPageId(47).collectList().zipWith(Mono.just(page)))
5    .flatMap(t -&gt; {
6      List&lt;Block&gt; blocks = t.getT1();
7      Page page = t.getT2();
8      page.setBlocks(blocks);
9      return Mono.just(page);
10    });
11

Can you recommend better ways of accomplishing the same result?

ANSWER

Answered 2021-Nov-07 at 01:02

You could zip the 2 Monos from the start and use map instead of flatMap.

1Page page = repo.getPageById(47);
2page.setBlocks(repo.getBlocksByPageId(47));
3Mono&lt;Page&gt; = repo.getPageById(47)
4    .flatMap(page -&gt; repo.getBlocksByPageId(47).collectList().zipWith(Mono.just(page)))
5    .flatMap(t -&gt; {
6      List&lt;Block&gt; blocks = t.getT1();
7      Page page = t.getT2();
8      page.setBlocks(blocks);
9      return Mono.just(page);
10    });
11Mono&lt;Page&gt; result = repo.getPageById(47)
12           .zipWith(repo.getBlocksByPageId(47).collectList())
13           .map(t -&gt; {
14               Page page = t.getT1();
15               page.setBlocks(t.getT2());
16               return page;
17           });
18

Source https://stackoverflow.com/questions/69868718

QUESTION

How to represent a tree structure with ORDER BY OR GROUP BY

Asked 2021-Aug-25 at 12:32

Given a table 'TEMPLATES'(with columns ID,NAME,IS_MASTER,MASTER_ID etc) which describes multiple content management system elements e.g. masters, templates etc. The column IS_MASTER filters the master-docs. I want to filter all master-docs and the associated elements(documents), which point to the master over the 'MASTER_ID' column of the same table but I want to order the rows one after another for example after a result row which shows a master should be listed the elements, which point to this master (and not all rows mixed up like in the screenshot) :

enter image description here

But I can only do it in this way, I don't know how to order or group by

1SELECT x.*,x.ROWID FROM TEMPLATE x
2WHERE IS_MASTER IN (1) OR MASTER_ID IS NOT NULL 
3

ANSWER

Answered 2021-Aug-25 at 12:32

You could do this:

1SELECT x.*,x.ROWID FROM TEMPLATE x
2WHERE IS_MASTER IN (1) OR MASTER_ID IS NOT NULL 
3select *
4from templates
5order by nvl(master_id, id);
6

This would tell the database to sort by master_id, and if that column is empty (NULL) to use the id. This way the master and its children are sorted together.

Alternatively you can use a hierarchical query:

1SELECT x.*,x.ROWID FROM TEMPLATE x
2WHERE IS_MASTER IN (1) OR MASTER_ID IS NOT NULL 
3select *
4from templates
5order by nvl(master_id, id);
6select *
7from templates
8start with master_id is null
9connect by master_id = prior id;
10

Source https://stackoverflow.com/questions/68921762

QUESTION

how can I add variables for another input field I've created using a CMS in php

Asked 2021-Aug-07 at 17:03

I just want to ask if it is possible to create variables on a php file so that the new input fields that I will create using a Content Management System (CMS) will have it's data stored on that new variables so I can query all those data to the database. (I'm sorry I'm so bad at explaining).

For example, I have this 4 Input Fields which has its own variable to house their data; Lastname, Firstname, Middlename, and Phone Number

sample code:

1&lt;div class=&quot;box-divide&quot;&gt;
2                                        &lt;b&gt;Lastname:&lt;/b&gt;
3                                        &lt;input type=&quot;text&quot; name=&quot;last_name&quot; id=&quot;ln&quot; placeholder=&quot;Lastname&quot;  required&gt;
4                                    &lt;/div&gt;
5                                    &lt;div class=&quot;box-divide&quot;&gt;
6                                        &lt;b&gt;Firstname:&lt;/b&gt;
7                                        &lt;input type=&quot;text&quot; name=&quot;first_name&quot; id=&quot;fn&quot; placeholder=&quot;Firstname&quot;  required&gt;
8                                    &lt;/div&gt;
9                                    &lt;div class=&quot;box-divide&quot;&gt;
10                                        &lt;b&gt;Middlename:&lt;/b&gt;
11                                        &lt;input type=&quot;text&quot; name=&quot;middle_name&quot; id=&quot;mn&quot; placeholder=&quot;Middlename&quot;  required&gt;
12                                    &lt;/div&gt;
13                                    &lt;div class=&quot;box-divide&quot;&gt;
14                                        &lt;b&gt;Phone Number:&lt;/b&gt;
15                                        &lt;input type=&quot;tel&quot; name=&quot;phoneNum&quot; id=&quot;pn&quot; value=&quot;&quot; placeholder=&quot;+639123456789&quot; maxlength=&quot;13&quot; required&gt;
16                                    &lt;/div&gt;
17

and I add this php codes to print new input fields:

1&lt;div class=&quot;box-divide&quot;&gt;
2                                        &lt;b&gt;Lastname:&lt;/b&gt;
3                                        &lt;input type=&quot;text&quot; name=&quot;last_name&quot; id=&quot;ln&quot; placeholder=&quot;Lastname&quot;  required&gt;
4                                    &lt;/div&gt;
5                                    &lt;div class=&quot;box-divide&quot;&gt;
6                                        &lt;b&gt;Firstname:&lt;/b&gt;
7                                        &lt;input type=&quot;text&quot; name=&quot;first_name&quot; id=&quot;fn&quot; placeholder=&quot;Firstname&quot;  required&gt;
8                                    &lt;/div&gt;
9                                    &lt;div class=&quot;box-divide&quot;&gt;
10                                        &lt;b&gt;Middlename:&lt;/b&gt;
11                                        &lt;input type=&quot;text&quot; name=&quot;middle_name&quot; id=&quot;mn&quot; placeholder=&quot;Middlename&quot;  required&gt;
12                                    &lt;/div&gt;
13                                    &lt;div class=&quot;box-divide&quot;&gt;
14                                        &lt;b&gt;Phone Number:&lt;/b&gt;
15                                        &lt;input type=&quot;tel&quot; name=&quot;phoneNum&quot; id=&quot;pn&quot; value=&quot;&quot; placeholder=&quot;+639123456789&quot; maxlength=&quot;13&quot; required&gt;
16                                    &lt;/div&gt;
17&lt;?php
18                                        //Select All Items for new Field
19                                        $sqlFD = &quot;SELECT * FROM app_fields_lists&quot;;
20                                        $resFD = mysqli_query($conn, $sqlFD);
21                                        if (mysqli_num_rows($resFD) &gt; 0) {
22                                            while ($rowFD = mysqli_fetch_assoc($resFD)) {
23                                                $idFD = $rowFD['id'];
24                                                $field_name = $rowFD['field_name'];
25                                                $uCapAFA = strtolower($field_name); // TO LOWER CASE STRING
26    
27                                                $uCapAFA = str_replace(&quot; &quot;, &quot;_&quot;, $uCapAFA); // REPLACE SPACE TO UNDERSCORE &quot;_&quot; TO CREATE/ADD TABLE COLUMN
28                                    ?&gt;
29
30                                    &lt;div class=&quot;box-divide&quot;&gt;
31                                        &lt;b&gt;&lt;?php echo $field_name ?&gt;:&lt;/b&gt;
32                                        &lt;input type=&quot;text&quot; name=&quot;&lt;?php echo $uCapAFA ?&gt;&quot; id=&quot;&lt;?php echo $uCapAFA ?&gt;&quot; value=&quot;&quot; placeholder=&quot;&lt;?php echo $uCapAFA ?&gt;&quot; required&gt;
33                                    &lt;/div&gt;
34                                    
35                                    &lt;?php
36                                            }
37                                        }
38                                    ?&gt;
39

All are successful on the CMS part. I'm sorry I can't show you guys the codes on the CMS part. I was able to alter the table I want to add the new input fields to. And can also delete/drop columns when I delete a column.

All was going fine but now I'm stuck. I can't think of a doable solution on this problem. Was thinking of using loop too but I don't know what follows after making the first part.

This all seems like a real headache, but I don't have anyone to ask about this, that's why I'm trying to push my luck in here. Thanks in advance!

ANSWER

Answered 2021-Aug-07 at 17:03

I know this feeling all to well.

"This all seems like a real headache, but I don't have anyone to ask about this, that's why I'm trying to push my luck in here. Thanks in advance!"

I re-read your question twice and it boggles me: So to my understanding:

  1. You have a form with inputs (generated statically ?)
  2. When the user inputs data you store it in the db.
  3. Then you re-create the form using PHP ?

What happens to the page when the user inputs the data ?

  • Does it refresh ?
  • Does The form push to the db ?
  • Why do you need to re-generate the form using PHP ?

Have you tried using ajax in the mix between the form and user inputs ?

EG: User Form -> User Inputs Data (Submits Form) -> ajax handles the posting to the php file -> let ajax wait for a response from php on success -> refresh the page using jquery.

That would automatically do the same thing over and over for every user that submits the form.

On another note you should switch to PDO as mysqli is not secure at all if you do not escape queries correctly.

Going to need a little bit more of the logic as it seems that you might have over complicated a simple process which is completely fine as it happens from time to time

Source https://stackoverflow.com/questions/68694200

QUESTION

Can I install Django Rest Framework in an uploaded website in pythonanywhere?

Asked 2021-Jul-28 at 15:25

Summary:

  1. I decided to use python for my thesis
  2. I started my project while simultaneously studying about python and django
  3. I've added a lot of contents, models, and apps in my project, and I just now realized that I need to create a Content Management System, and somebody told me to use Django Rest Framework.
  4. I started searching on how to use it, and everything that I saw installed it before creating the project, and it might be too late for me because I might have a lot of errors that I might not be able to trace.(or maybe django rest framework should really be installed before starting)
  5. Can someone tell me if its possible to just install it? Or a hint/tip for alternatives? I only have less than 2 weeks left before my defense. Thank you for the help and understanding, Im new sorry

ANSWER

Answered 2021-Jul-28 at 15:25

Yes, you can still install it mid project. Just make sure to add it to your 'INSTALLED_APPS' list in your project settings file.

1// settings.py
2INSTALLED_APPS = [
3    'django.contrib.admin',
4    'django.contrib.auth',
5    'django.contrib.contenttypes',
6    'django.contrib.sessions',
7    'django.contrib.messages',
8    'django.contrib.staticfiles',
9    'rest_framework',
10]
11

Source https://stackoverflow.com/questions/68562884

QUESTION

Doctrine in Symfony: use a single “Author” associative entity related to different entities

Asked 2021-Apr-01 at 10:47

I'm developing a custom content management system with Symfony 5 and Doctrine.

I'm trying to implement a relation between the entities Document and Video (actually there are many more, but for simplicity sake let's say are just two) and the User entity.

The relation represent the User who wrote the document or recorded the video. So the relation here is called Author. Each document or video can have one or more author. Each User can have none or more document or video.

I would like to use just a single associative Author associative entity, like this:

entity_id|author_id|entity

Where:

  • entity_id: is the id of the document or video
  • author_id: is the user_id who authored the entity
  • entity: is a constant like document or video to know to which entity the relation refer to

The problem is that I cannot understand how to build this in Doctrine. Was this a classic SingleEntity<-->Author<-->Users relationship I would have build it as a ManyToMany item, but here it's different.

Author would probably contain two ManyToOne relations (one with the User entity and one with either the Document or the Video entity) plus the entity type field, but I really don't know how to code the "DocumentorVideo`" part. I mean:

1    /**
2     * @ORM\Id
3     * @ORM\ManyToOne(targetEntity=??????????, inversedBy=&quot;authors&quot;)
4     * @ORM\JoinColumn(nullable=false)
5     */
6    private $entity; // Document or Video
7
8    /**
9     * @ORM\Id
10     * @ORM\ManyToOne(targetEntity=User::class, inversedBy=&quot;articles&quot;)
11     * @ORM\JoinColumn(nullable=false)
12     */
13    private $user;
14
15    /**
16     * @ORM\Column(type=&quot;smallint&quot;)
17     */
18    private $entityType;
19
20

How should I manage the first field?

ANSWER

Answered 2021-Apr-01 at 10:09

My suggestion is to store the entity namespace Ex. Acme\Entity\Document in a property and the id in another and to use the entity manager to get the entity.

Edit: Though you won't have the relation, I prefer that way over others because it is reusable and the performance is rather the same. Also if I need to pass it to a JSON response, I just create a normalizer and I am good to go.

1    /**
2     * @ORM\Id
3     * @ORM\ManyToOne(targetEntity=??????????, inversedBy=&quot;authors&quot;)
4     * @ORM\JoinColumn(nullable=false)
5     */
6    private $entity; // Document or Video
7
8    /**
9     * @ORM\Id
10     * @ORM\ManyToOne(targetEntity=User::class, inversedBy=&quot;articles&quot;)
11     * @ORM\JoinColumn(nullable=false)
12     */
13    private $user;
14
15    /**
16     * @ORM\Column(type=&quot;smallint&quot;)
17     */
18    private $entityType;
19
20/**
21 * @ORM\Column(type=&quot;string&quot;)
22 */
23private $entityNamespace;
24
25/**
26 * @ORM\Column(type=&quot;integer&quot;)
27 */
28private $entityId;
29
30public function __construct(EntityManagerInterface $em)
31{
32    $this-&gt;em = $em;
33}
34
35public function getEntity()
36{
37    return $this-&gt;em-&gt;getRepository($this-&gt;entityNamespace)-&gt;find($this-&gt;entityId);
38}
39

Source https://stackoverflow.com/questions/66901745

QUESTION

Modifying bash script including MySQL query to determine if query returns content or no result

Asked 2021-Mar-09 at 13:16

Hope someone can help.

I have an existing bash script that sends a weekly email listing any new documents added to my CMS:

1#!/bin/bash
2DATE=$(date +&quot;%d-%b-%Y&quot;)
3RECIPIENTS=***@***.com
4MAILBODY=$(&lt;/root/bin/mailbody.txt)
5BCC=&quot;***@***.com&quot;
6SENDER=&quot;***@***.com&quot;
7SUBJECT=&quot;New Documents Released Week Ending &quot;
8GREETING=&quot;Good morning,&quot;
9MAILBODY=$MAILBODY
10#MAILBODY=&quot;The following content has been added or updated in the Content Management System in the last 7 days (if no files are listed, it means there have been no updates):&quot;
11CLOSEBODY=&quot;This is an automated email sent by the **** Content Management System (https://***.****.***:****). If you have any problems accessing the content listed in this email, please email ***@****.com&quot;
12
13echo &quot;FROM:&quot; $SENDER &gt; /root/bin/mailtext
14echo &quot;TO:&quot; $RECIPIENTS &gt;&gt; /root/bin/mailtext
15echo &quot;BCC:&quot; $BCC &gt;&gt; /root/bin/mailtext
16echo &quot;SUBJECT:&quot; $SUBJECT $DATE &gt;&gt; /root/bin/mailtext
17echo &quot;&quot; &gt;&gt; /root/bin/mailtext
18echo $GREETING &gt;&gt; /root/bin/mailtext
19echo &quot;&quot; &gt;&gt; /root/bin/mailtext
20echo $MAILBODY &gt;&gt; /root/bin/mailtext
21echo &quot;&quot; &gt;&gt; /root/bin/mailtext
22echo &quot;SELECT name AS NAME,MIN(id) as ID,MIN(created_at) as CREATED,MIN(CONCAT('https://***.***.com:****/link/',id)) as URL from pages WHERE deleted_at IS NULL AND name NOT LIKE 'AO%' AND name NOT LIKE 'KB%' AND name NOT LIKE 'Odoo%' AND name NOT LIKE 'WK%' AND draft=0 AND created_at &gt; DATE_SUB(NOW(), INTERVAL 7 DAY) GROUP BY name \G&quot; | mysql -u root -D  bookstack &gt;&gt; /root/bin/mailtext
23echo &quot;&quot; &gt;&gt; /root/bin/mailtext
24echo &quot;&quot; &gt;&gt; /root/bin/mailtext
25echo $CLOSEBODY &gt;&gt; /root/bin/mailtext
26
27cat /root/bin/mailtext | /usr/sbin/sendmail -t
28
29

However, I want to personalise this script a little more, so that if the query returns no results, it will change the body text (contained in $MAILBODY) of the email to something like:

There have been no new documents added to the CMS in the last 7 days.

I have tried so many different things to try and achieve what I want, but failed miserably (I know very little about bash and even less about SQL!). I have tried to create an IF, THEN, ELSE construct, but I cannot seem to find a way to detect when the query returns no results. The last attempt I had was this, but obviously it doesn't work:

1#!/bin/bash
2DATE=$(date +&quot;%d-%b-%Y&quot;)
3RECIPIENTS=***@***.com
4MAILBODY=$(&lt;/root/bin/mailbody.txt)
5BCC=&quot;***@***.com&quot;
6SENDER=&quot;***@***.com&quot;
7SUBJECT=&quot;New Documents Released Week Ending &quot;
8GREETING=&quot;Good morning,&quot;
9MAILBODY=$MAILBODY
10#MAILBODY=&quot;The following content has been added or updated in the Content Management System in the last 7 days (if no files are listed, it means there have been no updates):&quot;
11CLOSEBODY=&quot;This is an automated email sent by the **** Content Management System (https://***.****.***:****). If you have any problems accessing the content listed in this email, please email ***@****.com&quot;
12
13echo &quot;FROM:&quot; $SENDER &gt; /root/bin/mailtext
14echo &quot;TO:&quot; $RECIPIENTS &gt;&gt; /root/bin/mailtext
15echo &quot;BCC:&quot; $BCC &gt;&gt; /root/bin/mailtext
16echo &quot;SUBJECT:&quot; $SUBJECT $DATE &gt;&gt; /root/bin/mailtext
17echo &quot;&quot; &gt;&gt; /root/bin/mailtext
18echo $GREETING &gt;&gt; /root/bin/mailtext
19echo &quot;&quot; &gt;&gt; /root/bin/mailtext
20echo $MAILBODY &gt;&gt; /root/bin/mailtext
21echo &quot;&quot; &gt;&gt; /root/bin/mailtext
22echo &quot;SELECT name AS NAME,MIN(id) as ID,MIN(created_at) as CREATED,MIN(CONCAT('https://***.***.com:****/link/',id)) as URL from pages WHERE deleted_at IS NULL AND name NOT LIKE 'AO%' AND name NOT LIKE 'KB%' AND name NOT LIKE 'Odoo%' AND name NOT LIKE 'WK%' AND draft=0 AND created_at &gt; DATE_SUB(NOW(), INTERVAL 7 DAY) GROUP BY name \G&quot; | mysql -u root -D  bookstack &gt;&gt; /root/bin/mailtext
23echo &quot;&quot; &gt;&gt; /root/bin/mailtext
24echo &quot;&quot; &gt;&gt; /root/bin/mailtext
25echo $CLOSEBODY &gt;&gt; /root/bin/mailtext
26
27cat /root/bin/mailtext | /usr/sbin/sendmail -t
28
29TEST=$(echo &quot;SELECT IFNULL(SELECT name AS NAME,MIN(id) as ID,MIN(created_at) as CREATED,MIN(CONCAT('https://***.****.***:****/link/',id)) as URL from pages WHERE deleted_at IS NULL AND name NOT LIKE 'AO%' AND name NOT LIKE 'KB%' AND name NOT LIKE 'Odoo%' AND name NOT LIKE 'WK%' AND draft=0 AND created_at &gt; DATE_SUB(NOW(), INTERVAL 1 DAY) GROUP BY name \G&quot;)&quot; | mysql -u root -D  bookstack) 
30IF (echo &quot;IS NULL $TEST&quot;) THEN
31$MAILBODY = &quot;There have been no new documents added to the CMS in the last 7 days.&quot;
32fi
33

Can anyone help me modify my script to achieve what I need?

All help gratefully received!

Mark

ANSWER

Answered 2021-Mar-09 at 13:16

Get the output of the SQL query into a variable, v.gr. SQLQUERY. Test the string contained by that variable and execute a command according to the result

So, try:

1#!/bin/bash
2DATE=$(date +&quot;%d-%b-%Y&quot;)
3RECIPIENTS=***@***.com
4MAILBODY=$(&lt;/root/bin/mailbody.txt)
5BCC=&quot;***@***.com&quot;
6SENDER=&quot;***@***.com&quot;
7SUBJECT=&quot;New Documents Released Week Ending &quot;
8GREETING=&quot;Good morning,&quot;
9MAILBODY=$MAILBODY
10#MAILBODY=&quot;The following content has been added or updated in the Content Management System in the last 7 days (if no files are listed, it means there have been no updates):&quot;
11CLOSEBODY=&quot;This is an automated email sent by the **** Content Management System (https://***.****.***:****). If you have any problems accessing the content listed in this email, please email ***@****.com&quot;
12
13echo &quot;FROM:&quot; $SENDER &gt; /root/bin/mailtext
14echo &quot;TO:&quot; $RECIPIENTS &gt;&gt; /root/bin/mailtext
15echo &quot;BCC:&quot; $BCC &gt;&gt; /root/bin/mailtext
16echo &quot;SUBJECT:&quot; $SUBJECT $DATE &gt;&gt; /root/bin/mailtext
17echo &quot;&quot; &gt;&gt; /root/bin/mailtext
18echo $GREETING &gt;&gt; /root/bin/mailtext
19echo &quot;&quot; &gt;&gt; /root/bin/mailtext
20echo $MAILBODY &gt;&gt; /root/bin/mailtext
21echo &quot;&quot; &gt;&gt; /root/bin/mailtext
22echo &quot;SELECT name AS NAME,MIN(id) as ID,MIN(created_at) as CREATED,MIN(CONCAT('https://***.***.com:****/link/',id)) as URL from pages WHERE deleted_at IS NULL AND name NOT LIKE 'AO%' AND name NOT LIKE 'KB%' AND name NOT LIKE 'Odoo%' AND name NOT LIKE 'WK%' AND draft=0 AND created_at &gt; DATE_SUB(NOW(), INTERVAL 7 DAY) GROUP BY name \G&quot; | mysql -u root -D  bookstack &gt;&gt; /root/bin/mailtext
23echo &quot;&quot; &gt;&gt; /root/bin/mailtext
24echo &quot;&quot; &gt;&gt; /root/bin/mailtext
25echo $CLOSEBODY &gt;&gt; /root/bin/mailtext
26
27cat /root/bin/mailtext | /usr/sbin/sendmail -t
28
29TEST=$(echo &quot;SELECT IFNULL(SELECT name AS NAME,MIN(id) as ID,MIN(created_at) as CREATED,MIN(CONCAT('https://***.****.***:****/link/',id)) as URL from pages WHERE deleted_at IS NULL AND name NOT LIKE 'AO%' AND name NOT LIKE 'KB%' AND name NOT LIKE 'Odoo%' AND name NOT LIKE 'WK%' AND draft=0 AND created_at &gt; DATE_SUB(NOW(), INTERVAL 1 DAY) GROUP BY name \G&quot;)&quot; | mysql -u root -D  bookstack) 
30IF (echo &quot;IS NULL $TEST&quot;) THEN
31$MAILBODY = &quot;There have been no new documents added to the CMS in the last 7 days.&quot;
32fi
33#!/bin/bash
34DATE=$(date +&quot;%d-%b-%Y&quot;)
35RECIPIENTS=***@***.com
36MAILBODY=$(&lt;/root/bin/mailbody.txt)
37BCC=&quot;***@***.com&quot;
38SENDER=&quot;***@***.com&quot;
39SUBJECT=&quot;New Documents Released Week Ending &quot;
40GREETING=&quot;Good morning,&quot;
41MAILBODY=$MAILBODY
42#MAILBODY=&quot;The following content has been added or updated in the Content Management System in the last 7 days (if no files are listed, it means there have been no updates):&quot;
43CLOSEBODY=&quot;This is an automated email sent by the **** Content Management System (https://***.****.***:****). If you have any problems accessing the content listed in this email, please email ***@****.com&quot;
44SQLQUERY=$(echo &quot;SELECT name AS NAME,MIN(id) as ID,MIN(created_at) as CREATED,MIN(CONCAT('https://***.***.com:****/link/',id)) as URL from pages WHERE deleted_at IS NULL AND name NOT LIKE 'AO%' AND name NOT LIKE 'KB%' AND name NOT LIKE 'Odoo%' AND name NOT LIKE 'WK%' AND draft=0 AND created_at &gt; DATE_SUB(NOW(), INTERVAL 7 DAY) GROUP BY name \G&quot; | mysql -u root -D  bookstack)
45
46echo &quot;FROM:&quot; $SENDER &gt; /root/bin/mailtext
47echo &quot;TO:&quot; $RECIPIENTS &gt;&gt; /root/bin/mailtext
48echo &quot;BCC:&quot; $BCC &gt;&gt; /root/bin/mailtext
49echo &quot;SUBJECT:&quot; $SUBJECT $DATE &gt;&gt; /root/bin/mailtext
50echo &quot;&quot; &gt;&gt; /root/bin/mailtext
51echo $GREETING &gt;&gt; /root/bin/mailtext
52echo &quot;&quot; &gt;&gt; /root/bin/mailtext
53echo $MAILBODY &gt;&gt; /root/bin/mailtext
54echo &quot;&quot; &gt;&gt; /root/bin/mailtext
55if [ -z &quot;$SQLQUERY&quot; ] ; then # SQLQUERY contains an empty string.
56  echo &quot;There have been no new documents added to the CMS in the last 7 days.&quot; &gt;&gt; /root/bin/mailtext
57else
58  echo &quot;$SQLQUERY&quot; &gt;&gt; /root/bin/mailtext
59fi 
60echo &quot;&quot; &gt;&gt; /root/bin/mailtext
61echo &quot;&quot; &gt;&gt; /root/bin/mailtext
62echo $CLOSEBODY &gt;&gt; /root/bin/mailtext
63
64cat /root/bin/mailtext | /usr/sbin/sendmail -t
65

Since you don't provide a minimal working example as usual on SO, I cannot debug the code that I provide you. It is possible that you will have to adapt "if" test above in function of your configuration.

Source https://stackoverflow.com/questions/66527182

QUESTION

How do i fix Upwork clone sliding page problem (JS)

Asked 2020-Dec-31 at 08:29

If you've used upwork you might be familiar with their UI.
Here I tried to make it's small feature when when user clicks on any freelance job offer, another page opens from left side transform: translate(120%) to transform: translate(0)


Problem is that when I click on job header sliding from right to left works perfectly fine but when I do this same thing second time, sliding is not working. and also when slide comes from right to left there's grayish bar appears on right side of the page. I don't know what I am doing if You are satisfied with my explanation I'll try to more detailed about it.

Screenshot

1const jobContainer = document.querySelector('.job-description');
2let htag = document.querySelector('.green-h3');
3function changeCol() {
4    htag = document.querySelector('.green-h3');
5    htag.style.color = "green"
6}
7
8function normalCol() {
9    let htag = document.querySelector('.green-h3');
10    htag.style.color = "black"
11    htag.style.borderBottom = `none`
12}
13
14htag.addEventListener('mouseover', ()=&gt; {
15    htag.style.borderBottom = `1.5px solid green`
16});
17
18
19
20// show more
21let hiddenInfo = document.querySelector('.by-default-hidden');
22let more = document.querySelector('.more');
23let less = document.querySelector('.less');
24less.style.display = 'none'
25more.addEventListener('click', ()=&gt; {
26    hiddenInfo.style.display = 'inline'
27    more.style.display = 'none'
28    less.style.display = 'inline'
29})
30
31less.addEventListener('click', ()=&gt; {
32    hiddenInfo.style.display = 'none'
33    more.style.display = 'inline'
34    less.style.display = 'none'
35})
36
37
38// sliding
39
40let headingTag = document.querySelector('.green-h3');
41let slidingParent = document.querySelector('.container-job-slide')
42let slidingContent = document.querySelector('.slide-jobs');
43let jobSectionmain = document.querySelector('.jobs');
44let backIcon = document.querySelector('.back-icon');
45headingTag.addEventListener('click', ()=&gt; {
46    
47    document.body.setAttribute("data-theme", "blur")
48    if (headingTag) {
49        slidingContent.style.display = 'block';
50    } else {
51        slidingContent.style.display = 'none';
52    }
53})
54
55backIcon.addEventListener('click', ()=&gt; {
56    slidingContent.style.transform = `translateX(120%)`;
57    document.body.removeAttribute("data-theme", "blur");
58});
1const jobContainer = document.querySelector('.job-description');
2let htag = document.querySelector('.green-h3');
3function changeCol() {
4    htag = document.querySelector('.green-h3');
5    htag.style.color = "green"
6}
7
8function normalCol() {
9    let htag = document.querySelector('.green-h3');
10    htag.style.color = "black"
11    htag.style.borderBottom = `none`
12}
13
14htag.addEventListener('mouseover', ()=&gt; {
15    htag.style.borderBottom = `1.5px solid green`
16});
17
18
19
20// show more
21let hiddenInfo = document.querySelector('.by-default-hidden');
22let more = document.querySelector('.more');
23let less = document.querySelector('.less');
24less.style.display = 'none'
25more.addEventListener('click', ()=&gt; {
26    hiddenInfo.style.display = 'inline'
27    more.style.display = 'none'
28    less.style.display = 'inline'
29})
30
31less.addEventListener('click', ()=&gt; {
32    hiddenInfo.style.display = 'none'
33    more.style.display = 'inline'
34    less.style.display = 'none'
35})
36
37
38// sliding
39
40let headingTag = document.querySelector('.green-h3');
41let slidingParent = document.querySelector('.container-job-slide')
42let slidingContent = document.querySelector('.slide-jobs');
43let jobSectionmain = document.querySelector('.jobs');
44let backIcon = document.querySelector('.back-icon');
45headingTag.addEventListener('click', ()=&gt; {
46    
47    document.body.setAttribute("data-theme", "blur")
48    if (headingTag) {
49        slidingContent.style.display = 'block';
50    } else {
51        slidingContent.style.display = 'none';
52    }
53})
54
55backIcon.addEventListener('click', ()=&gt; {
56    slidingContent.style.transform = `translateX(120%)`;
57    document.body.removeAttribute("data-theme", "blur");
58});body {
59    max-width: 990px;
60    overflow-x: hidden;
61    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
62    background-color: #F1F2F4;
63    margin: 0 auto;
64}
65
66body[data-theme="blur"] {
67    background-color: rgb(87, 87, 87);
68}
69
70
71.jobs {
72    position: relative;
73}
74
75.container-job {
76    max-width: 630px;
77    position: relative;
78}
79
80
81h1 {
82    padding: 20px 10px 20px 40px;
83    background-color: white ;
84}
85
86.job-description {
87    margin-top: -20px;
88    border-top: 1px solid rgb(194, 194, 194);
89    padding: 20px 20px 20px 40px;
90    background-color: white;
91    color: #656565;
92}
93
94.job-description:hover{
95    color: black;
96    background-color: #F9F9F9;
97    cursor: pointer;
98}
99.more,.less {
100    color: green;
101}
102.more:hover,.less:hover {
103    border-bottom: 1.5px solid green;
104    cursor: pointer;
105}
106.green-h3 {
107    font-size: 1.2rem;
108}
109
110.green-h3:hover  {
111    border-bottom: 1.5px solid green;
112}
113
114.by-default-hidden {
115    display: none;
116}
117
118/* slide jobs */
119
120.slide-jobs {
121    top: 0;
122    position: absolute;
123    /* */
124    display: none;
125    right: 5%;
126    width: 80%;
127    transition: all .4s;
128    animation: slide .4s ease-in;
129}
130@keyframes slide {
131    from {
132        transform: translateX(100%); 
133    }
134    to {
135        transform: translateX(0); 
136    }
137}
138/* .backSlide {
139    animation: backSlide .4s ease-in;
140}
141
142@keyframes backSlide {
143    from{
144        transform: translateX(0%);
145    } 
146    to {
147        transform: translateX(120%);
148    }
149} */
150
151.job-description-slide {
152    margin-top: -20px;
153    border-top: 1px solid rgb(194, 194, 194);
154    padding: 20px 20px 20px 40px;
155    background-color: white;
156}
157.back-icon div{
158    height: 4px;
159    width: 20px;
160    margin: 5px;
161    background-color: green;
162    cursor: pointer;
163}
164.back-icon {
165    background-color: white;
166    padding: 25px;
167}
168.line1 {
169    transform: rotate(-30deg);
170}
171.line2 {
172    transform: rotate(30deg);
173}
1const jobContainer = document.querySelector('.job-description');
2let htag = document.querySelector('.green-h3');
3function changeCol() {
4    htag = document.querySelector('.green-h3');
5    htag.style.color = "green"
6}
7
8function normalCol() {
9    let htag = document.querySelector('.green-h3');
10    htag.style.color = "black"
11    htag.style.borderBottom = `none`
12}
13
14htag.addEventListener('mouseover', ()=&gt; {
15    htag.style.borderBottom = `1.5px solid green`
16});
17
18
19
20// show more
21let hiddenInfo = document.querySelector('.by-default-hidden');
22let more = document.querySelector('.more');
23let less = document.querySelector('.less');
24less.style.display = 'none'
25more.addEventListener('click', ()=&gt; {
26    hiddenInfo.style.display = 'inline'
27    more.style.display = 'none'
28    less.style.display = 'inline'
29})
30
31less.addEventListener('click', ()=&gt; {
32    hiddenInfo.style.display = 'none'
33    more.style.display = 'inline'
34    less.style.display = 'none'
35})
36
37
38// sliding
39
40let headingTag = document.querySelector('.green-h3');
41let slidingParent = document.querySelector('.container-job-slide')
42let slidingContent = document.querySelector('.slide-jobs');
43let jobSectionmain = document.querySelector('.jobs');
44let backIcon = document.querySelector('.back-icon');
45headingTag.addEventListener('click', ()=&gt; {
46    
47    document.body.setAttribute("data-theme", "blur")
48    if (headingTag) {
49        slidingContent.style.display = 'block';
50    } else {
51        slidingContent.style.display = 'none';
52    }
53})
54
55backIcon.addEventListener('click', ()=&gt; {
56    slidingContent.style.transform = `translateX(120%)`;
57    document.body.removeAttribute("data-theme", "blur");
58});body {
59    max-width: 990px;
60    overflow-x: hidden;
61    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
62    background-color: #F1F2F4;
63    margin: 0 auto;
64}
65
66body[data-theme="blur"] {
67    background-color: rgb(87, 87, 87);
68}
69
70
71.jobs {
72    position: relative;
73}
74
75.container-job {
76    max-width: 630px;
77    position: relative;
78}
79
80
81h1 {
82    padding: 20px 10px 20px 40px;
83    background-color: white ;
84}
85
86.job-description {
87    margin-top: -20px;
88    border-top: 1px solid rgb(194, 194, 194);
89    padding: 20px 20px 20px 40px;
90    background-color: white;
91    color: #656565;
92}
93
94.job-description:hover{
95    color: black;
96    background-color: #F9F9F9;
97    cursor: pointer;
98}
99.more,.less {
100    color: green;
101}
102.more:hover,.less:hover {
103    border-bottom: 1.5px solid green;
104    cursor: pointer;
105}
106.green-h3 {
107    font-size: 1.2rem;
108}
109
110.green-h3:hover  {
111    border-bottom: 1.5px solid green;
112}
113
114.by-default-hidden {
115    display: none;
116}
117
118/* slide jobs */
119
120.slide-jobs {
121    top: 0;
122    position: absolute;
123    /* */
124    display: none;
125    right: 5%;
126    width: 80%;
127    transition: all .4s;
128    animation: slide .4s ease-in;
129}
130@keyframes slide {
131    from {
132        transform: translateX(100%); 
133    }
134    to {
135        transform: translateX(0); 
136    }
137}
138/* .backSlide {
139    animation: backSlide .4s ease-in;
140}
141
142@keyframes backSlide {
143    from{
144        transform: translateX(0%);
145    } 
146    to {
147        transform: translateX(120%);
148    }
149} */
150
151.job-description-slide {
152    margin-top: -20px;
153    border-top: 1px solid rgb(194, 194, 194);
154    padding: 20px 20px 20px 40px;
155    background-color: white;
156}
157.back-icon div{
158    height: 4px;
159    width: 20px;
160    margin: 5px;
161    background-color: green;
162    cursor: pointer;
163}
164.back-icon {
165    background-color: white;
166    padding: 25px;
167}
168.line1 {
169    transform: rotate(-30deg);
170}
171.line2 {
172    transform: rotate(30deg);
173}&lt;section class="jobs"&gt;
174      &lt;div class="container-job"&gt;
175        &lt;h1&gt;My Feed&lt;/h1&gt;
176        &lt;div
177          onmouseover="changeCol();"
178          onmouseout="normalCol()"
179          class="job-description"
180        &gt;
181          &lt;span class="green-h3"&gt;SEO Specialist Needed&lt;/span&gt;
182          &lt;h4&gt;
183            Fixed-price - Expert - Est. Budget: 400$ - Posted 46 minutes ago
184          &lt;/h4&gt;
185          &lt;p&gt;
186            Job Description Hello! Our small digital advertising company needs
187            someone that's starting out in their career that is **VERY** capable
188            in SEO and web development. Must be able to do a video call and
189            operate in US Eastern Time. Also must be comfortable with Wordpress.
190            If you also have some graphic design background and know about
191            Facebook / Google Ads and could manage those, that's a
192            &lt;span class="more"&gt;more&lt;/span&gt;
193            &lt;span class="by-default-hidden"
194              &gt;significant plus. Our team also needs someone that's very
195              comfortable in Wordpress back end HTML / CSS / PHP, and can
196              essentially create a site from visuals provided. Pay is not
197              fantastic YET, but it should be once we really have clients coming
198              through. Must be able to do a video call every now and then, and
199              video interview on front end. Key summary: we need an SEO expert
200              to manage search engine optimization and marketing activities. The
201              SEO Specialist will be responsible for managing all SEO activities
202              such as keyword strategy, content strategy and link building to
203              increase organic search rankings and drive search traffic from
204              Google, Bing, Yahoo and other search engines. A successful SEO
205              specialist must keep up-to-date with the latest industry best
206              practices and work closely with editorial and marketing teams to
207              develop a successful organic search strategy. Responsibilities
208              Optimize copy and landing pages for search engine optimization
209              Perform ongoing keyword research and discovery, expansion and
210              optimization Research and implement search engine optimization
211              recommendations on the website Research and analyze competitor
212              content and links Develop and implement link building strategy
213              Work with the development team to ensure SEO best practices are
214              properly implemented on newly developed code Work with editorial
215              and marketing teams to drive SEO in content strategy and creation
216              Work closely with social media team to align social distribution
217              and SEO efforts Recommend changes to website architecture,
218              content, linking and other factors to improve SEO positions for
219              target keywords Skills Proven SEO experience and a track record of
220              success growing organic search traffic and conversions Solid
221              understanding of performance marketing, conversion, and online
222              customer acquisition Up-to-date with the latest trends and best
223              practices in SEO and inbound marketing In-depth experience with
224              website analytics tools (e.g, Google Analytics, NetInsight,
225              Omniture, WebTrends) Working knowledge of HTML, CSS, and
226              JavaScript development and constraints Familiarity with content
227              management systems (e.g, Wordpress, Vignette) BS/MS degree in a
228              quantitative, test-driven field Job Type: Part-time Pay: From
229              $20.00 per hour&lt;/span
230            &gt;
231            &lt;span class="less"&gt;Less&lt;/span&gt;
232          &lt;/p&gt;
233        &lt;/div&gt;
234      &lt;/div&gt;
235    &lt;/section&gt;
236    &lt;section class="slide-jobs"&gt;
237      &lt;div class="container-job-slide"&gt;
238        &lt;div class="back-icon"&gt;
239          &lt;div class="line1"&gt;&lt;/div&gt;
240          &lt;div class="line2"&gt;&lt;/div&gt;
241        &lt;/div&gt;
242        &lt;h1&gt;SEO Specialist Needed&lt;/h1&gt;
243        &lt;div class="job-description-slide"&gt;
244          &lt;span class="green-h3"&gt;SEO Specialist Needed&lt;/span&gt;
245          &lt;h4&gt;
246            Fixed-price - Expert - Est. Budget: 400$ - Posted 46 minutes ago
247          &lt;/h4&gt;
248          &lt;p&gt;
249            Job Description Hello! Our small digital advertising company needs
250            someone that's starting out in their career that is **VERY** capable
251            in SEO and web development. Must be able to do a video call and
252            operate in US Eastern Time. Also must be comfortable with Wordpress.
253            If you also have some graphic design background and know about
254            Facebook / Google Ads and could manage those, that's a significant
255            plus. Our team also needs someone that's very comfortable in
256            Wordpress back end HTML / CSS / PHP, and can essentially create a
257            site from visuals provided. Pay is not fantastic YET, but it should
258            be once we really have clients coming through. Must be able to do a
259            video call every now and then, and video interview on front end. Key
260            summary: we need an SEO expert to manage search engine optimization
261            and marketing activities. The SEO Specialist will be responsible for
262            managing all SEO activities such as keyword strategy, content
263            strategy and link building to increase organic search rankings and
264            drive search traffic from Google, Bing, Yahoo and other search
265            engines. A successful SEO specialist must keep up-to-date with the
266            latest industry best practices and work closely with editorial and
267            marketing teams to develop a successful organic search strategy.
268            Responsibilities Optimize copy and landing pages for search engine
269            optimization Perform ongoing keyword research and discovery,
270            expansion and optimization Research and implement search engine
271            optimization recommendations on the website Research and analyze
272            competitor content and links Develop and implement link building
273            strategy Work with the development team to ensure SEO best practices
274            are properly implemented on newly developed code Work with editorial
275            and marketing teams to drive SEO in content strategy and creation
276            Work closely with social media team to align social distribution and
277            SEO efforts Recommend changes to website architecture, content,
278            linking and other factors to improve SEO positions for target
279            keywords Skills Proven SEO experience and a track record of success
280            growing organic search traffic and conversions Solid understanding
281            of performance marketing, conversion, and online customer
282            acquisition Up-to-date with the latest trends and best practices in
283            SEO and inbound marketing In-depth experience with website analytics
284            tools (e.g, Google Analytics, NetInsight, Omniture, WebTrends)
285            Working knowledge of HTML, CSS, and JavaScript development and
286            constraints Familiarity with content management systems (e.g,
287            Wordpress, Vignette) BS/MS degree in a quantitative, test-driven
288            field Job Type: Part-time Pay: From $20.00 per hour
289          &lt;/p&gt;
290        &lt;/div&gt;
291      &lt;/div&gt;
292    &lt;/section&gt;

ANSWER

Answered 2020-Dec-31 at 08:29

1st in some places in your code your js code you have ` instead of ' when selecting elements like in :

1const jobContainer = document.querySelector('.job-description');
2let htag = document.querySelector('.green-h3');
3function changeCol() {
4    htag = document.querySelector('.green-h3');
5    htag.style.color = "green"
6}
7
8function normalCol() {
9    let htag = document.querySelector('.green-h3');
10    htag.style.color = "black"
11    htag.style.borderBottom = `none`
12}
13
14htag.addEventListener('mouseover', ()=&gt; {
15    htag.style.borderBottom = `1.5px solid green`
16});
17
18
19
20// show more
21let hiddenInfo = document.querySelector('.by-default-hidden');
22let more = document.querySelector('.more');
23let less = document.querySelector('.less');
24less.style.display = 'none'
25more.addEventListener('click', ()=&gt; {
26    hiddenInfo.style.display = 'inline'
27    more.style.display = 'none'
28    less.style.display = 'inline'
29})
30
31less.addEventListener('click', ()=&gt; {
32    hiddenInfo.style.display = 'none'
33    more.style.display = 'inline'
34    less.style.display = 'none'
35})
36
37
38// sliding
39
40let headingTag = document.querySelector('.green-h3');
41let slidingParent = document.querySelector('.container-job-slide')
42let slidingContent = document.querySelector('.slide-jobs');
43let jobSectionmain = document.querySelector('.jobs');
44let backIcon = document.querySelector('.back-icon');
45headingTag.addEventListener('click', ()=&gt; {
46    
47    document.body.setAttribute("data-theme", "blur")
48    if (headingTag) {
49        slidingContent.style.display = 'block';
50    } else {
51        slidingContent.style.display = 'none';
52    }
53})
54
55backIcon.addEventListener('click', ()=&gt; {
56    slidingContent.style.transform = `translateX(120%)`;
57    document.body.removeAttribute("data-theme", "blur");
58});body {
59    max-width: 990px;
60    overflow-x: hidden;
61    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
62    background-color: #F1F2F4;
63    margin: 0 auto;
64}
65
66body[data-theme="blur"] {
67    background-color: rgb(87, 87, 87);
68}
69
70
71.jobs {
72    position: relative;
73}
74
75.container-job {
76    max-width: 630px;
77    position: relative;
78}
79
80
81h1 {
82    padding: 20px 10px 20px 40px;
83    background-color: white ;
84}
85
86.job-description {
87    margin-top: -20px;
88    border-top: 1px solid rgb(194, 194, 194);
89    padding: 20px 20px 20px 40px;
90    background-color: white;
91    color: #656565;
92}
93
94.job-description:hover{
95    color: black;
96    background-color: #F9F9F9;
97    cursor: pointer;
98}
99.more,.less {
100    color: green;
101}
102.more:hover,.less:hover {
103    border-bottom: 1.5px solid green;
104    cursor: pointer;
105}
106.green-h3 {
107    font-size: 1.2rem;
108}
109
110.green-h3:hover  {
111    border-bottom: 1.5px solid green;
112}
113
114.by-default-hidden {
115    display: none;
116}
117
118/* slide jobs */
119
120.slide-jobs {
121    top: 0;
122    position: absolute;
123    /* */
124    display: none;
125    right: 5%;
126    width: 80%;
127    transition: all .4s;
128    animation: slide .4s ease-in;
129}
130@keyframes slide {
131    from {
132        transform: translateX(100%); 
133    }
134    to {
135        transform: translateX(0); 
136    }
137}
138/* .backSlide {
139    animation: backSlide .4s ease-in;
140}
141
142@keyframes backSlide {
143    from{
144        transform: translateX(0%);
145    } 
146    to {
147        transform: translateX(120%);
148    }
149} */
150
151.job-description-slide {
152    margin-top: -20px;
153    border-top: 1px solid rgb(194, 194, 194);
154    padding: 20px 20px 20px 40px;
155    background-color: white;
156}
157.back-icon div{
158    height: 4px;
159    width: 20px;
160    margin: 5px;
161    background-color: green;
162    cursor: pointer;
163}
164.back-icon {
165    background-color: white;
166    padding: 25px;
167}
168.line1 {
169    transform: rotate(-30deg);
170}
171.line2 {
172    transform: rotate(30deg);
173}&lt;section class="jobs"&gt;
174      &lt;div class="container-job"&gt;
175        &lt;h1&gt;My Feed&lt;/h1&gt;
176        &lt;div
177          onmouseover="changeCol();"
178          onmouseout="normalCol()"
179          class="job-description"
180        &gt;
181          &lt;span class="green-h3"&gt;SEO Specialist Needed&lt;/span&gt;
182          &lt;h4&gt;
183            Fixed-price - Expert - Est. Budget: 400$ - Posted 46 minutes ago
184          &lt;/h4&gt;
185          &lt;p&gt;
186            Job Description Hello! Our small digital advertising company needs
187            someone that's starting out in their career that is **VERY** capable
188            in SEO and web development. Must be able to do a video call and
189            operate in US Eastern Time. Also must be comfortable with Wordpress.
190            If you also have some graphic design background and know about
191            Facebook / Google Ads and could manage those, that's a
192            &lt;span class="more"&gt;more&lt;/span&gt;
193            &lt;span class="by-default-hidden"
194              &gt;significant plus. Our team also needs someone that's very
195              comfortable in Wordpress back end HTML / CSS / PHP, and can
196              essentially create a site from visuals provided. Pay is not
197              fantastic YET, but it should be once we really have clients coming
198              through. Must be able to do a video call every now and then, and
199              video interview on front end. Key summary: we need an SEO expert
200              to manage search engine optimization and marketing activities. The
201              SEO Specialist will be responsible for managing all SEO activities
202              such as keyword strategy, content strategy and link building to
203              increase organic search rankings and drive search traffic from
204              Google, Bing, Yahoo and other search engines. A successful SEO
205              specialist must keep up-to-date with the latest industry best
206              practices and work closely with editorial and marketing teams to
207              develop a successful organic search strategy. Responsibilities
208              Optimize copy and landing pages for search engine optimization
209              Perform ongoing keyword research and discovery, expansion and
210              optimization Research and implement search engine optimization
211              recommendations on the website Research and analyze competitor
212              content and links Develop and implement link building strategy
213              Work with the development team to ensure SEO best practices are
214              properly implemented on newly developed code Work with editorial
215              and marketing teams to drive SEO in content strategy and creation
216              Work closely with social media team to align social distribution
217              and SEO efforts Recommend changes to website architecture,
218              content, linking and other factors to improve SEO positions for
219              target keywords Skills Proven SEO experience and a track record of
220              success growing organic search traffic and conversions Solid
221              understanding of performance marketing, conversion, and online
222              customer acquisition Up-to-date with the latest trends and best
223              practices in SEO and inbound marketing In-depth experience with
224              website analytics tools (e.g, Google Analytics, NetInsight,
225              Omniture, WebTrends) Working knowledge of HTML, CSS, and
226              JavaScript development and constraints Familiarity with content
227              management systems (e.g, Wordpress, Vignette) BS/MS degree in a
228              quantitative, test-driven field Job Type: Part-time Pay: From
229              $20.00 per hour&lt;/span
230            &gt;
231            &lt;span class="less"&gt;Less&lt;/span&gt;
232          &lt;/p&gt;
233        &lt;/div&gt;
234      &lt;/div&gt;
235    &lt;/section&gt;
236    &lt;section class="slide-jobs"&gt;
237      &lt;div class="container-job-slide"&gt;
238        &lt;div class="back-icon"&gt;
239          &lt;div class="line1"&gt;&lt;/div&gt;
240          &lt;div class="line2"&gt;&lt;/div&gt;
241        &lt;/div&gt;
242        &lt;h1&gt;SEO Specialist Needed&lt;/h1&gt;
243        &lt;div class="job-description-slide"&gt;
244          &lt;span class="green-h3"&gt;SEO Specialist Needed&lt;/span&gt;
245          &lt;h4&gt;
246            Fixed-price - Expert - Est. Budget: 400$ - Posted 46 minutes ago
247          &lt;/h4&gt;
248          &lt;p&gt;
249            Job Description Hello! Our small digital advertising company needs
250            someone that's starting out in their career that is **VERY** capable
251            in SEO and web development. Must be able to do a video call and
252            operate in US Eastern Time. Also must be comfortable with Wordpress.
253            If you also have some graphic design background and know about
254            Facebook / Google Ads and could manage those, that's a significant
255            plus. Our team also needs someone that's very comfortable in
256            Wordpress back end HTML / CSS / PHP, and can essentially create a
257            site from visuals provided. Pay is not fantastic YET, but it should
258            be once we really have clients coming through. Must be able to do a
259            video call every now and then, and video interview on front end. Key
260            summary: we need an SEO expert to manage search engine optimization
261            and marketing activities. The SEO Specialist will be responsible for
262            managing all SEO activities such as keyword strategy, content
263            strategy and link building to increase organic search rankings and
264            drive search traffic from Google, Bing, Yahoo and other search
265            engines. A successful SEO specialist must keep up-to-date with the
266            latest industry best practices and work closely with editorial and
267            marketing teams to develop a successful organic search strategy.
268            Responsibilities Optimize copy and landing pages for search engine
269            optimization Perform ongoing keyword research and discovery,
270            expansion and optimization Research and implement search engine
271            optimization recommendations on the website Research and analyze
272            competitor content and links Develop and implement link building
273            strategy Work with the development team to ensure SEO best practices
274            are properly implemented on newly developed code Work with editorial
275            and marketing teams to drive SEO in content strategy and creation
276            Work closely with social media team to align social distribution and
277            SEO efforts Recommend changes to website architecture, content,
278            linking and other factors to improve SEO positions for target
279            keywords Skills Proven SEO experience and a track record of success
280            growing organic search traffic and conversions Solid understanding
281            of performance marketing, conversion, and online customer
282            acquisition Up-to-date with the latest trends and best practices in
283            SEO and inbound marketing In-depth experience with website analytics
284            tools (e.g, Google Analytics, NetInsight, Omniture, WebTrends)
285            Working knowledge of HTML, CSS, and JavaScript development and
286            constraints Familiarity with content management systems (e.g,
287            Wordpress, Vignette) BS/MS degree in a quantitative, test-driven
288            field Job Type: Part-time Pay: From $20.00 per hour
289          &lt;/p&gt;
290        &lt;/div&gt;
291      &lt;/div&gt;
292    &lt;/section&gt;htag.style.borderBottom = `1.5px solid green`
293// should be
294htag.style.borderBottom = '1.5px solid green'
295

Fix that! You need 1 small fix in the code about sliding problem

1const jobContainer = document.querySelector('.job-description');
2let htag = document.querySelector('.green-h3');
3function changeCol() {
4    htag = document.querySelector('.green-h3');
5    htag.style.color = "green"
6}
7
8function normalCol() {
9    let htag = document.querySelector('.green-h3');
10    htag.style.color = "black"
11    htag.style.borderBottom = `none`
12}
13
14htag.addEventListener('mouseover', ()=&gt; {
15    htag.style.borderBottom = `1.5px solid green`
16});
17
18
19
20// show more
21let hiddenInfo = document.querySelector('.by-default-hidden');
22let more = document.querySelector('.more');
23let less = document.querySelector('.less');
24less.style.display = 'none'
25more.addEventListener('click', ()=&gt; {
26    hiddenInfo.style.display = 'inline'
27    more.style.display = 'none'
28    less.style.display = 'inline'
29})
30
31less.addEventListener('click', ()=&gt; {
32    hiddenInfo.style.display = 'none'
33    more.style.display = 'inline'
34    less.style.display = 'none'
35})
36
37
38// sliding
39
40let headingTag = document.querySelector('.green-h3');
41let slidingParent = document.querySelector('.container-job-slide')
42let slidingContent = document.querySelector('.slide-jobs');
43let jobSectionmain = document.querySelector('.jobs');
44let backIcon = document.querySelector('.back-icon');
45headingTag.addEventListener('click', ()=&gt; {
46    
47    document.body.setAttribute("data-theme", "blur")
48    if (headingTag) {
49        slidingContent.style.display = 'block';
50    } else {
51        slidingContent.style.display = 'none';
52    }
53})
54
55backIcon.addEventListener('click', ()=&gt; {
56    slidingContent.style.transform = `translateX(120%)`;
57    document.body.removeAttribute("data-theme", "blur");
58});body {
59    max-width: 990px;
60    overflow-x: hidden;
61    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
62    background-color: #F1F2F4;
63    margin: 0 auto;
64}
65
66body[data-theme="blur"] {
67    background-color: rgb(87, 87, 87);
68}
69
70
71.jobs {
72    position: relative;
73}
74
75.container-job {
76    max-width: 630px;
77    position: relative;
78}
79
80
81h1 {
82    padding: 20px 10px 20px 40px;
83    background-color: white ;
84}
85
86.job-description {
87    margin-top: -20px;
88    border-top: 1px solid rgb(194, 194, 194);
89    padding: 20px 20px 20px 40px;
90    background-color: white;
91    color: #656565;
92}
93
94.job-description:hover{
95    color: black;
96    background-color: #F9F9F9;
97    cursor: pointer;
98}
99.more,.less {
100    color: green;
101}
102.more:hover,.less:hover {
103    border-bottom: 1.5px solid green;
104    cursor: pointer;
105}
106.green-h3 {
107    font-size: 1.2rem;
108}
109
110.green-h3:hover  {
111    border-bottom: 1.5px solid green;
112}
113
114.by-default-hidden {
115    display: none;
116}
117
118/* slide jobs */
119
120.slide-jobs {
121    top: 0;
122    position: absolute;
123    /* */
124    display: none;
125    right: 5%;
126    width: 80%;
127    transition: all .4s;
128    animation: slide .4s ease-in;
129}
130@keyframes slide {
131    from {
132        transform: translateX(100%); 
133    }
134    to {
135        transform: translateX(0); 
136    }
137}
138/* .backSlide {
139    animation: backSlide .4s ease-in;
140}
141
142@keyframes backSlide {
143    from{
144        transform: translateX(0%);
145    } 
146    to {
147        transform: translateX(120%);
148    }
149} */
150
151.job-description-slide {
152    margin-top: -20px;
153    border-top: 1px solid rgb(194, 194, 194);
154    padding: 20px 20px 20px 40px;
155    background-color: white;
156}
157.back-icon div{
158    height: 4px;
159    width: 20px;
160    margin: 5px;
161    background-color: green;
162    cursor: pointer;
163}
164.back-icon {
165    background-color: white;
166    padding: 25px;
167}
168.line1 {
169    transform: rotate(-30deg);
170}
171.line2 {
172    transform: rotate(30deg);
173}&lt;section class="jobs"&gt;
174      &lt;div class="container-job"&gt;
175        &lt;h1&gt;My Feed&lt;/h1&gt;
176        &lt;div
177          onmouseover="changeCol();"
178          onmouseout="normalCol()"
179          class="job-description"
180        &gt;
181          &lt;span class="green-h3"&gt;SEO Specialist Needed&lt;/span&gt;
182          &lt;h4&gt;
183            Fixed-price - Expert - Est. Budget: 400$ - Posted 46 minutes ago
184          &lt;/h4&gt;
185          &lt;p&gt;
186            Job Description Hello! Our small digital advertising company needs
187            someone that's starting out in their career that is **VERY** capable
188            in SEO and web development. Must be able to do a video call and
189            operate in US Eastern Time. Also must be comfortable with Wordpress.
190            If you also have some graphic design background and know about
191            Facebook / Google Ads and could manage those, that's a
192            &lt;span class="more"&gt;more&lt;/span&gt;
193            &lt;span class="by-default-hidden"
194              &gt;significant plus. Our team also needs someone that's very
195              comfortable in Wordpress back end HTML / CSS / PHP, and can
196              essentially create a site from visuals provided. Pay is not
197              fantastic YET, but it should be once we really have clients coming
198              through. Must be able to do a video call every now and then, and
199              video interview on front end. Key summary: we need an SEO expert
200              to manage search engine optimization and marketing activities. The
201              SEO Specialist will be responsible for managing all SEO activities
202              such as keyword strategy, content strategy and link building to
203              increase organic search rankings and drive search traffic from
204              Google, Bing, Yahoo and other search engines. A successful SEO
205              specialist must keep up-to-date with the latest industry best
206              practices and work closely with editorial and marketing teams to
207              develop a successful organic search strategy. Responsibilities
208              Optimize copy and landing pages for search engine optimization
209              Perform ongoing keyword research and discovery, expansion and
210              optimization Research and implement search engine optimization
211              recommendations on the website Research and analyze competitor
212              content and links Develop and implement link building strategy
213              Work with the development team to ensure SEO best practices are
214              properly implemented on newly developed code Work with editorial
215              and marketing teams to drive SEO in content strategy and creation
216              Work closely with social media team to align social distribution
217              and SEO efforts Recommend changes to website architecture,
218              content, linking and other factors to improve SEO positions for
219              target keywords Skills Proven SEO experience and a track record of
220              success growing organic search traffic and conversions Solid
221              understanding of performance marketing, conversion, and online
222              customer acquisition Up-to-date with the latest trends and best
223              practices in SEO and inbound marketing In-depth experience with
224              website analytics tools (e.g, Google Analytics, NetInsight,
225              Omniture, WebTrends) Working knowledge of HTML, CSS, and
226              JavaScript development and constraints Familiarity with content
227              management systems (e.g, Wordpress, Vignette) BS/MS degree in a
228              quantitative, test-driven field Job Type: Part-time Pay: From
229              $20.00 per hour&lt;/span
230            &gt;
231            &lt;span class="less"&gt;Less&lt;/span&gt;
232          &lt;/p&gt;
233        &lt;/div&gt;
234      &lt;/div&gt;
235    &lt;/section&gt;
236    &lt;section class="slide-jobs"&gt;
237      &lt;div class="container-job-slide"&gt;
238        &lt;div class="back-icon"&gt;
239          &lt;div class="line1"&gt;&lt;/div&gt;
240          &lt;div class="line2"&gt;&lt;/div&gt;
241        &lt;/div&gt;
242        &lt;h1&gt;SEO Specialist Needed&lt;/h1&gt;
243        &lt;div class="job-description-slide"&gt;
244          &lt;span class="green-h3"&gt;SEO Specialist Needed&lt;/span&gt;
245          &lt;h4&gt;
246            Fixed-price - Expert - Est. Budget: 400$ - Posted 46 minutes ago
247          &lt;/h4&gt;
248          &lt;p&gt;
249            Job Description Hello! Our small digital advertising company needs
250            someone that's starting out in their career that is **VERY** capable
251            in SEO and web development. Must be able to do a video call and
252            operate in US Eastern Time. Also must be comfortable with Wordpress.
253            If you also have some graphic design background and know about
254            Facebook / Google Ads and could manage those, that's a significant
255            plus. Our team also needs someone that's very comfortable in
256            Wordpress back end HTML / CSS / PHP, and can essentially create a
257            site from visuals provided. Pay is not fantastic YET, but it should
258            be once we really have clients coming through. Must be able to do a
259            video call every now and then, and video interview on front end. Key
260            summary: we need an SEO expert to manage search engine optimization
261            and marketing activities. The SEO Specialist will be responsible for
262            managing all SEO activities such as keyword strategy, content
263            strategy and link building to increase organic search rankings and
264            drive search traffic from Google, Bing, Yahoo and other search
265            engines. A successful SEO specialist must keep up-to-date with the
266            latest industry best practices and work closely with editorial and
267            marketing teams to develop a successful organic search strategy.
268            Responsibilities Optimize copy and landing pages for search engine
269            optimization Perform ongoing keyword research and discovery,
270            expansion and optimization Research and implement search engine
271            optimization recommendations on the website Research and analyze
272            competitor content and links Develop and implement link building
273            strategy Work with the development team to ensure SEO best practices
274            are properly implemented on newly developed code Work with editorial
275            and marketing teams to drive SEO in content strategy and creation
276            Work closely with social media team to align social distribution and
277            SEO efforts Recommend changes to website architecture, content,
278            linking and other factors to improve SEO positions for target
279            keywords Skills Proven SEO experience and a track record of success
280            growing organic search traffic and conversions Solid understanding
281            of performance marketing, conversion, and online customer
282            acquisition Up-to-date with the latest trends and best practices in
283            SEO and inbound marketing In-depth experience with website analytics
284            tools (e.g, Google Analytics, NetInsight, Omniture, WebTrends)
285            Working knowledge of HTML, CSS, and JavaScript development and
286            constraints Familiarity with content management systems (e.g,
287            Wordpress, Vignette) BS/MS degree in a quantitative, test-driven
288            field Job Type: Part-time Pay: From $20.00 per hour
289          &lt;/p&gt;
290        &lt;/div&gt;
291      &lt;/div&gt;
292    &lt;/section&gt;htag.style.borderBottom = `1.5px solid green`
293// should be
294htag.style.borderBottom = '1.5px solid green'
295headingTag.addEventListener('click', () =&gt; {
296  document.body.setAttribute(&quot;data-theme&quot;, &quot;blur&quot;);
297  slidingContent.style.transform = &quot;translateX(0)&quot;;
298  slidingContent.style.display = 'block';
299})
300
301backIcon.addEventListener('click', () =&gt; {
302  slidingContent.style.transform = &quot;translateX(120%)&quot;;
303  document.body.removeAttribute(&quot;data-theme&quot;, &quot;blur&quot;);
304});
305

About your 2nd issue, this line you see is actually a margin from h1 tag inside the sliding content so just add this to remove it:

1const jobContainer = document.querySelector('.job-description');
2let htag = document.querySelector('.green-h3');
3function changeCol() {
4    htag = document.querySelector('.green-h3');
5    htag.style.color = "green"
6}
7
8function normalCol() {
9    let htag = document.querySelector('.green-h3');
10    htag.style.color = "black"
11    htag.style.borderBottom = `none`
12}
13
14htag.addEventListener('mouseover', ()=&gt; {
15    htag.style.borderBottom = `1.5px solid green`
16});
17
18
19
20// show more
21let hiddenInfo = document.querySelector('.by-default-hidden');
22let more = document.querySelector('.more');
23let less = document.querySelector('.less');
24less.style.display = 'none'
25more.addEventListener('click', ()=&gt; {
26    hiddenInfo.style.display = 'inline'
27    more.style.display = 'none'
28    less.style.display = 'inline'
29})
30
31less.addEventListener('click', ()=&gt; {
32    hiddenInfo.style.display = 'none'
33    more.style.display = 'inline'
34    less.style.display = 'none'
35})
36
37
38// sliding
39
40let headingTag = document.querySelector('.green-h3');
41let slidingParent = document.querySelector('.container-job-slide')
42let slidingContent = document.querySelector('.slide-jobs');
43let jobSectionmain = document.querySelector('.jobs');
44let backIcon = document.querySelector('.back-icon');
45headingTag.addEventListener('click', ()=&gt; {
46    
47    document.body.setAttribute("data-theme", "blur")
48    if (headingTag) {
49        slidingContent.style.display = 'block';
50    } else {
51        slidingContent.style.display = 'none';
52    }
53})
54
55backIcon.addEventListener('click', ()=&gt; {
56    slidingContent.style.transform = `translateX(120%)`;
57    document.body.removeAttribute("data-theme", "blur");
58});body {
59    max-width: 990px;
60    overflow-x: hidden;
61    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
62    background-color: #F1F2F4;
63    margin: 0 auto;
64}
65
66body[data-theme="blur"] {
67    background-color: rgb(87, 87, 87);
68}
69
70
71.jobs {
72    position: relative;
73}
74
75.container-job {
76    max-width: 630px;
77    position: relative;
78}
79
80
81h1 {
82    padding: 20px 10px 20px 40px;
83    background-color: white ;
84}
85
86.job-description {
87    margin-top: -20px;
88    border-top: 1px solid rgb(194, 194, 194);
89    padding: 20px 20px 20px 40px;
90    background-color: white;
91    color: #656565;
92}
93
94.job-description:hover{
95    color: black;
96    background-color: #F9F9F9;
97    cursor: pointer;
98}
99.more,.less {
100    color: green;
101}
102.more:hover,.less:hover {
103    border-bottom: 1.5px solid green;
104    cursor: pointer;
105}
106.green-h3 {
107    font-size: 1.2rem;
108}
109
110.green-h3:hover  {
111    border-bottom: 1.5px solid green;
112}
113
114.by-default-hidden {
115    display: none;
116}
117
118/* slide jobs */
119
120.slide-jobs {
121    top: 0;
122    position: absolute;
123    /* */
124    display: none;
125    right: 5%;
126    width: 80%;
127    transition: all .4s;
128    animation: slide .4s ease-in;
129}
130@keyframes slide {
131    from {
132        transform: translateX(100%); 
133    }
134    to {
135        transform: translateX(0); 
136    }
137}
138/* .backSlide {
139    animation: backSlide .4s ease-in;
140}
141
142@keyframes backSlide {
143    from{
144        transform: translateX(0%);
145    } 
146    to {
147        transform: translateX(120%);
148    }
149} */
150
151.job-description-slide {
152    margin-top: -20px;
153    border-top: 1px solid rgb(194, 194, 194);
154    padding: 20px 20px 20px 40px;
155    background-color: white;
156}
157.back-icon div{
158    height: 4px;
159    width: 20px;
160    margin: 5px;
161    background-color: green;
162    cursor: pointer;
163}
164.back-icon {
165    background-color: white;
166    padding: 25px;
167}
168.line1 {
169    transform: rotate(-30deg);
170}
171.line2 {
172    transform: rotate(30deg);
173}&lt;section class="jobs"&gt;
174      &lt;div class="container-job"&gt;
175        &lt;h1&gt;My Feed&lt;/h1&gt;
176        &lt;div
177          onmouseover="changeCol();"
178          onmouseout="normalCol()"
179          class="job-description"
180        &gt;
181          &lt;span class="green-h3"&gt;SEO Specialist Needed&lt;/span&gt;
182          &lt;h4&gt;
183            Fixed-price - Expert - Est. Budget: 400$ - Posted 46 minutes ago
184          &lt;/h4&gt;
185          &lt;p&gt;
186            Job Description Hello! Our small digital advertising company needs
187            someone that's starting out in their career that is **VERY** capable
188            in SEO and web development. Must be able to do a video call and
189            operate in US Eastern Time. Also must be comfortable with Wordpress.
190            If you also have some graphic design background and know about
191            Facebook / Google Ads and could manage those, that's a
192            &lt;span class="more"&gt;more&lt;/span&gt;
193            &lt;span class="by-default-hidden"
194              &gt;significant plus. Our team also needs someone that's very
195              comfortable in Wordpress back end HTML / CSS / PHP, and can
196              essentially create a site from visuals provided. Pay is not
197              fantastic YET, but it should be once we really have clients coming
198              through. Must be able to do a video call every now and then, and
199              video interview on front end. Key summary: we need an SEO expert
200              to manage search engine optimization and marketing activities. The
201              SEO Specialist will be responsible for managing all SEO activities
202              such as keyword strategy, content strategy and link building to
203              increase organic search rankings and drive search traffic from
204              Google, Bing, Yahoo and other search engines. A successful SEO
205              specialist must keep up-to-date with the latest industry best
206              practices and work closely with editorial and marketing teams to
207              develop a successful organic search strategy. Responsibilities
208              Optimize copy and landing pages for search engine optimization
209              Perform ongoing keyword research and discovery, expansion and
210              optimization Research and implement search engine optimization
211              recommendations on the website Research and analyze competitor
212              content and links Develop and implement link building strategy
213              Work with the development team to ensure SEO best practices are
214              properly implemented on newly developed code Work with editorial
215              and marketing teams to drive SEO in content strategy and creation
216              Work closely with social media team to align social distribution
217              and SEO efforts Recommend changes to website architecture,
218              content, linking and other factors to improve SEO positions for
219              target keywords Skills Proven SEO experience and a track record of
220              success growing organic search traffic and conversions Solid
221              understanding of performance marketing, conversion, and online
222              customer acquisition Up-to-date with the latest trends and best
223              practices in SEO and inbound marketing In-depth experience with
224              website analytics tools (e.g, Google Analytics, NetInsight,
225              Omniture, WebTrends) Working knowledge of HTML, CSS, and
226              JavaScript development and constraints Familiarity with content
227              management systems (e.g, Wordpress, Vignette) BS/MS degree in a
228              quantitative, test-driven field Job Type: Part-time Pay: From
229              $20.00 per hour&lt;/span
230            &gt;
231            &lt;span class="less"&gt;Less&lt;/span&gt;
232          &lt;/p&gt;
233        &lt;/div&gt;
234      &lt;/div&gt;
235    &lt;/section&gt;
236    &lt;section class="slide-jobs"&gt;
237      &lt;div class="container-job-slide"&gt;
238        &lt;div class="back-icon"&gt;
239          &lt;div class="line1"&gt;&lt;/div&gt;
240          &lt;div class="line2"&gt;&lt;/div&gt;
241        &lt;/div&gt;
242        &lt;h1&gt;SEO Specialist Needed&lt;/h1&gt;
243        &lt;div class="job-description-slide"&gt;
244          &lt;span class="green-h3"&gt;SEO Specialist Needed&lt;/span&gt;
245          &lt;h4&gt;
246            Fixed-price - Expert - Est. Budget: 400$ - Posted 46 minutes ago
247          &lt;/h4&gt;
248          &lt;p&gt;
249            Job Description Hello! Our small digital advertising company needs
250            someone that's starting out in their career that is **VERY** capable
251            in SEO and web development. Must be able to do a video call and
252            operate in US Eastern Time. Also must be comfortable with Wordpress.
253            If you also have some graphic design background and know about
254            Facebook / Google Ads and could manage those, that's a significant
255            plus. Our team also needs someone that's very comfortable in
256            Wordpress back end HTML / CSS / PHP, and can essentially create a
257            site from visuals provided. Pay is not fantastic YET, but it should
258            be once we really have clients coming through. Must be able to do a
259            video call every now and then, and video interview on front end. Key
260            summary: we need an SEO expert to manage search engine optimization
261            and marketing activities. The SEO Specialist will be responsible for
262            managing all SEO activities such as keyword strategy, content
263            strategy and link building to increase organic search rankings and
264            drive search traffic from Google, Bing, Yahoo and other search
265            engines. A successful SEO specialist must keep up-to-date with the
266            latest industry best practices and work closely with editorial and
267            marketing teams to develop a successful organic search strategy.
268            Responsibilities Optimize copy and landing pages for search engine
269            optimization Perform ongoing keyword research and discovery,
270            expansion and optimization Research and implement search engine
271            optimization recommendations on the website Research and analyze
272            competitor content and links Develop and implement link building
273            strategy Work with the development team to ensure SEO best practices
274            are properly implemented on newly developed code Work with editorial
275            and marketing teams to drive SEO in content strategy and creation
276            Work closely with social media team to align social distribution and
277            SEO efforts Recommend changes to website architecture, content,
278            linking and other factors to improve SEO positions for target
279            keywords Skills Proven SEO experience and a track record of success
280            growing organic search traffic and conversions Solid understanding
281            of performance marketing, conversion, and online customer
282            acquisition Up-to-date with the latest trends and best practices in
283            SEO and inbound marketing In-depth experience with website analytics
284            tools (e.g, Google Analytics, NetInsight, Omniture, WebTrends)
285            Working knowledge of HTML, CSS, and JavaScript development and
286            constraints Familiarity with content management systems (e.g,
287            Wordpress, Vignette) BS/MS degree in a quantitative, test-driven
288            field Job Type: Part-time Pay: From $20.00 per hour
289          &lt;/p&gt;
290        &lt;/div&gt;
291      &lt;/div&gt;
292    &lt;/section&gt;htag.style.borderBottom = `1.5px solid green`
293// should be
294htag.style.borderBottom = '1.5px solid green'
295headingTag.addEventListener('click', () =&gt; {
296  document.body.setAttribute(&quot;data-theme&quot;, &quot;blur&quot;);
297  slidingContent.style.transform = &quot;translateX(0)&quot;;
298  slidingContent.style.display = 'block';
299})
300
301backIcon.addEventListener('click', () =&gt; {
302  slidingContent.style.transform = &quot;translateX(120%)&quot;;
303  document.body.removeAttribute(&quot;data-theme&quot;, &quot;blur&quot;);
304});
305....
306    &lt;/div&gt;
307    // set margin top to 0
308    &lt;h1 style=&quot;margin-top:0!important;&quot;&gt;SEO Specialist Needed&lt;/h1&gt;
309    &lt;div class=&quot;job-description-slide&quot;&gt;
310....
311

Source https://stackoverflow.com/questions/65517680

Community Discussions contain sources that include Stack Exchange Network

Tutorials and Learning Resources in Content Management System

Tutorials and Learning Resources are not available at this moment for Content Management System

Share this Page

share link

Get latest updates on Content Management System