掌上百科 - PDAWIKI

 找回密码
 免费注册

QQ登录

只需一步,快速开始

查看: 2739|回复: 6

[经验交流] [2] 通过 article-style.css 调整跳转词典 JumpToDicts

[复制链接]
  • TA的每日心情
    慵懒
    3 天前
  • 签到天数: 214 天

    [LV.7]常住居民III

    发表于 2017-9-21 05:05:21 | 显示全部楼层 |阅读模式
    本帖最后由 deeke 于 2017-10-10 23:38 编辑
    / ?$ k/ N0 b% F& D* F
    ) l- ?$ w8 t$ L$ V6 W* R6 T8 [170928:更换图例。' f: ^8 N' O9 S2 p( G6 c
    ------------------------------------------
    " l+ S5 f5 o* @+ l! O8 v! k# }/ ^" e! C. r# z
    ------------------------------------------
    - `& z  x: R+ ?3 |) H感谢 ryuya 制作、分享的跳转词典,和 GD 自带的构词法各有用处。
      t" D) d/ n: B# I3 j7 y5 u1 f# ?JumpToDicts 3.0 (英語構詞法詞典)
    * V# w8 ~* I% Q0 f) q& `  ~JumpToDicts (phrase version add-ons)! s2 N' m+ v- _: c6 Z; J
    我的软件环境是:Win8.1 + GoldenDict_Qt5_x64_portable
    0 }  t( l; E* L! N5 l% H# i
    2 S; h4 m( S, D词典没有外置 css 文件,所以通过 article-style.css 来曲线修改。直接修改 mdx 文件更方便快捷,但是我们就要在平坦的道路上曲折前进。9 Z, C9 L$ m( o( }( \+ n2 B" |
    根据来源不同,外框有四种颜色,此信息体现在小箭头( u279C )上,并保持一致。
    # M  a& Q, v1 l  G0 a! B1 g- v8 F( ]6 P7 O+ }- z
    1. 在 GD 里找出词典编号。
    : q2 m2 u! l. Y& G" S+ _! [- J- ]7 P鼠标右键“审查元素”,或直接按 F12 。每台电脑的词典编号并不相同。/ o7 b. J) T5 N6 B
    1. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 对应 JumpToDicts 3.0
      7 u' T) X# u# o9 Y
    2. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 对应 JumpToDicts (phrase version add-ons)
    复制代码
    ; D7 r) ]# @" P) ^+ @9 z4 U

    / R- A: W* t. ^! }2. 修改 GD 的配置文件:“ c:\...\GoldenDict\portable\article-style.css ” 。
    . h2 M, u# @2 c+ t: [
    1. /* JumpToDicts | Start */
      , [/ c9 u( E$ s: [
    2. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div,
      ( ?) w3 }0 b" m
    3. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div {
      8 e& Y" o  J6 m& z
    4.   font-family: Lato, sans-serif !important;
      % D  W, J1 Z; J/ R+ T  A- j
    5.   font-size: .625rem !important;
      6 B8 U: ^" H6 E( W+ V
    6.   font-weight: normal !important;0 P; t/ L$ ^; B" e$ T# T8 X
    7.   font-style: italic;
      , M, `) a4 O7 ~
    8.   width: auto !important;) W6 q! ^1 t% U2 J/ ?% D" k8 g
    9.   padding: 0 !important;
      ( P: U0 p* {, o6 [4 H! D' @. }
    10.   color: gray !important;  k. {) Q1 b8 ~; k6 P) l) ~% h. {
    11.   border: none !important;9 X# D, @5 I9 B2 d' z: _* E
    12.   border-radius: 0 !important;
      ! z9 }3 x6 h; _7 Q+ _; n& B# c- p3 l
    13.   background-color: transparent !important;
      - `- r" _; a/ K" c- Z
    14.   box-shadow: none !important;
        p. Y/ O1 o, {
    15.   vertical-align: baseline !important;
      , s* r8 D2 j; b! d+ `
    16. }
      6 D0 b  E9 X/ X) L( c% M0 L( ~
    17. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div::before,. g3 M9 j4 N# C+ _  U
    18. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div::before {  i; h, {! C# R0 p5 w& M" D4 q
    19.   font-family: "Segoe UI Symbol";3 _5 P( h* Q  q* Q  M$ L
    20.   font-size: .5rem;
      , t$ y5 @' m/ i7 _2 i
    21.   font-style: normal;
      3 O3 {4 W( Z) H
    22.   line-height: 0;1 h5 Y: Z0 v6 @+ ^
    23.   position: relative;
      0 i6 m4 G3 ^6 D( Y
    24.   bottom: .0425rem;
      5 Z1 W" L% a) ~- G
    25.   margin-right: .23rem;
      & i- }- x- N4 i
    26.   content: "\279C";
      1 j: u; T$ F6 l5 F, u
    27.   vertical-align: baseline;% v* L, Q7 Z7 k) ~  x+ {5 B
    28.   color: green;6 J5 T1 J2 J- o9 ^3 _/ R: ~
    29. }
      6 b/ F" v: [7 s% W1 Z
    30. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.MW::before { color: orange; }
      ) _; W' B/ H' {. e( ^' p" u
    31. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.O8::before { color: deeppink; }
      , o( ?" u! t: @, K  n# @1 H
    32. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.spell::before { color: #444444; }
      " d; k4 Y- x, g; W) \
    33. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div.phrase::before { color: #1E8BB7; }9 T+ R) [. w- a1 |
    34. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>br,: l3 Q, W) d% w5 [5 A/ I, ^
    35. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>br { display: none; }
      3 L/ r  L: W- ]7 H- S2 W- r6 O
    36. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>hr,
      1 h1 g9 G5 n' ?* R
    37. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>hr { margin: .1rem !important; }" b9 Z4 `+ x$ P( q9 X7 W
    38. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a,, A! b# {# i' f: @7 E
    39. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a {
      3 a. r  d/ p. y, @7 W! I. s/ U
    40.   font-size: .875rem !important;/ A2 n, }; U9 L/ z4 T
    41.   font-weight: bold !important;6 G7 g) [- s% V7 |' U
    42.   font-style: normal !important;* P+ z( i- W8 e! V4 r9 P8 F
    43.   margin: auto .23rem !important;% t1 I, q2 K5 B
    44.   text-decoration: none !important;
      7 S# ^; j- X7 s' q
    45.   color: black !important;/ F- U( B4 F6 o# w6 @( u; J9 Y4 P
    46.   border-bottom: .08rem solid transparent !important;2 B  J6 \/ A9 K6 c$ U
    47.   outline: none !important;9 A0 B4 J5 |8 R6 y
    48. }
      + _' z4 Y/ R* v
    49. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:link,8 y3 w  g; `4 X& b- X! B# K2 o
    50. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:link,8 ^4 P& \5 E+ d9 h
    51. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:visited,# V7 N& y: \6 U4 H
    52. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:visited { color: black !important; }
      0 b8 y* B! |' m
    53. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:hover,
      ) Y; Y4 p' U( \% o! `. z
    54. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:hover,
      8 f; Q' |- ~  p' ~, ~& u
    55. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:active,, O: b3 [' O4 h1 \+ [8 T1 h
    56. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:active {( s9 C4 O. A/ w' Z( X
    57.   color: black !important;
      5 Y! ?0 s3 C% O
    58.   border-bottom-color: black !important;$ U: k2 y. B$ x
    59.   background-color: yellow !important;
      0 ?' M/ Y) B1 b& m! E
    60. }5 V4 K' s* t6 C1 r5 t8 T
    61. /* JumpToDicts | End */
    复制代码
    6 S5 C+ z  [$ `. H- {
    ------------------------------------------! o8 k( s6 d9 ]1 E6 z! w
    修改 dsl 词典的展开按钮& Y1 h# w0 {( M8 u3 q

      x. g) f8 I3 I+ V0 T1. 在网上找两个图片表示展开、折叠,改名为 expand.png  、 collapse.png  。$ }5 P' Z1 ~% T7 Q( \
    放入文件夹:“ c:\...\GoldenDict\portable\icons\ ”备用。
    $ ]6 c' F/ _# b: c( K% p4 d* ]9 `$ E- _
    2. 修改 GD 的配置文件:“ c:\...\GoldenDict\portable\article-style.css ”。
    , i1 }* U" t# Z9 _3 f+ G: [7 q调整各种 前后左右、高矮胖瘦。% p, O* U% P# b; x2 i/ C& u8 ~8 g4 G
    1. .dsl_headwords img[src$="expand_opt.png"] { content: url("file:///icons/expand.png"); }. b. M+ }& [; ^3 @
    2. .dsl_headwords img[src$="collapse_opt.png"] { content: url("file:///icons/collapse.png"); }
      . g, Y1 I- [% k* c+ j& Y
    3. .dsl_headwords img[src$="expand_opt.png"],
      ( ~1 S& y7 j9 h, Y- I+ e3 c1 t& F0 m
    4. .dsl_headwords img[src$="collapse_opt.png"] {$ n2 C7 u; k0 L0 _/ ^+ q1 l8 u
    5.   line-height: 0 !important;
      3 h9 a  x1 [. y4 m" M1 T
    6.   position: relative;# C$ i: C& n, S# ?, G$ g
    7.   bottom: .125rem;8 s- E* o/ e9 j  T, l
    8.   left: .475rem;& p2 C# h7 g4 B1 U9 s" B! J# S
    9.   width: .75rem;
      5 W4 W8 z& D8 |' A0 Z" q
    10.   height: .75rem;$ Y' g6 U4 u- _  I
    11. }
    复制代码
    5 M; Q- j  G# j0 w/ X$ D/ W
    ------------------------------------------- a7 t  Z  ~7 N% J2 o+ N$ m

    ! q( s# F, n+ n9 g4 Q% D8 K搞定收工,试试看外链的图床效果如何。别忘了帮我评分呦~~~

    评分

    3

    查看全部评分

    本帖被以下淘专辑推荐:

    • · 工具|主题: 61, 订阅: 28
  • TA的每日心情

    2019-9-20 08:37
  • 签到天数: 214 天

    [LV.7]常住居民III

    发表于 2017-9-21 08:27:21 | 显示全部楼层
    GoldenDict_Qt5_x64_portable 这种词典是不是只能放在portable目录??

    点评

    不是,比如我词典文件放在 c:\Dicts\ ,把这个文件夹的快捷方式 Dicts.lnk 放在 ...\GoldenDict\content\ 中就可以了。注意不是 mdx 的快捷方式,是文件夹的。  发表于 2017-9-21 10:20
  • TA的每日心情

    2019-9-20 08:37
  • 签到天数: 214 天

    [LV.7]常住居民III

    发表于 2017-9-21 10:29:45 | 显示全部楼层
    @deeke 好方法!!!!!
  • TA的每日心情
    慵懒
    3 天前
  • 签到天数: 214 天

    [LV.7]常住居民III

     楼主| 发表于 2017-9-21 10:37:42 | 显示全部楼层
    HMPT 发表于 2017-9-21 10:29
    8 c( K8 E+ h  d@deeke 好方法!!!!!

    " L# k+ o1 p/ h  P我比较晚才开始用 GD ,都是从置顶的经验贴学来的。

    该用户从未签到

    发表于 2019-1-9 16:27:04 | 显示全部楼层
    谢谢,才知道把词典目录的快捷方式放在content那里也可以。
  • TA的每日心情
    开心
    2019-5-28 07:39
  • 签到天数: 339 天

    [LV.8]以坛为家I

    发表于 2019-4-12 16:25:44 | 显示全部楼层
    请问,直接修改mdx文件,怎么实现?
    / ^" c! C/ s9 w0 O3 d* u两个词典放在一个文件夹下。手机深蓝词典。. `8 o  s$ _6 ]5 _6 _0 E' N
    谢谢!
    您需要登录后才可以回帖 登录 | 免费注册

    本版积分规则

    小黑屋|手机版|Archiver|PDAWIKI |网站地图

    GMT+8, 2024-5-18 06:10 , Processed in 0.057376 second(s), 15 queries , MemCache On.

    Powered by Discuz! X3.4

    Copyright © 2001-2023, Tencent Cloud.

    快速回复 返回顶部 返回列表