~etalab/code.gouv.fr

1b5ec3e8816f59aa1738b198400c70b1fcf74cff — Bastien Guerry 10 days ago 5739423 + 668be69
Merge branch 'preproduction' into production
2 files changed, 59 insertions(+), 28 deletions(-)

M src/cljs/codegouvfr/core.cljs
M src/cljs/codegouvfr/i18n.cljs
M src/cljs/codegouvfr/core.cljs => src/cljs/codegouvfr/core.cljs +49 -22
@@ 167,6 167,15 @@
                        :href  (str "#/repos?" param "=" k)} k] v})))
            top))))

;; https://gist.github.com/rotaliator/73daca2dc93c586122a0da57189ece13
(defn copy-to-clipboard [val]
  (let [el (js/document.createElement "textarea")]
    (set! (.-value el) val)
    (.appendChild js/document.body el)
    (.select el)
    (js/document.execCommand "copy")
    (.removeChild js/document.body el)))

;; Filters

(defn apply-repos-filters [m]


@@ 599,11 608,13 @@
                     [:a.fr-link
                      {:href   (str "https://archive.softwareheritage.org/browse/origin/" r)
                       :title  (new-tab (i/i lang [:swh-link]) lang)
                       :rel    "noreferrer noopener"
                       :target "_blank"}
                      [:img {:width "18px" :src "/img/swh-logo.png"
                             :alt   "Software Heritage logo"}]]
                     [:a {:href   r
                          :target "_blank"
                          :rel    "noreferrer noopener"
                          :title  (new-tab
                                   (str
                                    (i/i lang [:go-to-repo])


@@ 638,6 649,7 @@
                    {:style {:text-align "center"}}
                    [:a.fr-link
                     {:title  (new-tab (i/i lang [:reuses-expand]) lang)
                      :rel    "noreferrer noopener"
                      :target "_blank"
                      :href   (str r "/network/dependents")}
                     g]]])))]])))


@@ 790,11 802,13 @@
                        [:a.fr-link
                         {:title  (new-tab (i/i lang [:go-to-website]) lang)
                          :target "_blank"
                          :rel    "noreferrer noopener"
                          :href   w}
                         [:img {:src au :width "100%" :alt ""}]])
                      [:img {:src au :width "100%" :alt ""}])]
                   [:td
                    [:a {:target "_blank"
                         :rel    "noreferrer noopener"
                         :title  (new-tab (i/i lang [:go-to-orga]) lang)
                         :href   o} (or n l)]]
                   [:td d]


@@ 881,6 895,7 @@
            [:td
             [:a {:href   l
                  :target "_blank"
                  :rel    "noreferrer noopener"
                  :title  (new-tab (i/i lang [:more-info]) lang)} n]]
            [:td t]
            [:td d]


@@ 908,6 923,7 @@
       [:tr
        [:td [:a {:href   l
                  :target "_blank"
                  :rel    "noreferrer noopener"
                  :title  (new-tab (i/i lang [:more-info]) lang)} n]]
        [:td t]
        [:td d]


@@ 1125,22 1141,7 @@
         [:div.fr-header__service
          [:a {:href "/"} ;; FIXME
           [:p.fr-header__service-title (i/i lang [:index-title])]]
          [:p.fr-header__service-tagline (i/i lang [:index-subtitle])]]]
        [:div.fr-header__tools
         [:div.fr-header__tools-links
          [:ul.fr-links-group   
           [:li
            [:a.fr-link.fr-fi-mail-line
             {:href  "mailto:logiciels-libres@data.gouv.fr"
              :title (i/i lang [:contact-title])}
             (i/i lang [:contact])]]
           [:li
            [:a.fr-link.fr-fi-mail-line.fr-share__link--twitter
             {:href       "https://twitter.com/codegouvfr"
              :aria-label (i/i lang [:twitter-follow])
              :title      (new-tab (i/i lang [:twitter-follow]) lang)
              :target     "_blank"}
             "@codegouvfr"]]]]]]]]
          [:p.fr-header__service-tagline (i/i lang [:index-subtitle])]]]]]]

     ;; Header menu
     [:div#modal-833.fr-header__menu.fr-modal


@@ 1148,7 1149,7 @@
      [:div.fr-container
       [:button.fr-link--close.fr-link
        {:aria-controls "modal-833"} (i/i lang [:close])]
       [:div.fr-header__menu-links {:style {:display "none"}}]
       [:div.fr-header__menu-links]
       [:nav#navigation-832.fr-nav {:role "navigation" :aria-label "Principal"}
        [:ul.fr-nav__list
         [:li.fr-nav__item


@@ 1189,22 1190,48 @@
  [:div.fr-follow
   [:div.fr-container
    [:div.fr-grid-row
     [:div.fr-col-12.fr-col-md-8
     [:div.fr-col-12.fr-col-md-4
      ;; Contact by email
      [:div.fr-follow__special
       [:div
        [:h1.fr-h5.fr-follow__title
         (i/i lang [:contact])
         " "
         [:button.fr-share__link.fr-share__link--copy.fr-text-sm
          {:type     "button"
           :on-click #(do (.stopPropagation %)
                          (copy-to-clipboard "logiciels-libres@data.gouv.fr"))
           :title    (i/i lang [:copy-to-clipboard])}]]
        [:p.fr-text--sm.fr-follow__desc (i/i lang [:contact-title])]
        [:a {:href "mailto:logiciels-libres@data.gouv.fr"}
         [:button.fr-btn {:type "button"} "logiciels-libres@data.gouv.fr"]]]]]
     ;; Subscribe to he newsletter
     [:div.fr-col-12.fr-col-md-5
      [:div.fr-follow__newsletter
       [:div
        [:h1.fr-h5.fr-follow__title (i/i lang [:bluehats])]
        [:p.fr-text--sm.fr-follow__desc (i/i lang [:bluehats-desc])]
        [:p.fr-text--sm.fr-follow__desc
         (i/i lang [:bluehats-desc])]
        [:a
         {:href "https://infolettres.etalab.gouv.fr/subscribe/bluehats@mail.etalab.studio"}
         [:button.fr-btn {:type "button"} (i/i lang [:subscribe])]]]]]
     [:div.fr-col-12.fr-col-md-4
     ;; Follow elsewhere
     [:div.fr-col-12.fr-col-md-3
      [:div.fr-follow__social
       [:p.fr-h5.fr-mb-3v (i/i lang [:follow])]
       [:p.fr-h5.fr-mb-3v (i/i lang [:find-us])]
       [:ul.fr-links-group.fr-links-group--lg
        [:li [:a.fr-link.fr-link--twitter
        [:li [:a.fr-share__link
              {:href       "https://sr.ht/~etalab/"
               :aria-label (i/i lang [:sourcehut-link])
               :title      (new-tab (i/i lang [:sourcehut-link]) lang)
               :rel        "noreferrer noopener"
               :target     "_blank"}
              "SourceHut"]]
        [:li [:a.fr-share__link
              {:href       "https://twitter.com/codegouvfr"
               :aria-label (i/i lang [:twitter-follow])
               :title      (new-tab (i/i lang [:twitter-follow]) lang)
               :rel        "noreferrer noopener"
               :target     "_blank"}
              "Twitter"]]]]]]]])


M src/cljs/codegouvfr/i18n.cljs => src/cljs/codegouvfr/i18n.cljs +10 -6
@@ 29,7 29,8 @@
    :browse-repos-orga             "Voir la liste des dépôts de cette organisation ou de ce groupe"
    :close                         "Fermer"
    :contact                       "Contact"
    :contact-title                 "Suivez ce lien pour nous envoyer un courriel."
    :contact-title                 "N'hésitez pas à nous écrire en suivant ce lien, nous tâchons de répondre dans la journée."
    :copy-to-clipboard             "Copier notre adresse de courriel dans le presse-papier"
    :created-at                    "Création"
    :dep                           " dépendance"
    :deps                          " dépendances"


@@ 37,7 38,7 @@
    :description                   "Description"
    :distribution-by-platform      "Répartition par plateforme"
    :download                      "Télécharger"
    :follow                        "Suivez-nous"
    :find-us                       "Retrouvez-nous"
    :footer-desc                   "Ce site est géré par "
    :footer-desc-link              "le pôle logiciels libres d'Etalab."
    :forks                         "Forks"


@@ 103,6 104,7 @@
    :reuses-expand                 "Réutilisations dans d'autres dépôts ou paquetages"
    :rss-feed                      "Flux RSS"
    :sitemap                       "Pages du site"
    :sourcehut-link                "Retrouvez nos codes sources sur SourceHut"
    :sorry                         "Désolé !"
    :sort                          "Trier"
    :sort-description-length       "Trier par longueur de description"


@@ 122,7 124,7 @@
    :subscribe-rss-flux            "S'abonner au flux RSS des derniers dépôts"
    :swh-link                      "Lien vers l'archive faite par Software Heritage"
    :switch-lang                   "Switch to english"
    :twitter-follow                "Suivez-nous sur Twitter !"
    :twitter-follow                "Suivez-nous sur Twitter"
    :type                          "Type"
    :under-license                 " sous licence "
    :understand-tech-terms         "Comprendre les termes techniques de ce site"


@@ 149,7 151,8 @@
    :browse-repos-orga             "See the list of repositories from this organization or group"
    :close                         "Close"
    :contact                       "Contact"
    :contact-title                 "Follow this link to send us an email."
    :contact-title                 "Don't hesitate to email us by following this link, we try to answer within a day."
    :copy-to-clipboard             "Copy our email address to the clipboard"
    :created-at                    "Created"
    :dep                           " dependency"
    :deps                          " dependencies"


@@ 157,7 160,7 @@
    :description                   "Description"
    :distribution-by-platform      "Distribution per platform"
    :download                      "Download"
    :follow                        "Follow us"
    :find-us                       "Follow us"
    :footer-desc                   "This website is maintained by "
    :footer-desc-link              "the free software pole at Etalab."
    :forks                         "Forks"


@@ 223,6 226,7 @@
    :reuses-expand                 "Reuses in other repositories or packages"
    :rss-feed                      "RSS feed"
    :sitemap                       "Sitemap"
    :sourcehut-link                "Find our source code on SourceHut"
    :sorry                         "Sorry!"
    :sort                          "Sort"
    :sort-description-length       "Sort by description length"


@@ 242,7 246,7 @@
    :subscribe-rss-flux            "Subscribe to our RSS feed to receive information about the latest repositories!"
    :swh-link                      "A link to the Software Heritage archive"
    :switch-lang                   "Ce site en français"
    :twitter-follow                "Follow us on Twitter!"
    :twitter-follow                "Follow us on Twitter"
    :type                          "Type"
    :under-license                 " licensed "
    :understand-tech-terms         "A glossary to understand the technical terms used on this website"